use erc20::Erc20Ref;
use ink_storage::traits::SpreadAllocate;
#[ink(storage)]
#[derive(SpreadAllocate)]
pub struct Bridge {
map: ink_storage::Mapping<AccountId, u32>,
token: Erc20Ref,
}
impl Bridge {
#[ink(constructor)]
pub fn new(token: Erc20Ref) -> Self {
ink_lang::utils::initialize_contract(|contract: &mut Self| {
contract.token = token;
})
}
}
the problem is: the trait ink_storage::traits::SpreadAllocate
is not implemented for erc20::Erc20Ref
Are there ways to make it properly without manual implementation of SpreadAllocate trait?