An ERC-20 precompile (like used for Polkadot AssetHub assets) using the prefix matcher and trigger "Address poisoning detected" warnings in wallets like MetaMask (since multiple assets can have addresses with only one/two bytes different).
Another issue is that all non-primitive precompiles have the same CODE constant, so block explorers (like BlockScout) will treat them as having the same interface.
I am thinking that a few changes to the Revive Precompile interface would help with these issues:
- Support an optional dynamic address matcher, which allows doing a storage lookup. (needs to support charging the gas meter or a weight function).
- Allow each precompile to provide its own
CODE value.
I am creating this issue to get feedback on these issues and possible solutions.
An ERC-20 precompile (like used for Polkadot AssetHub assets) using the prefix matcher and trigger "Address poisoning detected" warnings in wallets like MetaMask (since multiple assets can have addresses with only one/two bytes different).
Another issue is that all non-primitive precompiles have the same
CODEconstant, so block explorers (like BlockScout) will treat them as having the same interface.I am thinking that a few changes to the Revive Precompile interface would help with these issues:
CODEvalue.I am creating this issue to get feedback on these issues and possible solutions.