Skip to content

Precompiles should support flexible address matching and custom CODE value. #280

Description

@Neopallium

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:

  1. Support an optional dynamic address matcher, which allows doing a storage lookup. (needs to support charging the gas meter or a weight function).
  2. Allow each precompile to provide its own CODE value.

I am creating this issue to get feedback on these issues and possible solutions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions