Reference
Events
What the contract emits.
solidity
event AgentRegistered(address indexed agent, address indexed operator, string name);
event BondDeposited(address indexed agent, address indexed from, uint256 amount, uint256 bond);
event BondWithdrawn(address indexed agent, address indexed to, uint256 amount, uint256 bond);
event TaskCreated(uint256 indexed id, address indexed user, address indexed agent, Kind kind, uint64 deadline);
event TaskAccepted(uint256 indexed id, address indexed agent, uint256 compensation);
event TaskCancelled(uint256 indexed id);
event TaskDelivered(uint256 indexed id, address indexed agent, uint256 amountOut, uint256 fee);
event TaskFailed(uint256 indexed id, address indexed agent, address indexed user, uint256 refund, uint256 compensation);| Event | Emitted when | Notes |
|---|---|---|
AgentRegistered | An agent is registered | The only place the name is recorded |
BondDeposited | USDG is added to a bond | bond is the new total |
BondWithdrawn | The operator withdraws | bond is the new total |
TaskCreated | A user funds a task | Read the full terms with task(id) |
TaskAccepted | The agent accepts | compensation is now locked |
TaskCancelled | The user cancels | |
TaskDelivered | A task is delivered | amountOut is the swap output or the transfer amount |
TaskFailed | A missed deadline is settled | refund is the input amount. The fee is refunded too |