Overview
HyperProver processes proof messages from Hyperlane’s mailbox and records proven intents. It extends MessageBridgeProver to provide Hyperlane-specific messaging functionality.
Contract: contracts/prover/HyperProver.sol
Inheritance: IMessageRecipient, MessageBridgeProver, Semver
Proof Type: "Hyperlane"
Constructor
address
required
Address of the local Hyperlane mailbox contract
address
required
Address of the Portal contract
bytes32[]
required
Array of trusted prover addresses (as bytes32 for cross-VM compatibility)
MessengerContractCannotBeZeroAddress(): Mailbox address is zeroZeroPortal(): Portal address is zero
contracts/prover/HyperProver.sol:55
State Variables
MAILBOX
PROOF_TYPE
Core Functions
prove
MessageBridgeProver. Initiates proving process by dispatching a message via Hyperlane.
address
required
Address that initiated the proving request (receives refund if overpaid)
uint64
required
Hyperlane domain ID of the source chain (where the intent was created). NOT the chain ID.
bytes
required
Encoded (intentHash, claimant) pairs. Format:
[intentHash1][claimant1][intentHash2][claimant2]...bytes
required
ABI-encoded
UnpackedData struct containing:sourceChainProver(bytes32): Address of prover on source chainmetadata(bytes): Metadata for Hyperlane messagehookAddr(address): Address of post-dispatch hook (zero for default)
- Calculates required fee via
fetchFee - Validates msg.value covers fee
- Dispatches message via Hyperlane mailbox
- Refunds excess payment to sender
InsufficientFee(uint256 required): msg.value is less than required feeDomainIdTooLarge(uint64 domainID): Domain ID exceeds uint32.max
MessageBridgeProver.sol:112
handle
uint32
required
Origin domain ID from the source chain. Cannot be zero.
bytes32
required
Address that dispatched the message on source chain (as bytes32). Cannot be zero.
bytes
required
Encoded message with format:
[chainId (8 bytes)][intentHash1][claimant1][intentHash2][claimant2]...- Validates origin is not zero
- Validates sender is whitelisted
- Extracts chain ID from first 8 bytes of messageBody
- Processes intent proofs using
_processIntentProofs
MessageOriginChainDomainIDCannotBeZero(): Origin is zeroMessageSenderCannotBeZeroAddress(): Sender is zeroUnauthorizedIncomingProof(bytes32 sender): Sender not whitelisted
contracts/prover/HyperProver.sol:71
fetchFee
uint64
required
Hyperlane domain ID of the source chain
bytes
required
Encoded (intentHash, claimant) pairs
bytes
required
ABI-encoded UnpackedData struct
contracts/prover/HyperProver.sol:130
getProofType
"Hyperlane"
Internal Functions
_dispatchMessage
prove() function after validations.
Behavior:
- Unpacks data into structured format
- Formats Hyperlane message parameters
- Calls
IMailbox(MAILBOX).dispatchwith fee
contracts/prover/HyperProver.sol:93
_formatHyperlaneMessage
DispatchParams struct with:
destinationDomain(uint32): Hyperlane domain IDrecipientAddress(bytes32): Source chain prover addressmessageBody(bytes): Encoded proofsmetadata(bytes): Message metadatahook(IPostDispatchHook): Post-dispatch hook (defaults to mailbox’s default hook)
contracts/prover/HyperProver.sol:201
Data Structures
UnpackedData
data parameter in prove() and fetchFee().