octez.js TypeDocs
    Preparing search index...

    Function getTezosOperationHash

    • Computes the hash of the synthetic Michelson operation mirroring an Ethereum transaction that crossed into the Michelson runtime of a Tezos X chain (deposits included).

      Such an operation has no signature to hash, so the kernel derives it from the originating transaction: blake2b256("michelson" || evm_tx_hash). It is the hash under which the Tezos RPC serves the operation, and the seed of the addresses of the contracts it originates.

      Parameters

      • evmTxHash: string

        32-byte Ethereum transaction hash, hex encoded, optionally 0x-prefixed

      Returns string

      Base58 operation hash (o...)

      InvalidHexStringError if evmTxHash is not a 32-byte hex string

      getTezosOperationHash('0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20') // returns 'oon3NRVSUVJUDwBSfeMcXYFVU1GgFghM4ciDQsP8kuvpGrmj4kG'