ETH Price: $1,956.35 (-1.63%)

Contract

0x059CA23eFF4e608B7E1ceB1aa62234C6EBcc294D
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Max Penalty117417102021-01-28 2:44:061865 days ago1611801846IN
0x059CA23e...6EBcc294D
0 ETH0.0014935651.7
Set Offer117417082021-01-28 2:43:521865 days ago1611801832IN
0x059CA23e...6EBcc294D
0 ETH0.0014937651.7
Set Max Penalty117372082021-01-27 10:11:051866 days ago1611742265IN
0x059CA23e...6EBcc294D
0 ETH0.0024571156.00000145
Set Offer117372072021-01-27 10:10:571866 days ago1611742257IN
0x059CA23e...6EBcc294D
0 ETH0.00245856.00000145
Set Max Penalty117263182021-01-25 17:45:351867 days ago1611596735IN
0x059CA23e...6EBcc294D
0 ETH0.0025085557.1725
Set Offer117263182021-01-25 17:45:351867 days ago1611596735IN
0x059CA23e...6EBcc294D
0 ETH0.0023893254.45
Set Max Penalty117133212021-01-23 18:03:001869 days ago1611424980IN
0x059CA23e...6EBcc294D
0 ETH0.0037305685
Set Max Penalty117113942021-01-23 10:59:061870 days ago1611399546IN
0x059CA23e...6EBcc294D
0 ETH0.0028966766.00000145
Set Offer117113902021-01-23 10:58:431870 days ago1611399523IN
0x059CA23e...6EBcc294D
0 ETH0.0029343666.85272163
Set Offer117112572021-01-23 10:26:031870 days ago1611397563IN
0x059CA23e...6EBcc294D
0 ETH0.0024134555
Set Max Penalty117079872021-01-22 22:22:331870 days ago1611354153IN
0x059CA23e...6EBcc294D
0 ETH0.0030283469
Set Offer117079872021-01-22 22:22:331870 days ago1611354153IN
0x059CA23e...6EBcc294D
0 ETH0.00245856
Set Max Penalty117079422021-01-22 22:14:341870 days ago1611353674IN
0x059CA23e...6EBcc294D
0 ETH0.0017035469
Set Offer117079422021-01-22 22:14:341870 days ago1611353674IN
0x059CA23e...6EBcc294D
0 ETH0.0028862685
Set Max Penalty117076412021-01-22 21:10:561870 days ago1611349856IN
0x059CA23e...6EBcc294D
0 ETH0.0028859285
Set Offer117076402021-01-22 21:10:421870 days ago1611349842IN
0x059CA23e...6EBcc294D
0 ETH0.002455985
Set Max Penalty117062382021-01-22 15:57:471870 days ago1611331067IN
0x059CA23e...6EBcc294D
0 ETH0.0043450199
Set Offer117061842021-01-22 15:43:441870 days ago1611330224IN
0x059CA23e...6EBcc294D
0 ETH0.0043015198
Set Max Penalty117059202021-01-22 14:46:531870 days ago1611326813IN
0x059CA23e...6EBcc294D
0 ETH0.0043877100
Set Offer117059202021-01-22 14:46:531870 days ago1611326813IN
0x059CA23e...6EBcc294D
0 ETH0.0043881100
Set Max Penalty117059012021-01-22 14:42:551870 days ago1611326575IN
0x059CA23e...6EBcc294D
0 ETH0.00570557130
Set Offer117059012021-01-22 14:42:551870 days ago1611326575IN
0x059CA23e...6EBcc294D
0 ETH0.00491467112
Set Offer117058532021-01-22 14:31:491870 days ago1611325909IN
0x059CA23e...6EBcc294D
0 ETH0.00550087162
Set Max Penalty117058432021-01-22 14:28:271870 days ago1611325707IN
0x059CA23e...6EBcc294D
0 ETH0.00627612143
Set Offer117058412021-01-22 14:27:511870 days ago1611325671IN
0x059CA23e...6EBcc294D
0 ETH0.00618891141
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CouponClipper

Compiler Version
v0.7.4+commit.3f05b770

Optimization Enabled:
Yes with 1337 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2020-12-14
*/

pragma solidity 0.7.4;
// SPDX-License-Identifier: MIT

interface IDSDS {
    function epoch() external view returns (uint);
    function advance() external;
    function totalRedeemable() external view returns (uint);

    function redeemCoupons(uint _epoch, uint _amount) external;
    function transferCoupons(address _sender, address _recipient, uint _epoch, uint _amount) external;
    function balanceOfCoupons(address _account, uint _epoch) external view returns (uint);

    function couponRedemptionPenalty(uint _epoch, uint _amount) external view returns (uint);
}

interface IERC20 {
    function transfer(address recipient, uint amount) external returns (bool);
}

interface ICHI {
    function freeFromUpTo(address _addr, uint _amount) external returns (uint);
}

// @notice Lets anybody trustlessly redeem coupons on anyone else's behalf for a fee.
//    Requires that the coupon holder has previously approved this contract via the DSDS `approveCoupons` function.
// @dev Bots should scan for the `CouponApproval` event emitted by the DSDS `approveCoupons` function to find out which 
//    users have approved this contract to redeem their coupons.
// @dev This contract's API should be backwards compatible with other CouponClippers.
contract CouponClipper {
    using SafeMath for uint;

    IERC20 constant private DSD = IERC20(0xBD2F0Cd039E0BFcf88901C98c0bFAc5ab27566e3);
    IDSDS constant private DSDS = IDSDS(0x6Bf977ED1A09214E6209F4EA5f525261f1A2690a);
    ICHI  constant private CHI = ICHI(0x0000000000004946c0e9F43F4Dee607b0eF1fA1c);

    // HOUSE_RATE_HALVING_AMNT -- Every time a bot brings in 100000DSD for the house, the house's
    // rate will be cut in half *for that bot and that bot alone*:
    // * 50.0% of offer for 0 -> 100000DSD
    // * 25.0% of offer 100000DSD -> 200000DSD
    // * 12.5% of offer 200000DSD -> 300000DSD
    // ...
    uint constant private HOUSE_RATE_HALVING_AMNT = 100000e18;
    uint constant private HOUSE_RATE = 5000; // 50% -- initial portion of the offer taken by house
    uint constant private MAX_OFFER = 5000; // 50% -- higher than this and DIP-2 penalty may eat into offer
    
    address public house = 0x871ee4648d0FBB08F39857F41da256659Eab6334; // collector of house take

    // The basis points offered by coupon holders to have their coupons redeemed -- default is 0 bps (0%)
    // E.g., offers[_user] = 500 indicates that _user will pay 500 basis points (5%) to the caller
    mapping(address => uint) private offers;
    // The coupon redemption loss (in basis points) deemed acceptable by coupon holder -- default is 0 bps (0%)
    // E.g., maxPenalties[_user] = 100 indicates that _user is ok with 1% of their coupons being burned by DIP-2
    mapping(address => uint) private maxPenalties;
    // The cumulative revenue (in DSD) earned by the house because of a given bot's hard work. Any time
    // this value crosses a multiple of 100000, the house's take rate will be halved.
    // NOTE: This advantage is non-transferrable. Bots are encouraged to keep their address constant
    mapping(address => uint) private houseTakes;
    
    event SetOffer(address indexed user, uint offer);
    event SetMaxPenalty(address indexed user, uint penalty);
    
    // frees CHI from msg.sender to reduce gas costs
    // requires that msg.sender has approved this contract to use their CHI
    modifier useCHI {
        uint gasStart = gasleft();
        _;
        uint gasSpent = 21000 + gasStart - gasleft() + (16 * msg.data.length);
        CHI.freeFromUpTo(msg.sender, (gasSpent + 14154) / 41947);
    }

    // @notice Gets the number of basis points the _user is offering the bots
    // @param _user The account whose offer we're looking up.
    // @return The number of basis points the account is offering to have their coupons redeemed
    function getOffer(address _user) public view returns (uint) {
        return offers[_user];
    }

    // @notice Allows msg.sender to change the number of basis points they are offering.
    // @dev _newOffer must be no more than 5000 (50%)
    // @dev A user's offer cannot be *decreased* during the 15 minutes before the epoch advance (frontrun protection)
    // @param _offer The number of basis points msg.sender wants to offer to have their coupons redeemed.
    function setOffer(uint _newOffer) external {
        require(_newOffer <= MAX_OFFER, "Clipper: Offer above 50%");

        if (_newOffer < offers[msg.sender]) {
            uint nextEpochStartTime = getEpochStartTime(DSDS.epoch() + 1);
            uint timeUntilNextEpoch = nextEpochStartTime.sub(block.timestamp);
            require(timeUntilNextEpoch > 15 minutes, "Clipper: Wait until next epoch");
        }
        
        offers[msg.sender] = _newOffer;
        emit SetOffer(msg.sender, _newOffer);
    }

    // @notice Gets the number of basis points the _user is willing to burn due to DIP-2
    // @dev The default value is 0 basis points (0%)
    // @param _user The account whose maxPenalty we're looking up.
    // @return The number of basis points the accounts is willing to burn when their coupons get redeemed.
    function getMaxPenalty(address _user) public view returns (uint) {
        return maxPenalties[_user];
    }

    // @notice Allows msg.sender to change the number of basis points they are willing to burn
    // @dev _newPenalty should be between 0 (0%) and 5000 (50%)
    // @dev A user's maxPenalty cannot be *decreased* during the 15 minutes before the epoch advance (frontrun protection)
    // @param _newPenalty The number of basis points msg.sender is willing to burn when their coupons get redeemed.
    function setMaxPenalty(uint _newPenalty) external {
        if (_newPenalty < maxPenalties[msg.sender]) {
            uint nextEpochStartTime = getEpochStartTime(DSDS.epoch() + 1);
            uint timeUntilNextEpoch = nextEpochStartTime.sub(block.timestamp);
            require(timeUntilNextEpoch > 15 minutes, "Clipper: Wait until next epoch");
        }
        
        maxPenalties[msg.sender] = _newPenalty;
        emit SetMaxPenalty(msg.sender, _newPenalty);
    }
    
    // @notice Internal logic used to redeem coupons on the coupon holder's bahalf
    // @param _user Address of the user holding the coupons (and who has approved this contract)
    // @param _epoch The epoch in which the _user purchased the coupons
    // @param _couponAmount The number of coupons to redeem (18 decimals)
    // @return the fee (in DSD) owned to the bot (msg.sender)
    function _redeem(address _user, uint _epoch, uint _couponAmount) internal returns (uint) {
        // check that penalty isn't too high
        uint penalty = DSDS.couponRedemptionPenalty(_epoch, _couponAmount);
        if (penalty > _couponAmount.mul(getMaxPenalty(_user)).div(10_000)) return 0;

        // pull user's coupons into this contract (requires that the user has approved this contract)
        try DSDS.transferCoupons(_user, address(this), _epoch, _couponAmount) {
            // redeem the coupons for DSD
            try DSDS.redeemCoupons(_epoch, _couponAmount) {
                // compute fees
                uint fee = _couponAmount.mul(getOffer(_user)).div(10_000);
                // send the DSD to the user
                DSD.transfer(_user, _couponAmount.sub(penalty).sub(fee)); // @audit-info : reverts on failure

                // (x >> y) is equivalent to (x / 2**y) for positive integers
                uint houseRate = HOUSE_RATE >> houseTakes[tx.origin].div(HOUSE_RATE_HALVING_AMNT);
                uint houseFee = fee.mul(houseRate).div(10_000);
                houseTakes[tx.origin] = houseTakes[tx.origin].add(houseFee);

                // return the bot fee
                return fee.sub(houseFee);
            } catch {
                // In this block the transfer succeeded but redemption failed, so we need to undo the transfer!!
                DSDS.transferCoupons(address(this), _user, _epoch, _couponAmount);
                return 0;
            }
        } catch {
            return 0;
        }
    }

    // @notice Internal logic used to redeem coupons on the coupon holder's bahalf
    // @param _users Addresses of users holding the coupons (and who has approved this contract)
    // @param _epochs The epochs in which the _users purchased the coupons
    // @param _couponAmounts The numbers of coupons to redeem (18 decimals)
    // @return the total fee (in DSD) owned to the bot (msg.sender)
    function _redeemMany(address[] calldata _users, uint[] calldata _epochs, uint[] calldata _couponAmounts) internal returns (uint) {
        // 0 by default, would cost extra gas to make that explicit
        uint botFee;

        for (uint i = 0; i < _users.length; i++) {
            botFee = botFee.add(_redeem(_users[i], _epochs[i], _couponAmounts[i]));
        }

        return botFee;
    }
    
    // @notice Allows anyone to redeem coupons for DSD on the coupon-holder's bahalf
    // @dev Backwards compatible with CouponClipper V1.
    function redeem(address _user, uint _epoch, uint _couponAmount) external {
        DSD.transfer(msg.sender, _redeem(_user, _epoch, _couponAmount));
    }

    function redeemMany(address[] calldata _users, uint[] calldata _epochs, uint[] calldata _couponAmounts) external {
        DSD.transfer(msg.sender, _redeemMany(_users, _epochs, _couponAmounts));
    }
    
    // @notice Advances the epoch (if needed) and redeems the max amount of coupons possible
    //    Also frees CHI tokens to save on gas (requires that msg.sender has CHI tokens in their
    //    account and has approved this contract to spend their CHI).
    // @param _user The user whose coupons will attempt to be redeemed
    // @param _epoch The epoch in which the coupons were created
    // @param _targetEpoch The epoch that is about to be advanced _to_.
    //    E.g., if the current epoch is 220 and we are about to advance to to epoch 221, then _targetEpoch
    //    would be set to 221. The _targetEpoch is the epoch in which the coupon redemption will be attempted.
    function advanceAndRedeem(address _user, uint _epoch, uint _targetEpoch) external useCHI {
        // End execution early if tx is mined too early
        if (block.timestamp < getEpochStartTime(_targetEpoch)) { return; }
        
        // advance epoch if it has not already been advanced 
        if (DSDS.epoch() != _targetEpoch) { DSDS.advance(); }
        
        // get max redeemable amount
        uint totalRedeemable = DSDS.totalRedeemable();
        if (totalRedeemable == 0) { return; } // no coupons to redeem
        uint userBalance = DSDS.balanceOfCoupons(_user, _epoch);
        if (userBalance == 0) { return; } // no coupons to redeem
        uint maxRedeemableAmount = totalRedeemable < userBalance ? totalRedeemable : userBalance;
        
        // attempt to redeem coupons
        DSD.transfer(msg.sender, _redeem(_user, _epoch, maxRedeemableAmount));
    }

    // @notice Advances the epoch (if needed) and redeems the max amount of coupons possible
    //    Also frees CHI tokens to save on gas (requires that msg.sender has CHI tokens in their
    //    account and has approved this contract to spend their CHI).
    // @param _users The users whose coupons will attempt to be redeemed
    // @param _epochs The epochs in which the coupons were created
    // @param _targetEpoch The epoch that is about to be advanced _to_.
    //    E.g., if the current epoch is 220 and we are about to advance to to epoch 221, then _targetEpoch
    //    would be set to 221. The _targetEpoch is the epoch in which the coupon redemption will be attempted.
    function advanceAndRedeemMany(address[] calldata _users, uint[] calldata _epochs, uint _targetEpoch) external useCHI {
        // End execution early if tx is mined too early
        if (block.timestamp < getEpochStartTime(_targetEpoch)) return;

        // Advance the epoch if necessary
        if (DSDS.epoch() != _targetEpoch) DSDS.advance();
        
        // 0 by default, would cost extra gas to make that explicit
        uint botFee;
        uint amtToRedeem;
        uint totalRedeemable = DSDS.totalRedeemable();

        for (uint i = 0; i < _users.length; i++) {
            if (totalRedeemable == 0) break;

            amtToRedeem = DSDS.balanceOfCoupons(_users[i], _epochs[i]);
            if (totalRedeemable < amtToRedeem) amtToRedeem = totalRedeemable;

            botFee = botFee.add(_redeem(_users[i], _epochs[i], amtToRedeem));
            totalRedeemable = totalRedeemable.sub(amtToRedeem);
        }

        DSD.transfer(msg.sender, botFee);
    }
    
    // @notice Returns the timestamp at which the _targetEpoch starts
    function getEpochStartTime(uint _targetEpoch) public pure returns (uint) {
        return _targetEpoch.sub(0).mul(7200).add(1606348800);
    }
    
    // @notice Allows house address to change the house address
    function changeHouseAddress(address _newAddress) external {
        require(msg.sender == house);
        house = _newAddress;
    }

    // @notice Allows house to withdraw accumulated fees
    function withdraw(address _token, uint _amount) external {
        IERC20(_token).transfer(house, _amount);
    }
}



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

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

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"penalty","type":"uint256"}],"name":"SetMaxPenalty","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"offer","type":"uint256"}],"name":"SetOffer","type":"event"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_epoch","type":"uint256"},{"internalType":"uint256","name":"_targetEpoch","type":"uint256"}],"name":"advanceAndRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"},{"internalType":"uint256[]","name":"_epochs","type":"uint256[]"},{"internalType":"uint256","name":"_targetEpoch","type":"uint256"}],"name":"advanceAndRedeemMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAddress","type":"address"}],"name":"changeHouseAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_targetEpoch","type":"uint256"}],"name":"getEpochStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getMaxPenalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getOffer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"house","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_epoch","type":"uint256"},{"internalType":"uint256","name":"_couponAmount","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"},{"internalType":"uint256[]","name":"_epochs","type":"uint256[]"},{"internalType":"uint256[]","name":"_couponAmounts","type":"uint256[]"}],"name":"redeemMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPenalty","type":"uint256"}],"name":"setMaxPenalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newOffer","type":"uint256"}],"name":"setOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600080546001600160a01b03191673871ee4648d0fbb08f39857f41da256659eab633417905534801561003657600080fd5b506117bf806100466000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80636aea2be511610081578063eb75c4101161005b578063eb75c410146103ca578063f3fef3a3146103f0578063ff9b3acf1461041c576100d4565b80636aea2be514610273578063c612442c14610299578063ca54cdc3146103ad576100d4565b80632b83cccd116100b25780632b83cccd146101f55780632cdf4b7e14610227578063633e9e0914610244576100d4565b80631efb17ee146100d95780631f69c7431461010157806322b5b1eb146101c3575b600080fd5b6100ff600480360360208110156100ef57600080fd5b50356001600160a01b0316610440565b005b6100ff6004803603606081101561011757600080fd5b81019060208101813564010000000081111561013257600080fd5b82018360208201111561014457600080fd5b8035906020019184602083028401116401000000008311171561016657600080fd5b91939092909160208101903564010000000081111561018457600080fd5b82018360208201111561019657600080fd5b803590602001918460208302840111640100000000831117156101b857600080fd5b919350915035610491565b6100ff600480360360608110156101d957600080fd5b506001600160a01b03813516906020810135906040013561088a565b6100ff6004803603606081101561020b57600080fd5b506001600160a01b038135169060208101359060400135610c1e565b6100ff6004803603602081101561023d57600080fd5b5035610cbb565b6102616004803603602081101561025a57600080fd5b5035610e62565b60408051918252519081900360200190f35b6102616004803603602081101561028957600080fd5b50356001600160a01b0316610e8e565b6100ff600480360360608110156102af57600080fd5b8101906020810181356401000000008111156102ca57600080fd5b8201836020820111156102dc57600080fd5b803590602001918460208302840111640100000000831117156102fe57600080fd5b91939092909160208101903564010000000081111561031c57600080fd5b82018360208201111561032e57600080fd5b8035906020019184602083028401116401000000008311171561035057600080fd5b91939092909160208101903564010000000081111561036e57600080fd5b82018360208201111561038057600080fd5b803590602001918460208302840111640100000000831117156103a257600080fd5b509092509050610ea9565b6100ff600480360360208110156103c357600080fd5b5035610f4c565b610261600480360360208110156103e057600080fd5b50356001600160a01b0316611068565b6100ff6004803603604081101561040657600080fd5b506001600160a01b038135169060200135611083565b61042461110a565b604080516001600160a01b039092168252519081900360200190f35b6000546001600160a01b0316331461045757600080fd5b600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60005a905061049f82610e62565b4210156104ab576107d1565b81736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104f957600080fd5b505afa15801561050d573d6000803e3d6000fd5b505050506040513d602081101561052357600080fd5b50511461059257736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663ea105ac76040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561057957600080fd5b505af115801561058d573d6000803e3d6000fd5b505050505b6000806000736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b0316631edbcf6c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105e457600080fd5b505afa1580156105f8573d6000803e3d6000fd5b505050506040513d602081101561060e57600080fd5b5051905060005b88811015610746578161062757610746565b736bf977ed1a09214e6209f4ea5f525261f1a2690a63bc7513e28b8b8481811061064d57fe5b905060200201356001600160a01b03168a8a8581811061066957fe5b905060200201356040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b1580156106b457600080fd5b505afa1580156106c8573d6000803e3d6000fd5b505050506040513d60208110156106de57600080fd5b50519250828210156106ee578192505b6107306107298b8b8481811061070057fe5b905060200201356001600160a01b03168a8a8581811061071c57fe5b9050602002013586611119565b85906114bd565b935061073c8284611517565b9150600101610615565b506040805163a9059cbb60e01b815233600482015260248101859052905173bd2f0cd039e0bfcf88901c98c0bfac5ab27566e39163a9059cbb9160448083019260209291908290030181600087803b1580156107a157600080fd5b505af11580156107b5573d6000803e3d6000fd5b505050506040513d60208110156107cb57600080fd5b50505050505b6000601036025a8361520801030190506d4946c0e9f43f4dee607b0ef1fa1c6001600160a01b031663079d229f3361a3db8461374a018161080e57fe5b046040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561085557600080fd5b505af1158015610869573d6000803e3d6000fd5b505050506040513d602081101561087f57600080fd5b505050505050505050565b60005a905061089882610e62565b4210156108a457610b67565b81736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f257600080fd5b505afa158015610906573d6000803e3d6000fd5b505050506040513d602081101561091c57600080fd5b50511461098b57736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663ea105ac76040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561097257600080fd5b505af1158015610986573d6000803e3d6000fd5b505050505b6000736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b0316631edbcf6c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109da57600080fd5b505afa1580156109ee573d6000803e3d6000fd5b505050506040513d6020811015610a0457600080fd5b5051905080610a135750610b67565b6000736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663bc7513e287876040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b158015610a7e57600080fd5b505afa158015610a92573d6000803e3d6000fd5b505050506040513d6020811015610aa857600080fd5b5051905080610ab8575050610b67565b6000818310610ac75781610ac9565b825b905073bd2f0cd039e0bfcf88901c98c0bfac5ab27566e363a9059cbb33610af18a8a86611119565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610b3757600080fd5b505af1158015610b4b573d6000803e3d6000fd5b505050506040513d6020811015610b6157600080fd5b50505050505b6000601036025a8361520801030190506d4946c0e9f43f4dee607b0ef1fa1c6001600160a01b031663079d229f3361a3db8461374a0181610ba457fe5b046040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610beb57600080fd5b505af1158015610bff573d6000803e3d6000fd5b505050506040513d6020811015610c1557600080fd5b50505050505050565b73bd2f0cd039e0bfcf88901c98c0bfac5ab27566e363a9059cbb33610c44868686611119565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610c8a57600080fd5b505af1158015610c9e573d6000803e3d6000fd5b505050506040513d6020811015610cb457600080fd5b5050505050565b611388811115610d12576040805162461bcd60e51b815260206004820152601860248201527f436c69707065723a204f666665722061626f7665203530250000000000000000604482015290519081900360640190fd5b33600090815260016020526040902054811015610e18576000610daf736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d7b57600080fd5b505afa158015610d8f573d6000803e3d6000fd5b505050506040513d6020811015610da557600080fd5b5051600101610e62565b90506000610dbd8242611517565b90506103848111610e15576040805162461bcd60e51b815260206004820152601e60248201527f436c69707065723a205761697420756e74696c206e6578742065706f63680000604482015290519081900360640190fd5b50505b33600081815260016020908152604091829020849055815184815291517fffe6d5d3bde632d478cc383ada22ca697bde63b9f0586d11fe211d94c1c79b939281900390910190a250565b6000610e88635fbef000610e82611c20610e7c8686611517565b90611559565b906114bd565b92915050565b6001600160a01b031660009081526002602052604090205490565b73bd2f0cd039e0bfcf88901c98c0bfac5ab27566e363a9059cbb33610ed28989898989896115b2565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610f1857600080fd5b505af1158015610f2c573d6000803e3d6000fd5b505050506040513d6020811015610f4257600080fd5b5050505050505050565b3360009081526002602052604090205481101561101e576000610fb5736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d7b57600080fd5b90506000610fc38242611517565b9050610384811161101b576040805162461bcd60e51b815260206004820152601e60248201527f436c69707065723a205761697420756e74696c206e6578742065706f63680000604482015290519081900360640190fd5b50505b33600081815260026020908152604091829020849055815184815291517f2a40b2156360f39362c633686aba300083490d42f40d4be47de9119f65ad798f9281900390910190a250565b6001600160a01b031660009081526001602052604090205490565b600080546040805163a9059cbb60e01b81526001600160a01b0392831660048201526024810185905290519185169263a9059cbb926044808401936020939083900390910190829087803b1580156110da57600080fd5b505af11580156110ee573d6000803e3d6000fd5b505050506040513d602081101561110457600080fd5b50505050565b6000546001600160a01b031681565b600080736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663a1eb31e885856040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561117c57600080fd5b505afa158015611190573d6000803e3d6000fd5b505050506040513d60208110156111a657600080fd5b505190506111c96127106111c36111bc88610e8e565b8690611559565b9061162a565b8111156111da5760009150506114b6565b60408051625edd3760e01b81526001600160a01b038716600482015230602482015260448101869052606481018590529051736bf977ed1a09214e6209f4ea5f525261f1a2690a91625edd3791608480830192600092919082900301818387803b15801561124757600080fd5b505af1925050508015611258575060015b6112665760009150506114b6565b604080517fd6a9cf0800000000000000000000000000000000000000000000000000000000815260048101869052602481018590529051736bf977ed1a09214e6209f4ea5f525261f1a2690a9163d6a9cf0891604480830192600092919082900301818387803b1580156112d957600080fd5b505af19250505080156112ea575060015b61137d5760408051625edd3760e01b81523060048201526001600160a01b038716602482015260448101869052606481018590529051736bf977ed1a09214e6209f4ea5f525261f1a2690a91625edd3791608480830192600092919082900301818387803b15801561135b57600080fd5b505af115801561136f573d6000803e3d6000fd5b5050505060009150506114b6565b60006113986127106111c361139189611068565b8790611559565b905073bd2f0cd039e0bfcf88901c98c0bfac5ab27566e363a9059cbb876113c9846113c38988611517565b90611517565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561140f57600080fd5b505af1158015611423573d6000803e3d6000fd5b505050506040513d602081101561143957600080fd5b50503260009081526003602052604081205461145f9069152d02c7e14af680000061162a565b611388901c905060006114786127106111c38585611559565b3260009081526003602052604090205490915061149590826114bd565b326000908152600360205260409020556114af8382611517565b9450505050505b9392505050565b6000828201838110156114b6576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006114b683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061166c565b60008261156857506000610e88565b8282028284828161157557fe5b04146114b65760405162461bcd60e51b81526004018080602001828103825260218152602001806117696021913960400191505060405180910390fd5b60008060005b8781101561161e5761161461160d8a8a848181106115d257fe5b905060200201356001600160a01b03168989858181106115ee57fe5b9050602002013588888681811061160157fe5b90506020020135611119565b83906114bd565b91506001016115b8565b50979650505050505050565b60006114b683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611703565b600081848411156116fb5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156116c05781810151838201526020016116a8565b50505050905090810190601f1680156116ed5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836117525760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156116c05781810151838201526020016116a8565b50600083858161175e57fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122022f079019a26560e33147206deb2e279071833daa5b7027f7bfae3876317c13164736f6c63430007040033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100d45760003560e01c80636aea2be511610081578063eb75c4101161005b578063eb75c410146103ca578063f3fef3a3146103f0578063ff9b3acf1461041c576100d4565b80636aea2be514610273578063c612442c14610299578063ca54cdc3146103ad576100d4565b80632b83cccd116100b25780632b83cccd146101f55780632cdf4b7e14610227578063633e9e0914610244576100d4565b80631efb17ee146100d95780631f69c7431461010157806322b5b1eb146101c3575b600080fd5b6100ff600480360360208110156100ef57600080fd5b50356001600160a01b0316610440565b005b6100ff6004803603606081101561011757600080fd5b81019060208101813564010000000081111561013257600080fd5b82018360208201111561014457600080fd5b8035906020019184602083028401116401000000008311171561016657600080fd5b91939092909160208101903564010000000081111561018457600080fd5b82018360208201111561019657600080fd5b803590602001918460208302840111640100000000831117156101b857600080fd5b919350915035610491565b6100ff600480360360608110156101d957600080fd5b506001600160a01b03813516906020810135906040013561088a565b6100ff6004803603606081101561020b57600080fd5b506001600160a01b038135169060208101359060400135610c1e565b6100ff6004803603602081101561023d57600080fd5b5035610cbb565b6102616004803603602081101561025a57600080fd5b5035610e62565b60408051918252519081900360200190f35b6102616004803603602081101561028957600080fd5b50356001600160a01b0316610e8e565b6100ff600480360360608110156102af57600080fd5b8101906020810181356401000000008111156102ca57600080fd5b8201836020820111156102dc57600080fd5b803590602001918460208302840111640100000000831117156102fe57600080fd5b91939092909160208101903564010000000081111561031c57600080fd5b82018360208201111561032e57600080fd5b8035906020019184602083028401116401000000008311171561035057600080fd5b91939092909160208101903564010000000081111561036e57600080fd5b82018360208201111561038057600080fd5b803590602001918460208302840111640100000000831117156103a257600080fd5b509092509050610ea9565b6100ff600480360360208110156103c357600080fd5b5035610f4c565b610261600480360360208110156103e057600080fd5b50356001600160a01b0316611068565b6100ff6004803603604081101561040657600080fd5b506001600160a01b038135169060200135611083565b61042461110a565b604080516001600160a01b039092168252519081900360200190f35b6000546001600160a01b0316331461045757600080fd5b600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60005a905061049f82610e62565b4210156104ab576107d1565b81736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104f957600080fd5b505afa15801561050d573d6000803e3d6000fd5b505050506040513d602081101561052357600080fd5b50511461059257736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663ea105ac76040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561057957600080fd5b505af115801561058d573d6000803e3d6000fd5b505050505b6000806000736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b0316631edbcf6c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105e457600080fd5b505afa1580156105f8573d6000803e3d6000fd5b505050506040513d602081101561060e57600080fd5b5051905060005b88811015610746578161062757610746565b736bf977ed1a09214e6209f4ea5f525261f1a2690a63bc7513e28b8b8481811061064d57fe5b905060200201356001600160a01b03168a8a8581811061066957fe5b905060200201356040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b1580156106b457600080fd5b505afa1580156106c8573d6000803e3d6000fd5b505050506040513d60208110156106de57600080fd5b50519250828210156106ee578192505b6107306107298b8b8481811061070057fe5b905060200201356001600160a01b03168a8a8581811061071c57fe5b9050602002013586611119565b85906114bd565b935061073c8284611517565b9150600101610615565b506040805163a9059cbb60e01b815233600482015260248101859052905173bd2f0cd039e0bfcf88901c98c0bfac5ab27566e39163a9059cbb9160448083019260209291908290030181600087803b1580156107a157600080fd5b505af11580156107b5573d6000803e3d6000fd5b505050506040513d60208110156107cb57600080fd5b50505050505b6000601036025a8361520801030190506d4946c0e9f43f4dee607b0ef1fa1c6001600160a01b031663079d229f3361a3db8461374a018161080e57fe5b046040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561085557600080fd5b505af1158015610869573d6000803e3d6000fd5b505050506040513d602081101561087f57600080fd5b505050505050505050565b60005a905061089882610e62565b4210156108a457610b67565b81736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f257600080fd5b505afa158015610906573d6000803e3d6000fd5b505050506040513d602081101561091c57600080fd5b50511461098b57736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663ea105ac76040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561097257600080fd5b505af1158015610986573d6000803e3d6000fd5b505050505b6000736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b0316631edbcf6c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109da57600080fd5b505afa1580156109ee573d6000803e3d6000fd5b505050506040513d6020811015610a0457600080fd5b5051905080610a135750610b67565b6000736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663bc7513e287876040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b158015610a7e57600080fd5b505afa158015610a92573d6000803e3d6000fd5b505050506040513d6020811015610aa857600080fd5b5051905080610ab8575050610b67565b6000818310610ac75781610ac9565b825b905073bd2f0cd039e0bfcf88901c98c0bfac5ab27566e363a9059cbb33610af18a8a86611119565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610b3757600080fd5b505af1158015610b4b573d6000803e3d6000fd5b505050506040513d6020811015610b6157600080fd5b50505050505b6000601036025a8361520801030190506d4946c0e9f43f4dee607b0ef1fa1c6001600160a01b031663079d229f3361a3db8461374a0181610ba457fe5b046040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610beb57600080fd5b505af1158015610bff573d6000803e3d6000fd5b505050506040513d6020811015610c1557600080fd5b50505050505050565b73bd2f0cd039e0bfcf88901c98c0bfac5ab27566e363a9059cbb33610c44868686611119565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610c8a57600080fd5b505af1158015610c9e573d6000803e3d6000fd5b505050506040513d6020811015610cb457600080fd5b5050505050565b611388811115610d12576040805162461bcd60e51b815260206004820152601860248201527f436c69707065723a204f666665722061626f7665203530250000000000000000604482015290519081900360640190fd5b33600090815260016020526040902054811015610e18576000610daf736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d7b57600080fd5b505afa158015610d8f573d6000803e3d6000fd5b505050506040513d6020811015610da557600080fd5b5051600101610e62565b90506000610dbd8242611517565b90506103848111610e15576040805162461bcd60e51b815260206004820152601e60248201527f436c69707065723a205761697420756e74696c206e6578742065706f63680000604482015290519081900360640190fd5b50505b33600081815260016020908152604091829020849055815184815291517fffe6d5d3bde632d478cc383ada22ca697bde63b9f0586d11fe211d94c1c79b939281900390910190a250565b6000610e88635fbef000610e82611c20610e7c8686611517565b90611559565b906114bd565b92915050565b6001600160a01b031660009081526002602052604090205490565b73bd2f0cd039e0bfcf88901c98c0bfac5ab27566e363a9059cbb33610ed28989898989896115b2565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610f1857600080fd5b505af1158015610f2c573d6000803e3d6000fd5b505050506040513d6020811015610f4257600080fd5b5050505050505050565b3360009081526002602052604090205481101561101e576000610fb5736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d7b57600080fd5b90506000610fc38242611517565b9050610384811161101b576040805162461bcd60e51b815260206004820152601e60248201527f436c69707065723a205761697420756e74696c206e6578742065706f63680000604482015290519081900360640190fd5b50505b33600081815260026020908152604091829020849055815184815291517f2a40b2156360f39362c633686aba300083490d42f40d4be47de9119f65ad798f9281900390910190a250565b6001600160a01b031660009081526001602052604090205490565b600080546040805163a9059cbb60e01b81526001600160a01b0392831660048201526024810185905290519185169263a9059cbb926044808401936020939083900390910190829087803b1580156110da57600080fd5b505af11580156110ee573d6000803e3d6000fd5b505050506040513d602081101561110457600080fd5b50505050565b6000546001600160a01b031681565b600080736bf977ed1a09214e6209f4ea5f525261f1a2690a6001600160a01b031663a1eb31e885856040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561117c57600080fd5b505afa158015611190573d6000803e3d6000fd5b505050506040513d60208110156111a657600080fd5b505190506111c96127106111c36111bc88610e8e565b8690611559565b9061162a565b8111156111da5760009150506114b6565b60408051625edd3760e01b81526001600160a01b038716600482015230602482015260448101869052606481018590529051736bf977ed1a09214e6209f4ea5f525261f1a2690a91625edd3791608480830192600092919082900301818387803b15801561124757600080fd5b505af1925050508015611258575060015b6112665760009150506114b6565b604080517fd6a9cf0800000000000000000000000000000000000000000000000000000000815260048101869052602481018590529051736bf977ed1a09214e6209f4ea5f525261f1a2690a9163d6a9cf0891604480830192600092919082900301818387803b1580156112d957600080fd5b505af19250505080156112ea575060015b61137d5760408051625edd3760e01b81523060048201526001600160a01b038716602482015260448101869052606481018590529051736bf977ed1a09214e6209f4ea5f525261f1a2690a91625edd3791608480830192600092919082900301818387803b15801561135b57600080fd5b505af115801561136f573d6000803e3d6000fd5b5050505060009150506114b6565b60006113986127106111c361139189611068565b8790611559565b905073bd2f0cd039e0bfcf88901c98c0bfac5ab27566e363a9059cbb876113c9846113c38988611517565b90611517565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561140f57600080fd5b505af1158015611423573d6000803e3d6000fd5b505050506040513d602081101561143957600080fd5b50503260009081526003602052604081205461145f9069152d02c7e14af680000061162a565b611388901c905060006114786127106111c38585611559565b3260009081526003602052604090205490915061149590826114bd565b326000908152600360205260409020556114af8382611517565b9450505050505b9392505050565b6000828201838110156114b6576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006114b683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061166c565b60008261156857506000610e88565b8282028284828161157557fe5b04146114b65760405162461bcd60e51b81526004018080602001828103825260218152602001806117696021913960400191505060405180910390fd5b60008060005b8781101561161e5761161461160d8a8a848181106115d257fe5b905060200201356001600160a01b03168989858181106115ee57fe5b9050602002013588888681811061160157fe5b90506020020135611119565b83906114bd565b91506001016115b8565b50979650505050505050565b60006114b683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611703565b600081848411156116fb5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156116c05781810151838201526020016116a8565b50505050905090810190601f1680156116ed5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836117525760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156116c05781810151838201526020016116a8565b50600083858161175e57fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122022f079019a26560e33147206deb2e279071833daa5b7027f7bfae3876317c13164736f6c63430007040033

Deployed Bytecode Sourcemap

1279:12215:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13175:135;;;;;;;;;;;;;;;;-1:-1:-1;13175:135:0;-1:-1:-1;;;;;13175:135:0;;:::i;:::-;;11873:998;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11873:998:0;-1:-1:-1;11873:998:0;;:::i;10266:901::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;10266:901:0;;;;;;;;;;;;;:::i;9195:155::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;9195:155:0;;;;;;;;;;;;;:::i;4380:524::-;;;;;;;;;;;;;;;;-1:-1:-1;4380:524:0;;:::i;12954:144::-;;;;;;;;;;;;;;;;-1:-1:-1;12954:144:0;;:::i;:::-;;;;;;;;;;;;;;;;5232:110;;;;;;;;;;;;;;;;-1:-1:-1;5232:110:0;-1:-1:-1;;;;;5232:110:0;;:::i;9358:202::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9358:202:0;;-1:-1:-1;9358:202:0;-1:-1:-1;9358:202:0;:::i;5752:482::-;;;;;;;;;;;;;;;;-1:-1:-1;5752:482:0;;:::i;3902:99::-;;;;;;;;;;;;;;;;-1:-1:-1;3902:99:0;-1:-1:-1;;;;;3902:99:0;;:::i;13376:115::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;13376:115:0;;;;;;;;:::i;2198:65::-;;;:::i;:::-;;;;-1:-1:-1;;;;;2198:65:0;;;;;;;;;;;;;;13175:135;13266:5;;-1:-1:-1;;;;;13266:5:0;13252:10;:19;13244:28;;;;;;13283:5;:19;;;;-1:-1:-1;;;;;13283:19:0;;;;;;;;;;13175:135::o;11873:998::-;3462:13;3478:9;3462:25;;12080:31:::1;12098:12;12080:17;:31::i;:::-;12062:15;:49;12058:62;;;12113:7;;12058:62;12195:12;1464:42;-1:-1:-1::0;;;;;12179:10:0::1;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;12179:12:0;:28:::1;12175:48;;1464:42;-1:-1:-1::0;;;;;12209:12:0::1;;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;12175:48;12313:11;12335:16:::0;12362:20:::1;1464:42;-1:-1:-1::0;;;;;12385:20:0::1;;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;12385:22:0;;-1:-1:-1;12425:6:0::1;12420:399;12437:17:::0;;::::1;12420:399;;;12480:20:::0;12476:31:::1;;12502:5;;12476:31;1464:42;12538:21;12560:6:::0;;12567:1;12560:9;;::::1;;;;;;;;;;;-1:-1:-1::0;;;;;12560:9:0::1;12571:7;;12579:1;12571:10;;;;;;;;;;;;;12538:44;;;;;;;;;;;;;-1:-1:-1::0;;;;;12538:44:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;12538:44:0;;-1:-1:-1;12601:29:0;;::::1;12597:64;;;12646:15;12632:29;;12597:64;12687:55;12698:43;12706:6;;12713:1;12706:9;;;;;;;;;;;;;-1:-1:-1::0;;;;;12706:9:0::1;12717:7;;12725:1;12717:10;;;;;;;;;;;;;12729:11;12698:7;:43::i;:::-;12687:6:::0;;:10:::1;:55::i;:::-;12678:64:::0;-1:-1:-1;12775:32:0::1;:15:::0;12795:11;12775:19:::1;:32::i;:::-;12757:50:::0;-1:-1:-1;12456:3:0::1;;12420:399;;;-1:-1:-1::0;12831:32:0::1;::::0;;-1:-1:-1;;;12831:32:0;;12844:10:::1;12831:32;::::0;::::1;::::0;;;;;;;;;1378:42:::1;::::0;12831:12:::1;::::0;:32;;;;;::::1;::::0;;;;;;;;-1:-1:-1;1378:42:0;12831:32;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;;;;;3498:1:0::1;3510:13:::0;3558:2;3563:8;3558:20;3545:9;3534:8;3526:5;:16;:28;:53;3510:69;;1548:42;-1:-1:-1;;;;;3590:16:0;;3607:10;3640:5;3620:8;3631:5;3620:16;3619:26;;;;;;3590:56;;;;;;;;;;;;;-1:-1:-1;;;;;3590:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;11873:998:0:o;10266:901::-;3462:13;3478:9;3462:25;;10445:31:::1;10463:12;10445:17;:31::i;:::-;10427:15;:49;10423:66;;;10480:7;;10423:66;10592:12;1464:42;-1:-1:-1::0;;;;;10576:10:0::1;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;10576:12:0;:28:::1;10572:53;;1464:42;-1:-1:-1::0;;;;;10608:12:0::1;;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;10572:53;10683:20;1464:42;-1:-1:-1::0;;;;;10706:20:0::1;;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;10706:22:0;;-1:-1:-1;10743:20:0;10739:37:::1;;10767:7;;;10739:37;10810:16;1464:42;-1:-1:-1::0;;;;;10829:21:0::1;;10851:5;10858:6;10829:36;;;;;;;;;;;;;-1:-1:-1::0;;;;;10829:36:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;10829:36:0;;-1:-1:-1;10880:16:0;10876:33:::1;;10900:7;;;;10876:33;10943:24;10988:11;10970:15;:29;:61;;11020:11;10970:61;;;11002:15;10970:61;10943:88:::0;-1:-1:-1;1378:42:0::1;11090:12;11103:10;11115:43;11123:5:::0;11130:6;10943:88;11115:7:::1;:43::i;:::-;11090:69;;;;;;;;;;;;;-1:-1:-1::0;;;;;11090:69:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;;;;;3498:1:0::1;3510:13:::0;3558:2;3563:8;3558:20;3545:9;3534:8;3526:5;:16;:28;:53;3510:69;;1548:42;-1:-1:-1;;;;;3590:16:0;;3607:10;3640:5;3620:8;3631:5;3620:16;3619:26;;;;;;3590:56;;;;;;;;;;;;;-1:-1:-1;;;;;3590:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;10266:901:0:o;9195:155::-;1378:42;9279:12;9292:10;9304:37;9312:5;9319:6;9327:13;9304:7;:37::i;:::-;9279:63;;;;;;;;;;;;;-1:-1:-1;;;;;9279:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9195:155:0:o;4380:524::-;2117:4;4442:9;:22;;4434:59;;;;;-1:-1:-1;;;4434:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;4529:10;4522:18;;;;:6;:18;;;;;;4510:30;;4506:293;;;4557:23;4583:35;1464:42;-1:-1:-1;;;;;4601:10:0;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4601:12:0;4616:1;4601:16;4583:17;:35::i;:::-;4557:61;-1:-1:-1;4633:23:0;4659:39;4557:61;4682:15;4659:22;:39::i;:::-;4633:65;;4742:10;4721:18;:31;4713:74;;;;;-1:-1:-1;;;4713:74:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;4506:293;;;4826:10;4819:18;;;;:6;:18;;;;;;;;;:30;;;4865:31;;;;;;;;;;;;;;;;;4380:524;:::o;12954:144::-;13021:4;13045:45;13079:10;13045:29;13069:4;13045:19;:12;13021:4;13045:16;:19::i;:::-;:23;;:29::i;:::-;:33;;:45::i;:::-;13038:52;12954:144;-1:-1:-1;;12954:144:0:o;5232:110::-;-1:-1:-1;;;;;5315:19:0;5291:4;5315:19;;;:12;:19;;;;;;;5232:110::o;9358:202::-;1378:42;9482:12;9495:10;9507:44;9519:6;;9527:7;;9536:14;;9507:11;:44::i;:::-;9482:70;;;;;;;;;;;;;-1:-1:-1;;;;;9482:70:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;9358:202:0:o;5752:482::-;5844:10;5831:24;;;;:12;:24;;;;;;5817:38;;5813:301;;;5872:23;5898:35;1464:42;-1:-1:-1;;;;;5916:10:0;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5898:35;5872:61;-1:-1:-1;5948:23:0;5974:39;5872:61;5997:15;5974:22;:39::i;:::-;5948:65;;6057:10;6036:18;:31;6028:74;;;;;-1:-1:-1;;;6028:74:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;5813:301;;;6147:10;6134:24;;;;:12;:24;;;;;;;;;:38;;;6188;;;;;;;;;;;;;;;;;5752:482;:::o;3902:99::-;-1:-1:-1;;;;;3980:13:0;3956:4;3980:13;;;:6;:13;;;;;;;3902:99::o;13376:115::-;13468:5;;;13444:39;;;-1:-1:-1;;;13444:39:0;;-1:-1:-1;;;;;13468:5:0;;;13444:39;;;;;;;;;;;;:23;;;;;;:39;;;;;;;;;;;;;;;;;:23;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;13376:115:0:o;2198:65::-;;;-1:-1:-1;;;;;2198:65:0;;:::o;6639:1585::-;6722:4;6785:12;1464:42;-1:-1:-1;;;;;6800:28:0;;6829:6;6837:13;6800:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6800:51:0;;-1:-1:-1;6876:51:0;6920:6;6876:39;6894:20;6908:5;6894:13;:20::i;:::-;6876:13;;:17;:39::i;:::-;:43;;:51::i;:::-;6866:7;:61;6862:75;;;6936:1;6929:8;;;;;6862:75;7057:65;;;-1:-1:-1;;;7057:65:0;;-1:-1:-1;;;;;7057:65:0;;;;;;7093:4;7057:65;;;;;;;;;;;;;;;;;;1464:42;;7057:20;;:65;;;;;-1:-1:-1;;7057:65:0;;;;;;;-1:-1:-1;1464:42:0;7057:65;;;;;;;;;;;;;;;;;;;;;;;;;7053:1164;;8204:1;8197:8;;;;;7053:1164;7185:41;;;;;;;;;;;;;;;;;;;;1464:42;;7185:18;;:41;;;;;-1:-1:-1;;7185:41:0;;;;;;;-1:-1:-1;1464:42:0;7185:41;;;;;;;;;;;;;;;;;;;;;;;;;7181:983;;8056:65;;;-1:-1:-1;;;8056:65:0;;8085:4;8056:65;;;;-1:-1:-1;;;;;8056:65:0;;;;;;;;;;;;;;;;;;;;1464:42;;8056:20;;:65;;;;;-1:-1:-1;;8056:65:0;;;;;;;-1:-1:-1;1464:42:0;8056:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8147:1;8140:8;;;;;7181:983;7279:8;7290:46;7329:6;7290:34;7308:15;7317:5;7308:8;:15::i;:::-;7290:13;;:17;:34::i;:46::-;7279:57;-1:-1:-1;1378:42:0;7400:12;7413:5;7420:35;7279:57;7420:26;:13;7438:7;7420:17;:26::i;:::-;:30;;:35::i;:::-;7400:56;;;;;;;;;;;;;-1:-1:-1;;;;;7400:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;7634:9:0;7592:14;7623:21;;;:10;7400:56;7623:21;;;;;:50;;1967:9;7623:25;:50::i;:::-;2018:4;7609:64;;;-1:-1:-1;7692:13:0;7708:30;7731:6;7708:18;:3;7609:64;7708:7;:18::i;:30::-;7792:9;7781:21;;;;:10;:21;;;;;;7692:46;;-1:-1:-1;7781:35:0;;7692:46;7781:25;:35::i;:::-;7768:9;7757:21;;;;:10;:21;;;;;:59;7883:17;:3;7891:8;7883:7;:17::i;:::-;7876:24;;;;;;6639:1585;;;;;;:::o;13765:169::-;13817:4;13843:5;;;13867:6;;;;13859:46;;;;;-1:-1:-1;;;13859:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;14217:127;14269:4;14293:43;14297:1;14300;14293:43;;;;;;;;;;;;;;;;;:3;:43::i;15086:459::-;15138:4;15380:6;15376:47;;-1:-1:-1;15410:1:0;15403:8;;15376:47;15444:5;;;15448:1;15444;:5;:1;15468:5;;;;;:10;15460:56;;;;-1:-1:-1;;;15460:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8636:404;8759:4;8845:11;8874:6;8869:138;8886:17;;;8869:138;;;8934:61;8945:49;8953:6;;8960:1;8953:9;;;;;;;;;;;;;-1:-1:-1;;;;;8953:9:0;8964:7;;8972:1;8964:10;;;;;;;;;;;;;8976:14;;8991:1;8976:17;;;;;;;;;;;;;8945:7;:49::i;:::-;8934:6;;:10;:61::i;:::-;8925:70;-1:-1:-1;8905:3:0;;8869:138;;;-1:-1:-1;9026:6:0;8636:404;-1:-1:-1;;;;;;;8636:404:0:o;16021:123::-;16073:4;16097:39;16101:1;16104;16097:39;;;;;;;;;;;;;;;;;:3;:39::i;14647:180::-;14727:4;14760:12;14752:6;;;;14744:29;;;;-1:-1:-1;;;14744:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;14793:5:0;;;14647:180::o;16640:266::-;16720:4;16752:12;16745:5;16737:28;;;;-1:-1:-1;;;16737:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16776:6;16789:1;16785;:5;;;;;;;16640:266;-1:-1:-1;;;;;16640:266:0:o

Swarm Source

ipfs://22f079019a26560e33147206deb2e279071833daa5b7027f7bfae3876317c131

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.