Smart contracts for TRC-8004 (Trustless Agent) support on the TRON network.
TRC-8004 is an open, neutral standard for trustless AI agent identity, reputation, and validation. It provides a standardized way for agents to be registered as unique identities (NFTs) and builds a decentralized trust layer around them.
- Identity First: Agents are represented as TRC-721 tokens, making them ownable, transferable, and easily discoverable.
- On-Chain Reputation: A transparent feedback system for agents to build verifiable track records.
- Independent Validation: A framework for agents to request and receive third-party validation (TEE, zkML, or human audits) of their work.
- Trustless Integration: Verified payment wallets linked to agent identities for secure financial interactions.
- TRC-721 Identity Registry: Agents are minted as NFTs with unique IDs and metadata storage.
- Verified Agent Wallets: Secure linking of payment wallets to agents using TRC-712 signatures.
- Spam-Resistant Feedback: Anyone can leave feedback, with on-chain aggregation and revocation support.
- Validation Hooks: Generic interface for requesting and recording independent validations.
- Tron-Optimized: Designed for the TRON network with high throughput and low fees.
- Flexible Metadata: On-chain key-value metadata storage for agent-specific configurations.
The project consists of three main registry contracts:
IdentityRegistry.sol: The core contract that manages agent registration (as TRC-721), metadata, and payment wallet verification.ReputationRegistry.sol: Manages feedback and reputation scores, allowing clients to rate agents and agents to respond.ValidationRegistry.sol: Handles validation requests from agents to independent validators and records their responses.
- Register: An owner registers an agent in
IdentityRegistry, receiving an NFT. - Verify Wallet: The agent's payment wallet signs a message to prove ownership, which is then recorded in
IdentityRegistry. - Validate: The agent requests validation for a task in
ValidationRegistry; a validator provider (e.g., a TEE) submits the result. - Interact & Feedback: Clients interact with the agent and provide feedback in
ReputationRegistry.
- IdentityRegistry : TFLvivMdKsk6v2GrwyD2apEr9dU1w7p7Fy
- ReputationRegistry : TFbvfLDa4eFqNR5vy24nTrhgZ74HmQ6yat
- ValidationRegistry : TLCWcW8Qmo7QMNoAKfBhGYfGpHkw1krUEm
- IdentityRegistry : TDDk4vc69nzBCbsY4kfu7gw2jmvbinirj5
- ReputationRegistry : TBVaGd6mBuGuN5ebcvPvRaJo4rtEWqsW6Y
- ValidationRegistry : TGGkHDHhBzhFcLNcEogAWJkvfFYy4jyrSw
- IdentityRegistry : TH775ZzfJ5V25EZkFuX6SkbAP53ykXTcma
- ReputationRegistry : TTkds2ZZKBTChZHho4wcWAa7eWQTxh5TUT
- ValidationRegistry : TQBFHtKRiaQjc1xp4LtmmXKYdA7JLN89w3
- Node.js: v18+
- pnpm or npm
- Solidity: 0.8.25
- For TRON Deployment: @sun-protocol/sunhat and a TRON RPC URL + deployer private key.
npm install
# or
pnpm installnpm run compileThis project supports both Hardhat and Foundry for testing.
Run Hardhat tests:
npm testRun Foundry tests:
npm run test-foundryEnsure your .env is configured with TRON_PRIVATE_KEY and TRON_RPC_URL.
npm run deploycontracts/: Core smart contract logic.interfaces/: Solidity interfaces for TRC-8004.
test/: Hardhat and Foundry test suites.scripts/: Deployment and utility scripts.deploy/: Deployment configurations for Sunhat.
The IdentityRegistry uses TRC-712 for secure wallet verification. Agent wallets are automatically reset upon NFT transfer to ensure security of the new owner.
Note: These contracts are reference implementations and should undergo a professional audit before mainnet deployment.