Contract 0x54f47747f997f769fbe412e590f225dd41959d4f

 
Txn Hash
Block
From
To
Value [Txn Fee]
0x8180b4ae86895fec3497b49612bd30f9e0ea778fbf4d4e5963bb833cef2d068b93984432021-07-23 4:13:4220 hrs 28 mins ago0x8599c4ea902b539f8e5d5d739253e3f0790f6f2a IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001533138
0x954ba01d08ef4caf0b94be7b0c4fa757d7a90fdb8dc48bb72f2f3225656014e693977472021-07-23 3:38:5421 hrs 3 mins ago0x4eff0c02bddee9e7cf690f612c312b301a33784d IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001387338
0x45c1de0435d3c2ca24bd8eb2a9bb1bc7424abaa2c994907b4671d5e18bd665dd93976842021-07-23 3:35:4521 hrs 6 mins ago0xc012f24980ccf530a9c0bda32203a9926cbf997b IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.00022198
0x173088d42ce017bbec05a0cb366788d9fe61381fa5e24a2430d30388dc0e151e93975972021-07-23 3:31:2421 hrs 10 mins ago0x598fdedeb5b4add6612767275c07047fc6a0ed7f IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001297338
0xf27438b492ed54c378e81db24d59dee2065fff3587e863848a94c2ea12fa107593974782021-07-23 3:25:2721 hrs 16 mins ago0xe9a7b94078cf339818126f068e6d76fec0e44e9c IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001387338
0x702c58b70daadfcaa8d8bd94f524a08c2a8ae36905ecd283af6fc80f6e0abe3e93857452021-07-22 17:38:201 day 7 hrs ago0x780a39d01c006657596b61644da8ea24382a780b IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001387338
0x8bf1c0cb8e5b69fe45ad370539c85d95697a318366c5d4bfe49cc0df071c0fa593814942021-07-22 14:05:451 day 10 hrs ago0xc63ce81e11d1be47e5071b7c41392f7025387446 IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001297338
0x654d31b1b040923a28a853304d3d24e5cb8e530d2c09d7ab493b1552a895ad3093801712021-07-22 12:59:351 day 11 hrs ago0x71e07e5ef6d5d8e8f1346a8927ea29bcf45ef844 IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001387338
0xa143fb4b5fbde4dcb3be2ef1c92d101c9892029ce9578fb95cde6294d68259ba93798202021-07-22 12:42:021 day 12 hrs ago0x88527df72b6c5465e6a6a498efb378da5a3ee319 IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001297338
0x70d47918043b8939221414420662aa747f8e38711ef50b95d69e4b4ed98bc67293797782021-07-22 12:39:561 day 12 hrs ago0x7e67a64c6c675538155262dfd6f8eef494d74041 IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001297338
0xcf7e82982573b8afdfa1c71004e0709ee0613003abd9c9e483566e532b686d7193797282021-07-22 12:37:261 day 12 hrs ago0xbc14028a802eec386f8279d34d2b4202bf4bcac5 IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001297338
0x7904915f842828e6c9c609cb914a6bcdc44eb1deaaa467cb68bbd5eee5e39a0b93796902021-07-22 12:35:321 day 12 hrs ago0x79ae36dd315881a28a39fca5de7ecbaf884a3382 IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001297338
0x682dad6df064e221300d6ff5edda5e3af75fb9861a52c62ff43f9f99ea3608a493784472021-07-22 11:33:201 day 13 hrs ago0x42cb21541a8a520951fa6b2c6e7a0724b8131db4 IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001387338
0xf5bddc97ec10f2c7b6b5da47deaf6850a64e4478e1842f89184dd2e06931dbf393782472021-07-22 11:23:201 day 13 hrs ago0xe52d005e7de2dcd1bf4ed718a4ea235cd897aab3 IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.0011792373
0x0117d478134caa6aecc8d01f7e01600a0ecc53f4a5d60ffc8540648466b58ce893775082021-07-22 10:46:231 day 13 hrs ago0x8059221b5b83ff6d8a35687cd04228145cd6736d IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001297338
0x2c7c40c0807ad4fb62b2060348f4689938f36f73e48249f62de22226c37d710393773632021-07-22 10:39:081 day 14 hrs ago0xef65c13a2ee3d5f1857d2d0004fcb96cbf211a87 IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001297338
0xc840df686e664557b3ffb78861ce7cd0b5b0e58d0cbe3caa4e02f28d2d8d7fa493767252021-07-22 10:07:141 day 14 hrs ago0x6367c92ed4672e4f502a8e79729b451c6cd8ca96 IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001387338
0x9ad7e9b53d899e5c7d13aedcfb8d0287c730583fcce1965003bd2259aee58f9793767032021-07-22 10:06:081 day 14 hrs ago0x341535c840ad562b3d5c199e64e9cd470b7389af IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001387338
0xdf67e34b902bbca18709f0b84d6151d0192d683204e0880c272e27ca6a1e4ab793766802021-07-22 10:04:591 day 14 hrs ago0xb61433a0064b14b7f24008b7986fb25631efb1a0 IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001387338
0x3111e087e18ba8656f51ec67649d3bc6dfcfc54c52a68e3252ae1fd815d70c7293766422021-07-22 10:03:051 day 14 hrs ago0x71693d8f7c5d14dd2db0e9643dc1dd6fb11dc44c IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001387338
0xc13db3f24c24e53786163678c9e65a2def2a6b91a8866f222e2e9932012e670093766182021-07-22 10:01:521 day 14 hrs ago0x19c162a2a37352980bb56db02be376cfbcf908f9 IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001387338
0xe13afc8cc3e25f98a023e05f30f67c423410e427ffb6d7831f444f1583f702e393765992021-07-22 10:00:551 day 14 hrs ago0x70c90a450104fb8f0087e1c4c689160092afb064 IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001387338
0x7b4ba892275f48a70f0bcdae1120770fc0b3c47da42dab13ff35d43f22588c2093765972021-07-22 10:00:491 day 14 hrs ago0x991b48582a59aedc1af7e0e8de16908193127fa0 IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001387338
0x39978f0cb9f98ab4e98edb89be222a020959073a9fed61f999ba9f3b7a20c6ac93765932021-07-22 10:00:371 day 14 hrs ago0xc012f24980ccf530a9c0bda32203a9926cbf997b IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.00022198
0xf336fe2483f9692f2d46c9bf51eb5a3e89e5923f73c1d71776a5f0e72a3ac3b393765782021-07-22 9:59:521 day 14 hrs ago0x51e9f43624ed31543540ed0f1890238939c7601e IN  0x54f47747f997f769fbe412e590f225dd41959d4f0 BNB0.001387338
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xa9af8f66d09023f7a8f2129e8d076c54e97cfc4e73bba7b2bc827de55ad2c72993431272021-07-21 6:06:402 days 18 hrs ago 0xdbbe9592f37c94cf4fadae00acd877307ce132d3  Contract Creation0 BNB
[ Download CSV Export 
Loading

Minimal Proxy Contract for 0x54f47747f997f769fbe412e590f225dd41959d4f

Contract Name:
PriIPoolTemplate

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
Decompile ByteCode

Contract Source Code (Solidity)

Similar Contracts
/**
 *Submitted for verification at BscScan.com on 2021-06-21
*/

// File: localhost/interface/IERC20.sol

//SPDX-License-Identifier: SimPL-2.0
pragma solidity ^0.6.0;

interface IERC20 {

    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function decimals() external view returns (uint8);

    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `amount` tokens are moved from one account (`sender`) to
     * another (`recipient`).
     *
     * Note that `amount` may be zero.
     */
    event Transfer(address indexed sender, address indexed recipient, uint256 amount);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `amount` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 amount);
}
// File: localhost/base/Rootable.sol

//SPDX-License-Identifier: SimPL-2.0
pragma solidity ^0.6.0;

contract Rootable {

    address internal _ROOT_;
    bool internal _INIT_;

    event RootTransferred(address indexed previousRoot, address indexed newRoot);

    modifier notInit() {
        require(!_INIT_, "INITIALIZED");
        _;
    }

    function initRoot(address newRoot) internal notInit {
        _INIT_ = true;
        _ROOT_ = newRoot;

        emit RootTransferred(address(0), newRoot);
    }

    /**
     * @dev Returns the address of the current root.
     */
    function root() public view returns (address) {
        return _ROOT_;
    }

    /**
     * @dev Throws if called by any account other than the root.
     */
    modifier onlyRoot() {
        require(_ROOT_ == msg.sender, "YouSwap: CALLER_IS_NOT_THE_ROOT");
        _;
    }

    /**
     * @dev Leaves the contract without root. It will not be possible to call
     * `onlyRoot` functions anymore. Can only be called by the current root.
     *
     * NOTE: Renouncing root will leave the contract without an root,
     * thereby removing any functionality that is only available to the root.
     */
    function renounceRoot() public onlyRoot {
        emit RootTransferred(_ROOT_, address(0));
        _ROOT_ = address(0);
    }

    /**
     * @dev Transfers root of the contract to a new account (`newRoot`).
     * Can only be called by the current root.
     */
    function transferRoot(address newRoot) public onlyRoot {
        require(newRoot != address(0), "NEW_ROOT_IS_THE_ZERO_ADDRESS");
        emit RootTransferred(_ROOT_, newRoot);
        _ROOT_ = newRoot;
    }
}
// File: localhost/interface/IPoolFactory.sol

//SPDX-License-Identifier: SimPL-2.0
pragma solidity ^0.6.0;

interface IPoolFactory {

    function createPriPool(
        string calldata _proName,
        uint256 _startTime,
        uint256 _endTime,
        address _tokenIn,
        address _tokenOut,
        uint256 _tokenOutSupply,
        uint256 _upperLimitOfTokenIn,
        uint256 _tokenOutPrice
    ) external returns (address newPool);

    function createPubPool(
        string calldata _proName,
        uint256 _startTime,
        uint256 _endTime,
        address _tokenIn,
        address _tokenOut,
        uint256 _targetAmountOfTokenIn,
        uint256 _targetAmountOfTokenOut,
        uint256 _bottomLimitOfTokenIn
    ) external returns (address newPool);

    function addTokenInToWhiteList(address tokenIn) external;

    function removeTokenInFromWhiteList(address tokenIn) external;

    function tokenInWhiteList(address tokenIn) external view returns (bool);

    function getPools() external view returns (address[] memory pools);

    function getPoolsByCreator(address creator) external view returns (address[] memory pools);

    function getPoolsByParticipant(address creator) external view returns (address[] memory pools);

    function enroll(address participant, address pool) external returns (bool);

    function getPoolInfo(address poolAddr) external view returns (
        string memory proName,
        uint256 tokenOutPrice,
        string memory tokenInSymbol,
        string memory tokenOutSymbol,
        uint8 poolType,
        uint8 state,
        bool homePageShow,
        string memory proLink
    );
}

// File: localhost/interface/IPool.sol

//SPDX-License-Identifier: SimPL-2.0
pragma solidity ^0.6.0;

interface IPool {

    struct Participation {
        uint256 timeStamp;
        uint256 amountOfTokenIn;
        uint256 availableAmountOfTokenIn;
        uint256 amountOfTokenOut;
        bool claimed;
    }

    function getParticipation(address participant) external view returns (
        uint256 timeStamp,
        uint256 amountOfTokenIn,
        uint256 availableAmountOfTokenIn,
        uint256 amountOfTokenOut,
        bool claimed
    );

    function proName() external view returns (string memory);

    function proLink() external view returns (string memory);

    function homePageShow() external view returns (bool);

    function poolType() external view returns (uint8);

    function startTime() external view returns (uint256);

    function endTime() external view returns (uint256);

    function tokenOutPrice() external view returns (uint256);

    function nameOfTokenOut() external view returns (string memory);

    function symbolOfTokenOut() external view returns (string memory);

    function symbolOfTokenIn() external view returns (string memory);

    function decimalsOfTokenOut() external view returns (uint8);

    function isOver() external view returns (bool);

    function canClaim(address participant) external view returns (bool);

    function state() external view returns (uint8);

    function setStartTime(uint256 time) external returns (bool);

    function setEndTime(uint256 time) external returns (bool);

    function setVault(address newVault) external returns (bool);

    function activate(bool bActivated, bool bHomePageShow, string calldata prolink, uint256 feeRate) external returns (bool);

    function swap(uint256 amountOfTokenIn) external returns (bool);

    function claim() external returns (bool);

    function withdraw() external returns (bool);

    function claimTime() external view returns (uint256);

    function setClaimTime(uint256 time) external returns (bool);

    function getFeeRate() external view returns (uint256);

    function getFeeTo() external view returns (address);

    function setFeeTo(address account) external returns (bool);
}
// File: localhost/lib/Address.sol

//SPDX-License-Identifier: SimPL-2.0
pragma solidity ^0.6.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {

    function isNotZero(address account) internal pure returns (bool) {
        return account != address(0);
    }

    function isContract(address account) internal view returns (bool) {
        uint256 size;
        assembly {size := extcodesize(account)}
        return size > 0;
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success,) = recipient.call{value : amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value : weiValue}(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}
// File: localhost/base/InitializableOwnable.sol

//SPDX-License-Identifier: SimPL-2.0
pragma solidity ^0.6.0;

contract InitializableOwnable {
    address public _OWNER_;
    address public _NEW_OWNER_;
    bool internal _INITIALIZED_;

    event OwnershipTransferPrepared(address indexed previousOwner, address indexed newOwner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    modifier notInitialized() {
        require(!_INITIALIZED_, "INITIALIZED");
        _;
    }

    modifier onlyOwner() {
        require(msg.sender == _OWNER_, "NOT_OWNER");
        _;
    }

    function initOwner(address newOwner) public notInitialized {
        _INITIALIZED_ = true;
        _OWNER_ = newOwner;
    }

    function transferOwnership(address newOwner) public onlyOwner {
        emit OwnershipTransferPrepared(_OWNER_, newOwner);
        _NEW_OWNER_ = newOwner;
    }

    function claimOwnership() public {
        require(msg.sender == _NEW_OWNER_, "INVALID_CLAIM");
        emit OwnershipTransferred(_OWNER_, _NEW_OWNER_);
        _OWNER_ = _NEW_OWNER_;
        _NEW_OWNER_ = address(0);
    }
}
// File: localhost/lib/SafeMath.sol

//SPDX-License-Identifier: SimPL-2.0
pragma solidity ^0.6.0;

library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }

    function sqrt(uint256 x) internal pure returns (uint256 y) {
        uint256 z = x / 2 + 1;
        y = x;
        while (z < y) {
            y = z;
            z = (x / z + z) / 2;
        }
    }
}
// File: localhost/token/IDO/PriIPoolTemplate.sol

//SPDX-License-Identifier: SimPL-2.0
pragma solidity ^0.6.0;








contract PriIPoolTemplate is IPool, InitializableOwnable, Rootable {
    using SafeMath for uint256;

    mapping(address => uint256) private _orders;
    mapping(address => Participation) private _participations;
    uint256 private _startTime;
    uint256 private _endTime;
    uint256 private _claimTime;
    uint256 private _tokenOutSupply;
    uint256 private _tokenOutReserved;
    uint256 private _totalAmountOfTokenIn;
    uint256 private _upperLimitOfTokenIn;
    bool private _isOver = false;
    string private _proName;
    string private _proLink;

    IPoolFactory public _FACTORY_;

    event PrivateOffering(address indexed participant, uint256 amountOfTokenIn, uint256 amountOfTokenOut);
    event PrivateOfferingClaimed(address indexed participant, uint256 amountOfTokenOut);

    uint256 private _tokenOutPrice;// TOKENOUT/TOKENIN * FACTOR
    uint256 public constant _FACTOR_ = 10000;

    mapping(address => uint8) private _whiteList;

    IERC20  public _TOKEN_IN_;
    IERC20  public _TOKEN_OUT_;

    bool private _withdrawn = false;
    uint8 private unlocked = 1;
    modifier lock() {
        require(unlocked == 1, 'LOCKED');
        unlocked = 0;
        _;
        unlocked = 1;
    }
    bool private _activated = false;
    modifier activated() {
        require(_activated, "NOT_ACTIVATED");
        _;
    }
    modifier whenNotActivated() {
        require(!_activated, "ACTIVATED");
        _;
    }

    uint256 private _feeRate = 10;//10% as default
    address private _feeTo;

    address private _vault;
    bool private _homePageShow;
    bool public initialized;

    function init(
        address __factory,
        address __root,
        address __creator,
        string calldata __proName,
        uint256 __startTime,
        uint256 __endTime,
        address __tokenIn,
        address __tokenOut,
        uint256 __tokenOutSupply,
        uint256 __upperLimitOfTokenIn,
        uint256 __tokenOutPrice
    ) external {
        require(!initialized, "INITIALIZED");
        initOwner(__creator);
        initRoot(__root);
        _feeTo = __root;
        _vault = __creator;
        _FACTORY_ = IPoolFactory(__factory);
        _proName = __proName;
        _startTime = __startTime;
        _endTime = __endTime;
        _TOKEN_IN_ = IERC20(__tokenIn);
        _TOKEN_OUT_ = IERC20(__tokenOut);
        _tokenOutSupply = __tokenOutSupply;
        _upperLimitOfTokenIn = __upperLimitOfTokenIn;
        _tokenOutPrice = __tokenOutPrice;
        _totalAmountOfTokenIn = 0;
        initialized = true;
        unlocked = 1;
    }

    function setTokenOutPrice(uint256 newPrice) external whenNotActivated onlyOwner {
        _tokenOutPrice = newPrice;
    }

    function inWhiteList(address account) external view returns (bool) {
        return _whiteList[account] == 1;
    }

    function addToWhiteList(address account) external onlyOwner {
        _whiteList[account] = 1;
    }

    function addBatchToWhiteList(address[] calldata accounts) external onlyOwner {
        for (uint i = 0; i < accounts.length; i++) {
            _whiteList[accounts[i]] = 1;
        }
    }

    function removeFromWhiteList(address account) external onlyOwner {
        _whiteList[account] = 0;
    }

    function tokenOutSupply() external view returns (uint256) {
        return _tokenOutSupply;
    }

    function tokenOutReserved() external view returns (uint256) {
        return _tokenOutReserved;
    }

    function totalAmountOfTokenIn() external view returns (uint256) {
        return _totalAmountOfTokenIn;
    }

    function setTokenOutSupply(uint256 newSupply) external whenNotActivated onlyOwner {
        _tokenOutSupply = newSupply;
    }

    function setUpperLimitOfTokenIn(uint256 newVal) external whenNotActivated onlyOwner {
        _upperLimitOfTokenIn = newVal;
    }

    function upperLimitOfTokenIn() external view returns (uint256) {
        return _upperLimitOfTokenIn;
    }

    //IPool
    function getParticipation(address participant) external override view returns (
        uint256 timeStamp,
        uint256 amountOfTokenIn,
        uint256 availableAmountOfTokenIn,
        uint256 amountOfTokenOut,
        bool claimed
    ){
        Participation memory p = _participations[participant];
        return (p.timeStamp, p.amountOfTokenIn, p.availableAmountOfTokenIn, p.amountOfTokenOut, p.claimed);
    }

    function proName() external override view returns (string memory){
        return _proName;
    }

    function proLink() external override view returns (string memory){
        return _proLink;
    }

    function homePageShow() external override view returns (bool){
        return _homePageShow;
    }

    function poolType() external view override returns (uint8){
        return 1;
    }

    function startTime() external view override returns (uint256){
        return _startTime;
    }

    function endTime() external override view returns (uint256){
        return _endTime;
    }

    function tokenOutPrice() external override view returns (uint256){
        return _tokenOutPrice;
    }

    function nameOfTokenOut() external override view returns (string memory) {
        return _TOKEN_OUT_.name();
    }

    function symbolOfTokenOut() external override view returns (string memory) {
        return _TOKEN_OUT_.symbol();
    }

    function symbolOfTokenIn() external override view returns (string memory) {
        return _TOKEN_IN_.symbol();
    }

    function decimalsOfTokenOut() external override view returns (uint8) {
        return _TOKEN_OUT_.decimals();
    }

    function isOver() public override view returns (bool) {
        return block.timestamp > _endTime || _isOver;
    }

    function canClaim(address participant) public override view returns (bool){
        return isOver() && _orders[participant] > 0 && block.timestamp >= _claimTime;
    }

    function state() external override view returns (uint8){
        if (_activated) {
            if (block.timestamp < _startTime) {//NOT STARTED
                return 1;
            }
            else if (!_isOver && block.timestamp >= _startTime && block.timestamp <= _endTime) {//IN PROGRESS
                return 2;
            }
            else {//IS OVER
                return 3;
            }
        }
        else {//NOT ACTIVATED
            return 0;
        }
    }

    function setStartTime(uint256 time) onlyOwner external override whenNotActivated returns (bool){
        require(time > block.timestamp.add(300), "INVALID_START_TIME");
        _startTime = time;
        return true;
    }

    function setEndTime(uint256 time) onlyOwner external override whenNotActivated returns (bool){
        require(time > block.timestamp.add(600), "INVALID_END_TIME");
        _endTime = time;
        return true;
    }

    function setVault(address newVault) onlyOwner external override whenNotActivated returns (bool){
        require(Address.isNotZero(newVault), 'ZERO_ADDRESS_NOT_ALLOWED');
        _vault = newVault;
        return true;
    }

    function activate(bool bActivated, bool bHomePageShow, string calldata sProlink, uint256 feeRate) onlyRoot external override returns (bool){
        require(_startTime > block.timestamp.add(300), "INVALID_START_TIME");
        require(_endTime >= _startTime.add(300), "INVALID_END_TIME");
        require(Address.isContract(address(_TOKEN_IN_)), "INVALID_TOKEN_IN");
        require(Address.isContract(address(_TOKEN_OUT_)), "INVALID_TOKEN_OUT");
        require(feeRate <= 100, "INVALID_FEE_RATE");

        if (_claimTime < _endTime) {
            _claimTime = _endTime;
        }

        _activated = bActivated;
        _homePageShow = bHomePageShow;
        _proLink = sProlink;
        _feeRate = feeRate;

        return true;
    }

    function swap(uint256 amountOfTokenIn) activated lock external override returns (bool)  {
        require(_whiteList[msg.sender] == 1, "NOT_IN_WHITE_LIST");
        require(block.timestamp >= _startTime, 'NOT_STARTED');
        require(!isOver(), 'PRIVATE_OFFERING_IS_OVER');
        require(_orders[msg.sender] == 0, 'ENROLLED_ALREADY');
        require(amountOfTokenIn <= _upperLimitOfTokenIn, 'EXCEEDS_THE_UPPER_LIMIT');
        require(amountOfTokenIn > 0, "INVALID_AMOUNT");
        require(_tokenOutReserved < _tokenOutSupply, 'INSUFFICIENT_TOKEN_OUT');

        uint256 tokenOutDeci = uint256(10) ** _TOKEN_OUT_.decimals();
        uint256 tokenInDeci = uint256(10) ** _TOKEN_IN_.decimals();

        uint256 amountOfTokenOut = amountOfTokenIn.mul(tokenOutDeci).mul(_tokenOutPrice).div(_FACTOR_).div(tokenInDeci);

        if (_tokenOutReserved.add(amountOfTokenOut) >= _tokenOutSupply) {
            amountOfTokenOut = _tokenOutSupply.sub(_tokenOutReserved);
            amountOfTokenIn = amountOfTokenOut.mul(_FACTOR_).mul(tokenInDeci).div(tokenOutDeci).div(_tokenOutPrice);
            _isOver = true;
        }

        _transferFrom(address(_TOKEN_IN_), msg.sender, address(this), amountOfTokenIn);
        _orders[msg.sender] = amountOfTokenOut;
        _tokenOutReserved = _tokenOutReserved.add(amountOfTokenOut);
        _totalAmountOfTokenIn = _totalAmountOfTokenIn.add(amountOfTokenIn);
        emit PrivateOffering(msg.sender, amountOfTokenIn, amountOfTokenOut);

        _FACTORY_.enroll(msg.sender, address(this));
        Participation storage p = _participations[msg.sender];
        p.timeStamp = block.timestamp;
        p.amountOfTokenIn = amountOfTokenIn;
        p.availableAmountOfTokenIn = amountOfTokenIn;
        p.amountOfTokenOut = amountOfTokenOut;

        return true;
    }

    function claim() lock external override returns (bool){
        require(canClaim(msg.sender), 'FORBIDDEN');

        uint256 reserved = _orders[msg.sender];
        _transfer(address(_TOKEN_OUT_), msg.sender, reserved);
        _orders[msg.sender] = 0;
        emit PrivateOfferingClaimed(msg.sender, reserved);

        Participation storage p = _participations[msg.sender];
        p.claimed = true;

        return true;
    }

    function withdraw() onlyRoot external override returns (bool){
        require(isOver(), 'IS_NOT_OVER');
        require(!_withdrawn, 'WITHDRAWN');

        uint256 fee = _totalAmountOfTokenIn.mul(_feeRate).div(100);
        if (fee > 0) {
            _transfer(address(_TOKEN_IN_), _feeTo, fee);
        }

        uint256 reserve = _totalAmountOfTokenIn.sub(fee);
        if (reserve > 0) {
            _transfer(address(_TOKEN_IN_), _vault, reserve);
        }

        _withdrawn = true;
        return true;
    }

    function claimTime() external override view returns (uint256){
        return _claimTime;
    }

    function setClaimTime(uint256 time) onlyRoot external override returns (bool){
        require(time > _endTime, 'FORBIDDEN');
        _claimTime = time;
        return true;
    }

    function getFeeRate() external override view returns (uint256){
        return _feeRate;
    }

    function getFeeTo() external override view returns (address){
        return _feeTo;
    }

    function setFeeTo(address account) onlyRoot override external returns (bool){
        _feeTo = account;
    }

    //Only can call  this function 7 days later when PRI OFFERING was over, in case of emergency
    function emergencyWithdraw(address token, address recipient, uint256 amount) onlyRoot external {
        require(block.timestamp > _claimTime.add(7 days), 'FORBIDDEN');

        bytes4 methodId = bytes4(keccak256(bytes('transfer(address,uint256)')));

        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(methodId, recipient, amount));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TRANSFER_FAILED');
    }

    function _transfer(address token, address recipient, uint256 amount) private {
        bytes4 methodId = bytes4(keccak256(bytes('transfer(address,uint256)')));

        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(methodId, recipient, amount));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TRANSFER_FAILED');
    }

    function _transferFrom(address token, address sender, address recipient, uint256 amount) private {
        bytes4 methodId = bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));

        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(methodId, sender, recipient, amount));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TRANSFER_FROM_FAILED');
    }
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferPrepared","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"participant","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOfTokenIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOfTokenOut","type":"uint256"}],"name":"PrivateOffering","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"participant","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOfTokenOut","type":"uint256"}],"name":"PrivateOfferingClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousRoot","type":"address"},{"indexed":true,"internalType":"address","name":"newRoot","type":"address"}],"name":"RootTransferred","type":"event"},{"inputs":[],"name":"_FACTORY_","outputs":[{"internalType":"contract IPoolFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_FACTOR_","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_NEW_OWNER_","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_OWNER_","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_TOKEN_IN_","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_TOKEN_OUT_","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"bActivated","type":"bool"},{"internalType":"bool","name":"bHomePageShow","type":"bool"},{"internalType":"string","name":"sProlink","type":"string"},{"internalType":"uint256","name":"feeRate","type":"uint256"}],"name":"activate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"}],"name":"addBatchToWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addToWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"participant","type":"address"}],"name":"canClaim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimalsOfTokenOut","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeeTo","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"participant","type":"address"}],"name":"getParticipation","outputs":[{"internalType":"uint256","name":"timeStamp","type":"uint256"},{"internalType":"uint256","name":"amountOfTokenIn","type":"uint256"},{"internalType":"uint256","name":"availableAmountOfTokenIn","type":"uint256"},{"internalType":"uint256","name":"amountOfTokenOut","type":"uint256"},{"internalType":"bool","name":"claimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"homePageShow","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"inWhiteList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"__factory","type":"address"},{"internalType":"address","name":"__root","type":"address"},{"internalType":"address","name":"__creator","type":"address"},{"internalType":"string","name":"__proName","type":"string"},{"internalType":"uint256","name":"__startTime","type":"uint256"},{"internalType":"uint256","name":"__endTime","type":"uint256"},{"internalType":"address","name":"__tokenIn","type":"address"},{"internalType":"address","name":"__tokenOut","type":"address"},{"internalType":"uint256","name":"__tokenOutSupply","type":"uint256"},{"internalType":"uint256","name":"__upperLimitOfTokenIn","type":"uint256"},{"internalType":"uint256","name":"__tokenOutPrice","type":"uint256"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"initOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOver","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nameOfTokenOut","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolType","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proLink","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeFromWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"root","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"setClaimTime","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"setEndTime","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"setFeeTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"setStartTime","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setTokenOutPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSupply","type":"uint256"}],"name":"setTokenOutSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newVal","type":"uint256"}],"name":"setUpperLimitOfTokenIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newVault","type":"address"}],"name":"setVault","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOfTokenIn","type":"uint256"}],"name":"swap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbolOfTokenIn","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbolOfTokenOut","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenOutPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenOutReserved","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenOutSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAmountOfTokenIn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRoot","type":"address"}],"name":"transferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upperLimitOfTokenIn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.