Documentation Index
Fetch the complete documentation index at: https://mintlify.com/rhinestonewtf/warp-router/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheStandaloneIntentExecutor enables self-contained intent execution without dependencies on external protocols like Compact or Permit2.
Source: /src/executor/StandaloneIntent/StandaloneIntent.sol:50
Key Features
- Chain-Agnostic Signatures: Multi-chain operations with signatures valid across networks
- Direct Nonce Management: Account-level replay protection without external protocols
- Gas Refund Support: Optional ERC20 or native ETH relayer compensation
- Session Key Support: Integration with emissary-based validation for delegation
- Single and Multi-Chain: Optimized execution paths for both use cases
Execution Modes
Multi-Chain Operations:- Chain-agnostic signatures work across different networks
- Coordinated execution with operation hashes from other chains
- Chain-specific signatures (more gas efficient)
- Simplified execution for operations on one chain
- No refund: Simple execution without relayer compensation
- ERC20 refund: Pay relayer in any ERC20 token with configurable exchange rate
- ETH refund: Optimized native ETH compensation (1:1 rate)
Structs
MultiChainOps
Multi-chain operations structure for standalone intent execution.The account address that owns and signed these operations
Index position of current chain in the otherChains array
Array of operation hashes from other chains in the multi-chain intent
Nonce for replay protection
Operations to execute on the current chain
EIP-712 signature from the account authorizing all operations
SingleChainOps
Single-chain operations structure for standalone intent execution.The account address that owns and signed these operations
Nonce for replay protection
Operations to execute on the current chain
EIP-712 signature from the account authorizing the operations
SingleChainOps is ~850 gas cheaper than MultiChainOps due to simpler structure and standard EIP-712 hashing with chain ID.
GasRefund
Gas refund parameters for ERC20 token relayer compensation.ERC20 token address for gas refund (must not be Constants.NATIVE_TOKEN)
Exchange rate: how many token units equal 1 ETH (scaled to 1e18)
Fixed gas overhead to add to the gas calculation (gas units)
Functions
executeMultichainOps
The MultiChainOps struct containing account, operations, nonce, and signature
Uses chain-agnostic EIP-712 signature validation (excludes chain ID from digest), allowing the same signature to be valid across different chains.
executeMultichainOpsWithGasRefund_ERC20
The complete multi-chain operations structure with signature
The gas refund terms (ERC20 token, exchange rate, and overhead)
Address that will receive the gas refund payment (typically relayer)
account(address): The account address that executed the operationsnonce(uint256): The nonce that was consumed during execution
executeMultichainOpsWithGasRefund_ETH
The complete multi-chain operations structure with signature
The fixed gas overhead to add to the refund calculation (gas units)
Address that will receive the gas refund payment (typically relayer)
account(address): The account address that executed the operationsnonce(uint256): The nonce that was consumed during execution
executeSinglechainOps
The complete single-chain operations structure with signature
Uses standard chain-specific EIP-712 signature validation (includes chain ID), making signatures NOT valid across different chains but ~850 gas cheaper than multi-chain variant.
executeSinglechainOpsWithGasRefund_ERC20
The complete single-chain operations structure with signature
The gas refund terms (ERC20 token, exchange rate, and overhead)
Address that will receive the gas refund payment (typically relayer)
account(address): The account address that executed the operationsnonce(uint256): The nonce that was consumed during execution
executeSinglechainOpsWithGasRefund_ETH
The complete single-chain operations structure with signature
The fixed gas overhead to add to the refund calculation (gas units)
Address that will receive the gas refund payment (typically relayer)
account(address): The account address that executed the operationsnonce(uint256): The nonce that was consumed during execution
isStandaloneIntentNonceConsumed
The nonce value to check
The account address that owns the nonce
bool - True if the nonce has been consumed, false otherwise
getCostInToken
The total wei spent on execution (gasUsed × tx.gasprice)
The current gas price in wei (tx.gasprice)
How many token units (in token decimals) equal 1 ETH (1e18 wei)
The fixed gas overhead to add (gas units not captured by gasleft measurement)
uint256 - The gas cost denominated in tokens
Formula: ((actualGasCost + (overhead × gasPrice)) × exchangeRate) / 1e18
Gas Refund Mechanism
Settlement Methods
The contract uses different settlement methods based on signature mode: Owner Signature Modes (EMISSARY, ERC1271, EMISSARY_ERC1271, ERC1271_EMISSARY):- ERC20: Via Paymaster.settleGasRefund
- ETH: Direct transfer via executeSingleETHTransfer (~17-22k gas savings)
- Trusted exchange rate from account owner
- ERC20: Via Paymaster.settleGasRefund_requireCallback
- ETH: Via Paymaster.settleGasRefund_requireCallback
- Requires callback protection to prevent exchange rate/overhead manipulation
Session Key Security
Gas Overhead
The contract accounts for ~55,000 gas overhead not captured bygasleft() measurement:
- Function dispatch and calldata decoding
- EIP-712 hashing for gas refund commitment
- Reentrancy guard operations (TSTORE/TLOAD)
- Settlement call overhead
Example Usage
Events
Error Handling
Thrown when signature validation fails
Thrown when Constants.NATIVE_TOKEN is used with ERC20 refund functions
EIP-712 Domain
The contract uses the following EIP-712 domain:- Name: “IntentExecutor”
- Version: “v0.0.1”
Comparison: Multi-Chain vs Single-Chain
| Feature | Multi-Chain | Single-Chain |
|---|---|---|
| Chain ID in signature | No (chain-agnostic) | Yes (chain-specific) |
| Cross-chain validity | Yes | No |
| Gas cost | Higher (~850 gas more) | Lower (optimized) |
| Use case | Coordinated multi-chain | Single chain only |
| Struct complexity | More complex | Simpler |
Security Considerations
Related
- IntentExecutor - Main executor contract
- CompactIntentExecutor - Compact protocol execution
- Permit2IntentExecutor - Permit2-based execution