Conversation
|
^ Ready for review! Thanks @maurelian for the guidance 👍 |
| const result = await factory.verifyEIP20.call(newTokenAddr, { from: accounts[0] }); | ||
| assert.strictEqual(result, true, 'the bytecode at newTokenAddr ' | ||
| + 'was not the same as the bytecode of an EIP20 token'); | ||
|
|
There was a problem hiding this comment.
for consistency, would add // verify: new token's address is listed in the isEIP20 mapping
|
|
||
| const { contractAddress } = await web3.eth.getTransactionReceipt(txHash); | ||
| const result = await factory.verifyEIP20.call(contractAddress); | ||
| assert.strictEqual(result, true, 'should have returned true because the bytecode was exact'); |
There was a problem hiding this comment.
This is failing for me. Here's some output from inserting a debugger statement on the line above, and inspecting the run time:
code == EIP20Bytecode
false
code.length
6262
EIP20Bytecode.length
7076
It looks like the hardcoded bytecode above was generated by a different truffle/solc version than the one listed in package.json here.
There was a problem hiding this comment.
I fixed this test by changing line 2 to
const EIP20Bytecode = artifacts.require('EIP20').bytecode;
It feels a bit circular, but it translates to: "does the bytecode from compiling EIP20, match the bytecode deployed by the EIP20Factory".
There was a problem hiding this comment.
This test is also broken when rebased onto staging because the factory is using SafeEIP20 there, so this is dependent on that.
|
made those 2 changes. will wait til #135 gets merged into master then make changes to support |
This PR address #125, adding tests to eip20Factory.js
createdmappingverifyEIP20