Methods
approveToken
- approveToken(erc20L1Address: string, amount?: BigNumber, overrides?: PayableOverrides): Promise<ContractTransaction>
-
Parameters
-
erc20L1Address: string
-
Optional amount: BigNumber
-
Optional overrides: PayableOverrides
Returns Promise<ContractTransaction>
calculateL2RetryableTransactionHash
- calculateL2RetryableTransactionHash(inboxSequenceNumber: BigNumber, l2ChainId?: BigNumber): Promise<string>
-
Parameters
-
inboxSequenceNumber: BigNumber
-
Optional l2ChainId: BigNumber
Returns Promise<string>
calculateL2TransactionHash
- calculateL2TransactionHash(inboxSequenceNumber: BigNumber, l2ChainId?: BigNumber): Promise<string>
-
Parameters
-
inboxSequenceNumber: BigNumber
-
Optional l2ChainId: BigNumber
Returns Promise<string>
calculateRetryableAutoRedeemTxnHash
- calculateRetryableAutoRedeemTxnHash(inboxSequenceNumber: BigNumber, l2ChainId?: BigNumber): Promise<string>
-
Parameters
-
inboxSequenceNumber: BigNumber
-
Optional l2ChainId: BigNumber
Returns Promise<string>
deposit
- deposit(erc20L1Address: string, amount: BigNumber, retryableGasArgs?: RetryableGasArgs, destinationAddress?: string, overrides?: PayableOverrides): Promise<ContractTransaction>
-
Parameters
-
erc20L1Address: string
-
amount: BigNumber
-
retryableGasArgs: RetryableGasArgs = {}
-
Optional destinationAddress: string
-
Optional overrides: PayableOverrides
Returns Promise<ContractTransaction>
depositETH
- depositETH(value: BigNumber, _maxSubmissionPriceIncreaseRatio?: BigNumber, overrides?: PayableOverrides): Promise<ContractTransaction>
-
Parameters
-
value: BigNumber
-
Optional _maxSubmissionPriceIncreaseRatio: BigNumber
-
Optional overrides: PayableOverrides
Returns Promise<ContractTransaction>
getGatewayWithdrawEventData
- getGatewayWithdrawEventData(gatewayAddress: string, destinationAddress?: string): Promise<OutboundTransferInitiatedResult[]>
-
Parameters
-
gatewayAddress: string
-
Optional destinationAddress: string
Returns Promise<OutboundTransferInitiatedResult[]>
getL2TxHashByRetryableTicket
- getL2TxHashByRetryableTicket(l1Transaction: string | ContractReceipt): Promise<string>
-
Parameters
-
l1Transaction: string | ContractReceipt
Returns Promise<string>
getOutGoingMessageState
- getOutGoingMessageState(batchNumber: BigNumber, indexInBatch: BigNumber): Promise<OutgoingMessageState>
-
Parameters
-
batchNumber: BigNumber
-
indexInBatch: BigNumber
Returns Promise<OutgoingMessageState>
getTokenWithdrawEventData
- getTokenWithdrawEventData(l1TokenAddress: string, destinationAddress?: string): Promise<OutboundTransferInitiatedResult[]>
-
Parameters
-
l1TokenAddress: string
-
Optional destinationAddress: string
Returns Promise<OutboundTransferInitiatedResult[]>
triggerL2ToL1Transaction
- triggerL2ToL1Transaction(batchNumber: BigNumber, indexInBatch: BigNumber, singleAttempt?: boolean): Promise<ContractReceipt>
-
Parameters
-
batchNumber: BigNumber
-
indexInBatch: BigNumber
-
singleAttempt: boolean = false
Returns Promise<ContractReceipt>
updateAllTokens
- updateAllTokens(): Promise<{}>
updateTokenData
- updateTokenData(erc20l1Address: string): Promise<{}>
-
Parameters
Returns Promise<{}>
waitForRetryableReceipt
- waitForRetryableReceipt(seqNum: BigNumber): Promise<TransactionReceipt>
-
Parameters
Returns Promise<TransactionReceipt>
Main class for accessing token bridge methods; inherits methods from L1Bridge and L2Bridge