Contract 0x8a1E9d3aEbBBd5bA2A64d3355A48dD5E9b511256

 
Txn Hash
Block
From
To
Value [Txn Fee]
0x5d277f582f6a3583a84c9e2be666c9be44d37e9b68c41e8cf4c52aac659293776012922020-09-19 0:34:16266 days 10 hrs agoBurgerSwap: Deployer IN  Contract Creation0 BNB0.0634002
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x5db64a4b50ba734a57228816807901a893c44c1dc49b6f0f5ee3534c5aecbe0380104432021-06-04 18:38:537 days 16 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x5db64a4b50ba734a57228816807901a893c44c1dc49b6f0f5ee3534c5aecbe0380104432021-06-04 18:38:537 days 16 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x1a360524a10440b6053e9d32ffba21287b576caa8a190bbd18dff1e9ca16fe6180104322021-06-04 18:38:207 days 16 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x1a360524a10440b6053e9d32ffba21287b576caa8a190bbd18dff1e9ca16fe6180104322021-06-04 18:38:207 days 16 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0xb564b03bfac4b386269c2d226fd8649ded480e292635a218ea32de41c8015bfb79779462021-06-03 15:28:388 days 19 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0xb46f4ebf8244dca5d7ed8d6949f344f57af218f26394e45332df55dd9cbaf03279630832021-06-03 3:02:019 days 7 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x7a13fb8be996b209f63bac6a3afb9ea674d7af4fa8819fef8f13b255acdf3fe179482842021-06-02 14:40:479 days 20 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x96762be4c2912142d6f6a11b416d812c7355d7d10c10ced529adb70223a001ef79316812021-06-02 0:47:5110 days 10 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x2c0e731728941f28e9b606772ac7aae7eb732fed4cc7951ead0a1bcdd867d8de79315352021-06-02 0:40:3310 days 10 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x9718b40b1c84e4ff6f31512a5f76dd5110e88f4e8e6967cf4694bec40ecea9b879314682021-06-02 0:37:1210 days 10 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0xc2acaf851c7ed6c8470d5b595f61a4762174af5fbfc3a9402b589d0eb03a118f79313712021-06-02 0:32:2110 days 10 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0xc5308e25e7736500ec0957917f5d3907f0e0bcbed127098539d309e148519a4379058622021-06-01 3:11:5011 days 7 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x71720393a08989bc97a6209fd82f917cc4caaf7dd0ac2760a0bad67c44ada7fd79050182021-06-01 2:29:3611 days 8 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x31c86986a49109422660dca389f7e46b040594eabdb005fe5569ac6986339d8478966422021-05-31 19:28:5111 days 15 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0xb3f24f3c6451c121f4011c049a43fc489030db154dc11b280706c8c023f17e4878935982021-05-31 16:55:4611 days 18 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x2a2411c6afafb43e3c3681b1458300784a4f8e30d1fcb0d7ae68ec54fd7dcaea78935482021-05-31 16:53:1611 days 18 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x72216c143f33d37e374c814fbd822843056067d4a9200762f4df7eff690ead0278914442021-05-31 15:07:5911 days 19 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x6503c1b795b9e2e15a2bb6d06f788c8e75a1871c3e8336a3582751c6875daf6878912602021-05-31 14:58:4411 days 20 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0xb7ca76bb54c3b427b25a4a37e8618a47655bdf1108327d9606fb40e02bf6aeb578874192021-05-31 11:45:2811 days 23 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x6692499fc72a9417b90f539f28f632c6958356e7b8a6c19b66b5ba079b30cc4878871452021-05-31 11:31:4611 days 23 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x2b7591f0669ae5a66ac88124c1821035dc9b61a5e6384566964aed852936dd3b78849512021-05-31 9:42:0112 days 1 hr ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0xe7fb7c7f271c6c9451ee635805cd0134f69207e6c572564944d8b6abeaad2a9f78789842021-05-31 4:42:1912 days 6 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x27c24b5b4a57e81abf5c0bf1340bc5f79dd83aa4df3635c7da34df33d2387fd878676292021-05-30 19:11:3412 days 15 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x49590912f84ce07744472233496d27b57ce2bae4c438f79545be8fa6b95b63bf78586442021-05-30 11:41:2612 days 23 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
0x36382508ff22c899f690b48bc90a552d0dae41f23d5a3dbffda768581c4ebe9178513202021-05-30 5:33:4013 days 5 hrs ago 0x8a1e9d3aebbbd5ba2a64d3355a48dd5e9b511256  Contract Creation0 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DemaxFactory

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at BscScan.com on 2020-09-19
*/

// Dependency file: contracts/interfaces/IERC20.sol

// pragma solidity >=0.5.0;

interface IERC20 {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);
}

// Dependency file: contracts/libraries/TransferHelper.sol

// SPDX-License-Identifier: GPL-3.0-or-later

// pragma solidity >=0.6.0;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');
    }

    function safeTransfer(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
    }

    function safeTransferFrom(address token, address from, address to, uint value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }

    function safeTransferETH(address to, uint value) internal {
        (bool success,) = to.call{value:value}(new bytes(0));
        require(success, 'TransferHelper: ETH_TRANSFER_FAILED');
    }
}

// Dependency file: contracts/libraries/SafeMath.sol

// SPDX-License-Identifier: MIT

// pragma solidity ^0.6.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.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

//SPDX-License-Identifier: MIT
// pragma solidity >=0.6.6;
// import '../interfaces/IERC20.sol';

interface IERC2917 is IERC20 {

    /// @dev This emit when interests amount per block is changed by the owner of the contract.
    /// It emits with the old interests amount and the new interests amount.
    event InterestRatePerBlockChanged (uint oldValue, uint newValue);

    /// @dev This emit when a users' productivity has changed
    /// It emits with the user's address and the the value after the change.
    event ProductivityIncreased (address indexed user, uint value);

    /// @dev This emit when a users' productivity has changed
    /// It emits with the user's address and the the value after the change.
    event ProductivityDecreased (address indexed user, uint value);

    /// @dev Return the current contract's interests rate per block.
    /// @return The amount of interests currently producing per each block.
    function interestsPerBlock() external view returns (uint);

    /// @notice Change the current contract's interests rate.
    /// @dev Note the best practice will be restrict the gross product provider's contract address to call this.
    /// @return The true/fase to notice that the value has successfully changed or not, when it succeed, it will emite the InterestRatePerBlockChanged event.
    function changeInterestRatePerBlock(uint value) external returns (bool);

    /// @notice It will get the productivity of given user.
    /// @dev it will return 0 if user has no productivity proved in the contract.
    /// @return user's productivity and overall productivity.
    function getProductivity(address user) external view returns (uint, uint);

    /// @notice increase a user's productivity.
    /// @dev Note the best practice will be restrict the callee to prove of productivity's contract address.
    /// @return true to confirm that the productivity added success.
    function increaseProductivity(address user, uint value) external returns (bool);

    /// @notice decrease a user's productivity.
    /// @dev Note the best practice will be restrict the callee to prove of productivity's contract address.
    /// @return true to confirm that the productivity removed success.
    function decreaseProductivity(address user, uint value) external returns (bool);

    /// @notice take() will return the interests that callee will get at current block height.
    /// @dev it will always calculated by block.number, so it will change when block height changes.
    /// @return amount of the interests that user are able to mint() at current block height.
    function take() external view returns (uint);

    /// @notice similar to take(), but with the block height joined to calculate return.
    /// @dev for instance, it returns (_amount, _block), which means at block height _block, the callee has accumulated _amount of interests.
    /// @return amount of interests and the block height.
    function takeWithBlock() external view returns (uint, uint);

    /// @notice mint the avaiable interests to callee.
    /// @dev once it mint, the amount of interests will transfer to callee's address.
    /// @return the amount of interests minted.
    function mint() external returns (uint);
}
// Dependency file: contracts/libraries/ConfigNames.sol

// pragma solidity >=0.5.16;

library ConfigNames {
    bytes32 public constant PRODUCE_DGAS_RATE = bytes32('PRODUCE_DGAS_RATE');
    bytes32 public constant SWAP_FEE_PERCENT = bytes32('SWAP_FEE_PERCENT');
    bytes32 public constant LIST_DGAS_AMOUNT = bytes32('LIST_DGAS_AMOUNT');
    bytes32 public constant UNSTAKE_DURATION = bytes32('UNSTAKE_DURATION');
    bytes32 public constant REMOVE_LIQUIDITY_DURATION = bytes32('REMOVE_LIQUIDITY_DURATION');
    bytes32 public constant TOKEN_TO_DGAS_PAIR_MIN_PERCENT = bytes32('TOKEN_TO_DGAS_PAIR_MIN_PERCENT');
    bytes32 public constant LIST_TOKEN_FAILURE_BURN_PRECENT = bytes32('LIST_TOKEN_FAILURE_BURN_PRECENT');
    bytes32 public constant LIST_TOKEN_SUCCESS_BURN_PRECENT = bytes32('LIST_TOKEN_SUCCESS_BURN_PRECENT');
    bytes32 public constant PROPOSAL_DGAS_AMOUNT = bytes32('PROPOSAL_DGAS_AMOUNT');
    bytes32 public constant VOTE_DURATION = bytes32('VOTE_DURATION');
    bytes32 public constant VOTE_REWARD_PERCENT = bytes32('VOTE_REWARD_PERCENT');
    bytes32 public constant TOKEN_PENGDING_SWITCH = bytes32('TOKEN_PENGDING_SWITCH');
    bytes32 public constant TOKEN_PENGDING_TIME = bytes32('TOKEN_PENGDING_TIME');
    bytes32 public constant LIST_TOKEN_SWITCH = bytes32('LIST_TOKEN_SWITCH');
    bytes32 public constant DEV_PRECENT = bytes32('DEV_PRECENT');
}
// Dependency file: contracts/modules/BaseShareField.sol

// pragma solidity >=0.6.6;
// import '../interfaces/ERC2917-Interface.sol';
// import '../libraries/SafeMath.sol';
// import '../libraries/TransferHelper.sol';

contract BaseShareField {
    using SafeMath for uint;
    
    uint totalProductivity;
    uint accAmountPerShare;
    
    uint public totalShare;
    uint public mintedShare;
    uint public mintCumulation;
    
    address public shareToken;
    
    struct UserInfo {
        uint amount;     // How many tokens the user has provided.
        uint rewardDebt; // Reward debt. 
        uint rewardEarn; // Reward earn and not minted
    }

    mapping(address => UserInfo) public users;
    
    function _setShareToken(address _shareToken) internal {
        shareToken = _shareToken;
    }

    // Update reward variables of the given pool to be up-to-date.
    function _update() internal virtual {
        if (totalProductivity == 0) {
            totalShare = totalShare.add(_currentReward());
            return;
        }
        
        uint256 reward = _currentReward();
        accAmountPerShare = accAmountPerShare.add(reward.mul(1e12).div(totalProductivity));
        totalShare = totalShare.add(reward);
    }
    
    function _currentReward() internal virtual view returns (uint) {
        return mintedShare.add(IERC20(shareToken).balanceOf(address(this))).sub(totalShare);
    }
    
    // Audit user's reward to be up-to-date
    function _audit(address user) internal virtual {
        UserInfo storage userInfo = users[user];
        if (userInfo.amount > 0) {
            uint pending = userInfo.amount.mul(accAmountPerShare).div(1e12).sub(userInfo.rewardDebt);
            userInfo.rewardEarn = userInfo.rewardEarn.add(pending);
            mintCumulation = mintCumulation.add(pending);
            userInfo.rewardDebt = userInfo.amount.mul(accAmountPerShare).div(1e12);
        }
    }

    // External function call
    // This function increase user's productivity and updates the global productivity.
    // the users' actual share percentage will calculated by:
    // Formula:     user_productivity / global_productivity
    function _increaseProductivity(address user, uint value) internal virtual returns (bool) {
        require(value > 0, 'PRODUCTIVITY_VALUE_MUST_BE_GREATER_THAN_ZERO');

        UserInfo storage userInfo = users[user];
        _update();
        _audit(user);

        totalProductivity = totalProductivity.add(value);

        userInfo.amount = userInfo.amount.add(value);
        userInfo.rewardDebt = userInfo.amount.mul(accAmountPerShare).div(1e12);
        return true;
    }

    // External function call 
    // This function will decreases user's productivity by value, and updates the global productivity
    // it will record which block this is happenning and accumulates the area of (productivity * time)
    function _decreaseProductivity(address user, uint value) internal virtual returns (bool) {
        UserInfo storage userInfo = users[user];
        require(value > 0 && userInfo.amount >= value, 'INSUFFICIENT_PRODUCTIVITY');
        
        _update();
        _audit(user);
        
        userInfo.amount = userInfo.amount.sub(value);
        userInfo.rewardDebt = userInfo.amount.mul(accAmountPerShare).div(1e12);
        totalProductivity = totalProductivity.sub(value);
        
        return true;
    }
    
    function _takeWithAddress(address user) internal view returns (uint) {
        UserInfo storage userInfo = users[user];
        uint _accAmountPerShare = accAmountPerShare;
        // uint256 lpSupply = totalProductivity;
        if (totalProductivity != 0) {
            uint reward = _currentReward();
            _accAmountPerShare = _accAmountPerShare.add(reward.mul(1e12).div(totalProductivity));
        }
        return userInfo.amount.mul(_accAmountPerShare).div(1e12).add(userInfo.rewardEarn).sub(userInfo.rewardDebt);
    }

    // External function call
    // When user calls this function, it will calculate how many token will mint to user from his productivity * time
    // Also it calculates global token supply from last time the user mint to this time.
    function _mint(address user) internal virtual returns (uint) {
        _update();
        _audit(user);
        require(users[user].rewardEarn > 0, "NOTHING TO MINT");
        uint amount = users[user].rewardEarn;
        TransferHelper.safeTransfer(shareToken, msg.sender, amount);
        users[user].rewardEarn = 0;
        mintedShare += amount;
        return amount;
    }

    // Returns how many productivity a user has and global has.
    function getProductivity(address user) public virtual view returns (uint, uint) {
        return (users[user].amount, totalProductivity);
    }

    // Returns the current gorss product rate.
    function interestsPerBlock() public virtual view returns (uint) {
        return accAmountPerShare;
    }
    
}
// Dependency file: contracts/interfaces/IDemaxCallee.sol

// pragma solidity >=0.5.0;

interface IDemaxCallee {
    function demaxCall(address sender, uint amount0, uint amount1, bytes calldata data) external;
}

// Dependency file: contracts/interfaces/IDgas.sol

// pragma solidity >=0.5.0;

interface IDgas {
    function amountPerBlock() external view returns (uint);
    function changeInterestRatePerBlock(uint value) external returns (bool);
    function getProductivity(address user) external view returns (uint, uint);
    function increaseProductivity(address user, uint value) external returns (bool);
    function decreaseProductivity(address user, uint value) external returns (bool);
    function take() external view returns (uint);
    function takeWithBlock() external view returns (uint, uint);
    function mint() external returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function upgradeImpl(address _newImpl) external;
    function upgradeGovernance(address _newGovernor) external;
}
// Dependency file: contracts/interfaces/IDemaxFactory.sol

// pragma solidity >=0.5.0;

interface IDemaxFactory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function contractCodeHash() external view returns (bytes32);
    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function isPair(address pair) external view returns (bool);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);
    function playerPairs(address player, uint index) external view returns (address pair);
    function getPlayerPairCount(address player) external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);
    function addPlayerPair(address player, address _pair) external returns (bool);
}

// Dependency file: contracts/libraries/UQ112x112.sol

// pragma solidity >=0.5.0;

// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))

// range: [0, 2**112 - 1]
// resolution: 1 / 2**112

library UQ112x112 {
    uint224 constant Q112 = 2**112;

    // encode a uint112 as a UQ112x112
    function encode(uint112 y) internal pure returns (uint224 z) {
        z = uint224(y) * Q112; // never overflows
    }

    // divide a UQ112x112 by a uint112, returning a UQ112x112
    function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) {
        z = x / uint224(y);
    }
}

// Dependency file: contracts/libraries/Math.sol

// pragma solidity >=0.5.0;

// a library for performing various math operations

library Math {
    function min(uint x, uint y) internal pure returns (uint z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

// Dependency file: contracts/interfaces/IDemaxConfig.sol

// pragma solidity >=0.5.0;

interface IDemaxConfig {
    function governor() external view returns (address);
    function dev() external view returns (address);
    function PERCENT_DENOMINATOR() external view returns (uint);
    function getConfig(bytes32 _name) external view returns (uint minValue, uint maxValue, uint maxSpan, uint value, uint enable);
    function getConfigValue(bytes32 _name) external view returns (uint);
    function changeConfigValue(bytes32 _name, uint _value) external returns (bool);
    function checkToken(address _token) external view returns(bool);
    function checkPair(address tokenA, address tokenB) external view returns (bool);
    function listToken(address _token) external returns (bool);
    function getDefaultListTokens() external returns (address[] memory);
    function platform() external view returns  (address);
    function addToken(address _token) external returns (bool);
}
// Dependency file: contracts/DemaxPair.sol

// pragma solidity >=0.6.6;

// import './libraries/Math.sol';
// import './libraries/UQ112x112.sol';
// import './interfaces/IDemaxFactory.sol';
// import './interfaces/IDgas.sol';
// import './interfaces/IDemaxCallee.sol';
// import './interfaces/IDemaxConfig.sol';
// import './modules/BaseShareField.sol';
// import './libraries/ConfigNames.sol';

contract DemaxPair is BaseShareField {
    uint256 public version = 1;
    using SafeMath for uint256;
    using UQ112x112 for uint224;

    uint256 public constant MINIMUM_LIQUIDITY = 10**3;
    bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));

    address public FACTORY;
    address public CONFIG;
    address public DGAS;
    address public token0;
    address public token1;

    uint112 private reserve0; // uses single storage slot, accessible via getReserves
    uint112 private reserve1; // uses single storage slot, accessible via getReserves
    uint32 private blockTimestampLast; // uses single storage slot, accessible via getReserves

    uint256 public price0CumulativeLast;
    uint256 public price1CumulativeLast;

    uint256 public totalReward;
    uint256 public remainReward;
    uint256 public totalSupply;
    mapping(address => uint256) public balanceOf;
    event Mint(address indexed from, address indexed to, uint256 value);
    event Burn(address indexed from, address indexed to, uint256 value);
    event MintDGAS(address indexed player, uint256 pairMint, uint256 userMint);
    mapping(address => uint256) public lastMintBlock;

    uint private unlocked = 1;
    modifier lock() {
        require(unlocked == 1, 'Locked');
        unlocked = 0;
        _;
        unlocked = 1;
    }

    function _mint(address to, uint256 value) internal {
        totalSupply = totalSupply.add(value);
        balanceOf[to] = balanceOf[to].add(value);
        emit Mint(address(0), to, value);
    }

    function _burn(address from, uint256 value) internal {
        balanceOf[from] = balanceOf[from].sub(value);
        totalSupply = totalSupply.sub(value);
        emit Burn(from, address(0), value);
    }
    
    function _mintDGAS() internal {
        if(IDgas(DGAS).take() > 0) {
            uint reward = IDgas(DGAS).mint();
            uint devAmount = reward * IDemaxConfig(CONFIG).getConfigValue(ConfigNames.DEV_PRECENT) / 10000;
            address devAddress = IDemaxConfig(CONFIG).dev();
            _safeTransfer(DGAS, devAddress, devAmount);
            remainReward = remainReward.add(reward.sub(devAmount));
        }
    }
    
    function _currentReward() internal override view returns (uint) {
        uint devPercent = IDemaxConfig(CONFIG).getConfigValue(ConfigNames.DEV_PRECENT);
        uint pairReward = IDgas(DGAS).take().mul(10000 - devPercent).div(10000);
        return mintedShare.add(remainReward).add(pairReward).sub(totalShare);
    }

    function getReserves()
        public
        view
        returns (
            uint112 _reserve0,
            uint112 _reserve1,
            uint32 _blockTimestampLast
        )
    {
        _reserve0 = reserve0;
        _reserve1 = reserve1;
        _blockTimestampLast = blockTimestampLast;
    }

    function _safeTransfer(
        address token,
        address to,
        uint256 value
    ) private {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(SELECTOR, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'DEMAX PAIR : TRANSFER_FAILED');
    }

    event Mint(address indexed sender, uint256 amount0, uint256 amount1);
    event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint256 amount0In,
        uint256 amount1In,
        uint256 amount0Out,
        uint256 amount1Out,
        address indexed to
    );
    event SwapFee(address indexed token, address indexed to, uint256 amount);
    event Sync(uint112 reserve0, uint112 reserve1);

    constructor() public {
        FACTORY = msg.sender;
    }

    modifier onlyPlatform {
        address platform = IDemaxConfig(CONFIG).platform();
        require(msg.sender == platform, 'DEMAX PAIR : FORBIDDEN');
        _;
    }

    // called once by the factory at time of deployment
    function initialize(
        address _token0,
        address _token1,
        address _config,
        address _dgas
    ) external {
        require(msg.sender == FACTORY, 'DEMAX PAIR : FORBIDDEN');
        token0 = _token0;
        token1 = _token1;
        CONFIG = _config;
        DGAS = _dgas;
        _setShareToken(DGAS);
    }

    // update reserves and, on the first call per block, price accumulators
    function _update(
        uint256 balance0,
        uint256 balance1,
        uint112 _reserve0,
        uint112 _reserve1
    ) private {
        require(balance0 <= uint112(-1) && balance1 <= uint112(-1), 'DEMAX PAIR : OVERFLOW');
        uint32 blockTimestamp = uint32(block.timestamp % 2**32);
        uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired
        if (timeElapsed > 0 && _reserve0 != 0 && _reserve1 != 0) {
            // * never overflows, and + overflow is desired
            price0CumulativeLast += uint256(UQ112x112.encode(_reserve1).uqdiv(_reserve0)) * timeElapsed;
            price1CumulativeLast += uint256(UQ112x112.encode(_reserve0).uqdiv(_reserve1)) * timeElapsed;
        }
        reserve0 = uint112(balance0);
        reserve1 = uint112(balance1);
        blockTimestampLast = blockTimestamp;
        emit Sync(reserve0, reserve1);
    }

    // this low-level function should be called from a contract which performs // important safety checks
    function mint(address to) external onlyPlatform lock returns (uint256 liquidity) {
        (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings
        uint256 balance0 = _balanceOf(token0, address(this));
        uint256 balance1 = _balanceOf(token1, address(this));
        uint256 amount0 = balance0.sub(_reserve0);
        uint256 amount1 = balance1.sub(_reserve1);
        uint256 _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
        if (_totalSupply == 0) {
            liquidity = Math.sqrt(amount0.mul(amount1)).sub(MINIMUM_LIQUIDITY);
            _mint(address(0), MINIMUM_LIQUIDITY); // permanently lock the first MINIMUM_LIQUIDITY tokens
        } else {
            liquidity = Math.min(amount0.mul(_totalSupply) / _reserve0, amount1.mul(_totalSupply) / _reserve1);
        }
        require(liquidity > 0, 'DEMAX PAIR : INSUFFICIENT_LIQUIDITY_MINTED');
        _mint(to, liquidity);
        _mintDGAS();
        _increaseProductivity(to, liquidity);
        lastMintBlock[to] = block.number;
        _update(balance0, balance1, _reserve0, _reserve1);
        emit Mint(msg.sender, amount0, amount1);
    }

    // this low-level function should be called from a contract which performs // important safety checks
    function burn(
        address from,
        address to,
        uint256 amount
    ) external onlyPlatform lock returns (uint256 amount0, uint256 amount1) {
        require(
            block.number >=
                lastMintBlock[from] + IDemaxConfig(CONFIG).getConfigValue(ConfigNames.REMOVE_LIQUIDITY_DURATION),
            'DEMAX PLATFORM : REMOVE LIQUIDITY DURATION FAIL'
        );
        (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings
        address _token0 = token0; // gas savings
        address _token1 = token1; // gas savings
        uint256 balance0 = _balanceOf(_token0, address(this));
        uint256 balance1 = _balanceOf(_token1, address(this));
        require(balanceOf[from] >= amount, 'DEMAX PAIR : INSUFFICIENT_LIQUIDITY_AMOUNT');

        uint256 _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
        amount0 = amount.mul(balance0) / _totalSupply; // using balances ensures pro-rata distribution
        amount1 = amount.mul(balance1) / _totalSupply; // using balances ensures pro-rata distribution
        require(amount0 > 0 && amount1 > 0, 'DEMAX PAIR : INSUFFICIENT_LIQUIDITY_BURNED');
        _burn(from, amount);
        _mintDGAS();
        _decreaseProductivity(from, amount);

        _safeTransfer(_token0, to, amount0);
        _safeTransfer(_token1, to, amount1);
        balance0 = _balanceOf(_token0, address(this));
        balance1 = _balanceOf(_token1, address(this));
        _update(balance0, balance1, _reserve0, _reserve1);

        emit Burn(msg.sender, amount0, amount1, to);
    }

    // this low-level function should be called from a contract which performs // important safety checks
    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external onlyPlatform lock {
        require(amount0Out > 0 || amount1Out > 0, 'DEMAX PAIR : INSUFFICIENT_OUTPUT_AMOUNT');
        (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings
        require(amount0Out < _reserve0 && amount1Out < _reserve1, 'DEMAX PAIR :  INSUFFICIENT_LIQUIDITY');
        uint256 balance0;
        uint256 balance1;
        {
            address _token0 = token0;
            address _token1 = token1;
            require(to != _token0 && to != _token1, 'DEMAX PAIR : INVALID_TO');
            if (amount0Out > 0) _safeTransfer(_token0, to, amount0Out);
            if (amount1Out > 0) _safeTransfer(_token1, to, amount1Out);
            if (data.length > 0) IDemaxCallee(to).demaxCall(msg.sender, amount0Out, amount1Out, data);
            balance0 = _balanceOf(_token0, address(this));
            balance1 = _balanceOf(_token1, address(this));
        }
        uint256 amount0In = balance0 > _reserve0 - amount0Out ? balance0 - (_reserve0 - amount0Out) : 0;
        uint256 amount1In = balance1 > _reserve1 - amount1Out ? balance1 - (_reserve1 - amount1Out) : 0;
        uint256 _amount0Out = amount0Out;
        uint256 _amount1Out = amount1Out;
        require(amount0In > 0 || amount1In > 0, 'DEMAX PAIR : INSUFFICIENT_INPUT_AMOUNT');
        _update(balance0, balance1, _reserve0, _reserve1);
        emit Swap(msg.sender, amount0In, amount1In, _amount0Out, _amount1Out, to);
    }

    function swapFee(
        uint256 amount,
        address token,
        address to
    ) external onlyPlatform {
        if (amount == 0 || token == to) return;
        (uint112 _reserve0, uint112 _reserve1, ) = getReserves();
        require(to != token0 && to != token1, 'DEMAX PAIR : INVALID_TO');
        _safeTransfer(token, to, amount);
        uint256 balance0 = _balanceOf(token0, address(this));
        uint256 balance1 = _balanceOf(token1, address(this));
        _update(balance0, balance1, _reserve0, _reserve1);
        emit SwapFee(token, to , amount);
    }

    function queryReward() external view returns (uint256 rewardAmount, uint256 blockNumber) {
        rewardAmount = _takeWithAddress(msg.sender);
        blockNumber = block.number;
    }

    function mintReward() external lock returns (uint256 userReward) {
        _mintDGAS();
        userReward = _mint(msg.sender);
        remainReward = remainReward.sub(userReward);
        emit MintDGAS(msg.sender, remainReward, userReward);
    }

    function getDGASReserve() public view returns (uint256) {
        return _balanceOf(DGAS, address(this));
    }

    function _balanceOf(address token, address owner) internal view returns (uint256) {
        if (token == DGAS && owner == address(this)) {
            return IERC20(token).balanceOf(owner).sub(remainReward);
        } else {
            return IERC20(token).balanceOf(owner);
        }
    }

    // force reserves to match balances
    function sync() external lock {
        _update(_balanceOf(token0, address(this)), _balanceOf(token1, address(this)), reserve0, reserve1);
    }
}

// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.6.6;

// import './DemaxPair.sol';
// import './interfaces/IDemaxConfig.sol';

contract DemaxFactory {
    uint256 public version = 1;
    address public DGAS;
    address public CONFIG;
    address public owner;
    mapping(address => mapping(address => address)) public getPair;
    mapping(address => bool) public isPair;
    address[] public allPairs;

    mapping(address => address[]) public playerPairs;
    mapping(address => mapping(address => bool)) isAddPlayerPair;

    bytes32 public contractCodeHash;
    event PairCreated(address indexed token0, address indexed token1, address pair, uint256);

    constructor(address _DGAS, address _CONFIG) public {
        DGAS = _DGAS;
        CONFIG = _CONFIG;
        owner = msg.sender;
    }

    function updateConfig(address _CONFIG) external {
        require(msg.sender == owner, 'DEMAX FACTORY: PERMISSION');
        CONFIG = _CONFIG;
        for(uint i = 0; i < allPairs.length; i ++) {
            DemaxPair(allPairs[i]).initialize(DemaxPair(allPairs[i]).token0(), DemaxPair(allPairs[i]).token1(), _CONFIG, DGAS);
        }
    }

    function getPlayerPairCount(address player) external view returns (uint256) {
        address[] storage existAddress = playerPairs[player];
        if (existAddress.length == 0) return 0;
        return existAddress.length;
    }

    function addPlayerPair(address _player, address _pair) external returns (bool) {
        require(msg.sender == IDemaxConfig(CONFIG).platform(), 'DEMAX FACTORY: PERMISSION');
        if (isAddPlayerPair[_player][_pair] == false) {
            isAddPlayerPair[_player][_pair] = true;
            playerPairs[_player].push(_pair);
        }
        return true;
    }

    function allPairsLength() external view returns (uint256) {
        return allPairs.length;
    }

    function createPair(address tokenA, address tokenB) external returns (address pair) {
        require(msg.sender == IDemaxConfig(CONFIG).platform(), 'DEMAX FACTORY: PERMISSION');
        require(tokenA != tokenB, 'DEMAX FACTORY: IDENTICAL_ADDRESSES');
        require(
            IDemaxConfig(CONFIG).checkToken(tokenA) && IDemaxConfig(CONFIG).checkToken(tokenB),
            'DEMAX FACTORY: NOT LIST'
        );
        (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        require(token0 != address(0), 'DEMAX FACTORY: ZERO_ADDRESS');
        require(getPair[token0][token1] == address(0), 'DEMAX FACTORY: PAIR_EXISTS'); // single check is sufficient
        bytes memory bytecode = type(DemaxPair).creationCode;
        if (uint256(contractCodeHash) == 0) {
            contractCodeHash = keccak256(bytecode);
        }
        bytes32 salt = keccak256(abi.encodePacked(token0, token1));
        assembly {
            pair := create2(0, add(bytecode, 32), mload(bytecode), salt)
        }
        isPair[pair] = true;
        DemaxPair(pair).initialize(token0, token1, CONFIG, DGAS);
        getPair[token0][token1] = pair;
        getPair[token1][token0] = pair; // populate mapping in the reverse direction
        allPairs.push(pair);
        emit PairCreated(token0, token1, pair, allPairs.length);
    }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_DGAS","type":"address"},{"internalType":"address","name":"_CONFIG","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":true,"internalType":"address","name":"token1","type":"address"},{"indexed":false,"internalType":"address","name":"pair","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"PairCreated","type":"event"},{"inputs":[],"name":"CONFIG","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DGAS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_player","type":"address"},{"internalType":"address","name":"_pair","type":"address"}],"name":"addPlayerPair","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allPairs","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allPairsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractCodeHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"}],"name":"createPair","outputs":[{"internalType":"address","name":"pair","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"getPair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"player","type":"address"}],"name":"getPlayerPairCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isPair","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"playerPairs","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_CONFIG","type":"address"}],"name":"updateConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6080604052600160005534801561001557600080fd5b506040516137633803806137638339818101604052604081101561003857600080fd5b508051602090910151600180546001600160a01b039384166001600160a01b031991821617909155600280549390921692811692909217905560038054909116331790556136d88061008b6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063c9ead25811610066578063c9ead2581461020a578063d92e82e41461024c578063e5e31b1314610254578063e6a439051461027a576100ea565b80638da5cb5b146101a8578063bf1512d3146101b0578063c9c65396146101dc576100ea565b80636c42fa66116100c85780636c42fa661461014a5780636cc919c814610170578063723c2e2d146101985780637c7f84ee146101a0576100ea565b80631e3dd18b146100ef57806354fd4d5014610128578063574f2ba314610142575b600080fd5b61010c6004803603602081101561010557600080fd5b50356102a8565b604080516001600160a01b039092168252519081900360200190f35b6101306102cf565b60408051918252519081900360200190f35b6101306102d5565b6101306004803603602081101561016057600080fd5b50356001600160a01b03166102db565b6101966004803603602081101561018657600080fd5b50356001600160a01b031661030c565b005b61010c61054a565b610130610559565b61010c61055f565b61010c600480360360408110156101c657600080fd5b506001600160a01b03813516906020013561056e565b61010c600480360360408110156101f257600080fd5b506001600160a01b03813581169160200135166105a3565b6102386004803603604081101561022057600080fd5b506001600160a01b0381358116916020013516610b15565b604080519115158252519081900360200190f35b61010c610c71565b6102386004803603602081101561026a57600080fd5b50356001600160a01b0316610c80565b61010c6004803603604081101561029057600080fd5b506001600160a01b0381358116916020013516610c95565b600681815481106102b557fe5b6000918252602090912001546001600160a01b0316905081565b60005481565b60065490565b6001600160a01b03811660009081526007602052604081208054610303576000915050610307565b5490505b919050565b6003546001600160a01b03163314610367576040805162461bcd60e51b81526020600482015260196024820152782222a6a0ac102320a1aa27a92c9d102822a926a4a9a9a4a7a760391b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b03831617905560005b600654811015610546576006818154811061039c57fe5b600091825260209091200154600680546001600160a01b039092169163f8c8765e9190849081106103c957fe5b6000918252602091829020015460408051630dfe168160e01b815290516001600160a01b0390921692630dfe168192600480840193829003018186803b15801561041257600080fd5b505afa158015610426573d6000803e3d6000fd5b505050506040513d602081101561043c57600080fd5b5051600680548590811061044c57fe5b600091825260209182902001546040805163d21220a760e01b815290516001600160a01b039092169263d21220a792600480840193829003018186803b15801561049557600080fd5b505afa1580156104a9573d6000803e3d6000fd5b505050506040513d60208110156104bf57600080fd5b5051600154604080516001600160e01b031960e087901b1681526001600160a01b03948516600482015292841660248401528388166044840152921660648201529051608480830192600092919082900301818387803b15801561052257600080fd5b505af1158015610536573d6000803e3d6000fd5b5050600190920191506103859050565b5050565b6001546001600160a01b031681565b60095481565b6003546001600160a01b031681565b6007602052816000526040600020818154811061058757fe5b6000918252602090912001546001600160a01b03169150829050565b6002546040805163097bc71960e31b815290516000926001600160a01b031691634bde38c8916004808301926020929190829003018186803b1580156105e857600080fd5b505afa1580156105fc573d6000803e3d6000fd5b505050506040513d602081101561061257600080fd5b50516001600160a01b0316331461066c576040805162461bcd60e51b81526020600482015260196024820152782222a6a0ac102320a1aa27a92c9d102822a926a4a9a9a4a7a760391b604482015290519081900360640190fd5b816001600160a01b0316836001600160a01b031614156106bd5760405162461bcd60e51b81526004018080602001828103825260228152602001806136816022913960400191505060405180910390fd5b60025460408051633c6202c960e21b81526001600160a01b0386811660048301529151919092169163f1880b24916024808301926020929190829003018186803b15801561070a57600080fd5b505afa15801561071e573d6000803e3d6000fd5b505050506040513d602081101561073457600080fd5b505180156107b7575060025460408051633c6202c960e21b81526001600160a01b0385811660048301529151919092169163f1880b24916024808301926020929190829003018186803b15801561078a57600080fd5b505afa15801561079e573d6000803e3d6000fd5b505050506040513d60208110156107b457600080fd5b50515b610808576040805162461bcd60e51b815260206004820152601760248201527f44454d415820464143544f52593a204e4f54204c495354000000000000000000604482015290519081900360640190fd5b600080836001600160a01b0316856001600160a01b03161061082b57838561082e565b84845b90925090506001600160a01b03821661088e576040805162461bcd60e51b815260206004820152601b60248201527f44454d415820464143544f52593a205a45524f5f414444524553530000000000604482015290519081900360640190fd5b6001600160a01b03828116600090815260046020908152604080832085851684529091529020541615610908576040805162461bcd60e51b815260206004820152601a60248201527f44454d415820464143544f52593a20504149525f455849535453000000000000604482015290519081900360640190fd5b60606040518060200161091a90610cbb565b601f1982820381018352601f9091011660405260095490915061094257805160208201206009555b6000838360405160200180836001600160a01b03166001600160a01b031660601b8152601401826001600160a01b03166001600160a01b031660601b815260140192505050604051602081830303815290604052805190602001209050808251602084016000f56001600160a01b03808216600081815260056020526040808220805460ff1916600190811790915560025490548251637c643b2f60e11b81528b871660048201528a871660248201529186166044830152909416606485015251939850909263f8c8765e92608480820193929182900301818387803b158015610a2b57600080fd5b505af1158015610a3f573d6000803e3d6000fd5b505050506001600160a01b0384811660008181526004602081815260408084208987168086529083528185208054978d166001600160a01b031998891681179091559383528185208686528352818520805488168517905560068054600181018255958190527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90950180549097168417909655925483519283529082015281517f0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9929181900390910190a35050505092915050565b6002546040805163097bc71960e31b815290516000926001600160a01b031691634bde38c8916004808301926020929190829003018186803b158015610b5a57600080fd5b505afa158015610b6e573d6000803e3d6000fd5b505050506040513d6020811015610b8457600080fd5b50516001600160a01b03163314610bde576040805162461bcd60e51b81526020600482015260196024820152782222a6a0ac102320a1aa27a92c9d102822a926a4a9a9a4a7a760391b604482015290519081900360640190fd5b6001600160a01b0380841660009081526008602090815260408083209386168352929052205460ff16610c68576001600160a01b038084166000818152600860209081526040808320948716808452948252808320805460ff1916600190811790915593835260078252822080549384018155825290200180546001600160a01b03191690911790555b50600192915050565b6002546001600160a01b031681565b60056020526000908152604090205460ff1681565b60046020908152600092835260408084209091529082529020546001600160a01b031681565b6129b880610cc98339019056fe60806040526001600755600160155534801561001a57600080fd5b50600880546001600160a01b0319163317905561297c8061003c6000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c806370a082311161010f578063cf675365116100a2578063f6b911bc11610071578063f6b911bc1461049f578063f8c8765e146104d5578063ffc527bf14610513578063fff6cae91461051b576101e5565b8063cf6753651461047f578063d14c964114610487578063d21220a71461048f578063d92e82e414610497576101e5565b806396cda080116100de57806396cda080146103f7578063a87430ba1461042b578063ba9a7a561461046f578063bfc8b20814610477576101e5565b806370a082311461039b578063723c2e2d146103c1578063750142e6146103c95780638b185b35146103d1576101e5565b806328e964e9116101875780635909c0d5116101565780635909c0d51461035d5780635a3d5493146103655780636a6278421461036d5780636c9fa59e14610393576101e5565b806328e964e9146103065780632c79db11146103455780632dd310001461034d57806354fd4d5014610355576101e5565b80630dfe1681116101c35780630dfe1681146102ca5780631485ff78146102ee578063174f57af146102f657806318160ddd146102fe576101e5565b8063022c0d9f146101ea578063026c4207146102785780630902f1ac14610292575b600080fd5b6102766004803603608081101561020057600080fd5b8135916020810135916001600160a01b03604083013516919081019060808101606082013564010000000081111561023757600080fd5b82018360208201111561024957600080fd5b8035906020019184600183028401116401000000008311171561026b57600080fd5b509092509050610523565b005b61028061097d565b60408051918252519081900360200190f35b61029a610983565b604080516001600160701b03948516815292909316602083015263ffffffff168183015290519081900360600190f35b6102d26109ad565b604080516001600160a01b039092168252519081900360200190f35b6102806109bc565b6102806109c2565b610280610a78565b61032c6004803603602081101561031c57600080fd5b50356001600160a01b0316610a7e565b6040805192835260208301919091528051918290030190f35b61032c610a9c565b6102d2610ab0565b610280610abf565b610280610ac5565b610280610acb565b6102806004803603602081101561038357600080fd5b50356001600160a01b0316610ad1565b6102d2610dd3565b610280600480360360208110156103b157600080fd5b50356001600160a01b0316610de2565b6102d2610df4565b610280610e03565b610280600480360360208110156103e757600080fd5b50356001600160a01b0316610e09565b6102766004803603606081101561040d57600080fd5b508035906001600160a01b0360208201358116916040013516610e1b565b6104516004803603602081101561044157600080fd5b50356001600160a01b0316611038565b60408051938452602084019290925282820152519081900360600190f35b610280611059565b61028061105f565b610280611065565b61028061106b565b6102d2611071565b6102d2611080565b61032c600480360360608110156104b557600080fd5b506001600160a01b0381358116916020810135909116906040013561108f565b610276600480360360808110156104eb57600080fd5b506001600160a01b03813581169160208101358216916040820135811691606001351661146e565b610280611519565b610276611537565b6009546040805163097bc71960e31b815290516000926001600160a01b031691634bde38c8916004808301926020929190829003018186803b15801561056857600080fd5b505afa15801561057c573d6000803e3d6000fd5b505050506040513d602081101561059257600080fd5b50519050336001600160a01b038216146105ec576040805162461bcd60e51b81526020600482015260166024820152752222a6a0ac102820a4a9101d102327a92124a22222a760511b604482015290519081900360640190fd5b60155460011461062c576040805162461bcd60e51b8152602060048201526006602482015265131bd8dad95960d21b604482015290519081900360640190fd5b60006015558515158061063f5750600085115b61067a5760405162461bcd60e51b81526004018080602001828103825260278152602001806128066027913960400191505060405180910390fd5b600080610685610983565b5091509150816001600160701b0316881080156106aa5750806001600160701b031687105b6106e55760405162461bcd60e51b81526004018080602001828103825260248152602001806129236024913960400191505060405180910390fd5b600b54600c5460009182916001600160a01b0391821691908116908a1682148015906107235750806001600160a01b03168a6001600160a01b031614155b61076e576040805162461bcd60e51b815260206004820152601760248201527644454d41582050414952203a20494e56414c49445f544f60481b604482015290519081900360640190fd5b8b1561077f5761077f828b8e6115cf565b8a1561079057610790818b8d6115cf565b871561084b57896001600160a01b03166321fb6c90338e8e8d8d6040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b03168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b15801561083257600080fd5b505af1158015610846573d6000803e3d6000fd5b505050505b6108558230611769565b93506108618130611769565b9250505060008a856001600160701b031603831161088057600061088f565b8a856001600160701b03160383035b905060008a856001600160701b03160383116108ac5760006108bb565b8a856001600160701b03160383035b90508b8b831515806108cd5750600083115b6109085760405162461bcd60e51b815260040180806020018281038252602681526020018061282d6026913960400191505060405180910390fd5b61091486868a8a6118bc565b60408051858152602081018590528082018490526060810183905290516001600160a01b038e169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350506001601555505050505050505050505050565b60025481565b600d546001600160701b0380821692600160701b830490911691600160e01b900463ffffffff1690565b600b546001600160a01b031681565b60115481565b6000601554600114610a04576040805162461bcd60e51b8152602060048201526006602482015265131bd8dad95960d21b604482015290519081900360640190fd5b6000601555610a11611a83565b610a1a33611cc5565b601154909150610a30908263ffffffff611d9116565b60118190556040805191825260208201839052805133927fef84ded3b746df8ce33b8e850942f885a71fa805217f9099d5e006a8f32ca58792908290030190a2600160155590565b60125481565b6001600160a01b031660009081526006602052604081205490549091565b600080610aa833611dda565b924392509050565b6008546001600160a01b031681565b60075481565b600e5481565b600f5481565b600080600960009054906101000a90046001600160a01b03166001600160a01b0316634bde38c86040518163ffffffff1660e01b815260040160206040518083038186803b158015610b2257600080fd5b505afa158015610b36573d6000803e3d6000fd5b505050506040513d6020811015610b4c57600080fd5b50519050336001600160a01b03821614610ba6576040805162461bcd60e51b81526020600482015260166024820152752222a6a0ac102820a4a9101d102327a92124a22222a760511b604482015290519081900360640190fd5b601554600114610be6576040805162461bcd60e51b8152602060048201526006602482015265131bd8dad95960d21b604482015290519081900360640190fd5b6000601581905580610bf6610983565b50600b549193509150600090610c15906001600160a01b031630611769565b600c54909150600090610c31906001600160a01b031630611769565b90506000610c4e836001600160701b03871663ffffffff611d9116565b90506000610c6b836001600160701b03871663ffffffff611d9116565b60125490915080610cb457610ca06103e8610c94610c8f868663ffffffff611e8a16565b611ee3565b9063ffffffff611d9116565b9850610caf60006103e8611f34565b610d03565b610d006001600160701b038816610cd1858463ffffffff611e8a16565b81610cd857fe5b046001600160701b038816610cf3858563ffffffff611e8a16565b81610cfa57fe5b04611fcb565b98505b60008911610d425760405162461bcd60e51b815260040180806020018281038252602a8152602001806128a3602a913960400191505060405180910390fd5b610d4c8a8a611f34565b610d54611a83565b610d5e8a8a611fe1565b506001600160a01b038a166000908152601460205260409020439055610d86858589896118bc565b6040805184815260208101849052815133927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a25050600160155550949695505050505050565b6005546001600160a01b031681565b60136020526000908152604090205481565b600a546001600160a01b031681565b60105481565b60146020526000908152604090205481565b6009546040805163097bc71960e31b815290516000926001600160a01b031691634bde38c8916004808301926020929190829003018186803b158015610e6057600080fd5b505afa158015610e74573d6000803e3d6000fd5b505050506040513d6020811015610e8a57600080fd5b50519050336001600160a01b03821614610ee4576040805162461bcd60e51b81526020600482015260166024820152752222a6a0ac102820a4a9101d102327a92124a22222a760511b604482015290519081900360640190fd5b831580610f025750816001600160a01b0316836001600160a01b0316145b15610f0c57611032565b600080610f17610983565b50600b5491935091506001600160a01b03858116911614801590610f495750600c546001600160a01b03858116911614155b610f94576040805162461bcd60e51b815260206004820152601760248201527644454d41582050414952203a20494e56414c49445f544f60481b604482015290519081900360640190fd5b610f9f8585886115cf565b600b54600090610fb8906001600160a01b031630611769565b600c54909150600090610fd4906001600160a01b031630611769565b9050610fe2828286866118bc565b856001600160a01b0316876001600160a01b03167fd58eef465bb0100d5e79f7940ef7ec9eafeff04fa088db4388968231fffaf07d8a6040518082815260200191505060405180910390a3505050505b50505050565b60066020526000908152604090208054600182015460029092015490919083565b6103e881565b60015490565b60045481565b60035481565b600c546001600160a01b031681565b6009546001600160a01b031681565b6000806000600960009054906101000a90046001600160a01b03166001600160a01b0316634bde38c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156110e257600080fd5b505afa1580156110f6573d6000803e3d6000fd5b505050506040513d602081101561110c57600080fd5b50519050336001600160a01b03821614611166576040805162461bcd60e51b81526020600482015260166024820152752222a6a0ac102820a4a9101d102327a92124a22222a760511b604482015290519081900360640190fd5b6015546001146111a6576040805162461bcd60e51b8152602060048201526006602482015265131bd8dad95960d21b604482015290519081900360640190fd5b6000601555600954604080516360ccef1960e11b81527f52454d4f56455f4c49515549444954595f4455524154494f4e00000000000000600482015290516001600160a01b039092169163c199de3291602480820192602092909190829003018186803b15801561121657600080fd5b505afa15801561122a573d6000803e3d6000fd5b505050506040513d602081101561124057600080fd5b50516001600160a01b0387166000908152601460205260409020540143101561129a5760405162461bcd60e51b815260040180806020018281038252602f815260200180612874602f913960400191505060405180910390fd5b6000806112a5610983565b50600b54600c549294509092506001600160a01b03908116911660006112cb8330611769565b905060006112d98330611769565b6001600160a01b038d166000908152601360205260409020549091508a11156113335760405162461bcd60e51b815260040180806020018281038252602a8152602001806127dc602a913960400191505060405180910390fd5b601254806113478c8563ffffffff611e8a16565b8161134e57fe5b049950806113628c8463ffffffff611e8a16565b8161136957fe5b04985060008a11801561137c5750600089115b6113b75760405162461bcd60e51b815260040180806020018281038252602a8152602001806128cd602a913960400191505060405180910390fd5b6113c18d8c6120a0565b6113c9611a83565b6113d38d8c61213d565b506113df858d8c6115cf565b6113ea848d8b6115cf565b6113f48530611769565b92506114008430611769565b915061140e838389896118bc565b604080518b8152602081018b905281516001600160a01b038f169233927fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496929081900390910190a350505050505050600160158190555050935093915050565b6008546001600160a01b031633146114c6576040805162461bcd60e51b81526020600482015260166024820152752222a6a0ac102820a4a9101d102327a92124a22222a760511b604482015290519081900360640190fd5b600b80546001600160a01b03199081166001600160a01b0387811691909117909255600c80548216868416179055600980548216858416179055600a80549091168383161790819055611032911661221f565b600a54600090611532906001600160a01b031630611769565b905090565b601554600114611577576040805162461bcd60e51b8152602060048201526006602482015265131bd8dad95960d21b604482015290519081900360640190fd5b6000601555600b546115c890611596906001600160a01b031630611769565b600c546115ac906001600160a01b031630611769565b600d546001600160701b0380821691600160701b9004166118bc565b6001601555565b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0385811660248301526044808301869052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1781529251815160009460609489169392918291908083835b6020831061167c5780518252601f19909201916020918201910161165d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146116de576040519150601f19603f3d011682016040523d82523d6000602084013e6116e3565b606091505b5091509150818015611711575080511580611711575080806020019051602081101561170e57600080fd5b50515b611762576040805162461bcd60e51b815260206004820152601c60248201527f44454d41582050414952203a205452414e534645525f4641494c454400000000604482015290519081900360640190fd5b5050505050565b600a546000906001600160a01b03848116911614801561179157506001600160a01b03821630145b156118315761182a601154846001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156117f257600080fd5b505afa158015611806573d6000803e3d6000fd5b505050506040513d602081101561181c57600080fd5b50519063ffffffff611d9116565b90506118b6565b826001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561188757600080fd5b505afa15801561189b573d6000803e3d6000fd5b505050506040513d60208110156118b157600080fd5b505190505b92915050565b6001600160701b0384118015906118da57506001600160701b038311155b611923576040805162461bcd60e51b815260206004820152601560248201527444454d41582050414952203a204f564552464c4f5760581b604482015290519081900360640190fd5b600d5463ffffffff42811691600160e01b9004811682039081161580159061195357506001600160701b03841615155b801561196757506001600160701b03831615155b156119d8578063ffffffff166119958561198086612241565b6001600160e01b03169063ffffffff61225316565b600e80546001600160e01b03929092169290920201905563ffffffff81166119c08461198087612241565b600f80546001600160e01b0392909216929092020190555b600d80546dffffffffffffffffffffffffffff19166001600160701b03888116919091176dffffffffffffffffffffffffffff60701b1916600160701b8883168102919091176001600160e01b0316600160e01b63ffffffff871602179283905560408051848416815291909304909116602082015281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a1505050505050565b600a546040805163159090bd60e01b815290516000926001600160a01b03169163159090bd916004808301926020929190829003018186803b158015611ac857600080fd5b505afa158015611adc573d6000803e3d6000fd5b505050506040513d6020811015611af257600080fd5b50511115611cc357600a5460408051631249c58b60e01b815290516000926001600160a01b031691631249c58b91600480830192602092919082900301818787803b158015611b4057600080fd5b505af1158015611b54573d6000803e3d6000fd5b505050506040513d6020811015611b6a57600080fd5b5051600954604080516360ccef1960e11b81526a11115597d4149150d1539560aa1b60048201529051929350600092612710926001600160a01b03169163c199de32916024808301926020929190829003018186803b158015611bcc57600080fd5b505afa158015611be0573d6000803e3d6000fd5b505050506040513d6020811015611bf657600080fd5b5051830281611c0157fe5b0490506000600960009054906101000a90046001600160a01b03166001600160a01b03166391cca3db6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c5457600080fd5b505afa158015611c68573d6000803e3d6000fd5b505050506040513d6020811015611c7e57600080fd5b5051600a54909150611c9a906001600160a01b031682846115cf565b611cbc611cad848463ffffffff611d9116565b6011549063ffffffff61227816565b6011555050505b565b6000611ccf6122d2565b611cd882612353565b6001600160a01b038216600090815260066020526040902060020154611d37576040805162461bcd60e51b815260206004820152600f60248201526e1393d512125391c81513c813525395608a1b604482015290519081900360640190fd5b6001600160a01b038083166000908152600660205260409020600201546005549091611d65911633836123fb565b6001600160a01b038316600090815260066020526040812060020155600380548201905590505b919050565b6000611dd383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061255e565b9392505050565b6001600160a01b0381166000908152600660205260408120600154825415611e46576000611e066125f5565b9050611e42611e35600054611e2964e8d4a5100085611e8a90919063ffffffff16565b9063ffffffff61273916565b839063ffffffff61227816565b9150505b611e828260010154610c948460020154611e7664e8d4a51000611e29878960000154611e8a90919063ffffffff16565b9063ffffffff61227816565b949350505050565b600082611e99575060006118b6565b82820282848281611ea657fe5b0414611dd35760405162461bcd60e51b81526004018080602001828103825260218152602001806128536021913960400191505060405180910390fd5b60006003821115611f26575080600160028204015b81811015611f2057809150600281828581611f0f57fe5b040181611f1857fe5b049050611ef8565b50611d8c565b8115611d8c57506001919050565b601254611f47908263ffffffff61227816565b6012556001600160a01b038216600090815260136020526040902054611f73908263ffffffff61227816565b6001600160a01b03831660008181526013602090815260408083209490945583518581529351929391927fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f89281900390910190a35050565b6000818310611fda5781611dd3565b5090919050565b60008082116120215760405162461bcd60e51b815260040180806020018281038252602c8152602001806128f7602c913960400191505060405180910390fd5b6001600160a01b03831660009081526006602052604090206120416122d2565b61204a84612353565b60005461205d908463ffffffff61227816565b6000558054612072908463ffffffff61227816565b8082556001546120939164e8d4a5100091611e29919063ffffffff611e8a16565b6001918201559392505050565b6001600160a01b0382166000908152601360205260409020546120c9908263ffffffff611d9116565b6001600160a01b0383166000908152601360205260409020556012546120f5908263ffffffff611d9116565b6012556040805182815290516000916001600160a01b038516917fbac40739b0d4ca32fa2d82fc91630465ba3eddd1598da6fca393b26fb63b94539181900360200190a35050565b6001600160a01b03821660009081526006602052604081208215801590612165575080548311155b6121b6576040805162461bcd60e51b815260206004820152601960248201527f494e53554646494349454e545f50524f44554354495649545900000000000000604482015290519081900360640190fd5b6121be6122d2565b6121c784612353565b80546121d9908463ffffffff611d9116565b8082556001546121fa9164e8d4a5100091611e29919063ffffffff611e8a16565b6001820155600054612212908463ffffffff611d9116565b6000555060019392505050565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160701b0316600160701b0290565b60006001600160701b0382166001600160e01b0384168161227057fe5b049392505050565b600082820183811015611dd3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000546122fb576122f36122e46125f5565b6002549063ffffffff61227816565b600255611cc3565b60006123056125f5565b9050612337612328600054611e2964e8d4a5100085611e8a90919063ffffffff16565b6001549063ffffffff61227816565b60015560025461234d908263ffffffff61227816565b60025550565b6001600160a01b03811660009081526006602052604090208054156123f757600061239e8260010154610c9464e8d4a51000611e296001548760000154611e8a90919063ffffffff16565b60028301549091506123b6908263ffffffff61227816565b60028301556004546123ce908263ffffffff61227816565b60045560015482546123f09164e8d4a5100091611e299163ffffffff611e8a16565b6001830155505b5050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106124785780518252601f199092019160209182019101612459565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146124da576040519150601f19603f3d011682016040523d82523d6000602084013e6124df565b606091505b509150915081801561250d57508051158061250d575080806020019051602081101561250a57600080fd5b50515b611762576040805162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015290519081900360640190fd5b600081848411156125ed5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156125b257818101518382015260200161259a565b50505050905090810190601f1680156125df5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600954604080516360ccef1960e11b81526a11115597d4149150d1539560aa1b6004820152905160009283926001600160a01b039091169163c199de3291602480820192602092909190829003018186803b15801561265357600080fd5b505afa158015612667573d6000803e3d6000fd5b505050506040513d602081101561267d57600080fd5b5051600a546040805163159090bd60e01b8152905192935060009261270f9261271092611e2992878503926001600160a01b03169163159090bd916004808301926020929190829003018186803b1580156126d757600080fd5b505afa1580156126eb573d6000803e3d6000fd5b505050506040513d602081101561270157600080fd5b50519063ffffffff611e8a16565b9050612732600254610c9483611e7660115460035461227890919063ffffffff16565b9250505090565b6000611dd383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250600081836127c55760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156125b257818101518382015260200161259a565b5060008385816127d157fe5b049594505050505056fe44454d41582050414952203a20494e53554646494349454e545f4c49515549444954595f414d4f554e5444454d41582050414952203a20494e53554646494349454e545f4f55545055545f414d4f554e5444454d41582050414952203a20494e53554646494349454e545f494e5055545f414d4f554e54536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7744454d415820504c4154464f524d203a2052454d4f5645204c4951554944495459204455524154494f4e204641494c44454d41582050414952203a20494e53554646494349454e545f4c49515549444954595f4d494e54454444454d41582050414952203a20494e53554646494349454e545f4c49515549444954595f4255524e454450524f4455435449564954595f56414c55455f4d5553545f42455f475245415445525f5448414e5f5a45524f44454d41582050414952203a2020494e53554646494349454e545f4c4951554944495459a26469706673582212203d06d3778a5251c90eb2e8dae417a357fdd52b411184d6312ab5491391ddb87064736f6c6343000606003344454d415820464143544f52593a204944454e544943414c5f414444524553534553a2646970667358221220d982058268338069c056137a8117685aea60b1fa83552fcaf9b420d510ebcd1a64736f6c63430006060033000000000000000000000000ae9269f27437f0fcbc232d39ec814844a51d6b8f000000000000000000000000e7f6824706aeee33542088eb2fdd2d69e37455b6

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000ae9269f27437f0fcbc232d39ec814844a51d6b8f000000000000000000000000e7f6824706aeee33542088eb2fdd2d69e37455b6

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000ae9269f27437f0fcbc232d39ec814844a51d6b8f
Arg [1] : 000000000000000000000000e7f6824706aeee33542088eb2fdd2d69e37455b6


Deployed ByteCode Sourcemap

34595:3160:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;34595:3160:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;34852:25:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;34852:25:0;;:::i;:::-;;;;-1:-1:-1;;;;;34852:25:0;;;;;;;;;;;;;;34624:26;;;:::i;:::-;;;;;;;;;;;;;;;;36264:99;;;:::i;35644:233::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;35644:233:0;-1:-1:-1;;;;;35644:233:0;;:::i;35291:345::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;35291:345:0;-1:-1:-1;;;;;35291:345:0;;:::i;:::-;;34657:19;;;:::i;35010:31::-;;;:::i;34711:20::-;;;:::i;34886:48::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;34886:48:0;;;;;;;;:::i;36371:1381::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;36371:1381:0;;;;;;;;;;:::i;35885:371::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;35885:371:0;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;34683:21;;;:::i;34807:38::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;34807:38:0;-1:-1:-1;;;;;34807:38:0;;:::i;34738:62::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;34738:62:0;;;;;;;;;;:::i;34852:25::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;34852:25:0;;-1:-1:-1;34852:25:0;:::o;34624:26::-;;;;:::o;36264:99::-;36340:8;:15;36264:99;:::o;35644:233::-;-1:-1:-1;;;;;35764:19:0;;35711:7;35764:19;;;:11;:19;;;;;35798;;35794:38;;35831:1;35824:8;;;;;35794:38;35850:19;;-1:-1:-1;35644:233:0;;;;:::o;35291:345::-;35372:5;;-1:-1:-1;;;;;35372:5:0;35358:10;:19;35350:57;;;;;-1:-1:-1;;;35350:57:0;;;;;;;;;;;;-1:-1:-1;;;35350:57:0;;;;;;;;;;;;;;;35418:6;:16;;-1:-1:-1;;;;;;35418:16:0;-1:-1:-1;;;;;35418:16:0;;;;;-1:-1:-1;35445:184:0;35465:8;:15;35461:19;;35445:184;;;35513:8;35522:1;35513:11;;;;;;;;;;;;;;;;;;35547:8;:11;;-1:-1:-1;;;;;35513:11:0;;;;35503:33;;35547:8;35556:1;;35547:11;;;;;;;;;;;;;;;;;35537:31;;;-1:-1:-1;;;35537:31:0;;;;-1:-1:-1;;;;;35547:11:0;;;;35537:29;;:31;;;;;;;;;;35547:11;35537:31;;;2:2:-1;;;;27:1;24;17:12;2:2;35537:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;35537:31:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;35537:31:0;35580:8;:11;;35589:1;;35580:11;;;;;;;;;;;;;;;;;35570:31;;;-1:-1:-1;;;35570:31:0;;;;-1:-1:-1;;;;;35580:11:0;;;;35570:29;;:31;;;;;;;;;;35580:11;35570:31;;;2:2:-1;;;;27:1;24;17:12;2:2;35570:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;35570:31:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;35570:31:0;35612:4;;35503:114;;;-1:-1:-1;;;;;;35503:114:0;;;;;;;-1:-1:-1;;;;;35503:114:0;;;;;;;;;;;;;;;;;;;;;35612:4;;35503:114;;;;;;;;;;;35612:4;;35503:114;;;;;;;35612:4;35503:114;;;;2:2:-1;;;;27:1;24;17:12;2:2;35503:114:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;35482:4:0;;;;;-1:-1:-1;35445:184:0;;-1:-1:-1;35445:184:0;;;35291:345;:::o;34657:19::-;;;-1:-1:-1;;;;;34657:19:0;;:::o;35010:31::-;;;;:::o;34711:20::-;;;-1:-1:-1;;;;;34711:20:0;;:::o;34886:48::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;34886:48:0;;-1:-1:-1;34886:48:0;;-1:-1:-1;34886:48:0:o;36371:1381::-;36501:6;;36488:31;;;-1:-1:-1;;;36488:31:0;;;;36441:12;;-1:-1:-1;;;;;36501:6:0;;36488:29;;:31;;;;;;;;;;;;;;36501:6;36488:31;;;2:2:-1;;;;27:1;24;17:12;2:2;36488:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;36488:31:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;36488:31:0;-1:-1:-1;;;;;36474:45:0;:10;:45;36466:83;;;;;-1:-1:-1;;;36466:83:0;;;;;;;;;;;;-1:-1:-1;;;36466:83:0;;;;;;;;;;;;;;;36578:6;-1:-1:-1;;;;;36568:16:0;:6;-1:-1:-1;;;;;36568:16:0;;;36560:63;;;;-1:-1:-1;;;36560:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;36669:6;;36656:39;;;-1:-1:-1;;;36656:39:0;;-1:-1:-1;;;;;36656:39:0;;;;;;;;;36669:6;;;;;36656:31;;:39;;;;;;;;;;;;;;36669:6;36656:39;;;2:2:-1;;;;27:1;24;17:12;2:2;36656:39:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;36656:39:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;36656:39:0;:82;;;;-1:-1:-1;36712:6:0;;36699:39;;;-1:-1:-1;;;36699:39:0;;-1:-1:-1;;;;;36699:39:0;;;;;;;;;36712:6;;;;;36699:31;;:39;;;;;;;;;;;;;;36712:6;36699:39;;;2:2:-1;;;;27:1;24;17:12;2:2;36699:39:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;36699:39:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;36699:39:0;36656:82;36634:155;;;;;-1:-1:-1;;;36634:155:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;36801:14;36817;36844:6;-1:-1:-1;;;;;36835:15:0;:6;-1:-1:-1;;;;;36835:15:0;;:53;;36873:6;36881;36835:53;;;36854:6;36862;36835:53;36800:88;;-1:-1:-1;36800:88:0;-1:-1:-1;;;;;;36907:20:0;;36899:60;;;;;-1:-1:-1;;;36899:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;36978:15:0;;;37013:1;36978:15;;;:7;:15;;;;;;;;:23;;;;;;;;;;;;:37;36970:76;;;;;-1:-1:-1;;;36970:76:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;37087:21;37111:28;;;;;;;;:::i;:::-;-1:-1:-1;;21:26;;;;;7:41;;87:2;69:12;;;65:26;61:2;54:38;37162:16:0;;34:5:-1;;-1:-1;37150:101:0;;37220:19;;;;;;37201:16;:38;37150:101;37261:12;37303:6;37311;37286:32;;;;;;-1:-1:-1;;;;;37286:32:0;-1:-1:-1;;;;;37286:32:0;;;;;;;;-1:-1:-1;;;;;37286:32:0;-1:-1:-1;;;;;37286:32:0;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;37286:32:0;;;37276:43;;;;;;37261:58;;37409:4;37398:8;37392:15;37387:2;37377:8;37373:17;37370:1;37362:52;-1:-1:-1;;;;;37435:12:0;;;;;;;:6;:12;;;;;;:19;;-1:-1:-1;;37435:19:0;37450:4;37435:19;;;;;;37508:6;;37516:4;;37465:56;;-1:-1:-1;;;37465:56:0;;;;;;;;;;;;;;;;37508:6;;;37465:56;;;;37516:4;;;37465:56;;;;;37354:60;;-1:-1:-1;37435:12:0;;37465:26;;:56;;;;;37435:12;37465:56;;;;;;37435:12;;37465:56;;;2:2:-1;;;;27:1;24;17:12;2:2;37465:56:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;;;;;;;;37532:15:0;;;;;;;:7;:15;;;;;;;;:23;;;;;;;;;;;;:30;;;;;-1:-1:-1;;;;;;37532:30:0;;;;;;;;37573:15;;;;;;:23;;;;;;;;:30;;;;;;;;37659:8;27:10:-1;;-1:-1;23:18;;45:23;;37659:19:0;;;;;;;;;;;;;;;;;;37728:15;;37694:50;;;;;;;;;;;;;;;;;;;;;;36371:1381;;;;;;;;:::o;35885:371::-;36010:6;;35997:31;;;-1:-1:-1;;;35997:31:0;;;;35958:4;;-1:-1:-1;;;;;36010:6:0;;35997:29;;:31;;;;;;;;;;;;;;36010:6;35997:31;;;2:2:-1;;;;27:1;24;17:12;2:2;35997:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;35997:31:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;35997:31:0;-1:-1:-1;;;;;35983:45:0;:10;:45;35975:83;;;;;-1:-1:-1;;;35975:83:0;;;;;;;;;;;;-1:-1:-1;;;35975:83:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;36073:24:0;;;;;;;:15;:24;;;;;;;;:31;;;;;;;;;;;;36069:158;;-1:-1:-1;;;;;36130:24:0;;;;;;;:15;:24;;;;;;;;:31;;;;;;;;;;;;:38;;-1:-1:-1;;36130:38:0;36164:4;36130:38;;;;;;36183:20;;;:11;:20;;;;27:10:-1;;23:18;;;45:23;;36183:32:0;;;;;;;-1:-1:-1;;;;;;36183:32:0;;;;;;36069:158;-1:-1:-1;36244:4:0;35885:371;;;;:::o;34683:21::-;;;-1:-1:-1;;;;;34683:21:0;;:::o;34807:38::-;;;;;;;;;;;;;;;:::o;34738:62::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;34738:62:0;;:::o;34595:3160::-;;;;;;;;:::o

Swarm Source

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