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
I have the following code snippet which works as I expect in v5 (i.e. the parsedLog.args property is indexed by integer position as well as string name)
const ABI = "event Transfer(address indexed from, address indexed to, uint256 value)";
const interface = new ethers.Interface(ABI)
const parsedLog = interface.parseLog(log)
Here is the v5 result (which also includes string keys):
How can I also access the args by their name in v6? The inline documentation for Result implies this should work:
* A [[Result]] is a sub-class of Array, which allows accessing any
* of its values either positionally by its index or, if keys are
* provided by its name.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have the following code snippet which works as I expect in v5 (i.e. the
parsedLog.args
property is indexed by integer position as well as string name)Here is the v5 result (which also includes string keys):
When I use v6 with the same code, the
parsedLog.args
field looks like this (i.e. only position-based index):How can I also access the args by their name in v6? The inline documentation for
Result
implies this should work:Beta Was this translation helpful? Give feedback.
All reactions