Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ethers for abi coding #1277

Merged
merged 9 commits into from
Apr 26, 2018
Merged

Use ethers for abi coding #1277

merged 9 commits into from
Apr 26, 2018

Conversation

yann300
Copy link
Collaborator

@yann300 yann300 commented Apr 25, 2018

  • improve browser testing
  • adapt return values to match ethers.js decoded value in browser test

@yann300 yann300 added the review label Apr 25, 2018
@yann300 yann300 requested a review from ninabreznik April 25, 2018 10:17
@yann300 yann300 force-pushed the useEthersForAbiCoding branch from ac78d63 to dea6cca Compare April 26, 2018 13:08
@yann300 yann300 force-pushed the useEthersForAbiCoding branch from cad456c to 85c724d Compare April 26, 2018 14:59
@@ -108,6 +108,7 @@ function verifyCallReturnValue (browser, address, checks, done) {
}
return ret
}, [address], function (result) {
console.log(result)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to leave console.log in?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no right better to remove it

client.getText('#editor-container div[class^="terminal"] span[id="tx' + txHash + '"] table[class^="txTable"] #decodedoutput', (result) => {
console.log(result)
var equal = deepequal(JSON.parse(result.value), JSON.parse(expectedReturn))
if (!equal) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good!

@@ -16,7 +16,7 @@ module.exports = {
.clickFunction('getFromLib - call')
.waitForElementPresent('div[class^="contractActionsContainer"] div[class^="value"] ul')
.perform((client, done) => {
contractHelper.verifyCallReturnValue(browser, '0x35ef07393b57464e93deb59175ff72e6499450cf', ['0: uint256: 1', '0: uint256: 3456', '0: address: 0x35ef07393b57464e93deb59175ff72e6499450cf'], () => {
contractHelper.verifyCallReturnValue(browser, '0x35ef07393b57464e93deb59175ff72e6499450cf', ['0: uint256: 1', '0: uint256: 3456', '0: address: 0x35eF07393b57464e93dEB59175fF72E6499450cF'], () => {
Copy link
Contributor

@ninabreznik ninabreznik Apr 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part I don't quite understand - why are some letters capitalized?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the old decoder would just return basic hex number, the new one take care of returning a valid checksum address

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Very helpful.

@yann300 yann300 merged commit 4a71d9d into master Apr 26, 2018
@yann300 yann300 removed the review label Apr 26, 2018
@axic axic deleted the useEthersForAbiCoding branch September 19, 2018 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants