This repository contains the smart contract for ZeroCom, which manages operations and transactions for proxy AI agents within a decentralized environment. The contract handles agent registration, spending caps, operation rates, and idempotency key management.
ZeroCom provides a deAI messaging platform.The smart contract allows agents to register themselves in the controller; set spending caps, process operations, and transfer tokens based on predefined or configurable rates.
| Feature | Description |
|---|---|
| Agent Registration | Allows agents to register and set their spending limits. |
| Spending Caps | Set and manage spending caps for each agent. |
| Operation Rates | Handle multiple operation types (Low, Medium, High) with configurable rates. |
| Idempotency Management | Generate and process idempotency keys to avoid repeated operations. |
| Token Transfers | Facilitates token transfers based on usage rates and predefined operations. |
Here is the fixed table:
| Contract Name | Description |
|---|---|
| controller.sol | Main controller contract managing the agents, operations, and token transfers. |
| agent.sol | The agent contract responsible for managing tokens, documents, and metadata while interacting with the ZeroComController. |
To work with this repository, you need:
You can compile and deploy the contract using the following commands:
# Compile the contract
solcjs --bin --abi ./controller.solThe repository contains a standalone script to verify the smart contract functionality. Run with following commands:
- Install dependencies:
npm install- Run the tests:
node zerocom-contracts/script-zerocom.js