Skip to content

research: precompile call evm in the same session #813

@yihuang

Description

@yihuang

To achieve true interoperability between native code(precompiles) and EVM, native code should be able to call EVM in the same EVM instance.

Precompiles can call the four variant of evm.Call* method to call evm contracts with the current evm instance, but there are a few issues to beware of:

  • Context passing. Precompile should pass the current calling context down the stream.

  • Precompile implementations should deal with re-entrant calls.

Anything else? or is there projects that had did this before that we can take as reference?

Use Cases

Any non-trivial precompile contract will need to be able to call back into EVM world back and force, for example a native DEX that works with ERC20 contracts.

Metadata

Metadata

Assignees

No one assigned

    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