A specialized agent built on ElizaOS that audits smart contracts and publishes results to a Hedera Consensus Service (HCS) topic for public verification.
This project extends ElizaOS with Hedera integration to create an autonomous agent that:
- Receives smart contract audit requests through a Hedera topic
- Performs comprehensive security and quality audits of smart contracts
- Publishes detailed audit reports and scores to a public Hedera topic
- Maintains a transparent and immutable record of all audits
Hedera HIP-991 Permissionless revenue-generating Topic Ids for Topic Operators: To Interact with the agent, you need to send a message to the configured topic that requires a fee. This fee will be used to pay for the agent's services.
Hedera HCS-10 Topic Operators: To interact with the agent, you need to be a topic operator.
- audit-contract.ts - The main action that performs the audit
- hedera-topics.ts - The client that handles the Hedera topics communication
- Smart Contract Analysis: Deep analysis of Solidity smart contracts for security vulnerabilities and best practices
- Transparent Auditing: All audit results are published to a public Hedera topic for verification
- Automated Scoring: Comprehensive scoring system for smart contract quality and security
- Hedera Integration: Built on Hedera's Consensus Service for reliable and transparent communication
- Real-time Updates: Immediate publication of audit results to the public topic
The system consists of several key components:
- ElizaOS Core: Base agent framework
- Hedera Plugin: Handles all Hedera network interactions
- Smart Contract Analyzer: Performs contract analysis and scoring
- Topic Management: Manages HCS topics for request/response communication
- Audit Publisher: Publishes results to public topic
- Node.js (v18 or higher)
- pnpm
- Hedera Testnet/Previewnet account
- WSL2 if using Windows
- Install dependencies:
pnpm install- Configure environment variables:
cp .env.example .envEdit .env with your Hedera credentials and configuration.
- Build the project:
pnpm run buildRequired environment variables:
HEDERA_PRIVATE_KEY=your_private_key
HEDERA_ACCOUNT_ID=your_account_id
HEDERA_NETWORK_TYPE=testnet # or previewnet
HEDERA_KEY_TYPE=ED25519 # or ECDSA
- Start the agent:
pnpm startIt will use the default hedera character.
- Interact with the agent using the web client or sending messages to the configured topic.
- Smart contract is submitted to the audit request topic
- Agent receives the request and begins analysis
- Analysis includes:
- Security vulnerabilities
- Code quality
- Gas optimization
- Best practices compliance
- Results are published in the same topic the audit was asked for.
- The score is also published separatedly in a public topic linking the code.
- Used to submit contracts for audit
- Requires a fee to send the message, which will be the payment for the agent. In compliance with HIP-991
- Contains all audit results
- ElizaOS - Base agent framework
- Hedera - Distributed ledger technology
- Hashgraph SDK - Hedera JavaScript SDK
Smart contract security is critical in Web3, but current audit processes are:
- Expensive
- Time-consuming
- Not transparent
- Difficult to verify
An autonomous agent that:
- Automates smart contract auditing
- Uses Hedera's Consensus Service for transparent communication
- Implements HIP-991 for sustainable revenue generation
- Provides immutable audit records on-chain
-
Autonomous Auditing
- Self-operating agent that performs comprehensive audits
- No human intervention required
- Consistent and objective analysis
-
Transparent Process
- All audit requests and results stored on Hedera
- Public verification of audit results
- Immutable audit history
-
Sustainable Business Model
- Implements HIP-991 for revenue generation
- Fair pricing through topic message fees
- Self-sustaining operation
- Democratizes smart contract auditing
- Reduces audit costs
- Increases transparency in Web3
- Creates new revenue opportunities for developers
- Expand to multiple smart contract languages
- Implement machine learning for better vulnerability detection
- Create a reputation system for auditors
- Develop a web interface for easy interaction
[Insert demo video or live demonstration details here]
[Insert team member names and roles here]
[Insert contact information for follow-up questions]