L1X VM-EVM Cross Contract Calls
L1X VM-EVM Cross Contract Calls Process Flow:
Client Submission:
Initiates contract deployment.
Initializes the contract.
Makes a function call to the L1X core (via the L1X node).
Contract Identification by L1X Core:
The L1X core discerns the type of contract from three possible options:
L1XVM
,EVM
, andXTALK
.
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.
Interaction with the EVMSyncApi:
The
EVMSyncApi
invokes the above functions (execute_evm_contract_deployment
andexecute_contract_function_call
) provided by theEVMContractCallTrait
.
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