L1X VM-EVM Cross Contract Calls

L1X VM-EVM Cross Contract Calls Process Flow:

  1. Client Submission:

    • Initiates contract deployment.

    • Initializes the contract.

    • Makes a function call to the L1X core (via the L1X node).

  2. Contract Identification by L1X Core:

    • The L1X core discerns the type of contract from three possible options: L1XVM, EVM, and XTALK.

  3. Execution via the EVMContractCallTrait:

    • If the contract type is identified as EVM, the EVMContractCallTrait facilitates its interaction with the Ethereum Virtual Machine (EVM) for execution.

    • This trait provides two main functionalities:

      • Contract Deployment: Achieved through the execute_evm_contract_deployment(args..) function.

      • Contract Call: Managed with the execute_evm_contract_call(args...) function.

  4. Interaction with the EVMSyncApi:

    • The EVMSyncApi invokes the above functions (execute_evm_contract_deployment and execute_contract_function_call) provided by the EVMContractCallTrait.

  5. Feedback from EVM:

    • Once the EVM completes the execution, it generates events or results, which are then relayed back to L1XVM.

Interaction with EVM

L1X core uses evm and evm_runtime crates to interact with EVM Following diagram shows how the mint event interacts from L1X VM to L1X-EVM. Core uses Sputnik EVM L1X core has the execution module which facilitates to execute different contract types and can be extended via traits to support different ecosystems.

Deployment flow

Last updated