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
|
2023-03-21 21:46:08 +01:00
|
|
|
// File-version: 6
|
2020-12-11 07:48:54 +01:00
|
|
|
|
2023-03-25 13:32:56 +01:00
|
|
|
interface IFaucet {
|
2023-03-25 12:14:46 +01:00
|
|
|
// Tokens were given to an address
|
2023-03-21 21:46:08 +01:00
|
|
|
event Give(address indexed _recipient, address indexed _token, uint256 _value);
|
2023-03-25 12:14:46 +01:00
|
|
|
|
|
|
|
// The amount that the faucet disperses has changed
|
2021-05-10 09:13:22 +02:00
|
|
|
event FaucetAmountChange(uint256 _value);
|
|
|
|
|
2021-10-23 20:42:52 +02:00
|
|
|
// Address of token the faucet represents
|
2023-03-21 21:46:08 +01:00
|
|
|
// 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);
|
2023-03-25 12:14:46 +01:00
|
|
|
|
2021-10-23 20:42:52 +02:00
|
|
|
// Amount of tokens the faucet gives out
|
2021-05-10 09:13:22 +02:00
|
|
|
function tokenAmount() external returns (uint256);
|
2023-03-25 12:14:46 +01:00
|
|
|
|
2023-03-21 21:46:08 +01:00
|
|
|
// Give tokens to the given recipient. Returns amount of tokens given.
|
|
|
|
function giveTo(address _recipient) external returns (uint256);
|
2023-03-25 12:14:46 +01:00
|
|
|
|
2023-03-21 21:46:08 +01:00
|
|
|
// Give tokens to yourself. Returns amount of tokens given.
|
|
|
|
function gimme() external returns (uint256);
|
2023-03-25 12:14:46 +01:00
|
|
|
|
|
|
|
// Check if faucet may be used in the current contract state by _recipient
|
|
|
|
function check(address _recipient) external view returns (bool);
|
|
|
|
|
2023-03-21 21:46:08 +01:00
|
|
|
// 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);
|
2023-03-25 12:14:46 +01:00
|
|
|
|
|
|
|
// 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
|
|
|
}
|