29 lines
1.0 KiB
Solidity
29 lines
1.0 KiB
Solidity
pragma solidity >=0.6.12;
|
|
|
|
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
// File-version: 6
|
|
|
|
interface IAccountsIndex {
|
|
// Address added to store, index in array.
|
|
event AddressAdded(uint256 indexed _idx, address _account);
|
|
|
|
// Return number of entries in index.
|
|
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.
|
|
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.
|
|
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);
|
|
}
|