Reference
Contract ABIs
ABI reference for Agent Multiverse smart contracts.
The contract ABIs are available in the contracts/out/ directory after running forge build, and are also embedded in the frontend at src/config/contracts.ts.
AgentRegistry
Key Functions
function registerService(
string name,
string description,
string endpoint,
string repoUrl
) external returns (bytes32 serviceId)
function updateService(
bytes32 serviceId,
string description,
string endpoint
) external
function submitAudit(
bytes32 serviceId,
string reportUri,
bool reproducible
) external
function services(bytes32 serviceId) external view returns (
string name,
string description,
string endpoint,
string repoUrl,
address developer,
bool isVerified,
uint256 createdAt,
uint256 updatedAt
)
function getServiceCount() external view returns (uint256)
function serviceIds(uint256 index) external view returns (bytes32)
function getAudits(bytes32 serviceId) external view returns (Audit[])Events
event ServiceRegistered(bytes32 indexed serviceId, string name, address indexed developer)
event ServiceUpdated(bytes32 indexed serviceId)
event AuditSubmitted(bytes32 indexed serviceId, address indexed auditor)AgentPassport
Key Functions
function registerAgent(
address to,
string name,
string version,
string uri
) external returns (uint256 tokenId)
function setVerified(uint256 tokenId, bool verified) external
function agentData(uint256 tokenId) external view returns (
string name,
string version,
address owner,
bool isVerified
)
function balanceOf(address owner) external view returns (uint256)
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256)
function tokenURI(uint256 tokenId) external view returns (string)
function totalSupply() external view returns (uint256)Events
event AgentRegistered(uint256 indexed tokenId, string name, address indexed owner)
event AgentVerified(uint256 indexed tokenId)MultiverseBounty
Key Functions
function createBounty(
bytes32 serviceId,
address token,
uint256 amount
) external
function claimBounty(uint256 bountyId) external
function bounties(uint256 bountyId) external view returns (
bytes32 serviceId,
address sponsor,
uint256 amount,
address token,
bool claimed
)
function nextBountyId() external view returns (uint256)Events
event BountyCreated(uint256 indexed bountyId, bytes32 indexed serviceId, address indexed sponsor, uint256 amount)
event BountyClaimed(uint256 indexed bountyId, address indexed auditor, uint256 amount)Generating Fresh ABIs
After modifying contracts, regenerate ABIs:
cd contracts
forge buildThe compiled ABIs are in:
contracts/out/AgentRegistry.sol/AgentRegistry.jsoncontracts/out/AgentPassport.sol/AgentPassport.jsoncontracts/out/MultiverseBounty.sol/MultiverseBounty.json
Copy the abi field from these JSON files into src/config/contracts.ts for the frontend.