Skip to content
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

Contract calls need their return method imported manually #5936

Open
xunilrj opened this issue Apr 30, 2024 · 0 comments
Open

Contract calls need their return method imported manually #5936

xunilrj opened this issue Apr 30, 2024 · 0 comments
Assignees

Comments

@xunilrj
Copy link
Contributor

xunilrj commented Apr 30, 2024

At the moment it is required to manually import the return type of contract calls for their AbiDecode impl to be available. Otherwise. we return a very misleading error message like

abi SomeAbi {
    fn some_method() -> SomeType;
}
...
let abi = Abi(SomeAbi, ....);
abi.some_method();
...
error: Trait "AbiDecode" is not implemented for type "SomeType".

Which means one need to import it like

use SomeLib::SomeType;
@xunilrj xunilrj self-assigned this Apr 30, 2024
@xunilrj xunilrj mentioned this issue Apr 30, 2024
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant