Skip to main content

IL1MessageService

ClaimMessageWithProofParams​

Parameters​

NameTypeDescription
struct ClaimMessageWithProofParams {
bytes32[] proof;
uint256 messageNumber;
uint32 leafIndex;
address from;
address to;
uint256 fee;
uint256 value;
address payable feeRecipient;
bytes32 merkleRoot;
bytes data;
}

L2MerkleRootDoesNotExist​

error L2MerkleRootDoesNotExist()

Thrown when L2 Merkle root does not exist.

InvalidMerkleProof​

error InvalidMerkleProof()

Thrown when the Merkle proof is invalid.

ProofLengthDifferentThanMerkleDepth​

error ProofLengthDifferentThanMerkleDepth(uint256 actual, uint256 expected)

Thrown when Merkle depth doesn't match proof length.

claimMessageWithProof​

function claimMessageWithProof(struct IL1MessageService.ClaimMessageWithProofParams _params) external

Claims and delivers a cross-chain message using a Merkle proof.

if tree depth is empty, it will revert with L2MerkleRootDoesNotExist. if tree depth is different than proof size, it will revert with ProofLengthDifferentThanMerkleDepth.

Parameters​

NameTypeDescription
_paramsstruct IL1MessageService.ClaimMessageWithProofParamsCollection of claim data with proof and supporting data.

Was this page helpful?