fix comments
This commit is contained in:
parent
20a97c2baa
commit
95ebd28004
|
@ -5,66 +5,57 @@ import { TokenController } from "@vacp2p/minime/contracts/TokenController.sol";
|
||||||
import { MiniMeBase } from "@vacp2p/minime/contracts/MiniMeBase.sol";
|
import { MiniMeBase } from "@vacp2p/minime/contracts/MiniMeBase.sol";
|
||||||
import { Ownable2Step } from "@openzeppelin/contracts/access/Ownable2Step.sol";
|
import { Ownable2Step } from "@openzeppelin/contracts/access/Ownable2Step.sol";
|
||||||
|
|
||||||
/*
|
/**
|
||||||
Copyright 2017, Jordi Baylina
|
* @title SNTOptimismController
|
||||||
|
* @author Ricardo Guilherme Schmidt, r4bbit
|
||||||
This program is free software: you can redistribute it and/or modify
|
* @dev Contract for keeping the SNT token in Optimism.
|
||||||
it under the terms of the GNU General Public License as published by
|
* It does nothing, but can be replaced by other contract that does something.
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/// @title SNTPlaceholder Contract
|
|
||||||
/// @author Jordi Baylina
|
|
||||||
/// @dev The SNTPlaceholder contract will take control over the SNT after the contribution
|
|
||||||
/// is finalized and before the Status Network is deployed.
|
|
||||||
/// The contract allows for SNT transfers and transferFrom and implements the
|
|
||||||
/// logic for transferring control of the token to the network when the offering
|
|
||||||
/// asks it to do so.
|
|
||||||
contract SNTOptimismController is TokenController, Ownable2Step {
|
contract SNTOptimismController is TokenController, Ownable2Step {
|
||||||
MiniMeBase public snt;
|
MiniMeBase public snt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param _snt The address of the SNT token
|
||||||
|
*/
|
||||||
constructor(address payable _snt) {
|
constructor(address payable _snt) {
|
||||||
snt = MiniMeBase(_snt);
|
snt = MiniMeBase(_snt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @notice The owner of this contract can change the controller of the SNT token
|
/**
|
||||||
/// Please, be sure that the owner is a trusted agent or 0x0 address.
|
* @notice The owner of this contract can change the controller of the SNT token
|
||||||
/// @param _newController The address of the new controller
|
* Please, be sure that the owner is a trusted agent or 0x0 address.
|
||||||
|
* @param _newController The address of the new controller
|
||||||
|
*/
|
||||||
function changeController(address payable _newController) public onlyOwner {
|
function changeController(address payable _newController) public onlyOwner {
|
||||||
snt.changeController(_newController);
|
snt.changeController(_newController);
|
||||||
emit ControllerChanged(_newController);
|
emit ControllerChanged(_newController);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////
|
/**
|
||||||
// MiniMe Controller Interface functions
|
* @dev proxyPayment set to reject all Ether.
|
||||||
//////////
|
*/
|
||||||
|
|
||||||
// In between the offering and the network. Default settings for allowing token transfers.
|
|
||||||
function proxyPayment(address) public payable override returns (bool) {
|
function proxyPayment(address) public payable override returns (bool) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dev onTransfer set to accept any transfer
|
||||||
|
*/
|
||||||
function onTransfer(address, address, uint256) public pure override returns (bool) {
|
function onTransfer(address, address, uint256) public pure override returns (bool) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dev onApprove set to accept any approval
|
||||||
|
*/
|
||||||
function onApprove(address, address, uint256) public pure override returns (bool) {
|
function onApprove(address, address, uint256) public pure override returns (bool) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @notice This method can be used by the controller to extract mistakenly
|
/**
|
||||||
/// sent tokens to this contract.
|
* @notice Extract mistakenly sent tokens to this contract.
|
||||||
/// @param _token The address of the token contract that you want to recover
|
* @param _token Token contract to recover, 0 to extract ether.
|
||||||
/// set to 0 in case you want to extract ether.
|
*/
|
||||||
function claimTokens(MiniMeBase _token) public onlyOwner {
|
function claimTokens(MiniMeBase _token) public onlyOwner {
|
||||||
if (address(_token) == address(0)) {
|
if (address(_token) == address(0)) {
|
||||||
payable(owner()).transfer(address(this).balance);
|
payable(owner()).transfer(address(this).balance);
|
||||||
|
|
Loading…
Reference in New Issue