Options
All
  • Public
  • Public/Protected
  • All
Menu

A TransferMessage extends the BridgeMessage with transfer-specific functionality.

Hierarchy

Index

Constructors

Properties

action: Transfer
cache: EventCache
context: BridgeContext
dispatch: AnnotatedDispatch
fromBridge: BridgeContracts
home: Home
message: ParsedMessage
replica: Replica
toBridge: BridgeContracts

Accessors

  • get amount(): BigNumber
  • get body(): string
  • The message body

    Returns string

  • get bodyHash(): string
  • The keccak256 hash of the message body

    Returns string

  • get committedRoot(): string
  • The committed root when this message was dispatched.

    Returns string

  • get destination(): number
  • The destination domain for this message

    Returns number

  • get destinationAndNonce(): BigNumber
  • The destination and nonceof this message.

    Returns BigNumber

  • get from(): number
  • The domain from which the message was sent

    Returns number

  • get leaf(): string
  • The messageHash committed to the tree in the Home contract.

    Returns string

  • get leafIndex(): BigNumber
  • The index of the leaf in the contract.

    Returns BigNumber

  • get nonce(): number
  • The domain nonce for this message

    Returns number

  • get origin(): number
  • The domain from which the message was sent. Alias for from

    Returns number

  • get prefillId(): string
  • get receipt(): TransactionReceipt
  • The receipt of the TX that dispatched this message

    Returns TransactionReceipt

  • get recipient(): string
  • The identifer for the recipient for this message

    Returns string

  • get sender(): string
  • The identifier for the sender of this message

    Returns string

  • get to(): string
  • get transactionHash(): string
  • The hash of the transaction that dispatched this message

    Returns string

Methods

  • assetAtDestination(): Promise<undefined | ERC20>
  • Resolves an interface for the asset that is being transfered on the chain TO WHICH it is being transferred

    WARNING: do not hold references to this contract, as it will not be reconnected in the event the chain connection changes.

    Returns Promise<undefined | ERC20>

    The resolved token interface.

  • assetAtOrigin(): Promise<undefined | ERC20>
  • Resolves an interface for the asset that is being transfered on the chain FROM WHICH it is being transferred

    WARNING: do not hold references to this contract, as it will not be reconnected in the event the chain connection changes.

    Returns Promise<undefined | ERC20>

    The resolved token interface.

  • confirmAt(): Promise<BigNumber>
  • Returns the timestamp after which it is possible to process this message.

    Note: return the timestamp after which it is possible to process messages within an Update. The timestamp is most relevant during the time AFTER the Update has been Relayed to the Replica and BEFORE the message in question has been Processed.

    Considerations:

    • the timestamp will be 0 if the Update has not been relayed to the Replica
    • after the Update has been relayed to the Replica, the timestamp will be non-zero forever (even after all messages in the Update have been processed)
    • if the timestamp is in the future, the challenge period has not elapsed yet; messages in the Update cannot be processed yet
    • if the timestamp is in the past, this does not necessarily mean that all messages in the Update have been processed

    Returns Promise<BigNumber>

    The timestamp at which a message can confirm

  • currentlyPrefilled(): Promise<boolean>
  • delivered(): Promise<boolean>
  • Checks whether the message has been delivered.

    Returns Promise<boolean>

    true if processed, else false.

  • events(): Promise<NomadStatus>
  • Get all lifecycle events associated with this message

    Returns Promise<NomadStatus>

    An array of {@link AnnotatedLifecycleEvent} objects

  • getHomeUpdate(): Promise<undefined | AnnotatedUpdate>
  • Get the Home Update event associated with this message (if any)

    Returns Promise<undefined | AnnotatedUpdate>

    An {@link AnnotatedUpdate} (if any)

  • getProcess(): Promise<undefined | AnnotatedProcess>
  • Get the Replica Process event associated with this message (if any)

    Returns Promise<undefined | AnnotatedProcess>

    An {@link AnnotatedProcess} (if any)

  • getReplicaUpdate(): Promise<undefined | AnnotatedUpdate>
  • Get the Replica Update event associated with this message (if any)

    Returns Promise<undefined | AnnotatedUpdate>

    An {@link AnnotatedUpdate} (if any)

  • replicaStatus(): Promise<ReplicaMessageStatus>
  • Retrieve the replica status of this message.

    Returns Promise<ReplicaMessageStatus>

    The {@link ReplicaMessageStatus} corresponding to the solidity status of the message.

  • wait(opts?: { pollTime?: number }): Promise<void>
  • Returns a promise that resolves when the message has been delivered.

    WARNING: May never resolve. Oftern takes hours to resolve.

    Parameters

    • Optional opts: { pollTime?: number }

      Polling options.

      • Optional pollTime?: number

    Returns Promise<void>

  • baseFromReceipt<T>(context: T, nameOrDomain: string | number, receipt: TransactionReceipt): NomadMessage<T>[]
  • Instantiate one or more messages from a receipt.

    Type parameters

    • T: NomadContext<T>

    Parameters

    • context: T

      the {@link NomadContext} object to use

    • nameOrDomain: string | number

      the domain on which the receipt was logged

    • receipt: TransactionReceipt

      the receipt

    Returns NomadMessage<T>[]

    an array of {@link NomadMessage} objects

  • baseFromTransactionHash<T>(context: T, nameOrDomain: string | number, transactionHash: string): Promise<NomadMessage<T>[]>
  • Instantiate one or more messages from a tx hash.

    throws

    if there is no receipt for the TX

    Type parameters

    • T: NomadContext<T>

    Parameters

    • context: T

      the {@link NomadContext} object to use

    • nameOrDomain: string | number

      the domain on which the receipt was logged

    • transactionHash: string

    Returns Promise<NomadMessage<T>[]>

    an array of {@link NomadMessage} objects

  • baseSingleFromReceipt<T>(context: T, nameOrDomain: string | number, receipt: TransactionReceipt): NomadMessage<T>
  • Instantiate EXACTLY one message from a receipt.

    throws

    if there is not EXACTLY 1 dispatch in the receipt

    Type parameters

    • T: NomadContext<T>

    Parameters

    • context: T

      the {@link NomadContext} object to use

    • nameOrDomain: string | number

      the domain on which the receipt was logged

    • receipt: TransactionReceipt

      the receipt

    Returns NomadMessage<T>

    an array of {@link NomadMessage} objects

  • baseSingleFromTransactionHash<T>(context: T, nameOrDomain: string | number, transactionHash: string): Promise<NomadMessage<T>>
  • Instantiate EXACTLY one message from a transaction has.

    throws

    if there is no receipt for the TX, or if not EXACTLY 1 dispatch in the receipt

    Type parameters

    • T: NomadContext<T>

    Parameters

    • context: T

      the {@link NomadContext} object to use

    • nameOrDomain: string | number

      the domain on which the receipt was logged

    • transactionHash: string

    Returns Promise<NomadMessage<T>>

    an array of {@link NomadMessage} objects

Generated using TypeDoc