Options for the provider.
Optional
bedrock?: booleanWhether or not to enable Bedrock compatibility.
Optional
contracts?: DeepPartial<OEContractsLike>Optional contract address overrides.
Optional
depositOptional number of blocks before a deposit is confirmed.
Optional
l1Optional estimated block time in seconds for the L1 chain.
Chain ID for the L1 chain.
Signer or Provider for the L1 chain, or a JSON-RPC url.
Chain ID for the L2 chain.
Signer or Provider for the L2 chain, or a JSON-RPC url.
Private
_outputCache for output root validation. Output roots are expensive to verify, so we cache them.
Whether or not Bedrock compatibility is enabled.
Contract objects attached to their respective providers and addresses.
Number of blocks before a deposit is considered confirmed.
Object that holds the functions that estimates the gas required for a given transaction. Follows the pattern used by ethers.js.
Optional
opts: { Optional
overrides?: PayableOverridesEstimated average L1 block time in seconds.
Chain ID for the L1 network.
Provider connected to the L1 chain.
Chain ID for the L2 network.
Provider connected to the L2 chain.
Optional
opts: { Optional
overrides?: PayableOverridesProvider connected to the L1 chain.
Signer connected to the L1 chain.
Provider connected to the L2 chain.
Signer connected to the L2 chain.
Optional
opts: { Optional
signer?: SignerOptional
opts: { Optional
signer?: SignerUses portal version to determine if the messenger is using fpac contracts. Better not to cache this value as it will change during the fpac upgrade and we want clients to automatically begin using the new logic without throwing any errors.
Whether or not the messenger is using fpac contracts.
Generates the bedrock proof required to finalize an L2 to L1 message.
Proof that can be used to finalize the message.
Returns the state root that corresponds to a given message. This is the state root for the block in which the transaction was included, as published to the StateCommitmentChain. If the state root for the given message has not been published yet, this function returns null.
State root for the block in which the message was created.
Queries the OptimismPortal contract's provenWithdrawals
mapping
for a ProvenWithdrawal that matches the passed withdrawalHash
A ProvenWithdrawal object
Note: This function is bedrock-specific.
Returns the StateBatchAppended event that was emitted when the batch with a given index was created. Returns null if no such event exists (the batch has not been submitted).
Index of the batch to find an event for.
StateBatchAppended event for the batch, or null if no such batch exists.
Returns the StateBatchAppended event for the batch that includes the transaction with the given index. Returns null if no such event exists.
Index of the L2 transaction to find an event for.
StateBatchAppended event for the batch that includes the given transaction by index.
Returns information about the state root batch that included the state root for the given transaction by index. Returns null if no such state root has been published yet.
Index of the L2 transaction to find a state root batch for.
State root batch for the given transaction index, or null if none exists yet.
Optional
opts: { Optional
signer?: SignerOptional
opts: { Optional
signer?: SignerOptional
opts: { Optional
pollOptional
timeoutGenerated using TypeDoc
Creates a new CrossChainProvider instance.