Module Bridgehub

Source
Expand description

Bridgehub contract for handling L2 transaction requests and related operations.

contract Bridgehub {
    function requestL2TransactionDirect(L2TransactionRequestDirect memory request) external payable returns (bytes32 canonicalTxHash);
    function requestL2TransactionTwoBridges(L2TransactionRequestTwoBridges calldata _request) external payable returns (bytes32 canonicalTxHash);
    function l2TransactionBaseCost(uint256 _chainId, uint256 _gasPrice, uint256 _l2GasLimit, uint256 _l2GasPerPubdataByteLimit) external view returns (uint256);
    event NewPriorityRequest(uint256 txId, bytes32 txHash, uint64 expirationTimestamp, L2CanonicalTransaction transaction, bytes[] factoryDeps);
}

Structs§

BridgehubInstance
A Bridgehub instance.
NewPriorityRequest
Emitted when a new priority request is made.
l2TransactionBaseCostCall
Calculates the base cost of an L2 transaction.
l2TransactionBaseCostReturn
Calculates the base cost of an L2 transaction.
requestL2TransactionDirectCall
Requests a direct L2 transaction.
requestL2TransactionDirectReturn
Requests a direct L2 transaction.
requestL2TransactionTwoBridgesCall
Requests an L2 transaction involving two bridges.
requestL2TransactionTwoBridgesReturn
Requests an L2 transaction involving two bridges.

Enums§

BridgehubCalls
Container for all the Bridgehub function calls.
BridgehubEvents
Container for all the Bridgehub events.

Functions§

new
Creates a new wrapper around an on-chain Bridgehub contract instance.