polkadot-js / api

Promise and RxJS APIs around Polkadot and Substrate based chains via RPC calls. It is dynamically generated based on what the Substrate runtime provides in terms of metadata.
Apache License 2.0
1.06k stars 350 forks source link

Polkadot JS (hence contracts-ui) sees contract message only as `read` #5575

Open Daanvdplas opened 1 year ago

Daanvdplas commented 1 year ago

I build a contract where an #[ink(message)] calls a second (and different) contract's #[ink(message)] that calls a third (and different) contract's #[ink(message)].

Everything works, based on my e2e-tests and interacting with the contract through the CLI. Yet when I try to interact with the contract through Polkadot JS it sees the above mentioned message as read while it should be execute: Screenshot 2023-04-02 at 17 23 06

Link to the repo: https://github.com/Daanvdplas/Ink/tree/main/my_contracts/delegator Link to the #[ink(message)]: https://github.com/Daanvdplas/Ink/blob/14195b4a9645b42be65ea04c8f75787d7b9f8a36/my_contracts/delegator/lib.rs#L76

jacogr commented 1 year ago

PRs very welcome.

This is completely out of my wheelhouse, never compiled an ink contract and also not familiar as to how the interactions would work.