Hi,
I am trying to work with and understand ContractEvents, but im struggling with the deserialization.
My preference would be to get the subquery to work, i succesfully got the contractEvent hash in the handleTransactionEvent handler from this example:
The event looks like this:
fe040000011101000b9090a0967f57684d0b812c9532c4428d56df1ff7ea0aaf33fbb08fc7de554b
My question is how I can deserialize this in the handler so I can work with the object? I have the schema.bin but I dont know how to proceed.
Trying to understand the process i want back a step to this example from the concordium-rust-sdk
I got the transction details out successfully again which looks like:
AccountTransaction(AccountTransactionDetails { cost: Amount { micro_ccd: 14928115 }, sender: AccountAddress([11, 144, 144, 160, 150, 127, 87, 104, 77, 11, 129, 44, 149, 50, 196, 66, 141, 86, 223, 31, 247, 234, 10, 175, 51, 251, 176, 143, 199, 222, 85, 75]), effects: ContractUpdateIssued { effects: [Updated { data: InstanceUpdatedEvent { contract_version: V1, address: ContractAddress { index: 7418, subindex: 0 }, instigator: Account(AccountAddress([11, 144, 144, 160, 150, 127, 87, 104, 77, 11, 129, 44, 149, 50, 196, 66, 141, 86, 223, 31, 247, 234, 10, 175, 51, 251, 176, 143, 199, 222, 85, 75])), amount: Amount { micro_ccd: 0 }, message: OwnedParameter([1, 0, 11, 144, 144, 160, 150, 127, 87, 104, 77, 11, 129, 44, 149, 50, 196, 66, 141, 86, 223, 31, 247, 234, 10, 175, 51, 251, 176, 143, 199, 222, 85, 75, 1, 4, 0, 0, 1, 17, 1, 25, 0, 0, 0, 104, 116, 116, 112, 115, 58, 47, 47, 105, 112, 102, 115, 46, 105, 111, 47, 105, 112, 102, 115, 47, 81, 109, 90, 50]), receive_name: OwnedReceiveName("ciphers_nft.mint"), events: [ContractEvent { bytes: [254, 4, 0, 0, 1, 17, 1, 0, 11, 144, 144, 160, 150, 127, 87, 104, 77, 11, 129, 44, 149, 50, 196, 66, 141, 86, 223, 31, 247, 234, 10, 175, 51, 251, 176, 143, 199, 222, 85, 75] }, ContractEvent { bytes: [0, 4, 0, 0, 1, 17, 1, 0, 0, 0, 108, 17, 135, 63, 140, 1, 0, 0, 25, 0, 104, 116, 116, 112, 115, 58, 47, 47, 105, 112, 102, 115, 46, 105, 111, 47, 105, 112, 102, 115, 47, 81, 109, 90, 50, 0] }] } }] } })
But im struggling again to get the ContractEvent out and deserialize it into a struct/object. Could someone point me in the right direction?
Many thanks!