1+ // SPDX-License-Identifier: MIT
2+ pragma solidity >= 0.8.4 < 0.9 ;
3+
4+ /**
5+ * @title IAgentVaultsFacet
6+ * @notice Interface for the AgentVaultsFacet contract.
7+ */
8+ interface IAgentVaultsFacet {
9+
10+ /**
11+ * @notice Emitted when an agent vault is added.
12+ * @param agentVaultId The agent vault ID.
13+ * @param agentVaultAddress The agent vault address.
14+ */
15+ event AgentVaultAdded (
16+ uint256 indexed agentVaultId ,
17+ address indexed agentVaultAddress
18+ );
19+
20+ /**
21+ * @notice Emitted when an agent vault is removed.
22+ * @param agentVaultId The agent vault ID.
23+ * @param agentVaultAddress The agent vault address.
24+ */
25+ event AgentVaultRemoved (
26+ uint256 indexed agentVaultId ,
27+ address indexed agentVaultAddress
28+ );
29+
30+ /**
31+ * @notice Reverts if array lengths do not match.
32+ */
33+ error AgentsVaultsLengthsMismatch ();
34+
35+ /**
36+ * @notice Reverts if the agent vault ID is zero.
37+ * @param index The index in the input array.
38+ */
39+ error AgentVaultIdZero (
40+ uint256 index
41+ );
42+
43+ /**
44+ * @notice Reverts if the agent vault ID is already added.
45+ * @param agentVaultId The agent vault ID.
46+ */
47+ error AgentVaultIdAlreadyAdded (
48+ uint256 agentVaultId
49+ );
50+
51+ /**
52+ * @notice Reverts if the agent vault address is zero.
53+ * @param index The index in the input array.
54+ */
55+ error AgentVaultAddressZero (
56+ uint256 index
57+ );
58+
59+ /**
60+ * @notice Reverts if the agent vault address is already added.
61+ * @param agentVaultAddress The agent vault address.
62+ */
63+ error AgentVaultAddressAlreadyAdded (
64+ address agentVaultAddress
65+ );
66+
67+ /**
68+ * @notice Reverts if the agent vault is invalid.
69+ * @param agentVaultId The agent vault ID.
70+ */
71+ error InvalidAgentVault (
72+ uint256 agentVaultId
73+ );
74+
75+ /**
76+ * @notice Reverts if the agent is not available.
77+ * @param agentVault The agent vault address.
78+ */
79+ error AgentNotAvailable (
80+ address agentVault
81+ );
82+
83+ /**
84+ * Returns the list of registered agent vault IDs and their corresponding addresses.
85+ * @return _agentVaultIds The list of registered agent vault IDs.
86+ * @return _agentVaultAddresses The list of registered agent vault addresses.
87+ */
88+ function getAgentVaults ()
89+ external view
90+ returns (uint256 [] memory _agentVaultIds , address [] memory _agentVaultAddresses );
91+ }
0 commit comments