Skip to content

Commit c217206

Browse files
committed
Update to version 0.1.22, added new interfaces for FAssets asset management, agent ping, and transfer fees, along with related data structures for agent and collateral management.
1 parent dc6126a commit c217206

30 files changed

+5152
-4
lines changed

coston/IAgentPing.sol

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity >=0.7.6 <0.9;
3+
4+
interface IAgentPing {
5+
/**
6+
* Agent bot liveness check.
7+
* @param agentVault the agent vault whose owner bot to ping
8+
* @param sender the account that triggered ping; helps bot decide whether it is important to answer
9+
* @param query off-chain defined id of the query
10+
*/
11+
event AgentPing(
12+
address indexed agentVault,
13+
address indexed sender,
14+
uint256 query);
15+
16+
/**
17+
* Response to agent bot liveness check.
18+
* @param agentVault the pinged agent vault
19+
* @param owner owner of the agent vault (management address)
20+
* @param query repeated `query` from the AgentPing event
21+
* @param response response data to the query
22+
*/
23+
event AgentPingResponse(
24+
address indexed agentVault,
25+
address indexed owner,
26+
uint256 query,
27+
string response);
28+
29+
/**
30+
* Used for liveness checks, simply emits AgentPing event.
31+
* @param _agentVault the agent vault whose owner bot to ping
32+
* @param _query off-chain defined id of the query
33+
*/
34+
function agentPing(
35+
address _agentVault,
36+
uint256 _query
37+
) external;
38+
39+
/**
40+
* Used for liveness checks, the bot's response to AgentPing event.
41+
* Simply emits AgentPingResponse event identifying the owner.
42+
* NOTE: may only be called by the agent vault owner
43+
* @param _agentVault the pinged agent vault
44+
* @param _query repeated `_query` from the agentPing
45+
* @param _response response data to the query
46+
*/
47+
function agentPingResponse(
48+
address _agentVault,
49+
uint256 _query,
50+
string memory _response
51+
) external;
52+
}

0 commit comments

Comments
 (0)