|
| 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 | + * @notice Emitted when an agent vault is added. |
| 11 | + * @param agentVaultId The agent vault ID. |
| 12 | + * @param agentVaultAddress The agent vault address. |
| 13 | + */ |
| 14 | + event AgentVaultAdded( |
| 15 | + uint256 indexed agentVaultId, |
| 16 | + address indexed agentVaultAddress |
| 17 | + ); |
| 18 | + |
| 19 | + /** |
| 20 | + * @notice Emitted when an agent vault is removed. |
| 21 | + * @param agentVaultId The agent vault ID. |
| 22 | + * @param agentVaultAddress The agent vault address. |
| 23 | + */ |
| 24 | + event AgentVaultRemoved( |
| 25 | + uint256 indexed agentVaultId, |
| 26 | + address indexed agentVaultAddress |
| 27 | + ); |
| 28 | + |
| 29 | + /** |
| 30 | + * @notice Reverts if array lengths do not match. |
| 31 | + */ |
| 32 | + error AgentsVaultsLengthsMismatch(); |
| 33 | + |
| 34 | + /** |
| 35 | + * @notice Reverts if the agent vault ID is zero. |
| 36 | + * @param index The index in the input array. |
| 37 | + */ |
| 38 | + error AgentVaultIdZero(uint256 index); |
| 39 | + |
| 40 | + /** |
| 41 | + * @notice Reverts if the agent vault ID is already added. |
| 42 | + * @param agentVaultId The agent vault ID. |
| 43 | + */ |
| 44 | + error AgentVaultIdAlreadyAdded(uint256 agentVaultId); |
| 45 | + |
| 46 | + /** |
| 47 | + * @notice Reverts if the agent vault address is zero. |
| 48 | + * @param index The index in the input array. |
| 49 | + */ |
| 50 | + error AgentVaultAddressZero(uint256 index); |
| 51 | + |
| 52 | + /** |
| 53 | + * @notice Reverts if the agent vault address is already added. |
| 54 | + * @param agentVaultAddress The agent vault address. |
| 55 | + */ |
| 56 | + error AgentVaultAddressAlreadyAdded(address agentVaultAddress); |
| 57 | + |
| 58 | + /** |
| 59 | + * @notice Reverts if the agent vault is invalid. |
| 60 | + * @param agentVaultId The agent vault ID. |
| 61 | + */ |
| 62 | + error InvalidAgentVault(uint256 agentVaultId); |
| 63 | + |
| 64 | + /** |
| 65 | + * @notice Reverts if the agent is not available. |
| 66 | + * @param agentVault The agent vault address. |
| 67 | + */ |
| 68 | + error AgentNotAvailable(address agentVault); |
| 69 | + |
| 70 | + /** |
| 71 | + * Returns the list of registered agent vault IDs and their corresponding addresses. |
| 72 | + * @return _agentVaultIds The list of registered agent vault IDs. |
| 73 | + * @return _agentVaultAddresses The list of registered agent vault addresses. |
| 74 | + */ |
| 75 | + function getAgentVaults() |
| 76 | + external |
| 77 | + view |
| 78 | + returns ( |
| 79 | + uint256[] memory _agentVaultIds, |
| 80 | + address[] memory _agentVaultAddresses |
| 81 | + ); |
| 82 | +} |
0 commit comments