-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
yann300
commented
Apr 25, 2018
- improve browser testing
- adapt return values to match ethers.js decoded value in browser test
ac78d63
to
dea6cca
Compare
cad456c
to
85c724d
Compare
test-browser/helpers/contracts.js
Outdated
@@ -108,6 +108,7 @@ function verifyCallReturnValue (browser, address, checks, done) { | |||
} | |||
return ret | |||
}, [address], function (result) { | |||
console.log(result) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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'], () => { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the function is here : https://github.com/ethereumjs/ethereumjs-util/blob/master/docs/index.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Very helpful.