Deployed: Mar 3, 2026 1:06 PM EST
Contract: registry-wot.testnet
Explorer: https://testnet.nearblocks.io/address/registry-wot.testnet
Contract was throwing PrepareError(Deserialization) on every call.
- Rust version incompatibility - Needed Rust 1.86.0 (not 1.87+)
- Missing JsonSchema implementations -
AccountIddoesn't implementJsonSchema - Build tool requirement - Must use
cargo near build(not plaincargo build)
- Set Rust 1.86.0:
rustup override set 1.86.0 - Changed Endorsement struct to use
Stringinstead ofAccountId:pub struct Endorsement { pub endorser: String, // Changed from AccountId pub endorsed: String, // Changed from AccountId // ... }
- Build with cargo-near:
cargo near build non-reproducible-wasm - Deploy optimized wasm from
target/near/directory
# Register agent
near call registry-wot.testnet register \
'{"name":"MyAgent","capabilities":["trading"],"endpoint":null,"public_key":"abc","description":"Test"}' \
--accountId YOUR_ACCOUNT --networkId testnet
# Get agent info
near view registry-wot.testnet get_agent \
'{"account_id":"alice-test.testnet"}' --networkId testnet
# List all agents
near view registry-wot.testnet get_total_count '{}' --networkId testnet# Endorse an agent
near call registry-wot.testnet endorse_agent \
'{"endorsed":"alice-test.testnet","capability":"data-analysis","trust_level":"Full"}' \
--accountId registry-wot.testnet --networkId testnet
# View endorsements
near view registry-wot.testnet get_endorsements \
'{"agent_id":"alice-test.testnet"}' --networkId testnet
# Compute trust score
near view registry-wot.testnet compute_trust_score \
'{"agent_id":"alice-test.testnet","capability":"data-analysis"}' --networkId testnet
# Discover trusted agents
near view registry-wot.testnet discover_trusted \
'{"capability":"data-analysis","min_trust":40,"limit":10}' --networkId testnet✅ Agent registration works ✅ Endorsement system works ✅ Trust score computation works ✅ Discovery by capability works ✅ Web of Trust graph traversal ready
- Size: 261 KB (optimized with wasm-opt)
- Functions: 25+ methods
- Storage: UnorderedMap-based (scalable)
- Gas: Optimized for low cost
- Mainnet deployment - Ready to deploy
- Frontend UI - Build trust graph visualization
- Integration - Connect to Gork Protocol P2P layer
- Testing - Add more integration tests
cd /Users/asil/.openclaw/workspace/gork-protocol/contracts/registry
# Set correct Rust version
rustup override set 1.86.0
# Build optimized wasm
cargo near build non-reproducible-wasm
# Deploy
near deploy ACCOUNT_NAME target/near/gork_agent_registry.wasm --networkId testnetStatus: ✅ WORKING - Ready for production use!