Goerli Testnet

Contract

0xA9AdA6A88eA228e77EEccF5DA1dE914dA7314F0E

Overview

ETH Balance

0 ETH

Token Holdings

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Value
Buy Token By Eth...44414792021-03-14 21:35:511110 days ago1615757751IN
0xA9AdA6A8...dA7314F0E
0.1 ETH0.00013741

Latest 6 internal transactions

Advanced mode:
Parent Txn Hash Block From To Value
44414792021-03-14 21:35:511110 days ago1615757751
0xA9AdA6A8...dA7314F0E
0.1 ETH
44414792021-03-14 21:35:511110 days ago1615757751
0xA9AdA6A8...dA7314F0E
0 ETH
44414792021-03-14 21:35:511110 days ago1615757751
0xA9AdA6A8...dA7314F0E
0 ETH
44414792021-03-14 21:35:511110 days ago1615757751
0xA9AdA6A8...dA7314F0E
0 ETH
44413992021-03-14 21:15:511110 days ago1615756551
0xA9AdA6A8...dA7314F0E
0 ETH
44413992021-03-14 21:15:511110 days ago1615756551  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Campaign

Compiler Version
v0.7.1+commit.f4a555be

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 7 : Campaign.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.1;

import "./interfaces/ICampaignFactory.sol";
import "./libraries/Ownable.sol"; 
import "./libraries/ReentrancyGuard.sol"; 
import "./libraries/SafeMath.sol";
import "./libraries/IERC20.sol";
import "./libraries/Pausable.sol";

contract Campaign is Ownable, ReentrancyGuard, Pausable {
    using SafeMath for uint256;

    // Token being sold
    IERC20 public token;

    // Address of factory contract
    address public factory;

    // Address where funds are collected
    address public fundingWallet;

    // Timestamp when token started to sell
    uint256 public openTime = block.timestamp;

    // Timestamp when token stopped to sell
    uint256 public closeTime;

    // Timestamp when token release is enabled
    uint256 public releaseTime;

    // Amount of wei raised
    uint256 public weiRaised = 0;

    // Amount of tokens sold
    uint256 public tokenSold = 0;

    // Name of IDO Campaign
    string public name;

    // Ether to token conversion rate
    uint256 private etherConversionRate;

    // Ether to token conversion rate decimals
    uint256 private etherConversionRateDecimals = 0;

    // Token to token conversion rate
    mapping(address => uint256) private erc20TokenConversionRate;

    // Token sold mapping to delivery
    mapping(address => uint256) private tokenSoldMapping;

    modifier tokenRateSet(address _token) {
        require(erc20TokenConversionRate[_token] != 0, "ICO_CAMPAIGN::TOKEN_NOT_ALLOWED");
        _;
    }

    // -----------------------------------------
    // Lemonade's events
    // -----------------------------------------
    event CampaignCreated(string name, address token, uint256 openTime, uint256 closeTime, uint256 releaseTime, uint256 ethRate, uint256 ethRateDecimals, address wallet, address owner);
    event AllowTokenToTradeWithRate(address token, uint256 rate);
    event TokenPurchaseByEther(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
    event TokenPurchaseByToken(address indexed purchaser, address indexed beneficiary, address token, uint256 value, uint256 amount);
    event RefundedTokenForIcoWhenEndIco(address wallet, uint256 amount);
    event TokenClaimed(address wallet, uint256 amount);
    event CampaignStatsChanged();

    // -----------------------------------------
    // Constructor
    // -----------------------------------------
    constructor () {
        factory = msg.sender;
    }

    // -----------------------------------------
    // Lemonade external interface
    // -----------------------------------------

    /**
    * @dev fallback function
    */
    fallback () external {
        revert();
    }

    /**
    * @dev fallback function
    */
    receive () external payable {
        buyTokenByEther(msg.sender);
    }

    /**
     * @param _name Name of ICO Campaign
     * @param _token Address of the token being sold
     * @param _duration Duration of ICO Campaign
     * @param _openTime When ICO Started
     * @param _ethRate Number of token units a buyer gets per wei
     * @param _wallet Address where collected funds will be forwarded to
     */
    function initialize(string calldata _name, address _token, uint256 _duration, uint256 _openTime, uint256 _releaseTime, uint256 _ethRate, uint256 _ethRateDecimals, address _wallet) external {
        require(msg.sender == factory, "ICO_CAMPAIGN::UNAUTHORIZED");

        name = _name;
        token = IERC20(_token);
        openTime = _openTime;
        closeTime = _openTime.add(_duration);
        releaseTime = _releaseTime;
        etherConversionRate = _ethRate;
        etherConversionRateDecimals = _ethRateDecimals;
        fundingWallet = _wallet;
        owner = tx.origin;
        paused = false;

        emit CampaignCreated(_name, _token, _openTime, closeTime, _releaseTime, _ethRate, _ethRateDecimals, _wallet, owner);
    }

    /**
     * @notice Returns the conversion rate when user buy by eth
     * @return Returns only a fixed number of rate.
     */
    function getEtherConversionRate() public view returns (uint256) {
        return etherConversionRate;
    }

    /**
     * @notice Returns the conversion rate decimals when user buy by eth
     * @return Returns only a fixed number of decimals.
     */
    function getEtherConversionRateDecimals() public view returns (uint256) {
        return etherConversionRateDecimals;
    }
    
    /**
     * @notice Returns the conversion rate when user buy by eth
     * @return Returns only a fixed number of token rate.
     * @param _token address of token to query token exchange rate
     */
    function getErc20TokenConversionRate(address _token) public view returns (uint256) {
        return erc20TokenConversionRate[_token];
    }
    
    /**
     * @notice Returns the Claimable tokens of an address
     * @return Returns amount of tokens the user can calain
     * @param _address Address to find the amount of tokens
     */
    function getClaimableTokens(address _address) public view returns (uint256) {
        return tokenSoldMapping[_address];
    }

    /**
     * @notice Owner can set the eth conversion rate. Receiver tokens = wei * etherConversionRate / 10 ** etherConversionRateDecimals
     * @param _rate Fixed number of ether rate
     */
    function setEtherConversionRate(uint256 _rate) public onlyOwner {
        require(etherConversionRate != _rate, "ICO_CAMPAIGN::RATE_INVALID");
        etherConversionRate = _rate;
        emit CampaignStatsChanged();
    }
    
    /**
     * @notice Owner can set the eth conversion rate decimals. Receiver tokens = wei * etherConversionRate / 10 ** etherConversionRateDecimals
     * @param _rateDecimals Fixed number of ether rate decimals
     */
    function setEtherConversionRateDecimals(uint256 _rateDecimals) public onlyOwner {
        etherConversionRateDecimals = _rateDecimals;
        emit CampaignStatsChanged();
    }

    /**
     * @notice Owner can set the token conversion rate. Receiver tokens = tradeTokens * tokenRate
     * @param _token address of token to query token exchange rate
     */
    function setErc20TokenConversionRate(address _token, uint256 _rate) public onlyOwner {
        require(erc20TokenConversionRate[_token] != _rate, "ICO_CAMPAIGN::RATE_INVALID");
        erc20TokenConversionRate[_token] = _rate;
        emit AllowTokenToTradeWithRate(_token, _rate);
        emit CampaignStatsChanged();
    }
    
    /**
    * @notice Owner can set the release time (time in seconds) for claim functionality.
    * @param _releaseTime Value in uint256 determine when we allow claim to function
    */
    function setReleaseTime(uint256 _releaseTime) public onlyOwner () {
        require(_releaseTime >= block.timestamp, "ICO_CAMPAIGN::INVALID_TIME");
        require(_releaseTime >= closeTime, "ICO_CAMPAIGN::INVALID_TIME_COMPATIBILITY");
        releaseTime = _releaseTime;
        emit CampaignStatsChanged();
    }

    /**
    * @notice Owner can set the close time (time in seconds). User can buy before close time.
    * @param _closeTime Value in uint256 determine when we stop user to by tokens
    */
    function setCloseTime(uint256 _closeTime) public onlyOwner () {
        require(_closeTime >= block.timestamp, "ICO_CAMPAIGN::INVALID_TIME");
        closeTime = _closeTime;
        emit CampaignStatsChanged();
    }

    /**
    * @notice Owner can set the open time (time in seconds). User can buy after open time.
    * @param _openTime Value in uint256 determine when we allow user to by tokens
    */
    function setOpenTime(uint256 _openTime) public onlyOwner () {
        openTime = _openTime;
        emit CampaignStatsChanged();
    }

    /**
    * @notice User can buy token by this function when available. tokens = wei * etherConversionRate / 10 ** etherConversionRateDecimals
    * @dev low level token purchase ***DO NOT OVERRIDE***
    * @param _beneficiary Address performing the token purchase
    */
    function buyTokenByEther(address _beneficiary) public whenNotPaused nonReentrant  payable {
        uint256 weiAmount = msg.value;
        _preValidatePurchase(_beneficiary, weiAmount);
        require(_validPurchase(), "ICO_CAMPAIGN::ENDED");
        require(tokenSoldMapping[_beneficiary] < etherConversionRate, "ICO_CAMPAIGN::MAX_1_ETH_TOTAL");

        // calculate token amount to be created
        uint256 tokens = _getEtherToTokenAmount(weiAmount);

        uint256 platformFee = _payPlatformEtherFee();
        _forwardFunds(weiAmount.sub(platformFee));
        _updatePurchasingState(_beneficiary, weiAmount, tokens);
        emit TokenPurchaseByEther(msg.sender, _beneficiary, weiAmount, tokens);
    }

    /**
    * @notice Calculate the tokens user can receive. Receive User's trade tokens and transfer tokens
    * @dev tokens = _token * token Conversion Rate Of _token
    * @param _beneficiary Address performing the token purchase
    * @param _token Address of willing to exchange to ke performing the token purchase
    * @param _amount Value of amount will exchange of tokens
    */
    function buyTokenByToken(address _beneficiary, address _token, uint256 _amount) public whenNotPaused nonReentrant {
        require(_token != address(0), "ICO_CAMPAIGN::TOKEN_ADDRESS_0");
        require(_token != address(token), "ICO_CAMPAIGN::TOKEN_INVALID");
        require(_amount < 5000000000, "ICO_CAMPAIGN::MAX_500");
        require(_validPurchase(), "ICO_CAMPAIGN::ENDED");
        require(tokenSoldMapping[_beneficiary] < etherConversionRate, "ICO_CAMPAIGN::MAX_1_ETH_TOTAL");
        _preValidatePurchase(_beneficiary, _amount);
        require(getErc20TokenConversionRate(_token) != 0, "ICO_CAMPAIGN::TOKEN_NOT_ALLOWED");

        IERC20 tradeToken = IERC20(_token);
        uint256 allowance = tradeToken.allowance(msg.sender, address(this));
        require(allowance >= _amount, "ICO_CAMPAIGN::TOKEN_NOT_APPROVED");
        
        uint256 tokens = _getTokenToTokenAmount(_token, _amount);

        uint256 platformFee = _payPlatformTokenFee(_token, _amount);
        _forwardTokenFunds(_token, _amount.sub(platformFee));
        _updatePurchasingState(_beneficiary, 0, tokens);
        
        emit TokenPurchaseByToken(msg.sender, _beneficiary, _token, _amount, tokens);
    }

    function claim() public whenNotPaused nonReentrant {
        require(isFinalized(), "ICO_CAMPAIGN::ICO_NOT_ENDED");

        uint256 amount = tokenSoldMapping[msg.sender];
        require(amount > 0, "ICO_CAMPAIGN::EMPTY_BALANCE");

        token.transfer(msg.sender, amount);
        _updateDeliveryState(msg.sender, amount);

        emit TokenClaimed(msg.sender, amount);
    }

    /**
    * @notice Return true if campaign has ended
    * @dev User cannot purchase / trade tokens when isFinalized == true
    * @return true if the ICO ended.
    */
    function isFinalized() public view returns (bool) {
        return block.timestamp >= closeTime;
    }

    /**
    * @notice Return true if campaign is open
    * @dev User can purchase / trade tokens when isOpen == true
    * @return true if the ICO is open.
    */
    function isOpen() public view returns (bool) {
        return (block.timestamp < closeTime) && (block.timestamp > openTime);
    }

    /**
    * @notice Owner can receive their remaining tokens when ICO Ended
    * @dev  Can refund remainning token if the ico ended
    * @param _wallet Address wallet who receive the remainning tokens when Ico end
    * @param _amount Value of amount will exchange of tokens
    */
    function refundTokenForIcoOwner(address _wallet, uint _amount) external onlyOwner {
        require(isFinalized(), "ICO_CAMPAIGN::ICO_NOT_ENDED");
        require(token.balanceOf(address(this)) > 0, "ICO_CAMPAIGN::EMPTY_BALANCE");
        _deliverTokens(_wallet, _amount);
        emit RefundedTokenForIcoWhenEndIco(_wallet, _amount);
    }

    /**
    * @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met. Use super to concatenate validations.
    * @param _beneficiary Address performing the token purchase
    * @param _weiAmount Value in wei involved in the purchase
    */
    function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal pure {
        require(_beneficiary != address(0), "ICO_CAMPAIGN::INVALID_BENEFICIARY");
        require(_weiAmount != 0, "ICO_CAMPAIGN::INVALID_WEI_AMOUNT");
        require(_weiAmount < 1 ether, "ICO_CAMPAIGN::MAX_1_ETH");
    }

    /**
    * @dev Override to extend the way in which ether is converted to tokens.
    * @param _weiAmount Value in wei to be converted into tokens
    * @return Number of tokens that can be purchased with the specified _weiAmount
    */
    function _getEtherToTokenAmount(uint256 _weiAmount) internal view returns (uint256) {
        uint256 rate = getEtherConversionRate();
        return _weiAmount.mul(rate).div(10 ** etherConversionRateDecimals);
    }

    /**
    * @dev Override to extend the way in which ether is converted to tokens.
    * @param _token Address of exchange token
    * @param _amount Value of exchange tokens
    * @return Number of tokens that can be purchased with the specified _weiAmount
    */
    function _getTokenToTokenAmount(address _token, uint256 _amount) internal view returns (uint256) {
        uint256 rate = getErc20TokenConversionRate(_token);
        return _amount.mul(rate);
    }

    /**
    * @dev Source of tokens. Transfer / mint
    * @param _beneficiary Address performing the token purchase
    * @param _tokenAmount Number of tokens to be emitted
    */
    function _deliverTokens(
        address _beneficiary,
        uint256 _tokenAmount
    )
      internal
    {
      token.transfer(_beneficiary, _tokenAmount);
    }

    /**
    * @dev Determines how ETH is stored/forwarded on purchases.
    */
    function _forwardFunds(uint256 _value) internal {
        address payable wallet = address(uint160(fundingWallet));
        (bool success, ) = wallet.call{value: _value}("");
        require(success, "ICO_CAMPAIGN::WALLET_TRANSFER_FAILED");
    }

    /**
    * @dev Determines how Token is stored/forwarded on purchases.
    */
    function _forwardTokenFunds(address _token, uint _amount) internal {
        IERC20(_token).transferFrom(msg.sender, fundingWallet, _amount);
    }

    /**
    * @param _beneficiary Address performing the token purchase
    * @param _tokenAmount Value of sold tokens
    * @param _weiAmount Value in wei involved in the purchase
    */
    function _updatePurchasingState(
        address _beneficiary,
        uint256 _weiAmount,
        uint256 _tokenAmount
    )
      internal
    {
      weiRaised = weiRaised.add(_weiAmount);
      tokenSold = tokenSold.add(_tokenAmount);
      tokenSoldMapping[_beneficiary] = tokenSoldMapping[_beneficiary].add(_tokenAmount);
    }

    /**
    * @param _beneficiary Address performing the token delivery
    * @param _tokenAmount Value of delivery tokens
    */
    function _updateDeliveryState(
        address _beneficiary,
        uint256 _tokenAmount
    )
      internal
    {
      tokenSoldMapping[_beneficiary] = tokenSoldMapping[_beneficiary].sub(_tokenAmount);
    }

    // @return true if the transaction can buy tokens
    function _validPurchase() internal view returns (bool) {
        bool withinPeriod = block.timestamp >= openTime && block.timestamp <= closeTime;
        return withinPeriod;
    }

    /**
    * @notice Pay platform fee when a trade executed in eth
    * @dev  Only pay when use Lemonade to register ICO Campaign
    */
    function _payPlatformEtherFee() private returns (uint256) {
      address payable platformRevenueAddress = address(uint160(_getPlatformRevenueAddress()));
      uint256 platformFeeRate = _getPlatformFeeRate();
      uint256 payment = msg.value;
      uint256 platformFee = payment.mul(platformFeeRate).div(100);

      (bool success, ) = platformRevenueAddress.call{value: platformFee}("");
      require(success, "ICO_CAMPAIGN::PAY_PLATFORM_FEE_FAILED");
      return platformFee;
    }

    /**
    * @notice Pay platform fee when a trade executed in tokens
    * @dev  Only pay when use Lemonade to register ICO Campaign
    */
    function _payPlatformTokenFee(address _token, uint256 _amount) private returns (uint) {
      address payable platformRevenueAddress = address(uint160(_getPlatformRevenueAddress()));
      uint256 platformFeeRate = _getPlatformFeeRate();
      uint256 payment = _amount;
      uint256 platformFee = payment.mul(platformFeeRate).div(100);
      IERC20(_token).transferFrom(msg.sender, platformRevenueAddress, platformFee);
      return platformFee;
    }

    /**
    * @notice Call to factory contract to get Platform Fee
    * @dev  return a fixed number fee of Platform
    */
    function _getPlatformFeeRate() private view returns (uint256) {
      return ICampaignFactory(factory).getPlatformFeeRate();
    }

    /**
    * @notice Call to factory contract to get revenue address
    * @dev  return address of factory vault
    */
    function _getPlatformRevenueAddress() private view returns (address) {
      return ICampaignFactory(factory).getplatformRevenueAddress();
    }

   /**
   * @dev Transfer eth to an address
   * @param _to Address receiving the eth
   * @param _amount Amount of wei to transfer
   */
    function _transfer(address _to, uint256 _amount) private {
        address payable payableAddress = address(uint160(_to));
        (bool success, ) = payableAddress.call{value: _amount}("");
        require(success, "ICO_CAMPAIGN::TRANSFER_FEE_FAILED");
    }

   /**
   * @dev Transfer token to an address
   * @param _to Address receiving the eth
   * @param _amount Amount of wei to transfer
   */
    function _transferToken(address _token, address _to, uint256 _amount) private {
        IERC20(_token).transferFrom(msg.sender, _to, _amount);
    }
}

File 2 of 7 : ICampaignFactory.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.1;

interface ICampaignFactory {
    function getPlatformFeeRate() external view returns (uint256);
    function getplatformRevenueAddress() external view returns (address);
}

File 3 of 7 : Ownable.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;


/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;

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

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param _newOwner The address to transfer ownership to.
   */
  function transferOwnership(address _newOwner) public onlyOwner {
    _transferOwnership(_newOwner);
  }

  /**
   * @dev Transfers control of the contract to a newOwner.
   * @param _newOwner The address to transfer ownership to.
   */
  function _transferOwnership(address _newOwner) internal {
    require(_newOwner != address(0));
    emit OwnershipTransferred(owner, _newOwner);
    owner = _newOwner;
  }
}

File 4 of 7 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 5 of 7 : SafeMath.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol
// Subject to the MIT license.

/**
 * @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 addition of two unsigned integers, reverting with custom message on overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, errorMessage);

        return c;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot underflow.
     */
    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 multiplication of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b, string memory errorMessage) 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, errorMessage);

        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) {
        // 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.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 6 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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);

    /**
     * @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 7 of 7 : Pausable.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.1;


import "./Ownable.sol";


/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
  event Pause();
  event Unpause();

  bool public paused;


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

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

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pause() onlyOwner whenNotPaused public {
    paused = true;
    emit Pause();
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpause() onlyOwner whenPaused public {
    paused = false;
    emit Unpause();
  }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"rate","type":"uint256"}],"name":"AllowTokenToTradeWithRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"openTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"closeTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"releaseTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethRateDecimals","type":"uint256"},{"indexed":false,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"CampaignCreated","type":"event"},{"anonymous":false,"inputs":[],"name":"CampaignStatsChanged","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":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RefundedTokenForIcoWhenEndIco","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"purchaser","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenPurchaseByEther","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"purchaser","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenPurchaseByToken","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"}],"name":"buyTokenByEther","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"buyTokenByToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundingWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getClaimableTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"getErc20TokenConversionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEtherConversionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEtherConversionRateDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"uint256","name":"_openTime","type":"uint256"},{"internalType":"uint256","name":"_releaseTime","type":"uint256"},{"internalType":"uint256","name":"_ethRate","type":"uint256"},{"internalType":"uint256","name":"_ethRateDecimals","type":"uint256"},{"internalType":"address","name":"_wallet","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isFinalized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"refundTokenForIcoOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"releaseTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_closeTime","type":"uint256"}],"name":"setCloseTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setErc20TokenConversionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setEtherConversionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rateDecimals","type":"uint256"}],"name":"setEtherConversionRateDecimals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_openTime","type":"uint256"}],"name":"setOpenTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_releaseTime","type":"uint256"}],"name":"setReleaseTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenSold","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":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weiRaised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405242600555600060085560006009556000600c5534801561002357600080fd5b5060018055600380546001600160a01b031916331790556123da806100496000396000f3fe6080604052600436106101dc5760003560e01c80638456cb5911610102578063c26e8fc211610095578063d831744511610064578063d831744514610688578063f2fde38b146106b2578063f60ba338146106e5578063fc0c546a1461070f576101ec565b8063c26e8fc2146105e8578063c45a01551461062b578063c9bb718b14610640578063cd33697f14610655576101ec565b8063ab05bfff116100d1578063ab05bfff146104e5578063aecad34f1461050f578063b4256888146105be578063b91d4001146105d3576101ec565b80638456cb591461046d5780638d4e4083146104825780638da5cb5b1461049757806397755788146104ac576101ec565b806347535d7b1161017a57806353da0a6d1161014957806353da0a6d146103f35780635c975abb1461041d578063627749e614610432578063744d380e14610447576101ec565b806347535d7b146103675780634e71d92d14610390578063500a0663146103a5578063519ee19e146103de576101ec565b80633be3a3f5116101b65780633be3a3f5146102e25780633c4b40b81461030c5780633f4ba83a1461033d5780634042b66f14610352576101ec565b806306fdde03146101fe5780631b831ead1461028857806326700c00146102cd576101ec565b366101ec576101ea33610724565b005b3480156101f857600080fd5b50600080fd5b34801561020a57600080fd5b50610213610925565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561024d578181015183820152602001610235565b50505050905090810190601f16801561027a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029457600080fd5b506102bb600480360360208110156102ab57600080fd5b50356001600160a01b03166109b3565b60408051918252519081900360200190f35b3480156102d957600080fd5b506102bb6109ce565b3480156102ee57600080fd5b506101ea6004803603602081101561030557600080fd5b50356109d4565b34801561031857600080fd5b50610321610a71565b604080516001600160a01b039092168252519081900360200190f35b34801561034957600080fd5b506101ea610a80565b34801561035e57600080fd5b506102bb610b23565b34801561037357600080fd5b5061037c610b29565b604080519115158252519081900360200190f35b34801561039c57600080fd5b506101ea610b42565b3480156103b157600080fd5b506101ea600480360360408110156103c857600080fd5b506001600160a01b038135169060200135610d75565b3480156103ea57600080fd5b506102bb610f1e565b3480156103ff57600080fd5b506101ea6004803603602081101561041657600080fd5b5035610f24565b34801561042957600080fd5b5061037c610f6c565b34801561043e57600080fd5b506102bb610f75565b6101ea6004803603602081101561045d57600080fd5b50356001600160a01b0316610724565b34801561047957600080fd5b506101ea610f7b565b34801561048e57600080fd5b5061037c611014565b3480156104a357600080fd5b5061032161101d565b3480156104b857600080fd5b506101ea600480360360408110156104cf57600080fd5b506001600160a01b03813516906020013561102c565b3480156104f157600080fd5b506101ea6004803603602081101561050857600080fd5b5035611132565b34801561051b57600080fd5b506101ea600480360361010081101561053357600080fd5b81019060208101813564010000000081111561054e57600080fd5b82018360208201111561056057600080fd5b8035906020019184600183028401116401000000008311171561058257600080fd5b91935091506001600160a01b03813581169160208101359160408201359160608101359160808201359160a08101359160c09091013516611210565b3480156105ca57600080fd5b506102bb6113d9565b3480156105df57600080fd5b506102bb6113df565b3480156105f457600080fd5b506101ea6004803603606081101561060b57600080fd5b506001600160a01b038135811691602081013590911690604001356113e5565b34801561063757600080fd5b50610321611859565b34801561064c57600080fd5b506102bb611868565b34801561066157600080fd5b506102bb6004803603602081101561067857600080fd5b50356001600160a01b031661186e565b34801561069457600080fd5b506101ea600480360360208110156106ab57600080fd5b5035611889565b3480156106be57600080fd5b506101ea600480360360208110156106d557600080fd5b50356001600160a01b0316611928565b3480156106f157600080fd5b506101ea6004803603602081101561070857600080fd5b503561194b565b34801561071b57600080fd5b50610321611993565b60025460ff161561076e576040805162461bcd60e51b815260206004820152600f60248201526e10d3d395149050d517d4105554d151608a1b604482015290519081900360640190fd5b600260015414156107c6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155346107d682826119a7565b6107de611a9e565b61082f576040805162461bcd60e51b815260206004820152601360248201527f49434f5f43414d504149474e3a3a454e44454400000000000000000000000000604482015290519081900360640190fd5b600b546001600160a01b0383166000908152600e60205260409020541061089d576040805162461bcd60e51b815260206004820152601d60248201527f49434f5f43414d504149474e3a3a4d41585f315f4554485f544f54414c000000604482015290519081900360640190fd5b60006108a882611abb565b905060006108b4611aea565b90506108c86108c38483611bb1565b611bfc565b6108d3848484611c97565b604080518481526020810184905281516001600160a01b0387169233927fd6e14f869a4a94e470ad9068cd72554abf10add2c7004aaeed6ea664aede76bd929081900390910190a35050600180555050565b600a805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109ab5780601f10610980576101008083540402835291602001916109ab565b820191906000526020600020905b81548152906001019060200180831161098e57829003601f168201915b505050505081565b6001600160a01b03166000908152600e602052604090205490565b600c5490565b6000546001600160a01b031633146109eb57600080fd5b42811015610a40576040805162461bcd60e51b815260206004820152601a60248201527f49434f5f43414d504149474e3a3a494e56414c49445f54494d45000000000000604482015290519081900360640190fd5b60068190556040517f4099256857b8a6204d5b71e93420dfc1bf257a2c9e6d44fc9cef51b0fb704cc190600090a150565b6004546001600160a01b031681565b6000546001600160a01b03163314610a9757600080fd5b60025460ff16610aee576040805162461bcd60e51b815260206004820152601360248201527f434f4e54524143545f4e4f545f50415553454400000000000000000000000000604482015290519081900360640190fd5b6002805460ff191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b60085481565b600060065442108015610b3d575060055442115b905090565b60025460ff1615610b8c576040805162461bcd60e51b815260206004820152600f60248201526e10d3d395149050d517d4105554d151608a1b604482015290519081900360640190fd5b60026001541415610be4576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155610bf1611014565b610c42576040805162461bcd60e51b815260206004820152601b60248201527f49434f5f43414d504149474e3a3a49434f5f4e4f545f454e4445440000000000604482015290519081900360640190fd5b336000908152600e602052604090205480610ca4576040805162461bcd60e51b815260206004820152601b60248201527f49434f5f43414d504149474e3a3a454d5054595f42414c414e43450000000000604482015290519081900360640190fd5b6002546040805163a9059cbb60e01b81523360048201526024810184905290516101009092046001600160a01b03169163a9059cbb916044808201926020929091908290030181600087803b158015610cfc57600080fd5b505af1158015610d10573d6000803e3d6000fd5b505050506040513d6020811015610d2657600080fd5b50610d3390503382611cfb565b604080513381526020810183905281517fe42df0d9493dfd0d7f69902c895b94c190a53e8c27876a86f45e7c997d9d8f7c929181900390910190a15060018055565b6000546001600160a01b03163314610d8c57600080fd5b610d94611014565b610de5576040805162461bcd60e51b815260206004820152601b60248201527f49434f5f43414d504149474e3a3a49434f5f4e4f545f454e4445440000000000604482015290519081900360640190fd5b600254604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009261010090046001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610e4e57600080fd5b505afa158015610e62573d6000803e3d6000fd5b505050506040513d6020811015610e7857600080fd5b505111610ecc576040805162461bcd60e51b815260206004820152601b60248201527f49434f5f43414d504149474e3a3a454d5054595f42414c414e43450000000000604482015290519081900360640190fd5b610ed68282611d3e565b604080516001600160a01b03841681526020810183905281517fa8699c1b2c85e64a4ceb1bb9bbddca45726d2577e2a617891b659e2f9ae48cef929181900390910190a15050565b60095481565b6000546001600160a01b03163314610f3b57600080fd5b600c8190556040517f4099256857b8a6204d5b71e93420dfc1bf257a2c9e6d44fc9cef51b0fb704cc190600090a150565b60025460ff1681565b60065481565b6000546001600160a01b03163314610f9257600080fd5b60025460ff1615610fdc576040805162461bcd60e51b815260206004820152600f60248201526e10d3d395149050d517d4105554d151608a1b604482015290519081900360640190fd5b6002805460ff191660011790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b60065442101590565b6000546001600160a01b031681565b6000546001600160a01b0316331461104357600080fd5b6001600160a01b0382166000908152600d60205260409020548114156110b0576040805162461bcd60e51b815260206004820152601a60248201527f49434f5f43414d504149474e3a3a524154455f494e56414c4944000000000000604482015290519081900360640190fd5b6001600160a01b0382166000818152600d60209081526040918290208490558151928352820183905280517f79773439bd6115f9a339f4d0179ee1962077d09bb22b96042ad49c1d3299e9f89281900390910190a16040517f4099256857b8a6204d5b71e93420dfc1bf257a2c9e6d44fc9cef51b0fb704cc190600090a15050565b6000546001600160a01b0316331461114957600080fd5b4281101561119e576040805162461bcd60e51b815260206004820152601a60248201527f49434f5f43414d504149474e3a3a494e56414c49445f54494d45000000000000604482015290519081900360640190fd5b6006548110156111df5760405162461bcd60e51b815260040180806020018281038252602881526020018061237d6028913960400191505060405180910390fd5b60078190556040517f4099256857b8a6204d5b71e93420dfc1bf257a2c9e6d44fc9cef51b0fb704cc190600090a150565b6003546001600160a01b0316331461126f576040805162461bcd60e51b815260206004820152601a60248201527f49434f5f43414d504149474e3a3a554e415554484f52495a4544000000000000604482015290519081900360640190fd5b61127b600a8a8a61225e565b50600280547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038a160217905560058590556112c28587611dca565b60068190556007859055600b849055600c839055600480546001600160a01b0380851673ffffffffffffffffffffffffffffffffffffffff199283168117909355600080549092163217918290556002805460ff19169055604080518c831660208201529081018a9052606081018590526080810189905260a0810188905260c0810187905260e081019390935216610100820181905261012080835282018b90527fa06a19e75a47635e993164352743a303c50d3bd2d312f0987078da4481e96760928c928c928c928b9290918b918b918b918b91908061014081018c8c80828437600083820152604051601f909101601f19169092018290039d50909b505050505050505050505050a1505050505050505050565b60055481565b60075481565b60025460ff161561142f576040805162461bcd60e51b815260206004820152600f60248201526e10d3d395149050d517d4105554d151608a1b604482015290519081900360640190fd5b60026001541415611487576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001556001600160a01b0382166114e7576040805162461bcd60e51b815260206004820152601d60248201527f49434f5f43414d504149474e3a3a544f4b454e5f414444524553535f30000000604482015290519081900360640190fd5b6002546001600160a01b0383811661010090920416141561154f576040805162461bcd60e51b815260206004820152601b60248201527f49434f5f43414d504149474e3a3a544f4b454e5f494e56414c49440000000000604482015290519081900360640190fd5b64012a05f20081106115a8576040805162461bcd60e51b815260206004820152601560248201527f49434f5f43414d504149474e3a3a4d41585f3530300000000000000000000000604482015290519081900360640190fd5b6115b0611a9e565b611601576040805162461bcd60e51b815260206004820152601360248201527f49434f5f43414d504149474e3a3a454e44454400000000000000000000000000604482015290519081900360640190fd5b600b546001600160a01b0384166000908152600e60205260409020541061166f576040805162461bcd60e51b815260206004820152601d60248201527f49434f5f43414d504149474e3a3a4d41585f315f4554485f544f54414c000000604482015290519081900360640190fd5b61167983826119a7565b6116828261186e565b6116d3576040805162461bcd60e51b815260206004820152601f60248201527f49434f5f43414d504149474e3a3a544f4b454e5f4e4f545f414c4c4f57454400604482015290519081900360640190fd5b604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820152306024820152905183916000916001600160a01b0384169163dd62ed3e916044808301926020929190829003018186803b15801561173d57600080fd5b505afa158015611751573d6000803e3d6000fd5b505050506040513d602081101561176757600080fd5b50519050828110156117c0576040805162461bcd60e51b815260206004820181905260248201527f49434f5f43414d504149474e3a3a544f4b454e5f4e4f545f415050524f564544604482015290519081900360640190fd5b60006117cc8585611e24565b905060006117da8686611e44565b90506117ef866117ea8784611bb1565b611f02565b6117fb87600084611c97565b604080516001600160a01b0388811682526020820188905281830185905291519189169133917f7298563060885829720d658271e2cf90735f0dedf473ea50428added4b4f7881919081900360600190a35050600180555050505050565b6003546001600160a01b031681565b600b5490565b6001600160a01b03166000908152600d602052604090205490565b6000546001600160a01b031633146118a057600080fd5b80600b5414156118f7576040805162461bcd60e51b815260206004820152601a60248201527f49434f5f43414d504149474e3a3a524154455f494e56414c4944000000000000604482015290519081900360640190fd5b600b8190556040517f4099256857b8a6204d5b71e93420dfc1bf257a2c9e6d44fc9cef51b0fb704cc190600090a150565b6000546001600160a01b0316331461193f57600080fd5b61194881611f5f565b50565b6000546001600160a01b0316331461196257600080fd5b60058190556040517f4099256857b8a6204d5b71e93420dfc1bf257a2c9e6d44fc9cef51b0fb704cc190600090a150565b60025461010090046001600160a01b031681565b6001600160a01b0382166119ec5760405162461bcd60e51b81526004018080602001828103825260218152602001806123176021913960400191505060405180910390fd5b80611a3e576040805162461bcd60e51b815260206004820181905260248201527f49434f5f43414d504149474e3a3a494e56414c49445f5745495f414d4f554e54604482015290519081900360640190fd5b670de0b6b3a76400008110611a9a576040805162461bcd60e51b815260206004820152601760248201527f49434f5f43414d504149474e3a3a4d41585f315f455448000000000000000000604482015290519081900360640190fd5b5050565b6000806005544210158015611ab557506006544211155b91505090565b600080611ac6611868565b600c54909150611ae390600a0a611add8584611fda565b90612033565b9392505050565b600080611af5612075565b90506000611b01612104565b9050346000611b156064611add8486611fda565b6040519091506000906001600160a01b0386169083908381818185875af1925050503d8060008114611b63576040519150601f19603f3d011682016040523d82523d6000602084013e611b68565b606091505b5050905080611ba85760405162461bcd60e51b81526004018080602001828103825260258152602001806122f26025913960400191505060405180910390fd5b50935050505090565b6000611bf383836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f7700815250612162565b90505b92915050565b6004546040516001600160a01b0390911690600090829084908381818185875af1925050503d8060008114611c4d576040519150601f19603f3d011682016040523d82523d6000602084013e611c52565b606091505b5050905080611c925760405162461bcd60e51b81526004018080602001828103825260248152602001806123596024913960400191505060405180910390fd5b505050565b600854611ca49083611dca565b600855600954611cb49082611dca565b6009556001600160a01b0383166000908152600e6020526040902054611cda9082611dca565b6001600160a01b039093166000908152600e60205260409020929092555050565b6001600160a01b0382166000908152600e6020526040902054611d1e9082611bb1565b6001600160a01b039092166000908152600e602052604090209190915550565b6002546040805163a9059cbb60e01b81526001600160a01b0385811660048301526024820185905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b158015611d9a57600080fd5b505af1158015611dae573d6000803e3d6000fd5b505050506040513d6020811015611dc457600080fd5b50505050565b600082820183811015611bf3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600080611e308461186e565b9050611e3c8382611fda565b949350505050565b600080611e4f612075565b90506000611e5b612104565b9050836000611e6f6064611add8486611fda565b604080516323b872dd60e01b81523360048201526001600160a01b038781166024830152604482018490529151929350908916916323b872dd916064808201926020929091908290030181600087803b158015611ecb57600080fd5b505af1158015611edf573d6000803e3d6000fd5b505050506040513d6020811015611ef557600080fd5b5090979650505050505050565b60048054604080516323b872dd60e01b815233938101939093526001600160a01b0391821660248401526044830184905251908416916323b872dd9160648083019260209291908290030181600087803b158015611d9a57600080fd5b6001600160a01b038116611f7257600080fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600082611fe957506000611bf6565b82820282848281611ff657fe5b0414611bf35760405162461bcd60e51b81526004018080602001828103825260218152602001806123386021913960400191505060405180910390fd5b6000611bf383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506121f9565b600354604080517f6886f1d300000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691636886f1d3916004808301926020929190829003018186803b1580156120d357600080fd5b505afa1580156120e7573d6000803e3d6000fd5b505050506040513d60208110156120fd57600080fd5b5051905090565b600354604080517f2571f4b800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691632571f4b8916004808301926020929190829003018186803b1580156120d357600080fd5b600081848411156121f15760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156121b657818101518382015260200161219e565b50505050905090810190601f1680156121e35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836122485760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156121b657818101518382015260200161219e565b50600083858161225457fe5b0495945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061229f5782800160ff198235161785556122cc565b828001600101855582156122cc579182015b828111156122cc5782358255916020019190600101906122b1565b506122d89291506122dc565b5090565b5b808211156122d857600081556001016122dd56fe49434f5f43414d504149474e3a3a5041595f504c4154464f524d5f4645455f4641494c454449434f5f43414d504149474e3a3a494e56414c49445f42454e4546494349415259536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7749434f5f43414d504149474e3a3a57414c4c45545f5452414e534645525f4641494c454449434f5f43414d504149474e3a3a494e56414c49445f54494d455f434f4d5041544942494c495459a2646970667358221220876d45896ad956eef134cb4a0704cabec214cd748d8eff023b624ce64252c23764736f6c63430007010033

Deployed Bytecode

0x6080604052600436106101dc5760003560e01c80638456cb5911610102578063c26e8fc211610095578063d831744511610064578063d831744514610688578063f2fde38b146106b2578063f60ba338146106e5578063fc0c546a1461070f576101ec565b8063c26e8fc2146105e8578063c45a01551461062b578063c9bb718b14610640578063cd33697f14610655576101ec565b8063ab05bfff116100d1578063ab05bfff146104e5578063aecad34f1461050f578063b4256888146105be578063b91d4001146105d3576101ec565b80638456cb591461046d5780638d4e4083146104825780638da5cb5b1461049757806397755788146104ac576101ec565b806347535d7b1161017a57806353da0a6d1161014957806353da0a6d146103f35780635c975abb1461041d578063627749e614610432578063744d380e14610447576101ec565b806347535d7b146103675780634e71d92d14610390578063500a0663146103a5578063519ee19e146103de576101ec565b80633be3a3f5116101b65780633be3a3f5146102e25780633c4b40b81461030c5780633f4ba83a1461033d5780634042b66f14610352576101ec565b806306fdde03146101fe5780631b831ead1461028857806326700c00146102cd576101ec565b366101ec576101ea33610724565b005b3480156101f857600080fd5b50600080fd5b34801561020a57600080fd5b50610213610925565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561024d578181015183820152602001610235565b50505050905090810190601f16801561027a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029457600080fd5b506102bb600480360360208110156102ab57600080fd5b50356001600160a01b03166109b3565b60408051918252519081900360200190f35b3480156102d957600080fd5b506102bb6109ce565b3480156102ee57600080fd5b506101ea6004803603602081101561030557600080fd5b50356109d4565b34801561031857600080fd5b50610321610a71565b604080516001600160a01b039092168252519081900360200190f35b34801561034957600080fd5b506101ea610a80565b34801561035e57600080fd5b506102bb610b23565b34801561037357600080fd5b5061037c610b29565b604080519115158252519081900360200190f35b34801561039c57600080fd5b506101ea610b42565b3480156103b157600080fd5b506101ea600480360360408110156103c857600080fd5b506001600160a01b038135169060200135610d75565b3480156103ea57600080fd5b506102bb610f1e565b3480156103ff57600080fd5b506101ea6004803603602081101561041657600080fd5b5035610f24565b34801561042957600080fd5b5061037c610f6c565b34801561043e57600080fd5b506102bb610f75565b6101ea6004803603602081101561045d57600080fd5b50356001600160a01b0316610724565b34801561047957600080fd5b506101ea610f7b565b34801561048e57600080fd5b5061037c611014565b3480156104a357600080fd5b5061032161101d565b3480156104b857600080fd5b506101ea600480360360408110156104cf57600080fd5b506001600160a01b03813516906020013561102c565b3480156104f157600080fd5b506101ea6004803603602081101561050857600080fd5b5035611132565b34801561051b57600080fd5b506101ea600480360361010081101561053357600080fd5b81019060208101813564010000000081111561054e57600080fd5b82018360208201111561056057600080fd5b8035906020019184600183028401116401000000008311171561058257600080fd5b91935091506001600160a01b03813581169160208101359160408201359160608101359160808201359160a08101359160c09091013516611210565b3480156105ca57600080fd5b506102bb6113d9565b3480156105df57600080fd5b506102bb6113df565b3480156105f457600080fd5b506101ea6004803603606081101561060b57600080fd5b506001600160a01b038135811691602081013590911690604001356113e5565b34801561063757600080fd5b50610321611859565b34801561064c57600080fd5b506102bb611868565b34801561066157600080fd5b506102bb6004803603602081101561067857600080fd5b50356001600160a01b031661186e565b34801561069457600080fd5b506101ea600480360360208110156106ab57600080fd5b5035611889565b3480156106be57600080fd5b506101ea600480360360208110156106d557600080fd5b50356001600160a01b0316611928565b3480156106f157600080fd5b506101ea6004803603602081101561070857600080fd5b503561194b565b34801561071b57600080fd5b50610321611993565b60025460ff161561076e576040805162461bcd60e51b815260206004820152600f60248201526e10d3d395149050d517d4105554d151608a1b604482015290519081900360640190fd5b600260015414156107c6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155346107d682826119a7565b6107de611a9e565b61082f576040805162461bcd60e51b815260206004820152601360248201527f49434f5f43414d504149474e3a3a454e44454400000000000000000000000000604482015290519081900360640190fd5b600b546001600160a01b0383166000908152600e60205260409020541061089d576040805162461bcd60e51b815260206004820152601d60248201527f49434f5f43414d504149474e3a3a4d41585f315f4554485f544f54414c000000604482015290519081900360640190fd5b60006108a882611abb565b905060006108b4611aea565b90506108c86108c38483611bb1565b611bfc565b6108d3848484611c97565b604080518481526020810184905281516001600160a01b0387169233927fd6e14f869a4a94e470ad9068cd72554abf10add2c7004aaeed6ea664aede76bd929081900390910190a35050600180555050565b600a805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109ab5780601f10610980576101008083540402835291602001916109ab565b820191906000526020600020905b81548152906001019060200180831161098e57829003601f168201915b505050505081565b6001600160a01b03166000908152600e602052604090205490565b600c5490565b6000546001600160a01b031633146109eb57600080fd5b42811015610a40576040805162461bcd60e51b815260206004820152601a60248201527f49434f5f43414d504149474e3a3a494e56414c49445f54494d45000000000000604482015290519081900360640190fd5b60068190556040517f4099256857b8a6204d5b71e93420dfc1bf257a2c9e6d44fc9cef51b0fb704cc190600090a150565b6004546001600160a01b031681565b6000546001600160a01b03163314610a9757600080fd5b60025460ff16610aee576040805162461bcd60e51b815260206004820152601360248201527f434f4e54524143545f4e4f545f50415553454400000000000000000000000000604482015290519081900360640190fd5b6002805460ff191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b60085481565b600060065442108015610b3d575060055442115b905090565b60025460ff1615610b8c576040805162461bcd60e51b815260206004820152600f60248201526e10d3d395149050d517d4105554d151608a1b604482015290519081900360640190fd5b60026001541415610be4576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155610bf1611014565b610c42576040805162461bcd60e51b815260206004820152601b60248201527f49434f5f43414d504149474e3a3a49434f5f4e4f545f454e4445440000000000604482015290519081900360640190fd5b336000908152600e602052604090205480610ca4576040805162461bcd60e51b815260206004820152601b60248201527f49434f5f43414d504149474e3a3a454d5054595f42414c414e43450000000000604482015290519081900360640190fd5b6002546040805163a9059cbb60e01b81523360048201526024810184905290516101009092046001600160a01b03169163a9059cbb916044808201926020929091908290030181600087803b158015610cfc57600080fd5b505af1158015610d10573d6000803e3d6000fd5b505050506040513d6020811015610d2657600080fd5b50610d3390503382611cfb565b604080513381526020810183905281517fe42df0d9493dfd0d7f69902c895b94c190a53e8c27876a86f45e7c997d9d8f7c929181900390910190a15060018055565b6000546001600160a01b03163314610d8c57600080fd5b610d94611014565b610de5576040805162461bcd60e51b815260206004820152601b60248201527f49434f5f43414d504149474e3a3a49434f5f4e4f545f454e4445440000000000604482015290519081900360640190fd5b600254604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009261010090046001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610e4e57600080fd5b505afa158015610e62573d6000803e3d6000fd5b505050506040513d6020811015610e7857600080fd5b505111610ecc576040805162461bcd60e51b815260206004820152601b60248201527f49434f5f43414d504149474e3a3a454d5054595f42414c414e43450000000000604482015290519081900360640190fd5b610ed68282611d3e565b604080516001600160a01b03841681526020810183905281517fa8699c1b2c85e64a4ceb1bb9bbddca45726d2577e2a617891b659e2f9ae48cef929181900390910190a15050565b60095481565b6000546001600160a01b03163314610f3b57600080fd5b600c8190556040517f4099256857b8a6204d5b71e93420dfc1bf257a2c9e6d44fc9cef51b0fb704cc190600090a150565b60025460ff1681565b60065481565b6000546001600160a01b03163314610f9257600080fd5b60025460ff1615610fdc576040805162461bcd60e51b815260206004820152600f60248201526e10d3d395149050d517d4105554d151608a1b604482015290519081900360640190fd5b6002805460ff191660011790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b60065442101590565b6000546001600160a01b031681565b6000546001600160a01b0316331461104357600080fd5b6001600160a01b0382166000908152600d60205260409020548114156110b0576040805162461bcd60e51b815260206004820152601a60248201527f49434f5f43414d504149474e3a3a524154455f494e56414c4944000000000000604482015290519081900360640190fd5b6001600160a01b0382166000818152600d60209081526040918290208490558151928352820183905280517f79773439bd6115f9a339f4d0179ee1962077d09bb22b96042ad49c1d3299e9f89281900390910190a16040517f4099256857b8a6204d5b71e93420dfc1bf257a2c9e6d44fc9cef51b0fb704cc190600090a15050565b6000546001600160a01b0316331461114957600080fd5b4281101561119e576040805162461bcd60e51b815260206004820152601a60248201527f49434f5f43414d504149474e3a3a494e56414c49445f54494d45000000000000604482015290519081900360640190fd5b6006548110156111df5760405162461bcd60e51b815260040180806020018281038252602881526020018061237d6028913960400191505060405180910390fd5b60078190556040517f4099256857b8a6204d5b71e93420dfc1bf257a2c9e6d44fc9cef51b0fb704cc190600090a150565b6003546001600160a01b0316331461126f576040805162461bcd60e51b815260206004820152601a60248201527f49434f5f43414d504149474e3a3a554e415554484f52495a4544000000000000604482015290519081900360640190fd5b61127b600a8a8a61225e565b50600280547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038a160217905560058590556112c28587611dca565b60068190556007859055600b849055600c839055600480546001600160a01b0380851673ffffffffffffffffffffffffffffffffffffffff199283168117909355600080549092163217918290556002805460ff19169055604080518c831660208201529081018a9052606081018590526080810189905260a0810188905260c0810187905260e081019390935216610100820181905261012080835282018b90527fa06a19e75a47635e993164352743a303c50d3bd2d312f0987078da4481e96760928c928c928c928b9290918b918b918b918b91908061014081018c8c80828437600083820152604051601f909101601f19169092018290039d50909b505050505050505050505050a1505050505050505050565b60055481565b60075481565b60025460ff161561142f576040805162461bcd60e51b815260206004820152600f60248201526e10d3d395149050d517d4105554d151608a1b604482015290519081900360640190fd5b60026001541415611487576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001556001600160a01b0382166114e7576040805162461bcd60e51b815260206004820152601d60248201527f49434f5f43414d504149474e3a3a544f4b454e5f414444524553535f30000000604482015290519081900360640190fd5b6002546001600160a01b0383811661010090920416141561154f576040805162461bcd60e51b815260206004820152601b60248201527f49434f5f43414d504149474e3a3a544f4b454e5f494e56414c49440000000000604482015290519081900360640190fd5b64012a05f20081106115a8576040805162461bcd60e51b815260206004820152601560248201527f49434f5f43414d504149474e3a3a4d41585f3530300000000000000000000000604482015290519081900360640190fd5b6115b0611a9e565b611601576040805162461bcd60e51b815260206004820152601360248201527f49434f5f43414d504149474e3a3a454e44454400000000000000000000000000604482015290519081900360640190fd5b600b546001600160a01b0384166000908152600e60205260409020541061166f576040805162461bcd60e51b815260206004820152601d60248201527f49434f5f43414d504149474e3a3a4d41585f315f4554485f544f54414c000000604482015290519081900360640190fd5b61167983826119a7565b6116828261186e565b6116d3576040805162461bcd60e51b815260206004820152601f60248201527f49434f5f43414d504149474e3a3a544f4b454e5f4e4f545f414c4c4f57454400604482015290519081900360640190fd5b604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820152306024820152905183916000916001600160a01b0384169163dd62ed3e916044808301926020929190829003018186803b15801561173d57600080fd5b505afa158015611751573d6000803e3d6000fd5b505050506040513d602081101561176757600080fd5b50519050828110156117c0576040805162461bcd60e51b815260206004820181905260248201527f49434f5f43414d504149474e3a3a544f4b454e5f4e4f545f415050524f564544604482015290519081900360640190fd5b60006117cc8585611e24565b905060006117da8686611e44565b90506117ef866117ea8784611bb1565b611f02565b6117fb87600084611c97565b604080516001600160a01b0388811682526020820188905281830185905291519189169133917f7298563060885829720d658271e2cf90735f0dedf473ea50428added4b4f7881919081900360600190a35050600180555050505050565b6003546001600160a01b031681565b600b5490565b6001600160a01b03166000908152600d602052604090205490565b6000546001600160a01b031633146118a057600080fd5b80600b5414156118f7576040805162461bcd60e51b815260206004820152601a60248201527f49434f5f43414d504149474e3a3a524154455f494e56414c4944000000000000604482015290519081900360640190fd5b600b8190556040517f4099256857b8a6204d5b71e93420dfc1bf257a2c9e6d44fc9cef51b0fb704cc190600090a150565b6000546001600160a01b0316331461193f57600080fd5b61194881611f5f565b50565b6000546001600160a01b0316331461196257600080fd5b60058190556040517f4099256857b8a6204d5b71e93420dfc1bf257a2c9e6d44fc9cef51b0fb704cc190600090a150565b60025461010090046001600160a01b031681565b6001600160a01b0382166119ec5760405162461bcd60e51b81526004018080602001828103825260218152602001806123176021913960400191505060405180910390fd5b80611a3e576040805162461bcd60e51b815260206004820181905260248201527f49434f5f43414d504149474e3a3a494e56414c49445f5745495f414d4f554e54604482015290519081900360640190fd5b670de0b6b3a76400008110611a9a576040805162461bcd60e51b815260206004820152601760248201527f49434f5f43414d504149474e3a3a4d41585f315f455448000000000000000000604482015290519081900360640190fd5b5050565b6000806005544210158015611ab557506006544211155b91505090565b600080611ac6611868565b600c54909150611ae390600a0a611add8584611fda565b90612033565b9392505050565b600080611af5612075565b90506000611b01612104565b9050346000611b156064611add8486611fda565b6040519091506000906001600160a01b0386169083908381818185875af1925050503d8060008114611b63576040519150601f19603f3d011682016040523d82523d6000602084013e611b68565b606091505b5050905080611ba85760405162461bcd60e51b81526004018080602001828103825260258152602001806122f26025913960400191505060405180910390fd5b50935050505090565b6000611bf383836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f7700815250612162565b90505b92915050565b6004546040516001600160a01b0390911690600090829084908381818185875af1925050503d8060008114611c4d576040519150601f19603f3d011682016040523d82523d6000602084013e611c52565b606091505b5050905080611c925760405162461bcd60e51b81526004018080602001828103825260248152602001806123596024913960400191505060405180910390fd5b505050565b600854611ca49083611dca565b600855600954611cb49082611dca565b6009556001600160a01b0383166000908152600e6020526040902054611cda9082611dca565b6001600160a01b039093166000908152600e60205260409020929092555050565b6001600160a01b0382166000908152600e6020526040902054611d1e9082611bb1565b6001600160a01b039092166000908152600e602052604090209190915550565b6002546040805163a9059cbb60e01b81526001600160a01b0385811660048301526024820185905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b158015611d9a57600080fd5b505af1158015611dae573d6000803e3d6000fd5b505050506040513d6020811015611dc457600080fd5b50505050565b600082820183811015611bf3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600080611e308461186e565b9050611e3c8382611fda565b949350505050565b600080611e4f612075565b90506000611e5b612104565b9050836000611e6f6064611add8486611fda565b604080516323b872dd60e01b81523360048201526001600160a01b038781166024830152604482018490529151929350908916916323b872dd916064808201926020929091908290030181600087803b158015611ecb57600080fd5b505af1158015611edf573d6000803e3d6000fd5b505050506040513d6020811015611ef557600080fd5b5090979650505050505050565b60048054604080516323b872dd60e01b815233938101939093526001600160a01b0391821660248401526044830184905251908416916323b872dd9160648083019260209291908290030181600087803b158015611d9a57600080fd5b6001600160a01b038116611f7257600080fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600082611fe957506000611bf6565b82820282848281611ff657fe5b0414611bf35760405162461bcd60e51b81526004018080602001828103825260218152602001806123386021913960400191505060405180910390fd5b6000611bf383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506121f9565b600354604080517f6886f1d300000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691636886f1d3916004808301926020929190829003018186803b1580156120d357600080fd5b505afa1580156120e7573d6000803e3d6000fd5b505050506040513d60208110156120fd57600080fd5b5051905090565b600354604080517f2571f4b800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691632571f4b8916004808301926020929190829003018186803b1580156120d357600080fd5b600081848411156121f15760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156121b657818101518382015260200161219e565b50505050905090810190601f1680156121e35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836122485760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156121b657818101518382015260200161219e565b50600083858161225457fe5b0495945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061229f5782800160ff198235161785556122cc565b828001600101855582156122cc579182015b828111156122cc5782358255916020019190600101906122b1565b506122d89291506122dc565b5090565b5b808211156122d857600081556001016122dd56fe49434f5f43414d504149474e3a3a5041595f504c4154464f524d5f4645455f4641494c454449434f5f43414d504149474e3a3a494e56414c49445f42454e4546494349415259536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7749434f5f43414d504149474e3a3a57414c4c45545f5452414e534645525f4641494c454449434f5f43414d504149474e3a3a494e56414c49445f54494d455f434f4d5041544942494c495459a2646970667358221220876d45896ad956eef134cb4a0704cabec214cd748d8eff023b624ce64252c23764736f6c63430007010033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.