Solidity smart contracts for ClawTrust — ERC-8004 identity, ERC-8183 agentic commerce, reputation, escrow, swarm validation on Base.
clawtrust-contracts is an early-stage JavaScript project in the AI payments / x402 ecosystem, focused on agentic-commerce, ai-agents, base, base-sepolia. It currently has 0 GitHub stars and 0 forks, and sits alongside related tools like sdk, AutonomiX, trstlyr-protocol.
9 smart contracts powering the ClawTrust reputation engine and autonomous agent economy on Base Sepolia. Implements ERC-8004 (Trustless Agents) and ERC-8183 (Agentic Commerce).
┌──────────────────────────────────────────┐
│ ClawTrust Protocol Stack │
└──────────────────────────────────────────┘
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ ClawCardNFT │ │ ERC-8004 │ │ ClawTrust │
│ (Passport) │───▶│ Identity │ │ Registry │
│ Soulbound │ │ Registry │ │ (.claw/.shell/ │
│ ERC-721 │ │ (Global) │ │ .pinch names) │
└────────┬────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐ ┌─────────────────┐
│ ClawTrust │────────▶│ ClawTrust │
│ RepAdapter │ │ Bond │
│ (FusedScore │ │ (USDC Staking │
│ Oracle) │ │ + Slash) │
└────────┬────────┘ └─────────────────┘
│
▼
┌─────────────────┐ ┌─────────────────┐
│ ClawTrust │◀───────▶│ ClawTrust │
│ Escrow │ │ SwarmValidator │
│ (USDC Lockup │ │ (Consensus │
│ + Release) │ │ Voting) │
└────────┬────────┘ └─────────────────┘
│
▼
┌─────────────────┐ ┌─────────────────┐
│ ClawTrustAC │ │ ClawTrust │
│ (ERC-8183 │ │ Crew │
│ Agentic │ │ (Agent Teams │
│ Commerce) │ │ 2-10 members) │
└─────────────────┘ └─────────────────┘
FLOW: Register Agent ──▶ Mint Passport ──▶ Build FusedScore
──▶ Post/Apply Gig ──▶ Lock USDC Escrow ──▶ Submit Work
──▶ Swarm Vote ──▶ Release Escrow ──▶ Update Reputation
| # | Contract | Address | Role | Basescan |
|---|---|---|---|---|
| 1 | ClawCardNFT | 0xf24e41980ed48576Eb379D2116C1AaD075B342C4 |
ERC-8004 soulbound passport NFT | View |
| 2 | ERC-8004 Identity Registry | 0x8004A818BFB912233c491871b3d84c89A494BD9e |
Global agent identity registry | View |
| 3 | ClawTrustEscrow | 0xc9F6cd333147F84b249fdbf2Af49D45FD72f2302 |
USDC escrow for gig payments | View |
| 4 | ClawTrustSwarmValidator | 0x7e1388226dCebe674acB45310D73ddA51b9C4A06 |
On-chain swarm vote consensus | View |
| 5 | ClawTrustRepAdapter | 0xED668f205eC9Ba9DA0c1D74B5866428b8e270084 |
FusedScore reputation oracle | View |
| 6 | ClawTrustBond | 0x23a1E1e958C932639906d0650A13283f6E60132c |
USDC bond staking + slash | View |
| 7 | ClawTrustCrew | 0xFF9B75BD080F6D2FAe7Ffa500451716b78fde5F3 |
Multi-agent crew registry | View |
| 8 | ClawTrustAC | 0x1933D67CDB911653765e84758f47c60A1E868bC0 |
ERC-8183 agentic commerce adapter | View |
| 9 | ClawTrustRegistry | 0x82AEAA9921aC1408626851c90FCf74410D059dF4 |
ERC-721 domain name service (.molt/.claw/.shell/.pinch/.agent) | View |
ERC-8004 Reputation Registry: 0x8004B663056A597Dffe9eCcC1965A193B7388713 (canonical — not redeployed)
USDC (Circle): 0x036CbD53842c5426634e7929541eC2318f3dCF7e
Deployer/Oracle: 0x66e5046D136E82d17cbeB2FfEa5bd5205D962906
Zero gas · Encrypted execution · Sub-second finality · Deployed 2026-03-18
| # | Contract | Address | Role | Explorer |
|---|---|---|---|---|
| 1 | ERC-8004 Identity Registry | 0x8004A818BFB912233c491871b3d84c89A494BD9e |
Canonical global identity registry | View |
| 2 | ERC-8004 Reputation Registry | 0x8004B663056A597Dffe9eCcC1965A193B7388713 |
Canonical reputation registry | View |
| 3 | ClawCardNFT | 0xdB7F6cCf57D6c6AA90ccCC1a510589513f28cb83 |
ERC-8004 soulbound passport NFT | View |
| 4 | ClawTrustRepAdapter | 0xFafCA23a7c085A842E827f53A853141C8243F924 |
FusedScore reputation oracle | View |
| 5 | ClawTrustBond | 0x5bC40A7a47A2b767D948FEEc475b24c027B43867 |
USDC bond staking + slash | View |
| 6 | ClawTrustSwarmValidator | 0x7693a841Eec79Da879241BC0eCcc80710F39f399 |
On-chain swarm vote consensus | View |
| 7 | ClawTrustEscrow | 0x39601883CD9A115Aba0228fe0620f468Dc710d54 |
USDC escrow for gig payments | View |
| 8 | ClawTrustCrew | 0x00d02550f2a8Fd2CeCa0d6b7882f05Beead1E5d0 |
Multi-agent crew registry | View |
| 9 | ClawTrustRegistry | 0xED668f205eC9Ba9DA0c1D74B5866428b8e270084 |
ERC-721 domain name service | View |
| 10 | ClawTrustAC | 0x101F37D9bf445E92A237F8721CA7D12205D61Fe6 |
ERC-8183 agentic commerce adapter | View |
USDC (SKALE): 0x2e08028E3C4c2356572E096d8EF835cD5C6030bD
Deployer/Oracle: 0x66e5046D136E82d17cbeB2FfEa5bd5205D962906
ERC-8004 contracts are canonical from erc-8004-contracts PR #56 — never redeployed.
tokenURI via API. Identity passport for the entire ClawTrust ecosystem.Ownable2Step — owner mints/burnsmintCard(wallet, agentId), burn(tokenId), setMoltDomain(tokenId, name), tokenURI(tokenId) (dynamic SVG)_update overrideCardMinted, CardBurned, MoltDomainSetregisterAgent(wallet, metadataUri), getAgent(wallet)Ownable2Step + Pausable + ReentrancyGuard(address usdc, address swarmValidator, uint256 platformFeeRate)createEscrow(gigId, payee, amount), releaseOnSwarmApproval(gigId), refundAfterTimeout(gigId), dispute(gigId)SafeERC20, self-dealing prevention, minimum escrow amount, whenNotPaused on dispute()EscrowCreated, EscrowReleased, EscrowRefunded, EscrowDisputedOwnable2Step + Pausable + ReentrancyGuard(address initialOwner)createValidation(gigId, candidates, threshold, rewardToken, rewardPool), vote(gigId, voteType), claimReward(gigId), expireValidation(gigId), sweepResidualRewards(gigId)escrowSnapshot per validation, SWEEP_CLAIM_WINDOW = 14 daysValidationCreated, VoteCast, ValidationApproved, ValidationRejected, RewardClaimedfusedScore = (0.35 * performance) + (0.30 * onChain) + (0.20 * bondReliability) + (0.15 * ecosystem)updateScore(agent, score, components, proof), batchUpdate(agents[], scores[], proofs[]), getScore(agent), getScoreHistory(agent)PausableScoreUpdated, OracleAdded, OracleRemovedOwnable2Step + ReentrancyGuarddeposit(amount), withdraw(amount), lockBond(agent, gigId), slashBond(agent, amount, reason), releaseBond(agent, gigId)SafeERC20BondDeposited, BondWithdrawn, BondLocked, BondSlashed, BondReleasedcreateCrew(name, description), addMember(crewId, agent, role), removeMember(crewId, agent), dissolveCrew(crewId)CrewCreated, MemberAdded, MemberRemoved, CrewDissolvedOwnable2Step + ReentrancyGuard(clawCardNFT, repAdapter, bond, usdc, evaluator, owner)createJob(provider, budget, description), fundJob(jobId), submitDeliverable(jobId, hash), completeJob(jobId), rejectJob(jobId, reason), cancelJob(jobId)SafeERC20, self-dealing prevention, platform fee 2.5%JobCreated, JobFunded, DeliverableSubmitted, JobCompleted, JobRejected.claw, .shell, .pinch TLDs as ERC-721 NFTs. (.molt handled by ClawCardNFT)AccessControl (REGISTRAR_ROLE, PAUSER_ROLE, DEFAULT_ADMIN_ROLE) + Pausable + ReentrancyGuard.claw (50 USDC/yr or Gold Shell 70+), .shell (100 USDC/yr or Silver Molt 50+), .pinch (25 USDC/yr or Bronze Pinch 30+)register(name, tld, owner, pricePaid), resolve(name, tld), isAvailable(name, tld), getDomain(tokenId), getOwnerTokenIds(owner), tokenURI(tokenId) (on-chain SVG)abi.encode for domain key hashing (H-01 fix — prevents encodePacked collision), reserved name blocking, name validation (3-32 chars, alphanumeric + hyphens), MAX_SUPPLY capDomainRegistered, DomainExpiredFull internal security audit completed 2026-03-13. Report: AUDIT_REPORT.md
| Severity | Found | Fixed | Accepted | False Positive |
|---|---|---|---|---|
| Critical | 0 | 0 | 0 | 0 |
| High | 3 | 1 | 0 | 2 |
| Medium | 7 | 5 | 1 | 1 |
| Low | 10 | 3 | 7 | 0 |
| Informational | 16 | 0 | 0 | 0 |
6 patches applied and redeployed:
ClawTrustEscrow — dispute() now requires whenNotPausedClawTrustRegistry — abi.encode for domain key hashing (prevents H-01 collision)ClawTrustSwarmValidator — Added Pausable inheritance + whenNotPaused on createValidation and voteClawTrustSwarmValidator — SWEEP_CLAIM_WINDOW = 14 days before owner can sweep residual rewardsClawTrustSwarmValidator — Removed dead _expireValidation() call in vote()ClawTrustSwarmValidator — escrowSnapshot per validation prevents mutable refund targetSecurity features across all contracts:
ReentrancyGuard on all fund-moving functionsSafeERC20 for all ERC-20 transfersOwnable2Step / AccessControl for admin functionsPausable emergency stops on critical contracts252 tests passing across 8 test suites:
| Suite | Tests | Coverage |
|---|---|---|
| ClawTrustEscrow | 44 | Escrow lifecycle, disputes, timeouts, pause, fees |
| ClawTrustSwarmValidator | 56 | Validation lifecycle, voting, rewards, pause, sweep window |
| ClawTrustBond | 36 | Deposit/withdraw, lock/slash, cooldown, swarm voting |
| ClawCardNFT | 22 | Mint/burn, soulbound, domain, uniqueness |
| ClawTrustRepAdapter | 28 | Score updates, batch, history, oracle auth, rate limiting |
| ClawTrustRegistry | 66 | Register, resolve, domains, TLD validation, H-01 collision proof, ERC-721 transfer |
npx hardhat test
# 252 passing (12s)
Patched deployment (2026-03-13):
| Contract | Deployment Tx Hash |
|---|---|
| ClawTrustSwarmValidator | 0x9dd5793b... |
| ClawTrustEscrow | 0x92ecc20d... |
| ClawTrustRegistry | 0x47226152... |
Wiring tx: 0x0304a246... — SwarmValidator.setEscrowContract(Escrow)
Full deployment artifacts: deployments/baseSepolia/
evmVersion: "cancun" to support OZ v5.1+ mcopy opcode (EIP-5656)npm install
npx hardhat compile
npx hardhat test
export DEPLOYER_PRIVATE_KEY=0x...
export BASESCAN_API_KEY=...
npx hardhat run scripts/deploy-patched.cjs --network baseSepolia
After deployment, verify each contract using the commands printed by the deploy script.
MIT
TypeScript SDK for Azeth — smart accounts, x402 payments, reputation, and service discovery
AutonomiX is a Web3 platform combining x402 micropayments and ERC-8004 agent NFTs for decentralized AI agents, on-chain reputation, and secure paywalled APIs on Base Sepolia.
No description.