-
Notifications
You must be signed in to change notification settings - Fork 426
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
Cross contract calling produces unsupported code #2172
Comments
By default the cross contract calls via traits will call into the new The aleph zero node likely does not support the You need to do something like the following to call: let mut psp22: contract_ref!(PSP22) = AccountId::from(token.bytes).into();
let psp22_builder = erc20.call_mut();
psp22_builder
.transfer_from(
AccountId::from(user.bytes),
self.env().account_id(),
amount,
[].to_vec(),
)
.call_v1()
.invoke() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a contract with a function
deposit
, which has the following cross-contract calling inside:PSP22
is declared as a trait with#[ink::trait_definition]
I'm running local env of aleph zero node
And when I upload code using
cargo upload
I get:The node logs produce the following error
It works well when I use
CallBuilder
The text was updated successfully, but these errors were encountered: