Skip to content

WithdrawalSenderTag.from

Derives the sender tag that identifies the indexed parent-chain WithdrawalProcessed event for a Zone withdrawal.

The transactionHash is the Zone transaction containing the ZoneOutbox.requestWithdrawal call. The protocol defines a user withdrawal sender tag as keccak256(abi.encodePacked(sender, transactionHash, fallbackNonce)). Internal deposit bounce-backs use the canonical zero-sender tag derived from address(0) and bytes32(0) without a fallback nonce.

Authenticated Withdrawals Specification

Imports

Named
import { WithdrawalSenderTag } from 'ox/tempo'

Examples

import { WithdrawalSenderTag } from 'ox/tempo'
 
const senderTag = WithdrawalSenderTag.from({
  fallbackNonce: 19n,
  sender: '0x1234567890abcdef1234567890abcdef12345678',
  transactionHash:
    '0xabababababababababababababababababababababababababababababababab'
})

Definition

function from(
  value: from.Value,
): Hex.Hex

Source: src/tempo/WithdrawalSenderTag.ts

Parameters

value

  • Type: from.Value

Withdrawal sender, Zone transaction hash, and fallback nonce.

value.fallbackNonce

  • Type: bigint

Public nonce assigned to the withdrawal's private fallback recipient.

value.sender

  • Type: abitype_Address

Address that requested the withdrawal.

value.transactionHash

  • Type: 0x${string}

Hash of the Zone transaction containing ZoneOutbox.requestWithdrawal.

Return Type

The sender tag.

Hex.Hex