You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
c = new web3.eth.Contract([{"constant":true,"inputs":[{"name":"a","type":"bytes32"},{"name":"b","type":"bytes32"}],"name":"bIsWrong","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function","stateMutability":"view"}])
c.methods.bIsWrong('a'.repeat(64), 'b'.repeat(64)).encodeABI()
returns 0x020e2724aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
which is fine
c.methods.bIsWrong('a'.repeat(65), 'b'.repeat(64)).encodeABI()
returns 0x020e2724aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa000000000000000000000000000000000000000000000000000000000000000bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
which is wrong, because second argument gets wrong value a000000000000000000000000000000000000000000000000000000000000000
Expected behaviour is raising error, because first argument exceeded length of specified in ABI type
The text was updated successfully, but these errors were encountered:
c = new web3.eth.Contract([{"constant":true,"inputs":[{"name":"a","type":"bytes32"},{"name":"b","type":"bytes32"}],"name":"bIsWrong","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function","stateMutability":"view"}])
c.methods.bIsWrong('a'.repeat(64), 'b'.repeat(64)).encodeABI()
returns
0x020e2724aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
which is fine
c.methods.bIsWrong('a'.repeat(65), 'b'.repeat(64)).encodeABI()
returns
0x020e2724aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa000000000000000000000000000000000000000000000000000000000000000bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
which is wrong, because second argument gets wrong value
a000000000000000000000000000000000000000000000000000000000000000
Expected behaviour is raising error, because first argument exceeded length of specified in ABI type
The text was updated successfully, but these errors were encountered: