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

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


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


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

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .