-
Notifications
You must be signed in to change notification settings - Fork 369
unable to decode contract events #5583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The actual contract(s) (wasm + Abi or .contract file is just as useful) & used messages/transactions on the contract(s) is missing here. |
Sorry about that! The events from the metadata:
|
Do you have a The |
The contract is in a bit of a tricky state as it's part of many other contracts that are required to be deployed in order for it to function. I'll see if I can put together a trimmed down version that replicates the behaviour. I am using ink |
I would certainly appreciate that. |
Hopefully this should work. I think it's too large for rococo if you're planning to use the contracts ui (works on astar shibuya testnet)
|
Thank you. I'll deploy against a local running Substrate. |
Sorry for being a PITA, could you walk me through the process & transactions to use to test? (It is deployed to a local chain) Thus far I'm stuck at calling Since all balances are 0 I assumed that would be a first step... |
Apologies for the lack of input here - I will update with info |
I think I found the route cause of this error. The problem originates at this line. The problem is that the code assumes that the contract event is generated by the contract that is called directly here. However, this contract can call other contracts and they will also be able to emit events. These events can then not be decoded properly because here only the abi of the directly called contract is used. As an example, I instantiated two contracts at the following addresses:
The first contract calls the second contract. Each contract will emit an event when called. When calling the first contract the runtime will emit the following two relevant events:
The first event is emitted by contract The second event is emitted by contract
|
Errors are being thrown when trying to decode contract events (either automatically via
contractEvents
or manually viaabi.decode
The event I'm calling is from the openbrush PSP34 example
Which is called:
I have tried both with and without topics. I am however able to decode them using
@subsquid/ink-abi
instead of polkadot.js abi.Version: 10.2.2
Environment:
Language:
The text was updated successfully, but these errors were encountered: