Remove faucet, update MiniMeToken to MiniMeBase
This commit is contained in:
parent
34a05aead1
commit
88abe731e1
|
@ -1,32 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity ^0.8.18;
|
||||
|
||||
import "./SNTPlaceHolder.sol";
|
||||
|
||||
contract SNTFaucet is SNTPlaceHolder {
|
||||
bool public open = true;
|
||||
|
||||
constructor(address _owner, address payable _snt) SNTPlaceHolder(_owner, _snt) { }
|
||||
|
||||
fallback() external {
|
||||
generateTokens(msg.sender, 1000 * (10 ** uint256(snt.decimals())));
|
||||
}
|
||||
|
||||
function mint(uint256 _amount) external {
|
||||
require(open);
|
||||
generateTokens(msg.sender, _amount);
|
||||
}
|
||||
|
||||
function setOpen(bool _open) external onlyOwner {
|
||||
open = _open;
|
||||
}
|
||||
|
||||
function destroyTokens(address _who, uint256 _amount) public onlyOwner {
|
||||
snt.destroyTokens(_who, _amount);
|
||||
}
|
||||
|
||||
function generateTokens(address _who, uint256 _amount) public {
|
||||
require(msg.sender == owner || open);
|
||||
snt.generateTokens(_who, _amount);
|
||||
}
|
||||
}
|
|
@ -30,11 +30,11 @@ import "@openzeppelin/contracts/access/Ownable2Step.sol";
|
|||
/// logic for transferring control of the token to the network when the offering
|
||||
/// asks it to do so.
|
||||
contract SNTPlaceHolder is TokenController, Ownable2Step {
|
||||
MiniMeToken public snt;
|
||||
MiniMeBase public snt;
|
||||
|
||||
constructor(address _owner, address payable _snt) {
|
||||
owner = _owner;
|
||||
snt = MiniMeToken(_snt);
|
||||
snt = MiniMeBase(_snt);
|
||||
}
|
||||
|
||||
/// @notice The owner of this contract can change the controller of the SNT token
|
||||
|
|
Loading…
Reference in New Issue