ethereum.tangerine_whistle.vm.precompiled_contracts.identityethereum.spurious_dragon.vm.precompiled_contracts.identity

Ethereum Virtual Machine (EVM) IDENTITY PRECOMPILED CONTRACT ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. contents:: Table of Contents :backlinks: none :local:

Introduction

Implementation of the IDENTITY precompiled contract.

identity

Writes the message data to output.

Parameters

evm : The current EVM frame.

def identity(evm: Evm) -> None:
22
    """
23
    Writes the message data to output.
24
25
    Parameters
26
    ----------
27
    evm :
28
        The current EVM frame.
29
    """
30
    data = evm.message.data
31
32
    # GAS
33
    word_count = ceil32(Uint(len(data))) // 32
34
    charge_gas(evm, GAS_IDENTITY + GAS_IDENTITY_WORD * word_count)
35
36
    # OPERATION
37
    evm.output = data