Create Tasks
Overview
The Othentic CLI allows you to define different Tasks to be performed by Operators. This guide covers the commands needed to define these tasks via Task Definitions.
Read More
Prerequisites
Access to AVS Governance multisig owner account
Attestation Center contract address of the AVS
Create Tasks
Run the following command:
otcli network create-task-definition
Use --browser-sign
flag for the browser wallets support like SAFE Multisig.
Follow these steps when prompted:
Provide the private key of the multi-sig address.
Enter the Attestation Center contract address.
Enter all the Task details
Task Name
Base Rewards (e.g. 0.001 ether; default: 0)
Attester rewards
Performer rewards
Aggregator rewards
Minimum voting power
Restricted attester IDs
Max number of Attesters
Expiry block – When the task expires (leave blank for never)
Implement Task Execution Service Logic
Write the logic that the Performer will execute
Implement Task Validation Service Logic
Write the logic that the Attester will execute
Using scripts
New Task Definitions are created on-chain via the AttestationCenter
smart contract. To create a task definition, call createNewTaskDefinition
as shown in the example below:
const attestationCenter = new ethers.Contract(
ATTESTATION_CENTER_ADDRESS,
['function createNewTaskDefinition(string,(uint256,uint256,uint256,uint256,uint256,uint256,uint256[])) external']
);
const tx = await attestationCenter.createNewTaskDefinition(
"Example Task", // Human-readable name
{
ethers.MaxUint256, // Never expires
ethers.parseEther('0.01'), // Reward for attestation
ethers.parseEther('0.1'), // Reward for performer
ethers.parseEther('0.005'), // Reward for aggregation
0, // Disable disputes
0, // Minimum Voting Power
[] // Restricted Operator Set
}
);
await tx.wait();
Last updated