Object that holds the functions that estimates the gas required for a given transaction. Follows the pattern used by ethers.js.
Estimates gas required to approve some tokens to deposit into the L2 chain.
The L1 token address.
The L2 token address.
Amount of the token to approve.
Additional options.
Optional transaction overrides.
Gas estimate for the transaction.
Estimates gas required to deposit some tokens into the L2 chain.
The L1 token address.
The L2 token address.
Amount of the token to deposit.
Additional options.
Optional gas limit to use for the transaction on L2.
Optional transaction overrides.
Optional address to receive the funds on L2. Defaults to sender.
Gas estimate for the transaction.
Estimates gas required to withdraw some tokens back to the L1 chain.
The L1 token address.
The L2 token address.
Amount of the token to withdraw.
Additional options.
Optional transaction overrides.
Optional address to receive the funds on L1. Defaults to sender.
Gas estimate for the transaction.
L1 bridge contract.
L2 bridge contract.
Provider used to make queries related to cross-chain interactions.
Object that holds the functions that generate transactions to be signed by the user. Follows the pattern used by ethers.js.
Generates a transaction for approving some tokens to deposit into the L2 chain.
The L1 token address.
The L2 token address.
Amount of the token to approve.
Additional options.
Optional transaction overrides.
Transaction that can be signed and executed to deposit the tokens.
Generates a transaction for depositing some tokens into the L2 chain.
The L1 token address.
The L2 token address.
Amount of the token to deposit.
Additional options.
Optional gas limit to use for the transaction on L2.
Optional transaction overrides.
Optional address to receive the funds on L2. Defaults to sender.
Transaction that can be signed and executed to deposit the tokens.
Generates a transaction for withdrawing some tokens back to the L1 chain.
The L1 token address.
The L2 token address.
Amount of the token to withdraw.
Additional options.
Optional transaction overrides.
Optional address to receive the funds on L1. Defaults to sender.
Transaction that can be signed and executed to withdraw the tokens.
Queries the account's approval amount for a given L1 token.
The L1 token address.
The L2 token address.
Signer to query the approval for.
Amount of tokens approved for deposits from the account.
Approves a deposit into the L2 chain.
The L1 token address.
The L2 token address.
Amount of the token to approve.
Signer used to sign and send the transaction.
Additional options.
Optional transaction overrides.
Transaction response for the approval transaction.
Deposits some tokens into the L2 chain.
The L1 token address.
The L2 token address.
Amount of the token to deposit.
Signer used to sign and send the transaction.
Additional options.
Optional gas limit to use for the transaction on L2.
Optional transaction overrides.
Optional address to receive the funds on L2. Defaults to sender.
Transaction response for the deposit transaction.
Gets all deposits for a given address.
Address to search for messages from.
Options object.
Block to start searching for messages from. If not provided, will start from the first block (block #0).
Block to stop searching for messages at. If not provided, will stop at the latest known block ("latest").
All deposit token bridge messages sent by the given address.
Gets all withdrawals for a given address.
Address to search for messages from.
Options object.
Block to start searching for messages from. If not provided, will start from the first block (block #0).
Block to stop searching for messages at. If not provided, will stop at the latest known block ("latest").
All withdrawal token bridge messages sent by the given address.
Checks whether the given token pair is supported by the bridge.
The L1 token address.
The L2 token address.
Whether the given token pair is supported by the bridge.
Withdraws some tokens back to the L1 chain.
The L1 token address.
The L2 token address.
Amount of the token to withdraw.
Signer used to sign and send the transaction.
Additional options.
Optional transaction overrides.
Optional address to receive the funds on L1. Defaults to sender.
Transaction response for the withdraw transaction.
Generated using TypeDoc
Represents an adapter for an L1<>L2 token bridge. Each custom bridge currently needs its own adapter because the bridge interface is not standardized. This may change in the future.