1

I'm trying to call an erc20 contract from another custom erc20 contract.

Both, the original contract and calling contract have the following macros:

#[ink(storage)]
#[derive(SpreadAllocate)]

In the calling contract's struct, we have asset: Erc20Ref,, and facing this error:

the trait bound `Erc20Ref: SpreadAllocate` is not satisfied
the trait `SpreadAllocate` is not implemented for `Erc20Ref`

The Erc20Ref is generated by ink, and I guess it doesn't implement SpreadAllocate. Is there a way to resolve this?

1 Answer 1

2

It is a duplicate of this issue. You can find a workaround there. Soon it will be fixed with storage refactoring.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.