- 13 contract ABIs generated via forge inspect -> packages/contracts/abi/*.json
- apps/web: lib/wallet.ts (viem injected wallet), /connect page (connect + add Pharos network + PHRS balance), /agents page, /api/agents (registry events + demo fallback), /api/contracts (contract set + addresses)
- packages/contracts/deployments/{pharos-atlantic,localhost}.json
- web app now: 6 pages + 6 API routes
291 lines
5.2 KiB
JSON
291 lines
5.2 KiB
JSON
[
|
|
{
|
|
"type": "function",
|
|
"name": "attest",
|
|
"inputs": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "uint256",
|
|
"internalType": "uint256"
|
|
},
|
|
{
|
|
"name": "score",
|
|
"type": "int8",
|
|
"internalType": "int8"
|
|
},
|
|
{
|
|
"name": "uri",
|
|
"type": "string",
|
|
"internalType": "string"
|
|
}
|
|
],
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable"
|
|
},
|
|
{
|
|
"type": "function",
|
|
"name": "averageScoreX100",
|
|
"inputs": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "uint256",
|
|
"internalType": "uint256"
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "int256",
|
|
"internalType": "int256"
|
|
}
|
|
],
|
|
"stateMutability": "view"
|
|
},
|
|
{
|
|
"type": "function",
|
|
"name": "getAgent",
|
|
"inputs": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "uint256",
|
|
"internalType": "uint256"
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"name": "owner",
|
|
"type": "address",
|
|
"internalType": "address"
|
|
},
|
|
{
|
|
"name": "metadataURI",
|
|
"type": "string",
|
|
"internalType": "string"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "uint64",
|
|
"internalType": "uint64"
|
|
}
|
|
],
|
|
"stateMutability": "view"
|
|
},
|
|
{
|
|
"type": "function",
|
|
"name": "hasAttested",
|
|
"inputs": [
|
|
{
|
|
"name": "",
|
|
"type": "uint256",
|
|
"internalType": "uint256"
|
|
},
|
|
{
|
|
"name": "",
|
|
"type": "address",
|
|
"internalType": "address"
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "bool",
|
|
"internalType": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view"
|
|
},
|
|
{
|
|
"type": "function",
|
|
"name": "nextAgentId",
|
|
"inputs": [],
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "uint256",
|
|
"internalType": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view"
|
|
},
|
|
{
|
|
"type": "function",
|
|
"name": "primaryAgentId",
|
|
"inputs": [
|
|
{
|
|
"name": "",
|
|
"type": "address",
|
|
"internalType": "address"
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "uint256",
|
|
"internalType": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view"
|
|
},
|
|
{
|
|
"type": "function",
|
|
"name": "register",
|
|
"inputs": [
|
|
{
|
|
"name": "metadataURI",
|
|
"type": "string",
|
|
"internalType": "string"
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "uint256",
|
|
"internalType": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable"
|
|
},
|
|
{
|
|
"type": "function",
|
|
"name": "reputationOf",
|
|
"inputs": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "uint256",
|
|
"internalType": "uint256"
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"name": "count",
|
|
"type": "uint64",
|
|
"internalType": "uint64"
|
|
},
|
|
{
|
|
"name": "scoreSum",
|
|
"type": "int256",
|
|
"internalType": "int256"
|
|
}
|
|
],
|
|
"stateMutability": "view"
|
|
},
|
|
{
|
|
"type": "function",
|
|
"name": "updateMetadata",
|
|
"inputs": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "uint256",
|
|
"internalType": "uint256"
|
|
},
|
|
{
|
|
"name": "metadataURI",
|
|
"type": "string",
|
|
"internalType": "string"
|
|
}
|
|
],
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable"
|
|
},
|
|
{
|
|
"type": "event",
|
|
"name": "AgentRegistered",
|
|
"inputs": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "uint256",
|
|
"indexed": true,
|
|
"internalType": "uint256"
|
|
},
|
|
{
|
|
"name": "owner",
|
|
"type": "address",
|
|
"indexed": true,
|
|
"internalType": "address"
|
|
},
|
|
{
|
|
"name": "metadataURI",
|
|
"type": "string",
|
|
"indexed": false,
|
|
"internalType": "string"
|
|
}
|
|
],
|
|
"anonymous": false
|
|
},
|
|
{
|
|
"type": "event",
|
|
"name": "Attested",
|
|
"inputs": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "uint256",
|
|
"indexed": true,
|
|
"internalType": "uint256"
|
|
},
|
|
{
|
|
"name": "from",
|
|
"type": "address",
|
|
"indexed": true,
|
|
"internalType": "address"
|
|
},
|
|
{
|
|
"name": "score",
|
|
"type": "int8",
|
|
"indexed": false,
|
|
"internalType": "int8"
|
|
},
|
|
{
|
|
"name": "uri",
|
|
"type": "string",
|
|
"indexed": false,
|
|
"internalType": "string"
|
|
}
|
|
],
|
|
"anonymous": false
|
|
},
|
|
{
|
|
"type": "event",
|
|
"name": "MetadataUpdated",
|
|
"inputs": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "uint256",
|
|
"indexed": true,
|
|
"internalType": "uint256"
|
|
},
|
|
{
|
|
"name": "metadataURI",
|
|
"type": "string",
|
|
"indexed": false,
|
|
"internalType": "string"
|
|
}
|
|
],
|
|
"anonymous": false
|
|
},
|
|
{
|
|
"type": "error",
|
|
"name": "AlreadyAttested",
|
|
"inputs": []
|
|
},
|
|
{
|
|
"type": "error",
|
|
"name": "InvalidScore",
|
|
"inputs": []
|
|
},
|
|
{
|
|
"type": "error",
|
|
"name": "NotOwner",
|
|
"inputs": []
|
|
},
|
|
{
|
|
"type": "error",
|
|
"name": "SelfAttest",
|
|
"inputs": []
|
|
},
|
|
{
|
|
"type": "error",
|
|
"name": "UnknownAgent",
|
|
"inputs": []
|
|
}
|
|
]
|