api
api copied to clipboard
How to get event args values from contracts::contractemitted data?
- I'm submitting a ...
- [x] Support request
- What is the current behavior and expected behavior?
I am using
const decodedEvent = Abi.decodeEvent(Uint8Array.from(Buffer.from("00000064a7b3b6e00d000000000000000000000000000000000000000000000000", 'hex')))
(00000064a7b3b6e00d000000000000000000000000000000000000000000000000 is the data in the contracts::contractemitted event.)
But I cannot access the actual argument values, only their types. I'd like to be able to access the values when decoding the event. What am I missing?
Currently when accessing the decodedEvent.event.args
, I only see the names and types. Where can I access the values?
Here's the decodedEvent.event.args
- Please tell us about your environment:
-
Version: @polkadot/api-contract": "9.3.3"
-
Environment: Macbook Air m1 chip
- [x] Node.js
-
Language:
- [x] JavaScript