2020-12-11 07:48:54 +01:00
|
|
|
pragma solidity >=0.6.12;
|
|
|
|
|
|
|
|
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
2021-04-28 11:59:47 +02:00
|
|
|
// File-version: 5
|
2020-12-11 07:48:54 +01:00
|
|
|
|
2020-12-11 10:20:56 +01:00
|
|
|
interface Faucet {
|
2021-05-10 09:13:22 +02:00
|
|
|
event FaucetUsed(address indexed _recipient, address indexed _token, uint256 _value);
|
|
|
|
event FaucetFail(address indexed _recipient, address indexed _token, uint256 _value);
|
|
|
|
event FaucetAmountChange(uint256 _value);
|
|
|
|
|
2021-10-23 20:42:52 +02:00
|
|
|
// Address of token the faucet represents
|
2021-04-28 11:59:47 +02:00
|
|
|
function token() external returns (address);
|
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);
|
2021-10-23 20:42:52 +02:00
|
|
|
// Set the amount of tokens that the faucet gives out
|
2020-12-11 10:20:56 +01:00
|
|
|
function setAmount(uint256 _amount) external returns (bool);
|
2021-10-23 20:42:52 +02:00
|
|
|
// Give tokens to the given recipient
|
2020-12-11 10:20:56 +01:00
|
|
|
function giveTo(address _recipient) external returns (bool);
|
2021-10-23 20:42:52 +02:00
|
|
|
// Number of blocks that must be mined until faucet can be used for the same address
|
|
|
|
// max uint (-1) can be used to indicate that faucet may not be reused
|
2021-05-10 09:13:22 +02:00
|
|
|
function cooldown(address _recipient) external returns (uint256);
|
2020-12-11 07:48:54 +01:00
|
|
|
}
|