It is not inheritance, it is called supertrait. It is a bound for the trait that if someone implements your CustomErc20
, he also should implement the Erc20
trait.
ink! right now doesn't support it(your error says to you about it). Maybe it will be fixed during this issue or this.
You can use openbrush::trait_definition
macro that allows adding bounds. But you need to use it in combination with the openbrush::contract
macro(instead of ink::contract
).
Right now, OpenBrush allows adding any bounds(defined with openbrush::trait_definition
, ink::trait_definition
and common rust traits). But in the next release, OpenBursh will allow adding only bounds defined via openbrush::trait_definition
. It is because traits defined with the trait_definition
macro are public and should not use bounds related to a specific language or implementation.