VeaMock
Inherits: IVeaOutboxOnL1, IVeaInbox
Functions
sendMessage
Sends an arbitrary message to receiving chain. Note: Calls authenticated by receiving gateway checking the sender argument.
function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external returns (uint64 msgId);
Parameters
| Name | Type | Description | 
|---|---|---|
| _to | address | The cross-domain contract address which receives the calldata. | 
| _fnSelector | bytes4 | The function selector of the receiving contract. | 
| _data | bytes | The message calldata, abi.encode(...) | 
Returns
| Name | Type | Description | 
|---|---|---|
| msgId | uint64 | The index of the message in the inbox, as a message Id, needed to relay the message. | 
saveSnapshot
Snapshots can be saved a maximum of once per epoch.
Saves snapshot of state root.
O(log(count)) where count number of messages in the inbox.
function saveSnapshot() external;
sendMessage
Verifies and relays the message. Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.
function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;
Parameters
| Name | Type | Description | 
|---|---|---|
| _proof | bytes32[] | The merkle proof to prove the message. | 
| _msgId | uint64 | The zero based index of the message in the inbox. | 
| _to | address | The address to send the message to. | 
| _message | bytes | The message to relay. | 
resolveDisputedClaim
Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge. Note: Access restricted to canonical bridge.
function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;
Parameters
| Name | Type | Description | 
|---|---|---|
| _epoch | uint256 | The epoch to verify. | 
| _stateRoot | bytes32 | The true state root for the epoch. | 
| _claim | Claim | The claim associated with the epoch. |