ETH Price: $3,885.23 (+0.42%)

Contract

0xBf198A82F39Ec0E989F33D16Aa86A6A9660e9776
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unpause187054342023-12-03 11:01:35378 days ago1701601295IN
0xBf198A82...9660e9776
0 ETH0.001024134.20066045
Seize Eth167858232023-03-08 20:11:23647 days ago1678306283IN
0xBf198A82...9660e9776
0 ETH0.0019206658.39307082
Transfer Ownersh...167858212023-03-08 20:10:59647 days ago1678306259IN
0xBf198A82...9660e9776
0 ETH0.0024528785.16622783
Transfer Ownersh...110321872020-10-11 5:03:431526 days ago1602392623IN
0xBf198A82...9660e9776
0 ETH0.0006164327
Transfer108491872020-09-12 19:59:541554 days ago1599940794IN
0xBf198A82...9660e9776
4.5 ETH0.37435717,000
Pause108488832020-09-12 18:51:331554 days ago1599936693IN
0xBf198A82...9660e9776
0 ETH0.0030102100.0001
Transfer108488782020-09-12 18:50:181554 days ago1599936618IN
0xBf198A82...9660e9776
0.3 ETH0.0038862100
Transfer108486902020-09-12 18:06:271554 days ago1599933987IN
0xBf198A82...9660e9776
2 ETH0.01647615150
Transfer108486832020-09-12 18:03:461554 days ago1599933826IN
0xBf198A82...9660e9776
2 ETH0.01647615150
Seize Eth108482182020-09-12 16:28:341554 days ago1599928114IN
0xBf198A82...9660e9776
0 ETH0.00312007103
Transfer108480092020-09-12 15:42:531554 days ago1599925373IN
0xBf198A82...9660e9776
1 ETH0.0028641273.70000156
Set White List108478612020-09-12 15:13:251554 days ago1599923605IN
0xBf198A82...9660e9776
0 ETH0.0021196890
Transfer108478612020-09-12 15:13:251554 days ago1599923605IN
0xBf198A82...9660e9776
2 ETH0.0034587189
Transfer108478542020-09-12 15:12:351554 days ago1599923555IN
0xBf198A82...9660e9776
2 ETH0.01109394101
Transfer108476502020-09-12 14:27:211554 days ago1599920841IN
0xBf198A82...9660e9776
5 ETH0.0063300
Transfer108475772020-09-12 14:10:381554 days ago1599919838IN
0xBf198A82...9660e9776
2 ETH0.0103250594
Transfer108475732020-09-12 14:10:161554 days ago1599919816IN
0xBf198A82...9660e9776
2 ETH0.01109394101
Transfer108475692020-09-12 14:07:471554 days ago1599919667IN
0xBf198A82...9660e9776
2 ETH0.01647615150
Transfer108475502020-09-12 14:03:301554 days ago1599919410IN
0xBf198A82...9660e9776
2 ETH0.0058293150
Transfer108475422020-09-12 14:01:511554 days ago1599919311IN
0xBf198A82...9660e9776
1 ETH0.0211,000
Transfer108474982020-09-12 13:50:151554 days ago1599918615IN
0xBf198A82...9660e9776
2 ETH0.1098411,000
Transfer108474962020-09-12 13:49:511554 days ago1599918591IN
0xBf198A82...9660e9776
2 ETH0.0388621,000
Transfer108474932020-09-12 13:49:241554 days ago1599918564IN
0xBf198A82...9660e9776
2 ETH0.0101053792
Transfer108474812020-09-12 13:46:451554 days ago1599918405IN
0xBf198A82...9660e9776
2 ETH0.019431500
Transfer108474742020-09-12 13:45:211554 days ago1599918321IN
0xBf198A82...9660e9776
2 ETH0.01234063112.35
View all transactions

Latest 6 internal transactions

Advanced mode:
Parent Transaction Hash Block
From
To
167858232023-03-08 20:11:23647 days ago1678306283
0xBf198A82...9660e9776
4 ETH
108482182020-09-12 16:28:341554 days ago1599928114
0xBf198A82...9660e9776
978 ETH
108473352020-09-12 13:14:441554 days ago1599916484
0xBf198A82...9660e9776
1 ETH
108473012020-09-12 13:09:311554 days ago1599916171
0xBf198A82...9660e9776
3 ETH
108472682020-09-12 13:00:541554 days ago1599915654
0xBf198A82...9660e9776
0.6 ETH
108472672020-09-12 13:00:411554 days ago1599915641
0xBf198A82...9660e9776
0.96 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DegoOpenSale

Compiler Version
v0.5.5+commit.47a71e8f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-09-10
*/

/***
 *    ██████╗ ███████╗ ██████╗  ██████╗ 
 *    ██╔══██╗██╔════╝██╔════╝ ██╔═══██╗
 *    ██║  ██║█████╗  ██║  ███╗██║   ██║
 *    ██║  ██║██╔══╝  ██║   ██║██║   ██║
 *    ██████╔╝███████╗╚██████╔╝╚██████╔╝
 *    ╚═════╝ ╚══════╝ ╚═════╝  ╚═════╝ 
 *    
 * https://dego.finance
                                  
* MIT License
* ===========
*
* Copyright (c) 2020 dego
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
// File: @openzeppelin/contracts/GSN/Context.sol

pragma solidity ^0.5.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: @openzeppelin/contracts/access/Roles.sol

pragma solidity ^0.5.0;

/**
 * @title Roles
 * @dev Library for managing addresses assigned to a Role.
 */
library Roles {
    struct Role {
        mapping (address => bool) bearer;
    }

    /**
     * @dev Give an account access to this role.
     */
    function add(Role storage role, address account) internal {
        require(!has(role, account), "Roles: account already has role");
        role.bearer[account] = true;
    }

    /**
     * @dev Remove an account's access to this role.
     */
    function remove(Role storage role, address account) internal {
        require(has(role, account), "Roles: account does not have role");
        role.bearer[account] = false;
    }

    /**
     * @dev Check if an account has this role.
     * @return bool
     */
    function has(Role storage role, address account) internal view returns (bool) {
        require(account != address(0), "Roles: account is the zero address");
        return role.bearer[account];
    }
}

// File: @openzeppelin/contracts/access/roles/PauserRole.sol

pragma solidity ^0.5.0;



contract PauserRole is Context {
    using Roles for Roles.Role;

    event PauserAdded(address indexed account);
    event PauserRemoved(address indexed account);

    Roles.Role private _pausers;

    constructor () internal {
        _addPauser(_msgSender());
    }

    modifier onlyPauser() {
        require(isPauser(_msgSender()), "PauserRole: caller does not have the Pauser role");
        _;
    }

    function isPauser(address account) public view returns (bool) {
        return _pausers.has(account);
    }

    function addPauser(address account) public onlyPauser {
        _addPauser(account);
    }

    function renouncePauser() public {
        _removePauser(_msgSender());
    }

    function _addPauser(address account) internal {
        _pausers.add(account);
        emit PauserAdded(account);
    }

    function _removePauser(address account) internal {
        _pausers.remove(account);
        emit PauserRemoved(account);
    }
}

// File: @openzeppelin/contracts/lifecycle/Pausable.sol

pragma solidity ^0.5.0;



/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
contract Pausable is Context, PauserRole {
    /**
     * @dev Emitted when the pause is triggered by a pauser (`account`).
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by a pauser (`account`).
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state. Assigns the Pauser role
     * to the deployer.
     */
    constructor () internal {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     */
    modifier whenNotPaused() {
        require(!_paused, "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     */
    modifier whenPaused() {
        require(_paused, "Pausable: not paused");
        _;
    }

    /**
     * @dev Called by a pauser to pause, triggers stopped state.
     */
    function pause() public onlyPauser whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Called by a pauser to unpause, returns to normal state.
     */
    function unpause() public onlyPauser whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// File: @openzeppelin/contracts/ownership/Ownable.sol

pragma solidity ^0.5.0;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _owner;
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: @openzeppelin/contracts/utils/Address.sol

pragma solidity ^0.5.5;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following 
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @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].
     *
     * _Available since v2.4.0._
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

// File: @openzeppelin/contracts/math/SafeMath.sol

pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
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.
     *
     * _Available since v2.4.0._
     */
    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.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        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.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: contracts/interface/IERC20.sol

pragma solidity ^0.5.5;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    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);

    // add mint interface by dego
    function mint(address account, uint amount) external;
    /**
     * @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 `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

// File: contracts/library/SafeERC20.sol

pragma solidity ^0.5.5;





/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "SafeERC20: low-level call failed");

        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// File: contracts/token/DegoOpenSale.sol

pragma solidity ^0.5.5;







/// @title DegoOpenSale Contract

contract DegoOpenSale is Pausable,Ownable {
    using SafeMath for uint256;
    using Address for address;

    struct condition {
        uint256 price;          //_dego per eth
        uint256 limitFund;      //a quota
        uint256 startTime;      //the stage start time
        uint256 maxSoldAmount;  //the stage max sold amount
    }

    //
    uint8 public constant _whiteListStage1 = 1;
    uint8 public constant _whiteListStage5 = 5;
    //
    /// All deposited ETH will be instantly forwarded to this address.
    address payable public _teamWallet = 0x20FE4B1eD95911487499e53355BB8f14a881D735;
    
    /// IERC20 compilant _dego token contact instance
    IERC20 public _dego = IERC20(0x88EF27e69108B2633F8E1C184CC37940A075cC02);

    /// tags show address can join in open sale
    mapping (uint8 =>  mapping (address => bool)) public _fullWhiteList;

    //the stage condition map
    mapping (uint8 => condition) public _stageCondition;

    //the user get fund per stage
    mapping (uint8 =>  mapping (address => uint256) ) public _stageFund;


    //the stage had sold amount
    mapping (uint8 => uint256) public _stageSoldAmount;
    
    /*
     * EVENTS
     */
    event eveNewSale(address indexed destAddress, uint256 ethCost, uint256 gotTokens);
    event eveClaim(address indexed destAddress, uint256 gotTokens);
    event eveTeamWallet(address wallet);



    /// @dev valid the address
    modifier validAddress( address addr ) {
        require(addr != address(0x0));
        require(addr != address(this));
        _;
    }

    constructor()
        public
    {
        pause();

        setCondition(1,3500 ,10*1e18, now,          525000*1e18);
        setCondition(2,2500 ,5 *1e18, now + 7 days, 375000*1e18);
        setCondition(3,2000 ,5 *1e18, now + 7 days, 600000*1e18);
        setCondition(4,1500 ,5 *1e18, now + 7 days, 450000*1e18);
        setCondition(5,1500 ,2 *1e18, now + 14 days, 150000*1e18);
        
    }


    /**
    * @dev for set team wallet
    */
    function setTeamWallet(address payable wallet) public 
        onlyOwner 
    {
        require(wallet != address(0x0));

        _teamWallet = wallet;

        emit eveTeamWallet(wallet);
    }

    /// @dev set the sale condition for every stage;
    function setCondition(
    uint8 stage,
    uint256 price,
    uint256 limitFund,
    uint256 startTime,
    uint256 maxSoldAmount )
        internal
        onlyOwner
    {

        _stageCondition[stage].price = price;
        _stageCondition[stage].limitFund =limitFund;
        _stageCondition[stage].startTime= startTime;
        _stageCondition[stage].maxSoldAmount=maxSoldAmount;
    }



    /// @dev set the sale start time for every stage;
    function setStartTime(uint8 stage,uint256 startTime )
        public
        onlyOwner
    {
        _stageCondition[stage].startTime = startTime;
    }

    /// @dev batch set quota for user admin
    /// if openTag <=0, removed 
    function setWhiteList(uint8 stage, address[] calldata users, bool openTag)
        external
        onlyOwner
    {
        for (uint256 i = 0; i < users.length; i++) {
            _fullWhiteList[stage][users[i]] = openTag;
        }
    }

    /// @dev batch set quota for early user quota
    /// if openTag <=0, removed 
    function addWhiteList(uint8 stage, address user, bool openTag)
        external
        onlyOwner
    {
        _fullWhiteList[stage][user] = openTag;
    }

    /**
     * @dev If anybody sends Ether directly to this  contract, consider he is getting DeGo token
     */
    function () external payable {
        buyDeGo(msg.sender);
    }

    //
    function getStage( ) view public returns(uint8) {

        for(uint8 i=1; i<6; i++){
            uint256 startTime = _stageCondition[i].startTime;
            if(now >= startTime && _stageSoldAmount[i] < _stageCondition[i].maxSoldAmount ){
                return i;
            }
        }

        return 0;
    }

    //
    function conditionCheck( address addr ) view internal  returns(uint8) {
    
        uint8 stage = getStage();
        require(stage!=0,"stage not begin");
        
        uint256 fund = _stageFund[stage][addr];
        require(fund < _stageCondition[stage].limitFund,"stage fund is full ");

        return stage;
    }

    /// @dev Exchange msg.value ether to Dego for account recepient
    /// @param receipient Dego tokens receiver
    function buyDeGo(address receipient) 
        internal 
        whenNotPaused  
        validAddress(receipient)
        returns (bool) 
    {
        // Do not allow contracts to game the system

        require(tx.gasprice <= 1000000000000 wei);

        uint8 stage = conditionCheck(receipient);
        if(stage==_whiteListStage1 || stage==_whiteListStage5 ){  
            require(_fullWhiteList[stage][receipient],"your are not in the whitelist ");
        }

        doBuy(receipient, stage);

        return true;
    }


    /// @dev Buy DeGo token normally
    function doBuy(address receipient, uint8 stage) internal {
        // protect partner quota in stage one
        uint256 value = msg.value;
        uint256 fund = _stageFund[stage][receipient];
        fund = fund.add(value);
        if (fund > _stageCondition[stage].limitFund ) {
            uint256 refund = fund.sub(_stageCondition[stage].limitFund);
            value = value.sub(refund);
            msg.sender.transfer(refund);
        }
        
        uint256 soldAmount = _stageSoldAmount[stage];
        uint256 tokenAvailable = _stageCondition[stage].maxSoldAmount.sub(soldAmount);
        require(tokenAvailable > 0);

        uint256 costValue = 0;
        uint256 getTokens = 0;

        // all conditions has checked in the caller functions
        uint256 price = _stageCondition[stage].price;
        getTokens = price * value;
        if (tokenAvailable >= getTokens) {
            costValue = value;
        } else {
            costValue = tokenAvailable.div(price);
            getTokens = tokenAvailable;
        }

        if (costValue > 0) {
        
            _stageSoldAmount[stage] = _stageSoldAmount[stage].add(getTokens);
            _stageFund[stage][receipient]=_stageFund[stage][receipient].add(costValue);

            _dego.mint(msg.sender, getTokens);   

            emit eveNewSale(receipient, costValue, getTokens);             
        }

        // not enough token sale, just return eth
        uint256 toReturn = value.sub(costValue);
        if (toReturn > 0) {
            msg.sender.transfer(toReturn);
        }

    }

    // get sale eth 
    function seizeEth() external  {
        uint256 _currentBalance =  address(this).balance;
        _teamWallet.transfer(_currentBalance);
    }
    

}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"_whiteListStage1","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"wallet","type":"address"}],"name":"setTeamWallet","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"_teamWallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"stage","type":"uint8"},{"name":"users","type":"address[]"},{"name":"openTag","type":"bool"}],"name":"setWhiteList","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"stage","type":"uint8"},{"name":"startTime","type":"uint256"}],"name":"setStartTime","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isPauser","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"seizeEth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"stage","type":"uint8"},{"name":"user","type":"address"},{"name":"openTag","type":"bool"}],"name":"addWhiteList","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renouncePauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"_dego","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addPauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint8"}],"name":"_stageCondition","outputs":[{"name":"price","type":"uint256"},{"name":"limitFund","type":"uint256"},{"name":"startTime","type":"uint256"},{"name":"maxSoldAmount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint8"}],"name":"_stageSoldAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint8"},{"name":"","type":"address"}],"name":"_stageFund","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_whiteListStage5","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint8"},{"name":"","type":"address"}],"name":"_fullWhiteList","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getStage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"destAddress","type":"address"},{"indexed":false,"name":"ethCost","type":"uint256"},{"indexed":false,"name":"gotTokens","type":"uint256"}],"name":"eveNewSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"destAddress","type":"address"},{"indexed":false,"name":"gotTokens","type":"uint256"}],"name":"eveClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"wallet","type":"address"}],"name":"eveTeamWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserRemoved","type":"event"}]

6080604052600280546001600160a01b03199081167320fe4b1ed95911487499e53355bb8f14a881d73517909155600380549091167388ef27e69108b2633f8e1c184cc37940a075cc021790553480156200005957600080fd5b506200007a6200006e620001e960201b60201c565b620001ed60201b60201c565b6001805460ff19169055600062000097620001e9602090811b901c565b60018054610100600160a81b0319166101006001600160a01b03841690810291909117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620000fd6200023f60201b60201c565b620001276001610dac678ac7230489e8000042696f2c4e995ec98e2000006200038660201b60201c565b6200015660026109c4674563918244f400004262093a8001694f68ca6d8cd91c6000006200038660201b60201c565b6200018560036107d0674563918244f400004262093a8001697f0e10af47c1c70000006200038660201b60201c565b620001b460046105dc674563918244f400004262093a8001695f4a8c8375d1554000006200038660201b60201c565b620001e360056105dc671bc16d674ec80000426212750001691fc3842bd1f071c000006200038660201b60201c565b620005ad565b3390565b620002088160006200042d60201b620014d21790919060201c565b6040516001600160a01b038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6200025f62000253620001e960201b60201c565b620004d160201b60201c565b1515620002b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603081526020018062001cff6030913960400191505060405180910390fd5b60015460ff16156200032b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25862000369620001e9602090811b901c565b604080516001600160a01b039092168252519081900360200190a1565b62000396620004f460201b60201c565b15156200040457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60ff90941660009081526005602052604090209283556001830191909155600282015560030155565b6200043f82826200052860201b60201c565b15620004ac57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b6000620004ee8260006200052860201b620011d11790919060201c565b92915050565b60015460009061010090046001600160a01b031662000519620001e9602090811b901c565b6001600160a01b031614905090565b60006001600160a01b03821615156200058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018062001d2f6022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b61174280620005bd6000396000f3fe60806040526004361061014b5760003560e01c806374f9b464116100b6578063b0aee7a11161006f578063b0aee7a114610472578063b4fc0610146104b1578063d50abe51146104ed578063df214d3c14610502578063f2fde38b1461053e578063fcaa7664146105715761014b565b806374f9b4641461039857806382dc1ec4146103ad5780638456cb59146103e0578063869be2a8146103f55780638da5cb5b146104485780638f32d59b1461045d5761014b565b806346fbf68e1161010857806346fbf68e146102b95780635c975abb146103005780635d5a835c1461031557806365afccfd1461032a5780636ef8d66d1461036e578063715018a6146103835761014b565b80630f9bfdbf146101575780631525ff7d1461018257806337e294d5146101b75780633a63c9ba146101e85780633f4ba83a1461027157806343a1696c14610286575b61015433610586565b50005b34801561016357600080fd5b5061016c6106d2565b6040805160ff9092168252519081900360200190f35b34801561018e57600080fd5b506101b5600480360360208110156101a557600080fd5b50356001600160a01b03166106d7565b005b3480156101c357600080fd5b506101cc61078c565b604080516001600160a01b039092168252519081900360200190f35b3480156101f457600080fd5b506101b56004803603606081101561020b57600080fd5b60ff823516919081019060408101602082013564010000000081111561023057600080fd5b82018360208201111561024257600080fd5b8035906020019184602083028401116401000000008311171561026457600080fd5b919350915035151561079b565b34801561027d57600080fd5b506101b5610852565b34801561029257600080fd5b506101b5600480360360408110156102a957600080fd5b5060ff813516906020013561094e565b3480156102c557600080fd5b506102ec600480360360208110156102dc57600080fd5b50356001600160a01b03166109b3565b604080519115158252519081900360200190f35b34801561030c57600080fd5b506102ec6109cb565b34801561032157600080fd5b506101b56109d5565b34801561033657600080fd5b506101b56004803603606081101561034d57600080fd5b5060ff813516906001600160a01b0360208201351690604001351515610a14565b34801561037a57600080fd5b506101b5610a9a565b34801561038f57600080fd5b506101b5610aac565b3480156103a457600080fd5b506101cc610b48565b3480156103b957600080fd5b506101b5600480360360208110156103d057600080fd5b50356001600160a01b0316610b57565b3480156103ec57600080fd5b506101b5610bae565b34801561040157600080fd5b506104226004803603602081101561041857600080fd5b503560ff16610c7f565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561045457600080fd5b506101cc610ca6565b34801561046957600080fd5b506102ec610cba565b34801561047e57600080fd5b5061049f6004803603602081101561049557600080fd5b503560ff16610ce5565b60408051918252519081900360200190f35b3480156104bd57600080fd5b5061049f600480360360408110156104d457600080fd5b50803560ff1690602001356001600160a01b0316610cf7565b3480156104f957600080fd5b5061016c610d14565b34801561050e57600080fd5b506102ec6004803603604081101561052557600080fd5b50803560ff1690602001356001600160a01b0316610d19565b34801561054a57600080fd5b506101b56004803603602081101561056157600080fd5b50356001600160a01b0316610d39565b34801561057d57600080fd5b5061016c610d8e565b60015460009060ff16156105da5760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b816001600160a01b03811615156105f057600080fd5b6001600160a01b03811630141561060657600080fd5b64e8d4a510003a111561061857600080fd5b600061062384610e02565b905060ff81166001148061063a575060ff81166005145b156106be5760ff80821660009081526004602090815260408083206001600160a01b03891684529091529020541615156106be5760408051600160e51b62461bcd02815260206004820152601e60248201527f796f757220617265206e6f7420696e207468652077686974656c697374200000604482015290519081900360640190fd5b6106c88482610efb565b5060019392505050565b600181565b6106df610cba565b15156107235760408051600160e51b62461bcd02815260206004820181905260248201526000805160206116d5833981519152604482015290519081900360640190fd5b6001600160a01b038116151561073857600080fd5b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f248646f8393d426ccfa02c4cc4e29aa6977d3b3ba7ea48892ae67cf45aff78d69181900360200190a150565b6002546001600160a01b031681565b6107a3610cba565b15156107e75760408051600160e51b62461bcd02815260206004820181905260248201526000805160206116d5833981519152604482015290519081900360640190fd5b60005b8281101561084b5760ff85166000908152600460205260408120839186868581811061081257fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff19169115159190911790556001016107ea565b5050505050565b61086261085d6111cd565b6109b3565b15156108a257604051600160e51b62461bcd02815260040180806020018281038252603081526020018061165e6030913960400191505060405180910390fd5b60015460ff1615156108fe5760408051600160e51b62461bcd02815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6109316111cd565b604080516001600160a01b039092168252519081900360200190a1565b610956610cba565b151561099a5760408051600160e51b62461bcd02815260206004820181905260248201526000805160206116d5833981519152604482015290519081900360640190fd5b60ff909116600090815260056020526040902060020155565b60006109c5818363ffffffff6111d116565b92915050565b60015460ff165b90565b6002546040513031916001600160a01b03169082156108fc029083906000818181858888f19350505050158015610a10573d6000803e3d6000fd5b5050565b610a1c610cba565b1515610a605760408051600160e51b62461bcd02815260206004820181905260248201526000805160206116d5833981519152604482015290519081900360640190fd5b60ff90921660009081526004602090815260408083206001600160a01b03909416835292905220805491151560ff19909216919091179055565b610aaa610aa56111cd565b61123d565b565b610ab4610cba565b1515610af85760408051600160e51b62461bcd02815260206004820181905260248201526000805160206116d5833981519152604482015290519081900360640190fd5b60015460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360018054610100600160a81b0319169055565b6003546001600160a01b031681565b610b6261085d6111cd565b1515610ba257604051600160e51b62461bcd02815260040180806020018281038252603081526020018061165e6030913960400191505060405180910390fd5b610bab81611285565b50565b610bb961085d6111cd565b1515610bf957604051600160e51b62461bcd02815260040180806020018281038252603081526020018061165e6030913960400191505060405180910390fd5b60015460ff1615610c4a5760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586109316111cd565b60056020526000908152604090208054600182015460028301546003909301549192909184565b60015461010090046001600160a01b031690565b60015460009061010090046001600160a01b0316610cd66111cd565b6001600160a01b031614905090565b60076020526000908152604090205481565b600660209081526000928352604080842090915290825290205481565b600581565b600460209081526000928352604080842090915290825290205460ff1681565b610d41610cba565b1515610d855760408051600160e51b62461bcd02815260206004820181905260248201526000805160206116d5833981519152604482015290519081900360640190fd5b610bab816112cd565b600060015b60068160ff161015610dfa5760ff8116600090815260056020526040902060020154428111801590610de4575060ff8216600090815260056020908152604080832060030154600790925290912054105b15610df1575090506109d2565b50600101610d93565b506000905090565b600080610e0d610d8e565b905060ff81161515610e695760408051600160e51b62461bcd02815260206004820152600f60248201527f7374616765206e6f7420626567696e0000000000000000000000000000000000604482015290519081900360640190fd5b60ff811660008181526006602090815260408083206001600160a01b038816845282528083205493835260059091529020600101548110610ef45760408051600160e51b62461bcd02815260206004820152601360248201527f73746167652066756e642069732066756c6c2000000000000000000000000000604482015290519081900360640190fd5b5092915050565b60ff811660009081526006602090815260408083206001600160a01b03861684529091529020543490610f34818363ffffffff61137e16565b60ff8416600090815260056020526040902060010154909150811115610fc05760ff8316600090815260056020526040812060010154610f7b90839063ffffffff6113e216565b9050610f8d838263ffffffff6113e216565b604051909350339082156108fc029083906000818181858888f19350505050158015610fbd573d6000803e3d6000fd5b50505b60ff83166000908152600760209081526040808320546005909252822060030154909190610ff4908363ffffffff6113e216565b905080151561100257600080fd5b60ff8516600090815260056020526040812054858102908184106110285786925061103e565b611038848263ffffffff61142416565b92508391505b82156111785760ff8816600090815260076020526040902054611067908363ffffffff61137e16565b60ff8916600090815260076020908152604080832093909355600681528282206001600160a01b038d168352905220546110a7908463ffffffff61137e16565b60ff891660009081526006602090815260408083206001600160a01b03808f1685529252808320939093556003548351600160e01b6340c10f190281523360048201526024810187905293519116926340c10f1992604480830193919282900301818387803b15801561111957600080fd5b505af115801561112d573d6000803e3d6000fd5b5050604080518681526020810186905281516001600160a01b038e1694507f132c3e5164cb9d1994c40d94178ab1163557eece8664ab86c5016e2609b6ce8a93509081900390910190a25b600061118a888563ffffffff6113e216565b905080156111c157604051339082156108fc029083906000818181858888f193505050501580156111bf573d6000803e3d6000fd5b505b50505050505050505050565b3390565b60006001600160a01b038216151561121d57604051600160e51b62461bcd0281526004018080602001828103825260228152602001806116f56022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b61124e60008263ffffffff61146616565b6040516001600160a01b038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61129660008263ffffffff6114d216565b6040516001600160a01b038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6001600160a01b038116151561131757604051600160e51b62461bcd02815260040180806020018281038252602681526020018061168e6026913960400191505060405180910390fd5b6001546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6000828201838110156113db5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60006113db83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611556565b60006113db83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506115f0565b61147082826111d1565b15156114b057604051600160e51b62461bcd0281526004018080602001828103825260218152602001806116b46021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b6114dc82826111d1565b156115315760408051600160e51b62461bcd02815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b600081848411156115e857604051600160e51b62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156115ad578181015183820152602001611595565b50505050905090810190601f1680156115da5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183151561164557604051600160e51b62461bcd028152600401808060200182810382528381815181526020019150805190602001908083836000838110156115ad578181015183820152602001611595565b506000838581151561165357fe5b049594505050505056fe506175736572526f6c653a2063616c6c657220646f6573206e6f742068617665207468652050617573657220726f6c654f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373a165627a7a7230582056153a2fa3a759c16460caa903ed42abf7796041d2b347aa8db563faa6fd9bf10029506175736572526f6c653a2063616c6c657220646f6573206e6f742068617665207468652050617573657220726f6c65526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373

Deployed Bytecode

0x60806040526004361061014b5760003560e01c806374f9b464116100b6578063b0aee7a11161006f578063b0aee7a114610472578063b4fc0610146104b1578063d50abe51146104ed578063df214d3c14610502578063f2fde38b1461053e578063fcaa7664146105715761014b565b806374f9b4641461039857806382dc1ec4146103ad5780638456cb59146103e0578063869be2a8146103f55780638da5cb5b146104485780638f32d59b1461045d5761014b565b806346fbf68e1161010857806346fbf68e146102b95780635c975abb146103005780635d5a835c1461031557806365afccfd1461032a5780636ef8d66d1461036e578063715018a6146103835761014b565b80630f9bfdbf146101575780631525ff7d1461018257806337e294d5146101b75780633a63c9ba146101e85780633f4ba83a1461027157806343a1696c14610286575b61015433610586565b50005b34801561016357600080fd5b5061016c6106d2565b6040805160ff9092168252519081900360200190f35b34801561018e57600080fd5b506101b5600480360360208110156101a557600080fd5b50356001600160a01b03166106d7565b005b3480156101c357600080fd5b506101cc61078c565b604080516001600160a01b039092168252519081900360200190f35b3480156101f457600080fd5b506101b56004803603606081101561020b57600080fd5b60ff823516919081019060408101602082013564010000000081111561023057600080fd5b82018360208201111561024257600080fd5b8035906020019184602083028401116401000000008311171561026457600080fd5b919350915035151561079b565b34801561027d57600080fd5b506101b5610852565b34801561029257600080fd5b506101b5600480360360408110156102a957600080fd5b5060ff813516906020013561094e565b3480156102c557600080fd5b506102ec600480360360208110156102dc57600080fd5b50356001600160a01b03166109b3565b604080519115158252519081900360200190f35b34801561030c57600080fd5b506102ec6109cb565b34801561032157600080fd5b506101b56109d5565b34801561033657600080fd5b506101b56004803603606081101561034d57600080fd5b5060ff813516906001600160a01b0360208201351690604001351515610a14565b34801561037a57600080fd5b506101b5610a9a565b34801561038f57600080fd5b506101b5610aac565b3480156103a457600080fd5b506101cc610b48565b3480156103b957600080fd5b506101b5600480360360208110156103d057600080fd5b50356001600160a01b0316610b57565b3480156103ec57600080fd5b506101b5610bae565b34801561040157600080fd5b506104226004803603602081101561041857600080fd5b503560ff16610c7f565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561045457600080fd5b506101cc610ca6565b34801561046957600080fd5b506102ec610cba565b34801561047e57600080fd5b5061049f6004803603602081101561049557600080fd5b503560ff16610ce5565b60408051918252519081900360200190f35b3480156104bd57600080fd5b5061049f600480360360408110156104d457600080fd5b50803560ff1690602001356001600160a01b0316610cf7565b3480156104f957600080fd5b5061016c610d14565b34801561050e57600080fd5b506102ec6004803603604081101561052557600080fd5b50803560ff1690602001356001600160a01b0316610d19565b34801561054a57600080fd5b506101b56004803603602081101561056157600080fd5b50356001600160a01b0316610d39565b34801561057d57600080fd5b5061016c610d8e565b60015460009060ff16156105da5760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b816001600160a01b03811615156105f057600080fd5b6001600160a01b03811630141561060657600080fd5b64e8d4a510003a111561061857600080fd5b600061062384610e02565b905060ff81166001148061063a575060ff81166005145b156106be5760ff80821660009081526004602090815260408083206001600160a01b03891684529091529020541615156106be5760408051600160e51b62461bcd02815260206004820152601e60248201527f796f757220617265206e6f7420696e207468652077686974656c697374200000604482015290519081900360640190fd5b6106c88482610efb565b5060019392505050565b600181565b6106df610cba565b15156107235760408051600160e51b62461bcd02815260206004820181905260248201526000805160206116d5833981519152604482015290519081900360640190fd5b6001600160a01b038116151561073857600080fd5b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f248646f8393d426ccfa02c4cc4e29aa6977d3b3ba7ea48892ae67cf45aff78d69181900360200190a150565b6002546001600160a01b031681565b6107a3610cba565b15156107e75760408051600160e51b62461bcd02815260206004820181905260248201526000805160206116d5833981519152604482015290519081900360640190fd5b60005b8281101561084b5760ff85166000908152600460205260408120839186868581811061081257fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff19169115159190911790556001016107ea565b5050505050565b61086261085d6111cd565b6109b3565b15156108a257604051600160e51b62461bcd02815260040180806020018281038252603081526020018061165e6030913960400191505060405180910390fd5b60015460ff1615156108fe5760408051600160e51b62461bcd02815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6109316111cd565b604080516001600160a01b039092168252519081900360200190a1565b610956610cba565b151561099a5760408051600160e51b62461bcd02815260206004820181905260248201526000805160206116d5833981519152604482015290519081900360640190fd5b60ff909116600090815260056020526040902060020155565b60006109c5818363ffffffff6111d116565b92915050565b60015460ff165b90565b6002546040513031916001600160a01b03169082156108fc029083906000818181858888f19350505050158015610a10573d6000803e3d6000fd5b5050565b610a1c610cba565b1515610a605760408051600160e51b62461bcd02815260206004820181905260248201526000805160206116d5833981519152604482015290519081900360640190fd5b60ff90921660009081526004602090815260408083206001600160a01b03909416835292905220805491151560ff19909216919091179055565b610aaa610aa56111cd565b61123d565b565b610ab4610cba565b1515610af85760408051600160e51b62461bcd02815260206004820181905260248201526000805160206116d5833981519152604482015290519081900360640190fd5b60015460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360018054610100600160a81b0319169055565b6003546001600160a01b031681565b610b6261085d6111cd565b1515610ba257604051600160e51b62461bcd02815260040180806020018281038252603081526020018061165e6030913960400191505060405180910390fd5b610bab81611285565b50565b610bb961085d6111cd565b1515610bf957604051600160e51b62461bcd02815260040180806020018281038252603081526020018061165e6030913960400191505060405180910390fd5b60015460ff1615610c4a5760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586109316111cd565b60056020526000908152604090208054600182015460028301546003909301549192909184565b60015461010090046001600160a01b031690565b60015460009061010090046001600160a01b0316610cd66111cd565b6001600160a01b031614905090565b60076020526000908152604090205481565b600660209081526000928352604080842090915290825290205481565b600581565b600460209081526000928352604080842090915290825290205460ff1681565b610d41610cba565b1515610d855760408051600160e51b62461bcd02815260206004820181905260248201526000805160206116d5833981519152604482015290519081900360640190fd5b610bab816112cd565b600060015b60068160ff161015610dfa5760ff8116600090815260056020526040902060020154428111801590610de4575060ff8216600090815260056020908152604080832060030154600790925290912054105b15610df1575090506109d2565b50600101610d93565b506000905090565b600080610e0d610d8e565b905060ff81161515610e695760408051600160e51b62461bcd02815260206004820152600f60248201527f7374616765206e6f7420626567696e0000000000000000000000000000000000604482015290519081900360640190fd5b60ff811660008181526006602090815260408083206001600160a01b038816845282528083205493835260059091529020600101548110610ef45760408051600160e51b62461bcd02815260206004820152601360248201527f73746167652066756e642069732066756c6c2000000000000000000000000000604482015290519081900360640190fd5b5092915050565b60ff811660009081526006602090815260408083206001600160a01b03861684529091529020543490610f34818363ffffffff61137e16565b60ff8416600090815260056020526040902060010154909150811115610fc05760ff8316600090815260056020526040812060010154610f7b90839063ffffffff6113e216565b9050610f8d838263ffffffff6113e216565b604051909350339082156108fc029083906000818181858888f19350505050158015610fbd573d6000803e3d6000fd5b50505b60ff83166000908152600760209081526040808320546005909252822060030154909190610ff4908363ffffffff6113e216565b905080151561100257600080fd5b60ff8516600090815260056020526040812054858102908184106110285786925061103e565b611038848263ffffffff61142416565b92508391505b82156111785760ff8816600090815260076020526040902054611067908363ffffffff61137e16565b60ff8916600090815260076020908152604080832093909355600681528282206001600160a01b038d168352905220546110a7908463ffffffff61137e16565b60ff891660009081526006602090815260408083206001600160a01b03808f1685529252808320939093556003548351600160e01b6340c10f190281523360048201526024810187905293519116926340c10f1992604480830193919282900301818387803b15801561111957600080fd5b505af115801561112d573d6000803e3d6000fd5b5050604080518681526020810186905281516001600160a01b038e1694507f132c3e5164cb9d1994c40d94178ab1163557eece8664ab86c5016e2609b6ce8a93509081900390910190a25b600061118a888563ffffffff6113e216565b905080156111c157604051339082156108fc029083906000818181858888f193505050501580156111bf573d6000803e3d6000fd5b505b50505050505050505050565b3390565b60006001600160a01b038216151561121d57604051600160e51b62461bcd0281526004018080602001828103825260228152602001806116f56022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b61124e60008263ffffffff61146616565b6040516001600160a01b038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61129660008263ffffffff6114d216565b6040516001600160a01b038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6001600160a01b038116151561131757604051600160e51b62461bcd02815260040180806020018281038252602681526020018061168e6026913960400191505060405180910390fd5b6001546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6000828201838110156113db5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60006113db83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611556565b60006113db83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506115f0565b61147082826111d1565b15156114b057604051600160e51b62461bcd0281526004018080602001828103825260218152602001806116b46021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b6114dc82826111d1565b156115315760408051600160e51b62461bcd02815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b600081848411156115e857604051600160e51b62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156115ad578181015183820152602001611595565b50505050905090810190601f1680156115da5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183151561164557604051600160e51b62461bcd028152600401808060200182810382528381815181526020019150805190602001908083836000838110156115ad578181015183820152602001611595565b506000838581151561165357fe5b049594505050505056fe506175736572526f6c653a2063616c6c657220646f6573206e6f742068617665207468652050617573657220726f6c654f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373a165627a7a7230582056153a2fa3a759c16460caa903ed42abf7796041d2b347aa8db563faa6fd9bf10029

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.