Contract Reference

Key functions and events for direct contract interaction. All contracts are verified on Etherscan ↗.

SolverRegistry

0xB6ab964832808E49635fF82D1996D6a888ecB745

solidity
// Registration
function registerSolver(string metadataURI) returns (bytes32 solverId);
function updateMetadata(bytes32 solverId, string metadataURI);

// Bond Management
function depositBond(bytes32 solverId) payable;
function requestWithdrawal(bytes32 solverId, uint256 amount);
function executeWithdrawal(bytes32 solverId);

// Read Functions
function getSolver(bytes32 solverId) returns (SolverInfo);
function getBondBalance(bytes32 solverId) returns (uint256);
function getIntentScore(bytes32 solverId) returns (uint256);
function minimumBond() returns (uint256);  // 0.1 ETH

// Events
event SolverRegistered(bytes32 indexed solverId, address indexed owner);
event BondDeposited(bytes32 indexed solverId, uint256 amount);
event BondSlashed(bytes32 indexed solverId, uint256 amount, string reason);
event SolverJailed(bytes32 indexed solverId, uint8 jailCount);
event SolverBanned(bytes32 indexed solverId);

IntentReceiptHub

0xD66A1e880AA3939CA066a9EA1dD37ad3d01D977c

solidity
// Post Receipts
function postReceipt(IntentReceipt receipt) returns (bytes32 receiptId);
function postReceiptV2(IntentReceiptV2 receipt) returns (bytes32 receiptId);

// Disputes
function openDispute(
    bytes32 receiptId,
    bytes32 evidenceHash,
    uint8 reasonCode
) payable returns (bytes32 disputeId);
function resolveDeterministic(bytes32 disputeId);

// Finalization
function finalize(bytes32 receiptId);

// Read Functions
function getReceipt(bytes32 receiptId) returns (IntentReceipt);
function getReceiptV2(bytes32 receiptId) returns (IntentReceiptV2);
function getDisputeStatus(bytes32 disputeId) returns (DisputeStatus);
function challengeWindow() returns (uint256);  // 3600 (1 hour)

// Events
event ReceiptPosted(bytes32 indexed receiptId, bytes32 indexed solverId);
event ReceiptFinalized(bytes32 indexed receiptId);
event DisputeOpened(bytes32 indexed disputeId, bytes32 indexed receiptId);
event DisputeResolved(bytes32 indexed disputeId, bool solverFault);

DisputeModule

0x144DfEcB57B08471e2A75E78fc0d2A74A89DB79D

solidity
// Evidence
function submitEvidence(bytes32 disputeId, bytes32 evidenceHash);

// Optimistic Resolution
function postCounterBond(bytes32 disputeId) payable;
function escalateToArbitrator(bytes32 disputeId);
function resolveArbitration(bytes32 disputeId, bool solverFault);

// Read Functions
function counterBondWindow() returns (uint256);   // 86400 (24 hours)
function arbitrationTimeout() returns (uint256);   // 604800 (7 days)

// Events
event EvidenceSubmitted(bytes32 indexed disputeId, bytes32 evidenceHash);
event CounterBondPosted(bytes32 indexed disputeId, uint256 amount);
event DisputeEscalated(bytes32 indexed disputeId);
event ArbitrationResolved(bytes32 indexed disputeId, bool solverFault);

Dispute Reason Codes

CodeNameResolution
0TIMEOUTDeterministic (auto-slash)
1WRONG_AMOUNTDeterministic (auto-slash)
2CONSTRAINT_VIOLATIONDeterministic (auto-slash)
3INVALID_SIGNATUREDeterministic (auto-slash)
4OTHEROptimistic (counter-bond / arbitration)

Custom Errors

solidity
error SolverNotActive();
error InsufficientBond();
error ChallengeWindowExpired();
error ChallengeWindowActive();
error DisputeAlreadyOpen();
error UnauthorizedCaller();
error WithdrawalCooldownActive();
error SolverBanned();

Direct Interaction (cast)

bash
# Read minimum bond
cast call 0xB6ab964832808E49635fF82D1996D6a888ecB745 \
  "minimumBond()" --rpc-url https://rpc.sepolia.org

# Read challenge window (seconds)
cast call 0xD66A1e880AA3939CA066a9EA1dD37ad3d01D977c \
  "challengeWindow()" --rpc-url https://rpc.sepolia.org

# Read solver info
cast call 0xB6ab964832808E49635fF82D1996D6a888ecB745 \
  "getSolver(bytes32)" <solver-id> --rpc-url https://rpc.sepolia.org