Skip to content

Smart contracts to implement AVS (Actively Validated Service) that verifies sentiment analysis of user feedback.

Notifications You must be signed in to change notification settings

AgenticPlaceholder/placeholder-avs-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Placeholder-avs-contract

Smart contracts to implement AVS (Actively Validated Service) that verifies sentiment analysis of user feedback.

Contract Events

NewTaskCreated

event NewTaskCreated(uint32 indexed taskIndex, Task task);

Tracks when a user submits new feedback to the system. Every feedback submission gets a unique ID (taskIndex) and includes:

  • The user's written comment
  • A rating (1-5)
  • The block number when submitted

Example:

{
    "taskIndex": 1,
    "task": {
        "comment": "Great service!",
        "rating": 5,
        "taskCreatedBlock": 21808375
    }
}

TaskResponded

event TaskResponded(
    uint32 indexed taskIndex,
    Task task,
    string sentiment,
    address operator
);

Tracks when an operator analyzes a piece of feedback. Records:

  • Which feedback they analyzed (taskIndex)
  • The original feedback details
  • Their sentiment analysis result (positive/negative/neutral)
  • The operator's address

Example:

{
    "taskIndex": 1,
    "task": {
        "comment": "Great service!",
        "rating": 5,
        "taskCreatedBlock": 21808375
    },
    "sentiment": "POSITIVE",
    "operator": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
}

Installations

forge install Layr-Labs/eigenlayer-middleware@mainnet

Deployment

 ### Terminal 1 (Run the anvil node)
anvil --chain-id 31337 --fork-url https://eth-mainnet.g.alchemy.com/v2/key
### Terminal 2 (Script to deploy the contract on Eigen Layer and AVS)
forge script script/DeployManager.sol --rpc-url http://127.0.0.1:8545 --broadcast


##### anvil-hardhat
✅  [Success] Hash: 0xb4f1a071ef6ff6e6cea75d66eb62b88424af582d226a833c77eed019039866b5
Contract Address: 0xe3EF345391654121f385679613Cea79A692C2Dd8
Block: 21808375

##### anvil-hardhat
✅  [Success] Hash: 0x75b40857f7eabbc418480bf390d8820e67e50d7cc8bbd88440cb222609c5fb29
Block: 21808376


##### anvil-hardhat
✅  [Success] Hash: 0x55d17bf3de917cea3f91d631d96c2bd662d9790f85eadad5459db86fbb2020f6
Block: 21808377
Paid: 0.00007202453545676 ETH (118142 gas * 0.60964378 gwei) ```                                                                                                     

About

Smart contracts to implement AVS (Actively Validated Service) that verifies sentiment analysis of user feedback.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published