Ethereum Virtual Machine (EVM) IDENTITY PRECOMPILED CONTRACT
Table of Contents
Introduction
Implementation of the IDENTITY precompiled contract.
Module Contents
Functions
Writes the message data to output. |
Module Details
identity
- identity(evm: ethereum.spurious_dragon.vm.Evm) → None
Writes the message data to output.
- Parameters
evm – The current EVM frame.
def identity(evm: Evm) -> None:
data = evm.message.data
# GAS
word_count = ceil32(Uint(len(data))) // 32
charge_gas(evm, GAS_IDENTITY + GAS_IDENTITY_WORD * word_count)
# OPERATION
evm.output = data