An overview of the Native Route (Prover Contract), responsible for managing intent fulfillment proofs for the Native Route.
Prover
contract. This section details the Native Route which uses Storage Proofs to relay intent fulfillments.Prover
contract for verification. The Prover
contract contains a few primary functions: proveSettlementLayerState
, proveWorldStateBedrock
, proveWorldStateCannon
, proveIntent
which are explained below. All code snippets in this section reference this specific commit.
In order to prove an intent was fulfilled on a specific destination chain, the following actions must be performed:
Inbox
contract using the world state tree of the destination chain. At a high level, proving an intent requires a proof that the hash for a given intent is part of the contract storage root (otherwise it is not solved), and that the contract storage root is part of the destination state root.
IntentSource
contract to withdraw the rewards. For more information about this step, please see the Reward Withdrawal section.
provenStates
. This mapping allows the proven state of any destination chain to be accessed for intent proofs.
ChainConfiguration
structure and chainConfigurations
mapping. As of now, these are configured during the deployment of the contract in the constructor.
batchProve
function that would allow for many different intents to be proven at once with only a minute increase in calldata costs.