Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DAIBridgeAdapter

Bridge adapter for DAI.

Hierarchy

Index

Constructors

Properties

estimateGas: { approve: ((l1Token: AddressLike, l2Token: AddressLike, amount: NumberLike, opts?: { overrides?: CallOverrides }) => Promise<BigNumber>); deposit: ((l1Token: AddressLike, l2Token: AddressLike, amount: NumberLike, opts?: { l2GasLimit?: NumberLike; overrides?: CallOverrides; recipient?: AddressLike }) => Promise<BigNumber>); withdraw: ((l1Token: AddressLike, l2Token: AddressLike, amount: NumberLike, opts?: { overrides?: CallOverrides; recipient?: AddressLike }) => Promise<BigNumber>) } = ...

Object that holds the functions that estimates the gas required for a given transaction. Follows the pattern used by ethers.js.

Type declaration

l1Bridge: Contract

L1 bridge contract.

l2Bridge: Contract

L2 bridge contract.

Provider used to make queries related to cross-chain interactions.

populateTransaction: { approve: ((l1Token: AddressLike, l2Token: AddressLike, amount: NumberLike, opts?: { overrides?: Overrides }) => Promise<TransactionRequest>); deposit: ((l1Token: AddressLike, l2Token: AddressLike, amount: NumberLike, opts?: { l2GasLimit?: NumberLike; overrides?: Overrides; recipient?: AddressLike }) => Promise<TransactionRequest>); withdraw: ((l1Token: AddressLike, l2Token: AddressLike, amount: NumberLike, opts?: { overrides?: Overrides; recipient?: AddressLike }) => Promise<TransactionRequest>) } = ...

Object that holds the functions that generate transactions to be signed by the user. Follows the pattern used by ethers.js.

Type declaration

Methods

  • Queries the account's approval amount for a given L1 token.

    Parameters

    Returns Promise<BigNumber>

    Amount of tokens approved for deposits from the account.

  • Approves a deposit into the L2 chain.

    Parameters

    Returns Promise<TransactionResponse>

    Transaction response for the approval transaction.

  • Gets all deposits for a given address.

    Parameters

    • address: AddressLike
    • Optional opts: { fromBlock?: BlockTag; toBlock?: BlockTag }
      • Optional fromBlock?: BlockTag
      • Optional toBlock?: BlockTag

    Returns Promise<TokenBridgeMessage[]>

    All deposit token bridge messages sent by the given address.

  • Gets all withdrawals for a given address.

    Parameters

    • address: AddressLike
    • Optional opts: { fromBlock?: BlockTag; toBlock?: BlockTag }
      • Optional fromBlock?: BlockTag
      • Optional toBlock?: BlockTag

    Returns Promise<TokenBridgeMessage[]>

    All withdrawal token bridge messages sent by the given address.

  • Withdraws some tokens back to the L1 chain.

    Parameters

    Returns Promise<TransactionResponse>

    Transaction response for the withdraw transaction.

Generated using TypeDoc