octez.js TypeDocs
    Preparing search index...

    Function getEthereumTransactionHash

    • Computes the hash of the synthetic Ethereum transaction mirroring a Michelson operation that crossed into the EVM runtime of a Tezos X chain.

      Such a transaction has no signature to hash, so the kernel derives it from the originating operation: keccak256("evm" || michelson_op_hash), where michelson_op_hash is the raw 32-byte operation hash. The result is the hash under which the EVM node serves the transaction (e.g. eth_getTransactionByHash, debug_traceTransaction).

      Parameters

      • michelsonOpHash: string

        Base58 operation hash (o...) of the Michelson operation

      Returns string

      0x-prefixed lowercase hex Ethereum transaction hash

      ParameterValidationError if michelsonOpHash is not a valid operation hash

      getEthereumTransactionHash('oneDGhZacw99EEFaYDTtWfz5QEhUW3PPVFsHa7GShnLPuDn7gSd') // returns '0x9e3d2459fac9713cf0ad82b503e7d050167c942ee8ff4bf689a8986216066a50'