Options
All
  • Public
  • Public/Protected
  • All
Menu

Bridge adapter for any token bridge that uses the standard token bridge interface.

Hierarchy

Implements

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

  • Logics for bridges of various token standards are different, on a high level: ERC20, native: each token contract maintains a mapping of address -> amount ERC721: each token contract maintains a mapping of tokenId -> owner ERC1155: each token contract maintains a mapping of owner -> tokenId -> amount

    Checkout contracts(ERC20, ERC721, ERC1155) for more details.

    Parameters

    Returns Promise<BigNumber>

Generated using TypeDoc