cic-contracts/solidity/Faucet.sol

40 lines
1.6 KiB
Solidity
Raw Normal View History

2020-12-11 07:48:54 +01:00
pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
2023-03-25 13:32:56 +01:00
// SPDX-License-Identifier: AGPL-3.0-or-later
// File-version: 6
2020-12-11 07:48:54 +01:00
2023-03-25 13:32:56 +01:00
interface IFaucet {
// Tokens were given to an address
event Give(address indexed _recipient, address indexed _token, uint256 _value);
// The amount that the faucet disperses has changed
2021-05-10 09:13:22 +02:00
event FaucetAmountChange(uint256 _value);
// Address of token the faucet represents
// The faucet will return gas tokens with the zero-address is returned.
2021-04-28 11:59:47 +02:00
function token() external returns (address);
// Amount of tokens the faucet gives out
2021-05-10 09:13:22 +02:00
function tokenAmount() external returns (uint256);
// Give tokens to the given recipient. Returns amount of tokens given.
function giveTo(address _recipient) external returns (uint256);
// Give tokens to yourself. Returns amount of tokens given.
function gimme() external returns (uint256);
// Check if faucet may be used in the current contract state by _recipient
function check(address _recipient) external view returns (bool);
// Returns timestamp when faucet may be used again by _recipient
// If 0 is returned, the address has not yet been used.
// A return value of max(uint256) indicates that the faucet may not be used again.
function nextTime(address _recipient) external returns (uint256);
// Returns the token balance under which faucet may be used again by _recipient
// A return value of max(uint256) indicates that the faucet may be used regardless
// of the token balance of _recipient
function nextBalance(address _recipient) external returns (uint256);
2020-12-11 07:48:54 +01:00
}