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
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
[no] I've asked for help in the Truffle Gitter before filing this issue.
Issue
When contract transaction fires event with indexed bytes param truffle fails with an exception
Contract: MetaCoin should send coin correctly:
Uncaught Error: Number can only safely store up to 53 bits
Steps to Reproduce
Make empty dir
Make truffle init in it
Change MetaCoin.sol line 13 to event Transfer(address indexed _from, address indexed _to, uint256 _value, bytes indexed data);
Change MetaCoin.sol line 23 to bytes memory empty; Transfer(msg.sender, receiver, amount, empty);
Execute truffle test
Expected Behavior
Tests should pass
Actual Results
Test fails with error
4 passing (485ms)
1 failing
Contract: MetaCoin should send coin correctly:
Uncaught Error: Number can only safely store up to 53 bits
at assert (C:\Users\User\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:126109:21)
at BN.toNumber (C:\Users\User\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:126609:7)
at C:\Users\User\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:62400:59
at Array.forEach (native)
at decodeParams (C:\Users\User\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:62395:9)
at Object.decodeEvent (C:\Users\User\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:62441:10)
at C:\Users\User\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:205589:38
at Array.map (native)
at Object.decodeLogs (C:\Users\User\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:205559:19)
at Object.callback (C:\Users\User\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:205688:35)
Uncaught Error: Number can only safely store up to 53 bits
at assert (node_modules/truffle/build/cli.bundled.js:123137:21)
at BN.toNumber (node_modules/truffle/build/cli.bundled.js:123637:7)
at node_modules/truffle/build/cli.bundled.js:80331:59
at Array.forEach (<anonymous>)
at decodeParams (node_modules/truffle/build/cli.bundled.js:80327:9)
at Object.decodeEvent (node_modules/truffle/build/cli.bundled.js:80372:10)
at node_modules/truffle/build/cli.bundled.js:207924:38
at Array.map (<anonymous>)
at Object.decodeLogs (node_modules/truffle/build/cli.bundled.js:207895:19)
at Object.callback (node_modules/truffle/build/cli.bundled.js:208023:35)
Hello all, thanks for reporting. This is an issue at the web3 dependency and relates to decoding dynamically sized solidity data types. At the moment, they're not indexable. More discussion on this topic at issue #728.
Issue
When contract transaction fires event with indexed bytes param truffle fails with an exception
Uncaught Error: Number can only safely store up to 53 bits
Steps to Reproduce
truffle init
in itMetaCoin.sol
line 13 toevent Transfer(address indexed _from, address indexed _to, uint256 _value, bytes indexed data);
MetaCoin.sol
line 23 tobytes memory empty; Transfer(msg.sender, receiver, amount, empty);
Expected Behavior
Tests should pass
Actual Results
Test fails with error
Environment
The text was updated successfully, but these errors were encountered: