Replies: 1 comment
-
There isn't really any way to get around this in JavaScript in general though, so nothing that can really be handled at that level. One option is to change the name in the ABI (as the ABI doesn't encode parameter names), so you can use: abi = [ "event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] amounts)" ];
let { operator, from, to, ids, amounts } = e.args; Does that make sense? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
When parsing log with the event TransferBatch of ERC1155
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
let e = iface.parseLog(log);
let { operator, from, to, ids, values } = e.args;
The values here is collided with the functions values() of Javascript Objects
So the return values is a function and not param values, this is unexpected.
Beta Was this translation helpful? Give feedback.
All reactions