diff --git a/contracts/SNTFaucet.sol b/contracts/SNTFaucet.sol deleted file mode 100644 index 90eabe2..0000000 --- a/contracts/SNTFaucet.sol +++ /dev/null @@ -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); - } -} diff --git a/contracts/SNTPlaceHolder.sol b/contracts/SNTPlaceHolder.sol index 2fe77b4..ef85cb0 100644 --- a/contracts/SNTPlaceHolder.sol +++ b/contracts/SNTPlaceHolder.sol @@ -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