Open
Description
ink! doesn't support generics and default implementation inside of trait definition. It causes us to introduce a separate trait Erc20
on rust level with a default implementation and reuse it in the impl section. It causes the user to declare the implementation of two traits.
impl Erc20 for Erc20Struct {}
impl IErc20 for Erc20Struct {
#[ink(message)]
fn token_name(&self) -> Option<String> {
Erc20::token_name(self)
}
...
}
instead of
impl IErc20 for Erc20Struct {
#[ink(message)]
fn token_name(&self) -> Option<String> {
IErc20::token_name(self)
}
...
}