cic-contracts/solidity/AccountsIndex.sol

30 lines
1.0 KiB
Solidity
Raw Normal View History

2021-04-28 13:02:50 +02:00
pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: AGPL-3.0-or-later
// File-version: 6
2021-04-28 13:02:50 +02:00
2023-03-25 13:32:56 +01:00
interface IAccountsIndex {
// Address added to store, index in array.
event AddressAdded(uint256 indexed _idx, address _account);
2021-05-10 09:13:22 +02:00
// Return number of entries in index.
2021-04-28 13:02:50 +02:00
function entryCount() external view returns (uint256);
// Return entry at the spceificed index.
// Will revert if index is beyond array length.
// An entry result of 0 means the entry should be skipped, and not count towards entry count.
2021-04-28 13:02:50 +02:00
function entry(uint256) external view returns (address);
// Add an entry to the index. Incresases the entry count.
function add(address) external returns (bool);
// Verify that the entry exists in the index.
2023-08-03 16:16:33 +02:00
// Implements ACL
function have(address) external view returns (bool);
// Retrieve the timestamp when account was added.
// If time is not being tracked, a value of 0 should be returned.
function time(address) external view returns (uint256);
2021-04-28 13:02:50 +02:00
}