Skip to main content

Overview

The Portal contract is the main entry point for intent publishing, fulfillment, and proving. It combines the functionality of both IntentSource (for the source chain) and Inbox (for the destination chain) into a unified interface. Inherits: IntentSource, Inbox, Semver Contract Location: contracts/Portal.sol
The Portal contract inherits all methods from IntentSource and Inbox. This means a single Portal deployment can handle both source chain operations (publishing intents, funding rewards) and destination chain operations (fulfilling intents).

Constructor

Portal()

constructor()
Initializes the Portal contract, creating a unified entry point combining source and destination chain functionality.

Inherited Methods

The Portal contract inherits all public and external methods from:
  • IntentSource - Methods for publishing and funding intents on the source chain
  • Inbox - Methods for fulfilling intents on the destination chain

Usage Example

// Deploy Portal (acts as both source and destination)
Portal portal = new Portal();

// Source chain: Publish and fund an intent
(bytes32 intentHash, address vault) = portal.publishAndFund{
    value: 0.1 ether
}(intent, false);

// Destination chain: Fulfill the intent
bytes[] memory results = portal.fulfill(
    intentHash,
    route,
    rewardHash,
    claimant
);

Build docs developers (and LLMs) love