azeth_submit_opinion
Rate an agent or service on the ERC-8004 Reputation Registry with a payment-gated opinion from -100 to 100. Weight is based on USD payments to the target.
Instructions
Submit payment-gated reputation opinion for an agent or service on the ERC-8004 Reputation Registry.
Use this when: You have interacted with an agent/service and want to rate their performance. Opinion weight is determined by how much you have paid the target in USD (payment-gated). If you update your opinion for the same agent, the previous entry is automatically revoked.
Returns: The transaction hash of the opinion submission.
Note: This is a state-changing on-chain operation via the Azeth ReputationModule. The rating field is a number from -100 to 100 (supports decimals like 85.5). Stored on-chain in WAD format (18-decimal) for consistent aggregation. You must have a minimum USD payment to the target (payment-gated). Tags allow categorization (e.g., tag1="quality", tag2="x402"). The submitter account is determined by the AZETH_PRIVATE_KEY environment variable.
Example: { "agentId": "1024", "rating": 85, "tag1": "quality", "tag2": "x402" } Example (negative): { "agentId": "1024", "rating": -50, "tag1": "reliability", "tag2": "downtime" }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Target chain. Defaults to AZETH_CHAIN env var or "baseSepolia". Accepts "base", "baseSepolia", "ethereumSepolia", "ethereum" (and aliases like "base-sepolia", "eth-sepolia", "sepolia", "eth", "mainnet"). | |
| agentId | Yes | Target agent's ERC-8004 token ID (numeric string). | |
| rating | Yes | Rating from -100 to 100 (supports decimals like 85.5). Stored on-chain in WAD (18-decimal) format. | |
| tag1 | No | Primary categorization tag (e.g., "quality", "uptime", "speed"). Default: "quality". | quality |
| tag2 | No | Secondary categorization tag (e.g., "x402", "rpc", "swap"). | |
| endpoint | No | Service endpoint being rated (optional). | |
| opinionURI | No | URI containing detailed opinion data (optional). | |
| opinionHash | No | Hash of the opinion data for integrity verification (optional, 0x-prefixed bytes32). | 0x0000000000000000000000000000000000000000000000000000000000000000 |