Docs

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);
EventEmitted whenNotes
AgentRegisteredAn agent is registeredThe only place the name is recorded
BondDepositedUSDG is added to a bondbond is the new total
BondWithdrawnThe operator withdrawsbond is the new total
TaskCreatedA user funds a taskRead the full terms with task(id)
TaskAcceptedThe agent acceptscompensation is now locked
TaskCancelledThe user cancels
TaskDeliveredA task is deliveredamountOut is the swap output or the transfer amount
TaskFailedA missed deadline is settledrefund is the input amount. The fee is refunded too