ETH Price: $3,353.18 (+0.86%)
Gas: 9.62 Gwei

Contract

0x4570b4fAF71E23942B8B9F934b47ccEdF7540162
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw Balance210466092024-10-26 1:47:1128 days ago1729907231IN
MetaCartel: Treasury
0 ETH0.000503156.65517474
Withdraw Balance210465842024-10-26 1:41:5928 days ago1729906919IN
MetaCartel: Treasury
0 ETH0.000468247.18333764
Withdraw Balance210465762024-10-26 1:40:2328 days ago1729906823IN
MetaCartel: Treasury
0 ETH0.000465477.13933817
Withdraw Balance210329912024-10-24 4:12:4730 days ago1729743167IN
MetaCartel: Treasury
0 ETH0.0006785610.44760074
Withdraw Balance208704682024-10-01 11:52:3552 days ago1727783555IN
MetaCartel: Treasury
0 ETH0.001445122.24982581
Withdraw Balance208636162024-09-30 12:57:5953 days ago1727701079IN
MetaCartel: Treasury
0 ETH0.0009593314.71716405
Withdraw Balance208551222024-09-29 8:32:5955 days ago1727598779IN
MetaCartel: Treasury
0 ETH0.0006557210.09598596
Withdraw Balance208459542024-09-28 1:49:4756 days ago1727488187IN
MetaCartel: Treasury
0 ETH0.000580458.62196978
Withdraw Balance208459542024-09-28 1:49:4756 days ago1727488187IN
MetaCartel: Treasury
0 ETH0.000473248.62196978
Withdraw Balance208459542024-09-28 1:49:4756 days ago1727488187IN
MetaCartel: Treasury
0 ETH0.000562028.62196978
Withdraw Balance208459542024-09-28 1:49:4756 days ago1727488187IN
MetaCartel: Treasury
0 ETH0.000466476.16911876
Withdraw Balance208446582024-09-27 21:29:4756 days ago1727472587IN
MetaCartel: Treasury
0 ETH0.0007209111.09769019
Withdraw Balance208444132024-09-27 20:40:3556 days ago1727469635IN
MetaCartel: Treasury
0 ETH0.0007857112.09741871
Withdraw Balance208435732024-09-27 17:52:2356 days ago1727459543IN
MetaCartel: Treasury
0 ETH0.0007309511.25435087
Withdraw Balance208394772024-09-27 4:10:1157 days ago1727410211IN
MetaCartel: Treasury
0 ETH0.0011520217.73731135
Withdraw Balance208380872024-09-26 23:31:1157 days ago1727393471IN
MetaCartel: Treasury
0 ETH0.0013638320.99849845
Withdraw Balance192209222024-02-13 18:41:11283 days ago1707849671IN
MetaCartel: Treasury
0 ETH0.0015229431.83610635
Withdraw Balance185219062023-11-07 18:36:11381 days ago1699382171IN
MetaCartel: Treasury
0 ETH0.0019516540.78780047
Withdraw Balance177788012023-07-26 17:39:23485 days ago1690393163IN
MetaCartel: Treasury
0 ETH0.0017163835.87077945
Process Proposal177712642023-07-25 16:20:59486 days ago1690302059IN
MetaCartel: Treasury
0 ETH0.0071765540.20524396
Process Proposal177712612023-07-25 16:20:23486 days ago1690302023IN
MetaCartel: Treasury
0 ETH0.0080014139.92759946
Submit Vote176519122023-07-08 22:08:35503 days ago1688854115IN
MetaCartel: Treasury
0 ETH0.0023584219.28422565
Submit Vote176435282023-07-07 17:52:59504 days ago1688752379IN
MetaCartel: Treasury
0 ETH0.0040109432.79651166
Sponsor Proposal176430182023-07-07 16:09:23504 days ago1688746163IN
MetaCartel: Treasury
0 ETH0.0093126951.84807507
Sponsor Proposal176430152023-07-07 16:08:47504 days ago1688746127IN
MetaCartel: Treasury
0 ETH0.0086585344.01856496
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Moloch

Compiler Version
v0.5.12+commit.7709ece9

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-02-25
*/

// Sources flattened with buidler v1.1.2 https://buidler.dev

// File contracts/oz/SafeMath.sol

pragma solidity ^0.5.2;

library SafeMath {
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b);

        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {

        require(b > 0);
        uint256 c = a / b;

        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        uint256 c = a - b;

        return c;
    }

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a);

        return c;
    }
}


// File contracts/oz/IERC20.sol

pragma solidity ^0.5.2;

interface IERC20 {
    function transfer(address to, uint256 value) external returns (bool);

    function approve(address spender, uint256 value) external returns (bool);

    function transferFrom(address from, address to, uint256 value) external returns (bool);

    function totalSupply() external view returns (uint256);

    function balanceOf(address who) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(address indexed owner, address indexed spender, uint256 value);
}


// File contracts/oz/ReentrancyGuard.sol

pragma solidity ^0.5.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * _Since v2.5.0:_ this module is now much more gas efficient, given net gas
 * metering changes introduced in the Istanbul hardfork.
 */
contract ReentrancyGuard {
    bool private _notEntered;

    constructor () internal {
        // Storing an initial non-zero value makes deployment a bit more
        // expensive, but in exchange the refund on every call to nonReentrant
        // will be lower in amount. Since refunds are capped to a percetange of
        // the total transaction's gas, it is best to keep them low in cases
        // like this one, to increase the likelihood of the full refund coming
        // into effect.
        _notEntered = true;
    }

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

        // Any calls to nonReentrant after this point will fail
        _notEntered = false;

        _;

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


// File contracts/Moloch.sol

pragma solidity 0.5.12;




contract Moloch is ReentrancyGuard {
    using SafeMath for uint256;

    /***************
    GLOBAL CONSTANTS
    ***************/
    uint256 public periodDuration; // default = 17280 = 4.8 hours in seconds (5 periods per day)
    uint256 public votingPeriodLength; // default = 35 periods (7 days)
    uint256 public gracePeriodLength; // default = 35 periods (7 days)
    uint256 public proposalDeposit; // default = 10 ETH (~$1,000 worth of ETH at contract deployment)
    uint256 public dilutionBound; // default = 3 - maximum multiplier a YES voter will be obligated to pay in case of mass ragequit
    uint256 public processingReward; // default = 0.1 - amount of ETH to give to whoever processes a proposal
    uint256 public summoningTime; // needed to determine the current period

    address public depositToken; // deposit token contract reference; default = wETH

    // HARD-CODED LIMITS
    // These numbers are quite arbitrary; they are small enough to avoid overflows when doing calculations
    // with periods or shares, yet big enough to not limit reasonable use cases.
    uint256 constant MAX_VOTING_PERIOD_LENGTH = 10**18; // maximum length of voting period
    uint256 constant MAX_GRACE_PERIOD_LENGTH = 10**18; // maximum length of grace period
    uint256 constant MAX_DILUTION_BOUND = 10**18; // maximum dilution bound
    uint256 constant MAX_NUMBER_OF_SHARES_AND_LOOT = 10**18; // maximum number of shares that can be minted
    uint256 constant MAX_TOKEN_WHITELIST_COUNT = 400; // maximum number of whitelisted tokens
    uint256 constant MAX_TOKEN_GUILDBANK_COUNT = 200; // maximum number of tokens with non-zero balance in guildbank

    // ***************
    // EVENTS
    // ***************
    event SummonComplete(address indexed summoner, address[] tokens, uint256 summoningTime, uint256 periodDuration, uint256 votingPeriodLength, uint256 gracePeriodLength, uint256 proposalDeposit, uint256 dilutionBound, uint256 processingReward);
    event SubmitProposal(address indexed applicant, uint256 sharesRequested, uint256 lootRequested, uint256 tributeOffered, address tributeToken, uint256 paymentRequested, address paymentToken, string details, bool[6] flags, uint256 proposalId, address indexed delegateKey, address indexed memberAddress);
    event SponsorProposal(address indexed delegateKey, address indexed memberAddress, uint256 proposalId, uint256 proposalIndex, uint256 startingPeriod);
    event SubmitVote(uint256 proposalId, uint256 indexed proposalIndex, address indexed delegateKey, address indexed memberAddress, uint8 uintVote);
    event ProcessProposal(uint256 indexed proposalIndex, uint256 indexed proposalId, bool didPass);
    event ProcessWhitelistProposal(uint256 indexed proposalIndex, uint256 indexed proposalId, bool didPass);
    event ProcessGuildKickProposal(uint256 indexed proposalIndex, uint256 indexed proposalId, bool didPass);
    event Ragequit(address indexed memberAddress, uint256 sharesToBurn, uint256 lootToBurn);
    event TokensCollected(address indexed token, uint256 amountToCollect);
    event CancelProposal(uint256 indexed proposalId, address applicantAddress);
    event UpdateDelegateKey(address indexed memberAddress, address newDelegateKey);
    event Withdraw(address indexed memberAddress, address token, uint256 amount);

    // *******************
    // INTERNAL ACCOUNTING
    // *******************
    uint256 public proposalCount = 0; // total proposals submitted
    uint256 public totalShares = 0; // total shares across all members
    uint256 public totalLoot = 0; // total loot across all members

    uint256 public totalGuildBankTokens = 0; // total tokens with non-zero balance in guild bank

    address public constant GUILD = address(0xdead);
    address public constant ESCROW = address(0xbeef);
    address public constant TOTAL = address(0xbabe);
    mapping (address => mapping(address => uint256)) public userTokenBalances; // userTokenBalances[userAddress][tokenAddress]

    enum Vote {
        Null, // default value, counted as abstention
        Yes,
        No
    }

    struct Member {
        address delegateKey; // the key responsible for submitting proposals and voting - defaults to member address unless updated
        uint256 shares; // the # of voting shares assigned to this member
        uint256 loot; // the loot amount available to this member (combined with shares on ragequit)
        bool exists; // always true once a member has been created
        uint256 highestIndexYesVote; // highest proposal index # on which the member voted YES
        uint256 jailed; // set to proposalIndex of a passing guild kick proposal for this member, prevents voting on and sponsoring proposals
    }

    struct Proposal {
        address applicant; // the applicant who wishes to become a member - this key will be used for withdrawals (doubles as guild kick target for gkick proposals)
        address proposer; // the account that submitted the proposal (can be non-member)
        address sponsor; // the member that sponsored the proposal (moving it into the queue)
        uint256 sharesRequested; // the # of shares the applicant is requesting
        uint256 lootRequested; // the amount of loot the applicant is requesting
        uint256 tributeOffered; // amount of tokens offered as tribute
        address tributeToken; // tribute token contract reference
        uint256 paymentRequested; // amount of tokens requested as payment
        address paymentToken; // payment token contract reference
        uint256 startingPeriod; // the period in which voting can start for this proposal
        uint256 yesVotes; // the total number of YES votes for this proposal
        uint256 noVotes; // the total number of NO votes for this proposal
        bool[6] flags; // [sponsored, processed, didPass, cancelled, whitelist, guildkick]
        string details; // proposal details - could be IPFS hash, plaintext, or JSON
        uint256 maxTotalSharesAndLootAtYesVote; // the maximum # of total shares encountered at a yes vote on this proposal
        mapping(address => Vote) votesByMember; // the votes on this proposal by each member
    }

    mapping(address => bool) public tokenWhitelist;
    address[] public approvedTokens;

    mapping(address => bool) public proposedToWhitelist;
    mapping(address => bool) public proposedToKick;

    mapping(address => Member) public members;
    mapping(address => address) public memberAddressByDelegateKey;

    mapping(uint256 => Proposal) public proposals;

    uint256[] public proposalQueue;

    modifier onlyMember {
        require(members[msg.sender].shares > 0 || members[msg.sender].loot > 0, "not a member");
        _;
    }

    modifier onlyShareholder {
        require(members[msg.sender].shares > 0, "not a shareholder");
        _;
    }

    modifier onlyDelegate {
        require(members[memberAddressByDelegateKey[msg.sender]].shares > 0, "not a delegate");
        _;
    }

    constructor(
        address _summoner,
        address[] memory _approvedTokens,
        uint256 _periodDuration,
        uint256 _votingPeriodLength,
        uint256 _gracePeriodLength,
        uint256 _proposalDeposit,
        uint256 _dilutionBound,
        uint256 _processingReward
    ) public {
        require(_summoner != address(0), "summoner cannot be 0");
        require(_periodDuration > 0, "_periodDuration cannot be 0");
        require(_votingPeriodLength > 0, "_votingPeriodLength cannot be 0");
        require(_votingPeriodLength <= MAX_VOTING_PERIOD_LENGTH, "_votingPeriodLength exceeds limit");
        require(_gracePeriodLength <= MAX_GRACE_PERIOD_LENGTH, "_gracePeriodLength exceeds limit");
        require(_dilutionBound > 0, "_dilutionBound cannot be 0");
        require(_dilutionBound <= MAX_DILUTION_BOUND, "_dilutionBound exceeds limit");
        require(_approvedTokens.length > 0, "need at least one approved token");
        require(_approvedTokens.length <= MAX_TOKEN_WHITELIST_COUNT, "too many tokens");
        require(_proposalDeposit >= _processingReward, "_proposalDeposit cannot be smaller than _processingReward");
        
        depositToken = _approvedTokens[0];
        // NOTE: move event up here, avoid stack too deep if too many approved tokens
        emit SummonComplete(_summoner, _approvedTokens, now, _periodDuration, _votingPeriodLength, _gracePeriodLength, _proposalDeposit, _dilutionBound, _processingReward);


        for (uint256 i = 0; i < _approvedTokens.length; i++) {
            require(_approvedTokens[i] != address(0), "_approvedToken cannot be 0");
            require(!tokenWhitelist[_approvedTokens[i]], "duplicate approved token");
            tokenWhitelist[_approvedTokens[i]] = true;
            approvedTokens.push(_approvedTokens[i]);
        }

        periodDuration = _periodDuration;
        votingPeriodLength = _votingPeriodLength;
        gracePeriodLength = _gracePeriodLength;
        proposalDeposit = _proposalDeposit;
        dilutionBound = _dilutionBound;
        processingReward = _processingReward;

        summoningTime = now;

        members[_summoner] = Member(_summoner, 1, 0, true, 0, 0);
        memberAddressByDelegateKey[_summoner] = _summoner;
        totalShares = 1;
       
    }

    /*****************
    PROPOSAL FUNCTIONS
    *****************/
    function submitProposal(
        address applicant,
        uint256 sharesRequested,
        uint256 lootRequested,
        uint256 tributeOffered,
        address tributeToken,
        uint256 paymentRequested,
        address paymentToken,
        string memory details
    ) public nonReentrant returns (uint256 proposalId) {
        require(sharesRequested.add(lootRequested) <= MAX_NUMBER_OF_SHARES_AND_LOOT, "too many shares requested");
        require(tokenWhitelist[tributeToken], "tributeToken is not whitelisted");
        require(tokenWhitelist[paymentToken], "payment is not whitelisted");
        require(applicant != address(0), "applicant cannot be 0");
        require(applicant != GUILD && applicant != ESCROW && applicant != TOTAL, "applicant address cannot be reserved");
        require(members[applicant].jailed == 0, "proposal applicant must not be jailed");

        if (tributeOffered > 0 && userTokenBalances[GUILD][tributeToken] == 0) {
            require(totalGuildBankTokens < MAX_TOKEN_GUILDBANK_COUNT, 'cannot submit more tribute proposals for new tokens - guildbank is full');
        }

        // collect tribute from proposer and store it in the Moloch until the proposal is processed
        require(IERC20(tributeToken).transferFrom(msg.sender, address(this), tributeOffered), "tribute token transfer failed");
        unsafeAddToBalance(ESCROW, tributeToken, tributeOffered);

        bool[6] memory flags; // [sponsored, processed, didPass, cancelled, whitelist, guildkick]

        _submitProposal(applicant, sharesRequested, lootRequested, tributeOffered, tributeToken, paymentRequested, paymentToken, details, flags);
        return proposalCount - 1; // return proposalId - contracts calling submit might want it
    }

    function submitWhitelistProposal(address tokenToWhitelist, string memory details) public nonReentrant returns (uint256 proposalId) {
        require(tokenToWhitelist != address(0), "must provide token address");
        require(!tokenWhitelist[tokenToWhitelist], "cannot already have whitelisted the token");
        require(approvedTokens.length < MAX_TOKEN_WHITELIST_COUNT, "cannot submit more whitelist proposals");

        bool[6] memory flags; // [sponsored, processed, didPass, cancelled, whitelist, guildkick]
        flags[4] = true; // whitelist

        _submitProposal(address(0), 0, 0, 0, tokenToWhitelist, 0, address(0), details, flags);
        return proposalCount - 1;
    }

    function submitGuildKickProposal(address memberToKick, string memory details) public nonReentrant returns (uint256 proposalId) {
        Member memory member = members[memberToKick];

        require(member.shares > 0 || member.loot > 0, "member must have at least one share or one loot");
        require(members[memberToKick].jailed == 0, "member must not already be jailed");

        bool[6] memory flags; // [sponsored, processed, didPass, cancelled, whitelist, guildkick]
        flags[5] = true; // guild kick

        _submitProposal(memberToKick, 0, 0, 0, address(0), 0, address(0), details, flags);
        return proposalCount - 1;
    }

    function _submitProposal(
        address applicant,
        uint256 sharesRequested,
        uint256 lootRequested,
        uint256 tributeOffered,
        address tributeToken,
        uint256 paymentRequested,
        address paymentToken,
        string memory details,
        bool[6] memory flags
    ) internal {
        Proposal memory proposal = Proposal({
            applicant : applicant,
            proposer : msg.sender,
            sponsor : address(0),
            sharesRequested : sharesRequested,
            lootRequested : lootRequested,
            tributeOffered : tributeOffered,
            tributeToken : tributeToken,
            paymentRequested : paymentRequested,
            paymentToken : paymentToken,
            startingPeriod : 0,
            yesVotes : 0,
            noVotes : 0,
            flags : flags,
            details : details,
            maxTotalSharesAndLootAtYesVote : 0
        });

        proposals[proposalCount] = proposal;
        address memberAddress = memberAddressByDelegateKey[msg.sender];
        // NOTE: argument order matters, avoid stack too deep
        emit SubmitProposal(applicant, sharesRequested, lootRequested, tributeOffered, tributeToken, paymentRequested, paymentToken, details, flags, proposalCount, msg.sender, memberAddress);
        proposalCount += 1;
    }

    function sponsorProposal(uint256 proposalId) public nonReentrant onlyDelegate {
        // collect proposal deposit from sponsor and store it in the Moloch until the proposal is processed
        require(IERC20(depositToken).transferFrom(msg.sender, address(this), proposalDeposit), "proposal deposit token transfer failed");
        unsafeAddToBalance(ESCROW, depositToken, proposalDeposit);

        Proposal storage proposal = proposals[proposalId];

        require(proposal.proposer != address(0), 'proposal must have been proposed');
        require(!proposal.flags[0], "proposal has already been sponsored");
        require(!proposal.flags[3], "proposal has been cancelled");
        require(members[proposal.applicant].jailed == 0, "proposal applicant must not be jailed");

        if (proposal.tributeOffered > 0 && userTokenBalances[GUILD][proposal.tributeToken] == 0) {
            require(totalGuildBankTokens < MAX_TOKEN_GUILDBANK_COUNT, 'cannot sponsor more tribute proposals for new tokens - guildbank is full');
        }

        // whitelist proposal
        if (proposal.flags[4]) {
            require(!tokenWhitelist[address(proposal.tributeToken)], "cannot already have whitelisted the token");
            require(!proposedToWhitelist[address(proposal.tributeToken)], 'already proposed to whitelist');
            require(approvedTokens.length < MAX_TOKEN_WHITELIST_COUNT, "cannot sponsor more whitelist proposals");
            proposedToWhitelist[address(proposal.tributeToken)] = true;

        // guild kick proposal
        } else if (proposal.flags[5]) {
            require(!proposedToKick[proposal.applicant], 'already proposed to kick');
            proposedToKick[proposal.applicant] = true;
        }

        // compute startingPeriod for proposal
        uint256 startingPeriod = max(
            getCurrentPeriod(),
            proposalQueue.length == 0 ? 0 : proposals[proposalQueue[proposalQueue.length.sub(1)]].startingPeriod
        ).add(1);

        proposal.startingPeriod = startingPeriod;

        address memberAddress = memberAddressByDelegateKey[msg.sender];
        proposal.sponsor = memberAddress;

        proposal.flags[0] = true; // sponsored

        // append proposal to the queue
        proposalQueue.push(proposalId);
        
        emit SponsorProposal(msg.sender, memberAddress, proposalId, proposalQueue.length.sub(1), startingPeriod);
    }

    // NOTE: In MolochV2 proposalIndex !== proposalId
    function submitVote(uint256 proposalIndex, uint8 uintVote) public nonReentrant onlyDelegate {
        address memberAddress = memberAddressByDelegateKey[msg.sender];
        Member storage member = members[memberAddress];

        require(proposalIndex < proposalQueue.length, "proposal does not exist");
        Proposal storage proposal = proposals[proposalQueue[proposalIndex]];

        require(uintVote < 3, "must be less than 3");
        Vote vote = Vote(uintVote);

        require(getCurrentPeriod() >= proposal.startingPeriod, "voting period has not started");
        require(!hasVotingPeriodExpired(proposal.startingPeriod), "proposal voting period has expired");
        require(proposal.votesByMember[memberAddress] == Vote.Null, "member has already voted");
        require(vote == Vote.Yes || vote == Vote.No, "vote must be either Yes or No");

        proposal.votesByMember[memberAddress] = vote;

        if (vote == Vote.Yes) {
            proposal.yesVotes = proposal.yesVotes.add(member.shares);

            // set highest index (latest) yes vote - must be processed for member to ragequit
            if (proposalIndex > member.highestIndexYesVote) {
                member.highestIndexYesVote = proposalIndex;
            }

            // set maximum of total shares encountered at a yes vote - used to bound dilution for yes voters
            if (totalShares.add(totalLoot) > proposal.maxTotalSharesAndLootAtYesVote) {
                proposal.maxTotalSharesAndLootAtYesVote = totalShares.add(totalLoot);
            }

        } else if (vote == Vote.No) {
            proposal.noVotes = proposal.noVotes.add(member.shares);
        }
     
        // NOTE: subgraph indexes by proposalId not proposalIndex since proposalIndex isn't set untill it's been sponsored but proposal is created on submission
        emit SubmitVote(proposalQueue[proposalIndex], proposalIndex, msg.sender, memberAddress, uintVote);
    }

    function processProposal(uint256 proposalIndex) public nonReentrant {
        _validateProposalForProcessing(proposalIndex);

        uint256 proposalId = proposalQueue[proposalIndex];
        Proposal storage proposal = proposals[proposalId];

        require(!proposal.flags[4] && !proposal.flags[5], "must be a standard proposal");

        proposal.flags[1] = true; // processed

        bool didPass = _didPass(proposalIndex);

        // Make the proposal fail if the new total number of shares and loot exceeds the limit
        if (totalShares.add(totalLoot).add(proposal.sharesRequested).add(proposal.lootRequested) > MAX_NUMBER_OF_SHARES_AND_LOOT) {
            didPass = false;
        }

        // Make the proposal fail if it is requesting more tokens as payment than the available guild bank balance
        if (proposal.paymentRequested > userTokenBalances[GUILD][proposal.paymentToken]) {
            didPass = false;
        }

        // Make the proposal fail if it would result in too many tokens with non-zero balance in guild bank
        if (proposal.tributeOffered > 0 && userTokenBalances[GUILD][proposal.tributeToken] == 0 && totalGuildBankTokens >= MAX_TOKEN_GUILDBANK_COUNT) {
           didPass = false;
        }

        // PROPOSAL PASSED
        if (didPass) {
            proposal.flags[2] = true; // didPass

            // if the applicant is already a member, add to their existing shares & loot
            if (members[proposal.applicant].exists) {
                members[proposal.applicant].shares = members[proposal.applicant].shares.add(proposal.sharesRequested);
                members[proposal.applicant].loot = members[proposal.applicant].loot.add(proposal.lootRequested);

            // the applicant is a new member, create a new record for them
            } else {
                // if the applicant address is already taken by a member's delegateKey, reset it to their member address
                if (members[memberAddressByDelegateKey[proposal.applicant]].exists) {
                    address memberToOverride = memberAddressByDelegateKey[proposal.applicant];
                    memberAddressByDelegateKey[memberToOverride] = memberToOverride;
                    members[memberToOverride].delegateKey = memberToOverride;
                }

                // use applicant address as delegateKey by default
                members[proposal.applicant] = Member(proposal.applicant, proposal.sharesRequested, proposal.lootRequested, true, 0, 0);
                memberAddressByDelegateKey[proposal.applicant] = proposal.applicant;
            }

            // mint new shares & loot
            totalShares = totalShares.add(proposal.sharesRequested);
            totalLoot = totalLoot.add(proposal.lootRequested);

            // if the proposal tribute is the first tokens of its kind to make it into the guild bank, increment total guild bank tokens
            if (userTokenBalances[GUILD][proposal.tributeToken] == 0 && proposal.tributeOffered > 0) {
                totalGuildBankTokens += 1;
            }

            unsafeInternalTransfer(ESCROW, GUILD, proposal.tributeToken, proposal.tributeOffered);
            unsafeInternalTransfer(GUILD, proposal.applicant, proposal.paymentToken, proposal.paymentRequested);

            // if the proposal spends 100% of guild bank balance for a token, decrement total guild bank tokens
            if (userTokenBalances[GUILD][proposal.paymentToken] == 0 && proposal.paymentRequested > 0) {
                totalGuildBankTokens -= 1;
            }

        // PROPOSAL FAILED
        } else {
            // return all tokens to the proposer (not the applicant, because funds come from proposer)
            unsafeInternalTransfer(ESCROW, proposal.proposer, proposal.tributeToken, proposal.tributeOffered);
        }

        _returnDeposit(proposal.sponsor);

        emit ProcessProposal(proposalIndex, proposalId, didPass);
    }

    function processWhitelistProposal(uint256 proposalIndex) public nonReentrant {
        _validateProposalForProcessing(proposalIndex);

        uint256 proposalId = proposalQueue[proposalIndex];
        Proposal storage proposal = proposals[proposalId];

        require(proposal.flags[4], "must be a whitelist proposal");

        proposal.flags[1] = true; // processed

        bool didPass = _didPass(proposalIndex);

        if (approvedTokens.length >= MAX_TOKEN_WHITELIST_COUNT) {
            didPass = false;
        }

        if (didPass) {
            proposal.flags[2] = true; // didPass

            tokenWhitelist[address(proposal.tributeToken)] = true;
            approvedTokens.push(proposal.tributeToken);
        }

        proposedToWhitelist[address(proposal.tributeToken)] = false;

        _returnDeposit(proposal.sponsor);

        emit ProcessWhitelistProposal(proposalIndex, proposalId, didPass);
    }

    function processGuildKickProposal(uint256 proposalIndex) public nonReentrant {
        _validateProposalForProcessing(proposalIndex);

        uint256 proposalId = proposalQueue[proposalIndex];
        Proposal storage proposal = proposals[proposalId];

        require(proposal.flags[5], "must be a guild kick proposal");

        proposal.flags[1] = true; // processed

        bool didPass = _didPass(proposalIndex);

        if (didPass) {
            proposal.flags[2] = true; // didPass
            Member storage member = members[proposal.applicant];
            member.jailed = proposalIndex;

            // transfer shares to loot
            member.loot = member.loot.add(member.shares);
            totalShares = totalShares.sub(member.shares);
            totalLoot = totalLoot.add(member.shares);
            member.shares = 0; // revoke all shares
        }

        proposedToKick[proposal.applicant] = false;

        _returnDeposit(proposal.sponsor);

        emit ProcessGuildKickProposal(proposalIndex, proposalId, didPass);
    }

    function _didPass(uint256 proposalIndex) internal returns (bool didPass) {
        Proposal memory proposal = proposals[proposalQueue[proposalIndex]];

        didPass = proposal.yesVotes > proposal.noVotes;

        // Make the proposal fail if the dilutionBound is exceeded
        if ((totalShares.add(totalLoot)).mul(dilutionBound) < proposal.maxTotalSharesAndLootAtYesVote) {
            didPass = false;
        }

        // Make the proposal fail if the applicant is jailed
        // - for standard proposals, we don't want the applicant to get any shares/loot/payment
        // - for guild kick proposals, we should never be able to propose to kick a jailed member (or have two kick proposals active), so it doesn't matter
        if (members[proposal.applicant].jailed != 0) {
            didPass = false;
        }

        return didPass;
    }

    function _validateProposalForProcessing(uint256 proposalIndex) internal view {
        require(proposalIndex < proposalQueue.length, "proposal does not exist");
        Proposal memory proposal = proposals[proposalQueue[proposalIndex]];

        require(getCurrentPeriod() >= proposal.startingPeriod.add(votingPeriodLength).add(gracePeriodLength), "proposal is not ready to be processed");
        require(proposal.flags[1] == false, "proposal has already been processed");
        require(proposalIndex == 0 || proposals[proposalQueue[proposalIndex.sub(1)]].flags[1], "previous proposal must be processed");
    }

    function _returnDeposit(address sponsor) internal {
        unsafeInternalTransfer(ESCROW, msg.sender, depositToken, processingReward);
        unsafeInternalTransfer(ESCROW, sponsor, depositToken, proposalDeposit.sub(processingReward));
    }

    function ragequit(uint256 sharesToBurn, uint256 lootToBurn) public nonReentrant onlyMember {
        _ragequit(msg.sender, sharesToBurn, lootToBurn);
    }

    function _ragequit(address memberAddress, uint256 sharesToBurn, uint256 lootToBurn) internal {
        uint256 initialTotalSharesAndLoot = totalShares.add(totalLoot);

        Member storage member = members[memberAddress];

        require(member.shares >= sharesToBurn, "insufficient shares");
        require(member.loot >= lootToBurn, "insufficient loot");

        require(canRagequit(member.highestIndexYesVote), "cannot ragequit until highest index proposal member voted YES on is processed");

        uint256 sharesAndLootToBurn = sharesToBurn.add(lootToBurn);

        // burn shares and loot
        member.shares = member.shares.sub(sharesToBurn);
        member.loot = member.loot.sub(lootToBurn);
        totalShares = totalShares.sub(sharesToBurn);
        totalLoot = totalLoot.sub(lootToBurn);

        for (uint256 i = 0; i < approvedTokens.length; i++) {
            uint256 amountToRagequit = fairShare(userTokenBalances[GUILD][approvedTokens[i]], sharesAndLootToBurn, initialTotalSharesAndLoot);
            if (amountToRagequit > 0) { // gas optimization to allow a higher maximum token limit
                // deliberately not using safemath here to keep overflows from preventing the function execution (which would break ragekicks)
                // if a token overflows, it is because the supply was artificially inflated to oblivion, so we probably don't care about it anyways
                userTokenBalances[GUILD][approvedTokens[i]] -= amountToRagequit;
                userTokenBalances[memberAddress][approvedTokens[i]] += amountToRagequit;
            }
        }

        emit Ragequit(msg.sender, sharesToBurn, lootToBurn);
    }

    function ragekick(address memberToKick) public nonReentrant {
        Member storage member = members[memberToKick];

        require(member.jailed != 0, "member must be in jail");
        require(member.loot > 0, "member must have some loot"); // note - should be impossible for jailed member to have shares
        require(canRagequit(member.highestIndexYesVote), "cannot ragequit until highest index proposal member voted YES on is processed");

        _ragequit(memberToKick, 0, member.loot);
    }

    function withdrawBalance(address token, uint256 amount) public nonReentrant {
        _withdrawBalance(token, amount);
    }

    function withdrawBalances(address[] memory tokens, uint256[] memory amounts, bool max) public nonReentrant {
        require(tokens.length == amounts.length, "tokens and amounts arrays must be matching lengths");

        for (uint256 i=0; i < tokens.length; i++) {
            uint256 withdrawAmount = amounts[i];
            if (max) { // withdraw the maximum balance
                withdrawAmount = userTokenBalances[msg.sender][tokens[i]];
            }

            _withdrawBalance(tokens[i], withdrawAmount);
        }
    }
    
    function _withdrawBalance(address token, uint256 amount) internal {
        require(userTokenBalances[msg.sender][token] >= amount, "insufficient balance");
        unsafeSubtractFromBalance(msg.sender, token, amount);
        require(IERC20(token).transfer(msg.sender, amount), "transfer failed");
        emit Withdraw(msg.sender, token, amount);
    }

    function collectTokens(address token) public onlyDelegate nonReentrant {
        uint256 amountToCollect = IERC20(token).balanceOf(address(this)).sub(userTokenBalances[TOTAL][token]);
        // only collect if 1) there are tokens to collect 2) token is whitelisted 3) token has non-zero balance
        require(amountToCollect > 0, 'no tokens to collect');
        require(tokenWhitelist[token], 'token to collect must be whitelisted');
        require(userTokenBalances[GUILD][token] > 0, 'token to collect must have non-zero guild bank balance');
        
        unsafeAddToBalance(GUILD, token, amountToCollect);
        emit TokensCollected(token, amountToCollect);
    }

    // NOTE: requires that delegate key which sent the original proposal cancels, msg.sender == proposal.proposer
    function cancelProposal(uint256 proposalId) public nonReentrant {
        Proposal storage proposal = proposals[proposalId];
        require(!proposal.flags[0], "proposal has already been sponsored");
        require(!proposal.flags[3], "proposal has already been cancelled");
        require(msg.sender == proposal.proposer, "solely the proposer can cancel");

        proposal.flags[3] = true; // cancelled
        
        unsafeInternalTransfer(ESCROW, proposal.proposer, proposal.tributeToken, proposal.tributeOffered);
        emit CancelProposal(proposalId, msg.sender);
    }

    function updateDelegateKey(address newDelegateKey) public nonReentrant onlyShareholder {
        require(newDelegateKey != address(0), "newDelegateKey cannot be 0");

        // skip checks if member is setting the delegate key to their member address
        if (newDelegateKey != msg.sender) {
            require(!members[newDelegateKey].exists, "cannot overwrite existing members");
            require(!members[memberAddressByDelegateKey[newDelegateKey]].exists, "cannot overwrite existing delegate keys");
        }

        Member storage member = members[msg.sender];
        memberAddressByDelegateKey[member.delegateKey] = address(0);
        memberAddressByDelegateKey[newDelegateKey] = msg.sender;
        member.delegateKey = newDelegateKey;

        emit UpdateDelegateKey(msg.sender, newDelegateKey);
    }

    // can only ragequit if the latest proposal you voted YES on has been processed
    function canRagequit(uint256 highestIndexYesVote) public view returns (bool) {
        require(highestIndexYesVote < proposalQueue.length, "proposal does not exist");
        return proposals[proposalQueue[highestIndexYesVote]].flags[1];
    }

    function hasVotingPeriodExpired(uint256 startingPeriod) public view returns (bool) {
        return getCurrentPeriod() >= startingPeriod.add(votingPeriodLength);
    }

    /***************
    GETTER FUNCTIONS
    ***************/

    function max(uint256 x, uint256 y) internal pure returns (uint256) {
        return x >= y ? x : y;
    }

    function getCurrentPeriod() public view returns (uint256) {
        return now.sub(summoningTime).div(periodDuration);
    }

    function getProposalQueueLength() public view returns (uint256) {
        return proposalQueue.length;
    }

    function getProposalFlags(uint256 proposalId) public view returns (bool[6] memory) {
        return proposals[proposalId].flags;
    }

    function getUserTokenBalance(address user, address token) public view returns (uint256) {
        return userTokenBalances[user][token];
    }

    function getMemberProposalVote(address memberAddress, uint256 proposalIndex) public view returns (Vote) {
        require(members[memberAddress].exists, "member does not exist");
        require(proposalIndex < proposalQueue.length, "proposal does not exist");
        return proposals[proposalQueue[proposalIndex]].votesByMember[memberAddress];
    }

    function getTokenCount() public view returns (uint256) {
        return approvedTokens.length;
    }

    /***************
    HELPER FUNCTIONS
    ***************/
    function unsafeAddToBalance(address user, address token, uint256 amount) internal {
        userTokenBalances[user][token] += amount;
        userTokenBalances[TOTAL][token] += amount;
    }

    function unsafeSubtractFromBalance(address user, address token, uint256 amount) internal {
        userTokenBalances[user][token] -= amount;
        userTokenBalances[TOTAL][token] -= amount;
    }

    function unsafeInternalTransfer(address from, address to, address token, uint256 amount) internal {
        unsafeSubtractFromBalance(from, token, amount);
        unsafeAddToBalance(to, token, amount);
    }

    function fairShare(uint256 balance, uint256 shares, uint256 totalShares) internal pure returns (uint256) {
        require(totalShares != 0);

        if (balance == 0) { return 0; }

        uint256 prod = balance * shares;

        if (prod / balance == shares) { // no overflow in multiplication above?
            return prod / totalShares;
        }

        return (balance / totalShares) * shares;
    }
}


// File contracts/MolochSummoner.sol

pragma solidity 0.5.12;


contract MolochSummoner {

    Moloch private M;

    address[] public Molochs;

    event Summoned(address indexed M, address indexed _summoner);

    function summonMoloch(
        address _summoner,
        address[] memory _approvedTokens,
        uint256 _periodDuration,
        uint256 _votingPeriodLength,
        uint256 _gracePeriodLength,
        uint256 _proposalDeposit,
        uint256 _dilutionBound,
        uint256 _processingReward) public {

        M = new Moloch(
            _summoner,
            _approvedTokens,
            _periodDuration,
            _votingPeriodLength,
            _gracePeriodLength,
            _proposalDeposit,
            _dilutionBound,
            _processingReward);

        Molochs.push(address(M));

        emit Summoned(address(M), _summoner);

    }

    function getMolochCount() public view returns (uint256 MolochCount) {
        return Molochs.length;
    }
}


// File contracts/oz/ERC20.sol

pragma solidity ^0.5.2;



/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard token.
 * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
 * Originally based on code by FirstBlood:
 * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
 *
 * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for
 * all accounts just by listening to said events. Note that this isn't required by the specification, and other
 * compliant implementations may not do it.
 */
contract ERC20 is IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowed;

    uint256 private _totalSupply;

    /**
     * @dev Total number of tokens in existence
     */
    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev Gets the balance of the specified address.
     * @param owner The address to query the balance of.
     * @return An uint256 representing the amount owned by the passed address.
     */
    function balanceOf(address owner) public view returns (uint256) {
        return _balances[owner];
    }

    /**
     * @dev Function to check the amount of tokens that an owner allowed to a spender.
     * @param owner address The address which owns the funds.
     * @param spender address The address which will spend the funds.
     * @return A uint256 specifying the amount of tokens still available for the spender.
     */
    function allowance(address owner, address spender) public view returns (uint256) {
        return _allowed[owner][spender];
    }

    /**
     * @dev Transfer token for a specified address
     * @param to The address to transfer to.
     * @param value The amount to be transferred.
     */
    function transfer(address to, uint256 value) public returns (bool) {
        _transfer(msg.sender, to, value);
        return true;
    }

    /**
     * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
     * Beware that changing an allowance with this method brings the risk that someone may use both the old
     * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
     * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     */
    function approve(address spender, uint256 value) public returns (bool) {
        _approve(msg.sender, spender, value);
        return true;
    }

    /**
     * @dev Transfer tokens from one address to another.
     * Note that while this function emits an Approval event, this is not required as per the specification,
     * and other compliant implementations may not emit the event.
     * @param from address The address which you want to send tokens from
     * @param to address The address which you want to transfer to
     * @param value uint256 the amount of tokens to be transferred
     */
    function transferFrom(address from, address to, uint256 value) public returns (bool) {
        _transfer(from, to, value);
        _approve(from, msg.sender, _allowed[from][msg.sender].sub(value));
        return true;
    }

    /**
     * @dev Increase the amount of tokens that an owner allowed to a spender.
     * approve should be called when allowed_[_spender] == 0. To increment
     * allowed value is better to use this function to avoid 2 calls (and wait until
     * the first transaction is mined)
     * From MonolithDAO Token.sol
     * Emits an Approval event.
     * @param spender The address which will spend the funds.
     * @param addedValue The amount of tokens to increase the allowance by.
     */
    function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
        _approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Decrease the amount of tokens that an owner allowed to a spender.
     * approve should be called when allowed_[_spender] == 0. To decrement
     * allowed value is better to use this function to avoid 2 calls (and wait until
     * the first transaction is mined)
     * From MonolithDAO Token.sol
     * Emits an Approval event.
     * @param spender The address which will spend the funds.
     * @param subtractedValue The amount of tokens to decrease the allowance by.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
        _approve(msg.sender, spender, _allowed[msg.sender][spender].sub(subtractedValue));
        return true;
    }

    /**
     * @dev Transfer token for a specified addresses
     * @param from The address to transfer from.
     * @param to The address to transfer to.
     * @param value The amount to be transferred.
     */
    function _transfer(address from, address to, uint256 value) internal {
        require(to != address(0));

        _balances[from] = _balances[from].sub(value);
        _balances[to] = _balances[to].add(value);
        emit Transfer(from, to, value);
    }

    /**
     * @dev Internal function that mints an amount of the token and assigns it to
     * an account. This encapsulates the modification of balances such that the
     * proper events are emitted.
     * @param account The account that will receive the created tokens.
     * @param value The amount that will be created.
     */
    function _mint(address account, uint256 value) internal {
        require(account != address(0));

        _totalSupply = _totalSupply.add(value);
        _balances[account] = _balances[account].add(value);
        emit Transfer(address(0), account, value);
    }

    /**
     * @dev Internal function that burns an amount of the token of a given
     * account.
     * @param account The account whose tokens will be burnt.
     * @param value The amount that will be burnt.
     */
    function _burn(address account, uint256 value) internal {
        require(account != address(0));

        _totalSupply = _totalSupply.sub(value);
        _balances[account] = _balances[account].sub(value);
        emit Transfer(account, address(0), value);
    }

    /**
     * @dev Approve an address to spend another addresses' tokens.
     * @param owner The address that owns the tokens.
     * @param spender The address that will spend the tokens.
     * @param value The number of tokens that can be spent.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        require(spender != address(0));
        require(owner != address(0));

        _allowed[owner][spender] = value;
        emit Approval(owner, spender, value);
    }

    /**
     * @dev Internal function that burns an amount of the token of a given
     * account, deducting from the sender's allowance for said account. Uses the
     * internal burn function.
     * Emits an Approval event (reflecting the reduced allowance).
     * @param account The account whose tokens will be burnt.
     * @param value The amount that will be burnt.
     */
    function _burnFrom(address account, uint256 value) internal {
        _burn(account, value);
        _approve(account, msg.sender, _allowed[account][msg.sender].sub(value));
    }
}


// File contracts/test-helpers/Submitter.sol

// helper for testing moloch.submitProposal return value

pragma solidity 0.5.12;


contract Submitter {

  event Submit(uint256 proposalId);

  Moloch public moloch; // moloch contract reference

  constructor(address molochAddress) public {
    moloch = Moloch(molochAddress);
  }

  function submitProposal(
    address applicant,
    uint256 sharesRequested,
    uint256 lootRequested,
    uint256 tributeOffered,
    address tributeToken,
    uint256 paymentRequested,
    address paymentToken,
    string memory details
  ) public {
    uint256 proposalId = moloch.submitProposal(
      applicant,
      sharesRequested,
      lootRequested,
      tributeOffered,
      tributeToken,
      paymentRequested,
      paymentToken,
      details
    );

    emit Submit(proposalId);
  }

  function submitWhitelistProposal(
    address tokenToWhitelist,
    string memory details
  ) public {
    uint256 proposalId = moloch.submitWhitelistProposal(
      tokenToWhitelist,
      details
    );

    emit Submit(proposalId);
  }

  function submitGuildKickProposal(
    address memberToKick,
    string memory details
  ) public {
    uint256 proposalId = moloch.submitGuildKickProposal(
      memberToKick,
      details
    );

    emit Submit(proposalId);
  }
}


// File contracts/tokens/ClaimsToken.sol

pragma solidity ^0.5.2;




/**
 * @dev Optional functions from the ERC20 standard.
 */
contract ERC20Detailed is IERC20 {
    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
     * these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name, string memory symbol, uint8 decimals) public {
        _name = name;
        _symbol = symbol;
        _decimals = decimals;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }
}

interface IClaimsToken {

	/**
	 * @dev This event emits when funds to be deposited are sent to the token contract
	 * @param from contains the address of the sender of the received funds
	 * @param fundsReceived contains the amount of funds received for distribution
	 */
	event FundsReceived(address indexed from, uint256 fundsReceived);

	/**
	 * @dev This event emits when distributed funds are withdrawn by a token holder.
	 * @param by contains the address of the receiver of funds
	 * @param fundsWithdrawn contains the amount of funds that were withdrawn
	 */
	event FundsWithdrawn(address indexed by, uint256 fundsWithdrawn);

	/**
	 * @dev Withdraws available funds for user.
	 */
	function withdrawFunds() external payable;

	/**
	 * @dev Returns the amount of funds a given address is able to withdraw currently.
	 * @param _forAddress Address of ClaimsToken holder
	 * @return A uint256 representing the available funds for a given account
	 */
	function availableFunds(address _forAddress) external view returns (uint256);

	/**
	 * @dev Get cumulative funds received by ClaimsToken.
	 * @return A uint256 representing the total funds received by ClaimsToken
	 */
	function totalReceivedFunds() external view returns (uint256);
}

contract ClaimsToken is IClaimsToken, ERC20, ERC20Detailed {

	using SafeMath for uint256;

	// cumulative funds received by this contract
	uint256 public receivedFunds;
	// cumulative funds received which were already processed for distribution - by user
	mapping (address => uint256) public processedFunds;
	// claimed but not yet withdrawn funds for a user
	mapping (address => uint256) public claimedFunds;


	constructor(address _owner)
		public
		ERC20Detailed("ClaimsToken", "CST", 18)
	{
		_mint(_owner, 10000 * (10 ** uint256(18)));

		receivedFunds = 0;
	}

	/**
	 * @dev Transfer token to a specified address.
	 * Claims funds for both parties, whereby the amount of tokens withdrawn
	 * is inherited by the new token owner.
	 * @param _to The address to transfer to
	 * @param _value The amount to be transferred
	 */
	function transfer(address _to, uint256 _value)
		public
		returns (bool)
	{
		_claimFunds(msg.sender);
		_claimFunds(_to);

		return super.transfer(_to, _value);
	}


	/**
	 * @dev Transfer tokens from one address to another.
	 * Claims funds for both parties, whereby the amount of tokens withdrawn
	 * is inherited by the new token owner.
	 * @param _from address The address which you want to send tokens from
	 * @param _to address The address which you want to transfer to
	 * @param _value uint256 the amount of tokens to be transferred
	 */
	function transferFrom(address _from, address _to, uint256 _value)
		public
		returns (bool)
	{
		_claimFunds(_from);
		_claimFunds(_to);

		return super.transferFrom(_from, _to, _value);
	}

	/**
	 * @dev Get cumulative funds received by ClaimsToken.
	 * @return A uint256 representing the total funds received by ClaimsToken
	 */
	function totalReceivedFunds()
		external
		view
		returns (uint256)
	{
		return receivedFunds;
	}

	/**
	 * @dev Returns the amount of funds a given address is able to withdraw currently.
	 * @param _forAddress Address of ClaimsToken holder
	 * @return A uint256 representing the available funds for a given account
	 */
	function availableFunds(address _forAddress)
		public
		view
		returns (uint256)
	{
		return _calcUnprocessedFunds(_forAddress).add(claimedFunds[_forAddress]);
	}

	/**
	 * @dev Increments cumulative received funds by new received funds.
	 * Called when ClaimsToken receives funds.
	 * @param _value Amount of tokens / Ether received
	 */
	function _registerFunds(uint256 _value)
		internal
	{
		receivedFunds = receivedFunds.add(_value);
	}

	/**
	 * @dev Returns payout for a user which can be withdrawn or claimed.
	 * @param _forAddress Address of ClaimsToken holder
	 */
	function _calcUnprocessedFunds(address _forAddress)
		internal
		view
		returns (uint256)
	{
		uint256 newReceivedFunds = receivedFunds.sub(processedFunds[_forAddress]);
		return balanceOf(_forAddress).mul(newReceivedFunds).div(totalSupply());
	}

	/**
	 * @dev Claims funds for a user.
	 * @param _forAddress Address of ClaimsToken holder
	 */
	function _claimFunds(address _forAddress) internal {
		uint256 unprocessedFunds = _calcUnprocessedFunds(_forAddress);

		processedFunds[_forAddress] = receivedFunds;
		claimedFunds[_forAddress] = claimedFunds[_forAddress].add(unprocessedFunds);
	}

	/**
	 * @dev Sets claimed but not yet withdrawn funds to 0,
	 * marks total received funds as processed and
	 * returns the withdrawable amount for a user.
	 * @return A uint256 representing the withdrawable funds
	 */
	function _prepareWithdraw()
		internal
		returns (uint256)
	{
		uint256 withdrawableFunds = availableFunds(msg.sender);

		processedFunds[msg.sender] = receivedFunds;
		claimedFunds[msg.sender] = 0;

		return withdrawableFunds;
	}
}

contract ClaimsTokenERC20Extension is IClaimsToken, ClaimsToken {

	// token that ClaimsToken takes in custodianship
	IERC20 public fundsToken;

	modifier onlyFundsToken () {
		require(msg.sender == address(fundsToken), "UNAUTHORIZED_SENDER");
		_;
	}

	constructor(address _owner, IERC20 _fundsToken)
		public
		ClaimsToken(_owner)
	{
		require(address(_fundsToken) != address(0));

		fundsToken = _fundsToken;
	}

	/**
	 * @dev Withdraws available funds for user.
	 */
	function withdrawFunds()
		external
		payable
	{
		require(msg.value == 0, "");

		uint256 withdrawableFunds = _prepareWithdraw();

		require(fundsToken.transfer(msg.sender, withdrawableFunds), "TRANSFER_FAILED");
	}

	/**
	 * @dev For ERC223.
	 * Calls _registerFunds(), whereby total received funds (cumulative) gets updated.
	 * @param _sender Sender of tokens
	 * @param _value Amount of tokens
	 */
	function tokenFallback(address _sender, uint256 _value, bytes memory)
		public
		onlyFundsToken()
	{
		if (_value > 0) {
			_registerFunds(_value);
			emit FundsReceived(_sender, _value);
		}
	}
}


// File contracts/tokens/Token.sol

pragma solidity ^0.5.2;


contract Token is ERC20 {
    bool transfersEnabled = true;
    bool transfersReturningFalse = false;

    constructor(uint256 supply) public {
        _mint(msg.sender, supply);
    }

    function updateTransfersEnabled(bool enabled) external {
        transfersEnabled = enabled;
    }

    function updateTransfersReturningFalse(bool enabled) external {
        transfersReturningFalse = enabled;
    }

    function transfer(address to, uint256 value) public returns (bool) {
        if (transfersReturningFalse) {
            return false;
        }
        require(transfersEnabled);
        return super.transfer(to, value);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_summoner","type":"address"},{"internalType":"address[]","name":"_approvedTokens","type":"address[]"},{"internalType":"uint256","name":"_periodDuration","type":"uint256"},{"internalType":"uint256","name":"_votingPeriodLength","type":"uint256"},{"internalType":"uint256","name":"_gracePeriodLength","type":"uint256"},{"internalType":"uint256","name":"_proposalDeposit","type":"uint256"},{"internalType":"uint256","name":"_dilutionBound","type":"uint256"},{"internalType":"uint256","name":"_processingReward","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"address","name":"applicantAddress","type":"address"}],"name":"CancelProposal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"proposalIndex","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"didPass","type":"bool"}],"name":"ProcessGuildKickProposal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"proposalIndex","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"didPass","type":"bool"}],"name":"ProcessProposal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"proposalIndex","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"didPass","type":"bool"}],"name":"ProcessWhitelistProposal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"memberAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"sharesToBurn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lootToBurn","type":"uint256"}],"name":"Ragequit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegateKey","type":"address"},{"indexed":true,"internalType":"address","name":"memberAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"proposalIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startingPeriod","type":"uint256"}],"name":"SponsorProposal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"applicant","type":"address"},{"indexed":false,"internalType":"uint256","name":"sharesRequested","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lootRequested","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tributeOffered","type":"uint256"},{"indexed":false,"internalType":"address","name":"tributeToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"paymentRequested","type":"uint256"},{"indexed":false,"internalType":"address","name":"paymentToken","type":"address"},{"indexed":false,"internalType":"string","name":"details","type":"string"},{"indexed":false,"internalType":"bool[6]","name":"flags","type":"bool[6]"},{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":true,"internalType":"address","name":"delegateKey","type":"address"},{"indexed":true,"internalType":"address","name":"memberAddress","type":"address"}],"name":"SubmitProposal","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"proposalIndex","type":"uint256"},{"indexed":true,"internalType":"address","name":"delegateKey","type":"address"},{"indexed":true,"internalType":"address","name":"memberAddress","type":"address"},{"indexed":false,"internalType":"uint8","name":"uintVote","type":"uint8"}],"name":"SubmitVote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"summoner","type":"address"},{"indexed":false,"internalType":"address[]","name":"tokens","type":"address[]"},{"indexed":false,"internalType":"uint256","name":"summoningTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"periodDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"votingPeriodLength","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gracePeriodLength","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"proposalDeposit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dilutionBound","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"processingReward","type":"uint256"}],"name":"SummonComplete","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountToCollect","type":"uint256"}],"name":"TokensCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"memberAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newDelegateKey","type":"address"}],"name":"UpdateDelegateKey","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"memberAddress","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"constant":true,"inputs":[],"name":"ESCROW","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GUILD","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"TOTAL","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"approvedTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"highestIndexYesVote","type":"uint256"}],"name":"canRagequit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"cancelProposal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"collectTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"depositToken","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dilutionBound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"memberAddress","type":"address"},{"internalType":"uint256","name":"proposalIndex","type":"uint256"}],"name":"getMemberProposalVote","outputs":[{"internalType":"enum Moloch.Vote","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"getProposalFlags","outputs":[{"internalType":"bool[6]","name":"","type":"bool[6]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getProposalQueueLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"getUserTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gracePeriodLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"startingPeriod","type":"uint256"}],"name":"hasVotingPeriodExpired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"memberAddressByDelegateKey","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"members","outputs":[{"internalType":"address","name":"delegateKey","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"loot","type":"uint256"},{"internalType":"bool","name":"exists","type":"bool"},{"internalType":"uint256","name":"highestIndexYesVote","type":"uint256"},{"internalType":"uint256","name":"jailed","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"periodDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"proposalIndex","type":"uint256"}],"name":"processGuildKickProposal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"proposalIndex","type":"uint256"}],"name":"processProposal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"proposalIndex","type":"uint256"}],"name":"processWhitelistProposal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"processingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"proposalCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"proposalDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"proposalQueue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"proposals","outputs":[{"internalType":"address","name":"applicant","type":"address"},{"internalType":"address","name":"proposer","type":"address"},{"internalType":"address","name":"sponsor","type":"address"},{"internalType":"uint256","name":"sharesRequested","type":"uint256"},{"internalType":"uint256","name":"lootRequested","type":"uint256"},{"internalType":"uint256","name":"tributeOffered","type":"uint256"},{"internalType":"address","name":"tributeToken","type":"address"},{"internalType":"uint256","name":"paymentRequested","type":"uint256"},{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"startingPeriod","type":"uint256"},{"internalType":"uint256","name":"yesVotes","type":"uint256"},{"internalType":"uint256","name":"noVotes","type":"uint256"},{"internalType":"string","name":"details","type":"string"},{"internalType":"uint256","name":"maxTotalSharesAndLootAtYesVote","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"proposedToKick","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"proposedToWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"memberToKick","type":"address"}],"name":"ragekick","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"sharesToBurn","type":"uint256"},{"internalType":"uint256","name":"lootToBurn","type":"uint256"}],"name":"ragequit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"sponsorProposal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"memberToKick","type":"address"},{"internalType":"string","name":"details","type":"string"}],"name":"submitGuildKickProposal","outputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"applicant","type":"address"},{"internalType":"uint256","name":"sharesRequested","type":"uint256"},{"internalType":"uint256","name":"lootRequested","type":"uint256"},{"internalType":"uint256","name":"tributeOffered","type":"uint256"},{"internalType":"address","name":"tributeToken","type":"address"},{"internalType":"uint256","name":"paymentRequested","type":"uint256"},{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"string","name":"details","type":"string"}],"name":"submitProposal","outputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"proposalIndex","type":"uint256"},{"internalType":"uint8","name":"uintVote","type":"uint8"}],"name":"submitVote","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"tokenToWhitelist","type":"address"},{"internalType":"string","name":"details","type":"string"}],"name":"submitWhitelistProposal","outputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"summoningTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalGuildBankTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalLoot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newDelegateKey","type":"address"}],"name":"updateDelegateKey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userTokenBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"votingPeriodLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bool","name":"max","type":"bool"}],"name":"withdrawBalances","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

608060405260006009556000600a556000600b556000600c553480156200002557600080fd5b50604051620059dc380380620059dc83398181016040526101008110156200004c57600080fd5b8151602083018051604051929492938301929190846401000000008211156200007457600080fd5b9083019060208201858111156200008a57600080fd5b8251866020820283011164010000000082111715620000a857600080fd5b82525081516020918201928201910280838360005b83811015620000d7578181015183820152602001620000bd565b505050509190910160409081526020830151908301516060840151608085015160a086015160c0909601516000805460ff1916600117905593975091955093909250906001600160a01b0388166200019057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f73756d6d6f6e65722063616e6e6f742062652030000000000000000000000000604482015290519081900360640190fd5b600086116200020057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f5f706572696f644475726174696f6e2063616e6e6f7420626520300000000000604482015290519081900360640190fd5b600085116200027057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5f766f74696e67506572696f644c656e6774682063616e6e6f74206265203000604482015290519081900360640190fd5b670de0b6b3a7640000851115620002d3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180620059826021913960400191505060405180910390fd5b670de0b6b3a76400008411156200034b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5f6772616365506572696f644c656e6774682065786365656473206c696d6974604482015290519081900360640190fd5b60008211620003bb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f5f64696c7574696f6e426f756e642063616e6e6f742062652030000000000000604482015290519081900360640190fd5b670de0b6b3a76400008211156200043357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f5f64696c7574696f6e426f756e642065786365656473206c696d697400000000604482015290519081900360640190fd5b6000875111620004a457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f6e656564206174206c65617374206f6e6520617070726f76656420746f6b656e604482015290519081900360640190fd5b610190875111156200051757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f746f6f206d616e7920746f6b656e730000000000000000000000000000000000604482015290519081900360640190fd5b8083101562000572576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526039815260200180620059a36039913960400191505060405180910390fd5b866000815181106200058057fe5b6020026020010151600860006101000a8154816001600160a01b0302191690836001600160a01b03160217905550876001600160a01b03167fc9943dac607a408ce079996205c3b771a7e464a5cf3859bc3315813f965e92408842898989898989604051808060200189815260200188815260200187815260200186815260200185815260200184815260200183815260200182810382528a818151815260200191508051906020019060200280838360005b838110156200064d57818101518382015260200162000633565b50505050905001995050505050505050505060405180910390a260005b8751811015620008575760006001600160a01b03168882815181106200068c57fe5b60200260200101516001600160a01b031614156200070b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f5f617070726f766564546f6b656e2063616e6e6f742062652030000000000000604482015290519081900360640190fd5b600e60008983815181106200071c57fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1615620007b057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6475706c696361746520617070726f76656420746f6b656e0000000000000000604482015290519081900360640190fd5b6001600e60008a8481518110620007c357fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550600f8882815181106200081157fe5b60209081029190910181015182546001808201855560009485529290932090920180546001600160a01b0319166001600160a01b0390931692909217909155016200066a565b50856001819055508460028190555083600381905550826004819055508160058190555080600681905550426007819055506040518060c00160405280896001600160a01b031681526020016001815260200160008152602001600115158152602001600081526020016000815250601260008a6001600160a01b03166001600160a01b0316815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550602082015181600101556040820151816002015560608201518160030160006101000a81548160ff0219169083151502179055506080820151816004015560a0820151816005015590505087601360008a6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001600a819055505050505050505050614fb580620009cd6000396000f3fe608060405234801561001057600080fd5b50600436106102955760003560e01c8063753d756311610167578063b2643aab116100ce578063e178034511610087578063e178034514610ae7578063e1a0e3fa14610b0d578063e63bc62d14610b2a578063e681c4aa14610b47578063f5d54c7714610b4f578063feb7ea1d14610b5757610295565b8063b2643aab14610a37578063b470aade14610a8c578063c89039c514610a94578063da35c66414610a9c578063dfdd369e14610aa4578063e0a8f6f514610aca57610295565b80639425a476116101205780639425a476146109aa5780639746d940146109c757806399653fbe146109e45780639d1722cb14610a0a578063a3dc380014610a12578063afe5475f14610a2f57610295565b8063753d75631461095c57806378a8956714610982578063797daf701461098a5780637d5b6c72146109925780638340bbce1461099a5780638b15a605146109a257610295565b80633793ab3c1161020b57806345f2d105116101c457806345f2d105146107ec578063590f940b1461081a57806359999b41146108f8578063635e99aa1461091e57806363858f2d1461092657806373f8fd4b1461092e57610295565b80633793ab3c146106255780633a98ef39146106425780633b214a741461064a5780633fc24bba14610667578063402c1794146106a15780634482394b146106c757610295565b80630cf20cc91161025d5780630cf20cc9146104b9578063115b2d18146104e757806315eb349e1461059b5780631dafede0146105be5780632582bf2a146105f757806327efc0861461061d57610295565b8063013cf08b1461029a57806303e32fa1146103e4578063044a0ca8146103fe578063086146d21461044e57806308ae4b0c14610456575b600080fd5b6102b7600480360360208110156102b057600080fd5b5035610c0b565b604051808f6001600160a01b03166001600160a01b031681526020018e6001600160a01b03166001600160a01b031681526020018d6001600160a01b03166001600160a01b031681526020018c81526020018b81526020018a8152602001896001600160a01b03166001600160a01b03168152602001888152602001876001600160a01b03166001600160a01b0316815260200186815260200185815260200184815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561039c578181015183820152602001610384565b50505050905090810190601f1680156103c95780820380516001836020036101000a031916815260200191505b509f5050505050505050505050505050505060405180910390f35b6103ec610d6e565b60408051918252519081900360200190f35b61042a6004803603604081101561041457600080fd5b506001600160a01b038135169060200135610d74565b6040518082600281111561043a57fe5b60ff16815260200191505060405180910390f35b6103ec610e7c565b61047c6004803603602081101561046c57600080fd5b50356001600160a01b0316610eab565b604080516001600160a01b0390971687526020870195909552858501939093529015156060850152608084015260a0830152519081900360c00190f35b6104e5600480360360408110156104cf57600080fd5b506001600160a01b038135169060200135610eee565b005b6103ec600480360360408110156104fd57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561052757600080fd5b82018360208201111561053957600080fd5b803590602001918460018302840111600160201b8311171561055a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610f58945050505050565b6104e5600480360360408110156105b157600080fd5b50803590602001356110fa565b6105db600480360360208110156105d457600080fd5b50356111c2565b604080516001600160a01b039092168252519081900360200190f35b6104e56004803603602081101561060d57600080fd5b50356001600160a01b03166111e9565b6105db611453565b6104e56004803603602081101561063b57600080fd5b5035611459565b6103ec611680565b6103ec6004803603602081101561066057600080fd5b5035611686565b61068d6004803603602081101561067d57600080fd5b50356001600160a01b03166116a4565b604080519115158252519081900360200190f35b6105db600480360360208110156106b757600080fd5b50356001600160a01b03166116b9565b6104e5600480360360608110156106dd57600080fd5b810190602081018135600160201b8111156106f757600080fd5b82018360208201111561070957600080fd5b803590602001918460208302840111600160201b8311171561072a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561077957600080fd5b82018360208201111561078b57600080fd5b803590602001918460208302840111600160201b831117156107ac57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050505035151590506116d4565b6103ec6004803603604081101561080257600080fd5b506001600160a01b0381358116916020013516611812565b6103ec600480360361010081101561083157600080fd5b6001600160a01b038235811692602081013592604082013592606083013592608081013582169260a08201359260c0830135169190810190610100810160e0820135600160201b81111561088457600080fd5b82018360208201111561089657600080fd5b803590602001918460018302840111600160201b831117156108b757600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061182f945050505050565b6104e56004803603602081101561090e57600080fd5b50356001600160a01b0316611c7b565b6103ec611f47565b6103ec611f4d565b6103ec6004803603604081101561094457600080fd5b506001600160a01b0381358116916020013516611f53565b61068d6004803603602081101561097257600080fd5b50356001600160a01b0316611f7e565b6103ec611f93565b6103ec611f99565b6103ec611f9f565b6103ec611fa5565b6103ec611fab565b61068d600480360360208110156109c057600080fd5b5035611fb1565b6104e5600480360360208110156109dd57600080fd5b5035611fd8565b6104e5600480360360408110156109fa57600080fd5b508035906020013560ff166126b6565b6103ec612b82565b61068d60048036036020811015610a2857600080fd5b5035612b88565b6103ec612c31565b610a5460048036036020811015610a4d57600080fd5b5035612c37565b604051808260c080838360005b83811015610a79578181015183820152602001610a61565b5050505090500191505060405180910390f35b6103ec612ca1565b6105db612ca7565b6103ec612cb6565b6104e560048036036020811015610aba57600080fd5b50356001600160a01b0316612cbc565b6104e560048036036020811015610ae057600080fd5b5035612e20565b61068d60048036036020811015610afd57600080fd5b50356001600160a01b0316612ff2565b6104e560048036036020811015610b2357600080fd5b5035613007565b6104e560048036036020811015610b4057600080fd5b503561321a565b6105db6137c3565b6105db6137c9565b6103ec60048036036040811015610b6d57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610b9757600080fd5b820183602082011115610ba957600080fd5b803590602001918460018302840111600160201b83111715610bca57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506137cf945050505050565b60146020528060005260406000206000915090508060000160009054906101000a90046001600160a01b0316908060010160009054906101000a90046001600160a01b0316908060020160009054906101000a90046001600160a01b0316908060030154908060040154908060050154908060060160009054906101000a90046001600160a01b0316908060070154908060080160009054906101000a90046001600160a01b03169080600901549080600a01549080600b01549080600d018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d5e5780601f10610d3357610100808354040283529160200191610d5e565b820191906000526020600020905b815481529060010190602001808311610d4157829003601f168201915b50505050509080600e015490508e565b60065481565b6001600160a01b03821660009081526012602052604081206003015460ff16610ddc576040805162461bcd60e51b81526020600482015260156024820152741b595b58995c88191bd95cc81b9bdd08195e1a5cdd605a1b604482015290519081900360640190fd5b6015548210610e2c576040805162461bcd60e51b81526020600482015260176024820152761c1c9bdc1bdcd85b08191bd95cc81b9bdd08195e1a5cdd604a1b604482015290519081900360640190fd5b6014600060158481548110610e3d57fe5b6000918252602080832090910154835282810193909352604091820181206001600160a01b0387168252600f0190925290205460ff1690505b92915050565b6000610ea5600154610e996007544261395190919063ffffffff16565b9063ffffffff61396616565b90505b90565b6012602052600090815260409020805460018201546002830154600384015460048501546005909501546001600160a01b03909416949293919260ff9091169186565b60005460ff16610f33576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff19169055610f478282613988565b50506000805460ff19166001179055565b6000805460ff16610f9e576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff19169055610fb061493c565b506001600160a01b03808416600090815260126020908152604091829020825160c081018452815490941684526001810154918401829052600281015492840192909252600382015460ff16151560608401526004820154608084015260059091015460a0830152151580611029575060008160400151115b6110645760405162461bcd60e51b815260040180806020018281038252602f815260200180614d3c602f913960400191505060405180910390fd5b6001600160a01b038416600090815260126020526040902060050154156110bc5760405162461bcd60e51b8152600401808060200182810382526021815260200180614cad6021913960400191505060405180910390fd5b6110c461497d565b600160a08201526110dd85600080808080808b89613b07565b50506009546000805460ff19166001179055600019019392505050565b60005460ff1661113f576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff191681553381526012602052604090206001015415158061117757503360009081526012602052604090206002015415155b6111b7576040805162461bcd60e51b815260206004820152600c60248201526b3737ba10309036b2b6b132b960a11b604482015290519081900360640190fd5b610f47338383613ec1565b600f81815481106111cf57fe5b6000918252602090912001546001600160a01b0316905081565b60005460ff1661122e576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff191681553381526012602052604090206001015461128d576040805162461bcd60e51b81526020600482015260116024820152703737ba10309039b430b932b437b63232b960791b604482015290519081900360640190fd5b6001600160a01b0381166112e8576040805162461bcd60e51b815260206004820152601a60248201527f6e657744656c65676174654b65792063616e6e6f742062652030000000000000604482015290519081900360640190fd5b6001600160a01b03811633146113bd576001600160a01b03811660009081526012602052604090206003015460ff16156113535760405162461bcd60e51b8152600401808060200182810382526021815260200180614e3b6021913960400191505060405180910390fd5b6001600160a01b03808216600090815260136020908152604080832054909316825260129052206003015460ff16156113bd5760405162461bcd60e51b8152600401808060200182810382526027815260200180614b896027913960400191505060405180910390fd5b33600081815260126020908152604080832080546001600160a01b0390811685526013845282852080546001600160a01b031990811690915590871680865294839020805482168717905581541684178155815193845290519093927fde7b64a369e10562cc2e71f0f1f944eaf144b75fead6ecb51fac9c4dd693488592908290030190a250506000805460ff19166001179055565b61babe81565b60005460ff1661149e576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff191690556114b1816141ba565b6000601582815481106114c057fe5b60009182526020808320919091015480835260149091526040909120600c81015491925090600160201b900460ff16611540576040805162461bcd60e51b815260206004820152601c60248201527f6d75737420626520612077686974656c6973742070726f706f73616c00000000604482015290519081900360640190fd5b600c8101805461ff001916610100179055600061155c84614523565b600f549091506101901161156e575060005b80156115ff57600c8201805462ff00001916620100001790556006820180546001600160a01b039081166000908152600e60205260408120805460ff191660019081179091559254600f805494850181559091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8029092018054929091166001600160a01b03199092169190911790555b60068201546001600160a01b039081166000908152601060205260409020805460ff1916905560028301546116349116614762565b6040805182151581529051849186917f2094fc13d2ecb0acd6861e82bd006c7e5ab6f312ec0c6cdfe3d1a01ee54d885a9181900360200190a350506000805460ff191660011790555050565b600a5481565b6015818154811061169357fe5b600091825260209091200154905081565b60116020526000908152604090205460ff1681565b6013602052600090815260409020546001600160a01b031681565b60005460ff16611719576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff1916905581518351146117635760405162461bcd60e51b8152600401808060200182810382526032815260200180614d6b6032913960400191505060405180910390fd5b60005b83518110156117ff57600083828151811061177d57fe5b6020026020010151905082156117d957336000908152600d6020526040812086519091908790859081106117ad57fe5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205490505b6117f68583815181106117e857fe5b602002602001015182613988565b50600101611766565b50506000805460ff191660011790555050565b600d60209081526000928352604080842090915290825290205481565b6000805460ff16611875576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff19169055670de0b6b3a7640000611898898963ffffffff6147b716565b11156118eb576040805162461bcd60e51b815260206004820152601960248201527f746f6f206d616e79207368617265732072657175657374656400000000000000604482015290519081900360640190fd5b6001600160a01b0385166000908152600e602052604090205460ff16611958576040805162461bcd60e51b815260206004820152601f60248201527f74726962757465546f6b656e206973206e6f742077686974656c697374656400604482015290519081900360640190fd5b6001600160a01b0383166000908152600e602052604090205460ff166119c5576040805162461bcd60e51b815260206004820152601a60248201527f7061796d656e74206973206e6f742077686974656c6973746564000000000000604482015290519081900360640190fd5b6001600160a01b038916611a18576040805162461bcd60e51b815260206004820152601560248201527406170706c6963616e742063616e6e6f74206265203605c1b604482015290519081900360640190fd5b6001600160a01b03891661dead14801590611a3e57506001600160a01b03891661beef14155b8015611a5557506001600160a01b03891661babe14155b611a905760405162461bcd60e51b8152600401808060200182810382526024815260200180614c426024913960400191505060405180910390fd5b6001600160a01b03891660009081526012602052604090206005015415611ae85760405162461bcd60e51b8152600401808060200182810382526025815260200180614df36025913960400191505060405180910390fd5b600086118015611b1b57506001600160a01b0385166000908152600080516020614d9d8339815191526020526040902054155b15611b615760c8600c5410611b615760405162461bcd60e51b8152600401808060200182810382526047815260200180614c666047913960600191505060405180910390fd5b604080516323b872dd60e01b81523360048201523060248201526044810188905290516001600160a01b038716916323b872dd9160648083019260209291908290030181600087803b158015611bb657600080fd5b505af1158015611bca573d6000803e3d6000fd5b505050506040513d6020811015611be057600080fd5b5051611c33576040805162461bcd60e51b815260206004820152601d60248201527f7472696275746520746f6b656e207472616e73666572206661696c6564000000604482015290519081900360640190fd5b611c4061beef86886147d0565b611c4861497d565b611c598a8a8a8a8a8a8a8a89613b07565b5050600954600019016000805460ff1916600117905598975050505050505050565b336000908152601360209081526040808320546001600160a01b031683526012909152902060010154611ce6576040805162461bcd60e51b815260206004820152600e60248201526d6e6f7420612064656c656761746560901b604482015290519081900360640190fd5b60005460ff16611d2b576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff191681556001600160a01b0382168082527fa30f7a7832bd8a7a8daa3a3f5b7a6f7cec6a2fbb1a121fa5b76520e44736771c602090815260408084205481516370a0823160e01b81523060048201529151611de494919391926370a08231926024808301939192829003018186803b158015611dac57600080fd5b505afa158015611dc0573d6000803e3d6000fd5b505050506040513d6020811015611dd657600080fd5b50519063ffffffff61395116565b905060008111611e32576040805162461bcd60e51b81526020600482015260146024820152731b9bc81d1bdad95b9cc81d1bc818dbdb1b1958dd60621b604482015290519081900360640190fd5b6001600160a01b0382166000908152600e602052604090205460ff16611e895760405162461bcd60e51b8152600401808060200182810382526024815260200180614cf16024913960400191505060405180910390fd5b6001600160a01b0382166000908152600080516020614d9d8339815191526020526040902054611eea5760405162461bcd60e51b8152600401808060200182810382526036815260200180614dbd6036913960400191505060405180910390fd5b611ef761dead83836147d0565b6040805182815290516001600160a01b038416917f9381e53ffdc9733a6783a6f8665be3f89c231bb81a6771996ed553b4e75c0fe3919081900360200190a250506000805460ff19166001179055565b600b5481565b60035481565b6001600160a01b039182166000908152600d6020908152604080832093909416825291909152205490565b600e6020526000908152604090205460ff1681565b600f5490565b60155490565b60075481565b60025481565b60045481565b6000611fc8600254836147b790919063ffffffff16565b611fd0610e7c565b101592915050565b60005460ff1661201d576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff19168155338152601360209081526040808320546001600160a01b03168352601290915290206001015461208f576040805162461bcd60e51b815260206004820152600e60248201526d6e6f7420612064656c656761746560901b604482015290519081900360640190fd5b60085460048054604080516323b872dd60e01b815233938101939093523060248401526044830191909152516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b1580156120ef57600080fd5b505af1158015612103573d6000803e3d6000fd5b505050506040513d602081101561211957600080fd5b50516121565760405162461bcd60e51b8152600401808060200182810382526026815260200180614eca6026913960400191505060405180910390fd5b6008546004546121759161beef916001600160a01b03909116906147d0565b600081815260146020526040902060018101546001600160a01b03166121e2576040805162461bcd60e51b815260206004820181905260248201527f70726f706f73616c206d7573742068617665206265656e2070726f706f736564604482015290519081900360640190fd5b600c81015460ff16156122265760405162461bcd60e51b8152600401808060200182810382526023815260200180614e186023913960400191505060405180910390fd5b600c8101546301000000900460ff1615612287576040805162461bcd60e51b815260206004820152601b60248201527f70726f706f73616c20686173206265656e2063616e63656c6c65640000000000604482015290519081900360640190fd5b80546001600160a01b0316600090815260126020526040902060050154156122e05760405162461bcd60e51b8152600401808060200182810382526025815260200180614df36025913960400191505060405180910390fd5b6000816005015411801561231b575060068101546001600160a01b03166000908152600080516020614d9d8339815191526020526040902054155b156123615760c8600c54106123615760405162461bcd60e51b8152600401808060200182810382526048815260200180614e826048913960600191505060405180910390fd5b600c810154600160201b900460ff16156124b15760068101546001600160a01b03166000908152600e602052604090205460ff16156123d15760405162461bcd60e51b8152600401808060200182810382526029815260200180614f356029913960400191505060405180910390fd5b60068101546001600160a01b031660009081526010602052604090205460ff1615612443576040805162461bcd60e51b815260206004820152601d60248201527f616c72656164792070726f706f73656420746f2077686974656c697374000000604482015290519081900360640190fd5b600f54610190116124855760405162461bcd60e51b8152600401808060200182810382526027815260200180614d156027913960400191505060405180910390fd5b60068101546001600160a01b03166000908152601060205260409020805460ff1916600117905561255b565b600c81015465010000000000900460ff161561255b5780546001600160a01b031660009081526011602052604090205460ff1615612536576040805162461bcd60e51b815260206004820152601860248201527f616c72656164792070726f706f73656420746f206b69636b0000000000000000604482015290519081900360640190fd5b80546001600160a01b03166000908152601160205260409020805460ff191660011790555b60006125d060016125c461256d610e7c565b601554156125bc576015805460149160009161259090600163ffffffff61395116565b8154811061259a57fe5b90600052602060002001548152602001908152602001600020600901546125bf565b60005b61482e565b9063ffffffff6147b716565b60098301819055336000818152601360205260408120546002860180546001600160a01b0319166001600160a01b039092169182179055600c8601805460ff19166001908117909155601580548083018255938190527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4759093018890559154939450928392917f2a383a979381335e3eb401ac01dd8083e024ff0256bf5338456ffc0063390bbd9188916126849190613951565b604080519283526020830191909152818101879052519081900360600190a350506000805460ff191660011790555050565b60005460ff166126fb576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff19168155338152601360209081526040808320546001600160a01b03168352601290915290206001015461276d576040805162461bcd60e51b815260206004820152600e60248201526d6e6f7420612064656c656761746560901b604482015290519081900360640190fd5b336000908152601360209081526040808320546001600160a01b0316808452601290925290912060155484106127e4576040805162461bcd60e51b81526020600482015260176024820152761c1c9bdc1bdcd85b08191bd95cc81b9bdd08195e1a5cdd604a1b604482015290519081900360640190fd5b600060146000601587815481106127f757fe5b90600052602060002001548152602001908152602001600020905060038460ff1610612860576040805162461bcd60e51b81526020600482015260136024820152726d757374206265206c657373207468616e203360681b604482015290519081900360640190fd5b60008460ff16600281111561287157fe5b90508160090154612880610e7c565b10156128d3576040805162461bcd60e51b815260206004820152601d60248201527f766f74696e6720706572696f6420686173206e6f742073746172746564000000604482015290519081900360640190fd5b6128e08260090154611fb1565b1561291c5760405162461bcd60e51b8152600401808060200182810382526022815260200180614ef06022913960400191505060405180910390fd5b6001600160a01b0384166000908152600f8301602052604081205460ff16600281111561294557fe5b14612997576040805162461bcd60e51b815260206004820152601860248201527f6d656d6265722068617320616c726561647920766f7465640000000000000000604482015290519081900360640190fd5b60018160028111156129a557fe5b14806129bc575060028160028111156129ba57fe5b145b612a0d576040805162461bcd60e51b815260206004820152601d60248201527f766f7465206d7573742062652065697468657220596573206f72204e6f000000604482015290519081900360640190fd5b6001600160a01b0384166000908152600f830160205260409020805482919060ff19166001836002811115612a3e57fe5b02179055506001816002811115612a5157fe5b1415612ac9576001830154600a830154612a709163ffffffff6147b716565b600a8301556004830154861115612a8957600483018690555b600e820154600b54600a54612aa39163ffffffff6147b716565b1115612ac457600b54600a54612abe9163ffffffff6147b716565b600e8301555b612afc565b6002816002811115612ad757fe5b1415612afc576001830154600b830154612af69163ffffffff6147b716565b600b8301555b836001600160a01b0316336001600160a01b0316877f804f03797630bf8b8a46b9371608abbf7d78a20df720e477bab641957ca68a2060158a81548110612b3f57fe5b906000526020600020015489604051808381526020018260ff1660ff1681526020019250505060405180910390a450506000805460ff1916600117905550505050565b600c5481565b6015546000908210612bdb576040805162461bcd60e51b81526020600482015260176024820152761c1c9bdc1bdcd85b08191bd95cc81b9bdd08195e1a5cdd604a1b604482015290519081900360640190fd5b6014600060158481548110612bec57fe5b90600052602060002001548152602001908152602001600020600c01600160068110612c1457fe5b602081049091015460ff601f9092166101000a9004169050919050565b60055481565b612c3f61497d565b600082815260146020526040808220815160c081019283905292600c909101916006918390855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411612c66575094979650505050505050565b60015481565b6008546001600160a01b031681565b60095481565b60005460ff16612d01576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff191681556001600160a01b03821681526012602052604090206005810154612d6f576040805162461bcd60e51b81526020600482015260166024820152751b595b58995c881b5d5cdd081899481a5b881a985a5b60521b604482015290519081900360640190fd5b6000816002015411612dc8576040805162461bcd60e51b815260206004820152601a60248201527f6d656d626572206d757374206861766520736f6d65206c6f6f74000000000000604482015290519081900360640190fd5b612dd58160040154612b88565b612e105760405162461bcd60e51b815260040180806020018281038252604d815260200180614bd0604d913960600191505060405180910390fd5b610f478260008360020154613ec1565b60005460ff16612e65576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff19168155818152601460205260409020600c81015460ff1615612ebf5760405162461bcd60e51b8152600401808060200182810382526023815260200180614e186023913960400191505060405180910390fd5b600c8101546301000000900460ff1615612f0a5760405162461bcd60e51b8152600401808060200182810382526023815260200180614f126023913960400191505060405180910390fd5b60018101546001600160a01b03163314612f6b576040805162461bcd60e51b815260206004820152601e60248201527f736f6c656c79207468652070726f706f7365722063616e2063616e63656c0000604482015290519081900360640190fd5b600c8101805463ff00000019166301000000179055600181015460068201546005830154612fab9261beef926001600160a01b0391821692911690614845565b60408051338152905183917fc215fed6680bb02d323dc3f8b8f85241572607538426059c9232601bd293c3be919081900360200190a250506000805460ff19166001179055565b60106020526000908152604090205460ff1681565b60005460ff1661304c576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff1916905561305f816141ba565b60006015828154811061306e57fe5b60009182526020808320919091015480835260149091526040909120600c8101549192509065010000000000900460ff166130f0576040805162461bcd60e51b815260206004820152601d60248201527f6d7573742062652061206775696c64206b69636b2070726f706f73616c000000604482015290519081900360640190fd5b600c8101805461ff001916610100179055600061310c84614523565b9050801561319c57600c8201805462ff000019166201000017905581546001600160a01b03166000908152601260205260409020600581018590556001810154600282015461315a916147b7565b60028201556001810154600a546131769163ffffffff61395116565b600a556001810154600b546131909163ffffffff6147b716565b600b5560006001909101555b81546001600160a01b039081166000908152601160205260409020805460ff1916905560028301546131ce9116614762565b6040805182151581529051849186917f0e347d00d3e9e6cdff9e6c09092c9ff1bd448f9b3dfb7091b30939ec5e7a3c739181900360200190a350506000805460ff191660011790555050565b60005460ff1661325f576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff19169055613272816141ba565b60006015828154811061328157fe5b60009182526020808320919091015480835260149091526040909120600c81015491925090600160201b900460ff161580156132cb5750600c81015465010000000000900460ff16155b61331c576040805162461bcd60e51b815260206004820152601b60248201527f6d7573742062652061207374616e646172642070726f706f73616c0000000000604482015290519081900360640190fd5b600c8101805461ff001916610100179055600061333884614523565b9050670de0b6b3a764000061336a83600401546125c485600301546125c4600b54600a546147b790919063ffffffff16565b1115613374575060005b60088201546001600160a01b03166000908152600080516020614d9d8339815191526020526040902054600783015411156133ad575060005b600082600501541180156133e8575060068201546001600160a01b03166000908152600080516020614d9d8339815191526020526040902054155b80156133f7575060c8600c5410155b15613400575060005b801561373557600c8201805462ff000019166201000017905581546001600160a01b031660009081526012602052604090206003015460ff16156134d757600382015482546001600160a01b031660009081526012602052604090206001015461346f9163ffffffff6147b716565b82546001600160a01b039081166000908152601260205260408082206001019390935560048501548554909216815291909120600201546134b59163ffffffff6147b716565b82546001600160a01b031660009081526012602052604090206002015561361a565b81546001600160a01b03908116600090815260136020908152604080832054909316825260129052206003015460ff161561355b5781546001600160a01b0390811660009081526013602090815260408083205490931680835283832080546001600160a01b03199081168317909155601290925292909120805490911690911790555b6040805160c08101825283546001600160a01b0390811680835260038087015460208086019182526004808a0154878901908152600160608901818152600060808b0181815260a08c01828152998252601287528c82209b518c54908c166001600160a01b0319918216178d559751938c0193909355925160028b015551958901805496151560ff1990971696909617909555935190870155925160059095019490945586549092168083526013909152929020805490911690911790555b6003820154600a546136319163ffffffff6147b716565b600a556004820154600b5461364b9163ffffffff6147b716565b600b5560068201546001600160a01b03166000908152600080516020614d9d8339815191526020526040902054158015613689575060008260050154115b1561369857600c805460010190555b600682015460058301546136bd9161beef9161dead916001600160a01b031690614845565b8154600883015460078401546136e59261dead926001600160a01b0391821692911690614845565b60088201546001600160a01b03166000908152600080516020614d9d8339815191526020526040902054158015613720575060008260070154115b1561373057600c80546000190190555b613760565b6001820154600683015460058401546137609261beef926001600160a01b0391821692911690614845565b6002820154613777906001600160a01b0316614762565b6040805182151581529051849186917f86f74240ecee9e4230d26ff92e17fee978460d9c0f78f5c88b2864c9e7a494279181900360200190a350506000805460ff191660011790555050565b61beef81565b61dead81565b6000805460ff16613815576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff191690556001600160a01b03831661387a576040805162461bcd60e51b815260206004820152601a60248201527f6d7573742070726f7669646520746f6b656e2061646472657373000000000000604482015290519081900360640190fd5b6001600160a01b0383166000908152600e602052604090205460ff16156138d25760405162461bcd60e51b8152600401808060200182810382526029815260200180614f356029913960400191505060405180910390fd5b600f54610190116139145760405162461bcd60e51b8152600401808060200182810382526026815260200180614e5c6026913960400191505060405180910390fd5b61391c61497d565b6001608082015261393560008080808881808a89613b07565b5050600954600019016000805460ff1916600117905592915050565b60008282111561396057600080fd5b50900390565b600080821161397457600080fd5b600082848161397f57fe5b04949350505050565b336000908152600d602090815260408083206001600160a01b03861684529091529020548111156139f7576040805162461bcd60e51b8152602060048201526014602482015273696e73756666696369656e742062616c616e636560601b604482015290519081900360640190fd5b613a02338383614861565b6040805163a9059cbb60e01b81523360048201526024810183905290516001600160a01b0384169163a9059cbb9160448083019260209291908290030181600087803b158015613a5157600080fd5b505af1158015613a65573d6000803e3d6000fd5b505050506040513d6020811015613a7b57600080fd5b5051613ac0576040805162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b604482015290519081900360640190fd5b604080516001600160a01b038416815260208101839052815133927f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb928290030190a25050565b613b0f61499b565b604051806101e001604052808b6001600160a01b03168152602001336001600160a01b0316815260200160006001600160a01b031681526020018a8152602001898152602001888152602001876001600160a01b03168152602001868152602001856001600160a01b03168152602001600081526020016000815260200160008152602001838152602001848152602001600081525090508060146000600954815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060e082015181600701556101008201518160080160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610120820151816009015561014082015181600a015561016082015181600b015561018082015181600c01906006613d00929190614a44565b506101a08201518051613d1d91600d840191602090910190614ad6565b506101c082015181600e0155905050600060136000336001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160a01b03169050806001600160a01b0316336001600160a01b03168c6001600160a01b03167fa763e0f5e4f4e33a3397b4ba22677c9b6fd2075ed6504596333006ff2f3e38748d8d8d8d8d8d8d8d600954604051808a8152602001898152602001888152602001876001600160a01b03166001600160a01b03168152602001868152602001856001600160a01b03166001600160a01b031681526020018060200184600660200280838360005b83811015613e27578181015183820152602001613e0f565b50505050905001838152602001828103825285818151815260200191508051906020019080838360005b83811015613e69578181015183820152602001613e51565b50505050905090810190601f168015613e965780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390a45050600980546001019055505050505050505050565b6000613eda600b54600a546147b790919063ffffffff16565b6001600160a01b0385166000908152601260205260409020600181015491925090841115613f45576040805162461bcd60e51b8152602060048201526013602482015272696e73756666696369656e742073686172657360681b604482015290519081900360640190fd5b8281600201541015613f92576040805162461bcd60e51b81526020600482015260116024820152701a5b9cdd59999a58da595b9d081b1bdbdd607a1b604482015290519081900360640190fd5b613f9f8160040154612b88565b613fda5760405162461bcd60e51b815260040180806020018281038252604d815260200180614bd0604d913960600191505060405180910390fd5b6000613fec858563ffffffff6147b716565b6001830154909150614004908663ffffffff61395116565b6001830155600282015461401e908563ffffffff61395116565b6002830155600a54614036908663ffffffff61395116565b600a55600b5461404c908563ffffffff61395116565b600b5560005b600f548110156141775761dead6000908152600d602052600f80546140ba91600080516020614d9d833981519152918491908690811061408e57fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205484876148c1565b9050801561416e5761dead6000908152600d602052600f80548392600080516020614d9d833981519152929091869081106140f157fe5b60009182526020808320909101546001600160a01b0390811684528382019490945260409283018220805495909503909455918b168252600d909252908120600f8054849391908690811061414257fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020805490910190555b50600101614052565b506040805186815260208101869052815133927fcad1a1c68982832d9abc314de8a1e5d5e8c81b0588961e360766736d10c3be1a928290030190a2505050505050565b601554811061420a576040805162461bcd60e51b81526020600482015260176024820152761c1c9bdc1bdcd85b08191bd95cc81b9bdd08195e1a5cdd604a1b604482015290519081900360640190fd5b61421261499b565b601460006015848154811061422357fe5b6000918252602080832091909101548352828101939093526040918201812082516101e08101845281546001600160a01b039081168252600183015481169582019590955260028201548516818501526003820154606082015260048201546080820152600582015460a0820152600680830154861660c080840191909152600784015460e084015260088401549096166101008301526009830154610120830152600a830154610140830152600b83015461016083015284519586019485905290949193610180860193600c86019291908390855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116142f957505050928452505050600d8201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156143bc5780601f10614391576101008083540402835291602001916143bc565b820191906000526020600020905b81548152906001019060200180831161439f57829003601f168201915b50505050508152602001600e8201548152505090506143f16003546125c46002548461012001516147b790919063ffffffff16565b6143f9610e7c565b10156144365760405162461bcd60e51b8152600401808060200182810382526025815260200180614c1d6025913960400191505060405180910390fd5b610180810151602001511561447c5760405162461bcd60e51b8152600401808060200182810382526023815260200180614f5e6023913960400191505060405180910390fd5b8115806144e4575060146000601561449b85600163ffffffff61395116565b815481106144a557fe5b90600052602060002001548152602001908152602001600020600c016001600681106144cd57fe5b602081049091015460ff601f9092166101000a9004165b61451f5760405162461bcd60e51b8152600401808060200182810382526023815260200180614cce6023913960400191505060405180910390fd5b5050565b600061452d61499b565b601460006015858154811061453e57fe5b6000918252602080832091909101548352828101939093526040918201812082516101e08101845281546001600160a01b039081168252600183015481169582019590955260028201548516818501526003820154606082015260048201546080820152600582015460a0820152600680830154861660c080840191909152600784015460e084015260088401549096166101008301526009830154610120830152600a830154610140830152600b83015461016083015284519586019485905290949193610180860193600c86019291908390855b825461010083900a900460ff16151581526020600192830181810494850194909303909202910180841161461457505050928452505050600d8201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156146d75780601f106146ac576101008083540402835291602001916146d7565b820191906000526020600020905b8154815290600101906020018083116146ba57829003601f168201915b50505050508152602001600e820154815250509050806101600151816101400151119150806101c0015161472a60055461471e600b54600a546147b790919063ffffffff16565b9063ffffffff61491516565b101561473557600091505b80516001600160a01b03166000908152601260205260409020600501541561475c57600091505b50919050565b6008546006546147819161beef9133916001600160a01b031690614845565b6008546006546004546147b49261beef9285926001600160a01b03909216916147af9163ffffffff61395116565b614845565b50565b6000828201838110156147c957600080fd5b9392505050565b6001600160a01b039283166000908152600d602090815260408083209490951682529283528381208054830190557fa30f7a7832bd8a7a8daa3a3f5b7a6f7cec6a2fbb1a121fa5b76520e44736771c90925291902080549091019055565b60008183101561483e57816147c9565b5090919050565b614850848383614861565b61485b8383836147d0565b50505050565b6001600160a01b039283166000908152600d60209081526040808320949095168252928352838120805483900390557fa30f7a7832bd8a7a8daa3a3f5b7a6f7cec6a2fbb1a121fa5b76520e44736771c9092529190208054919091039055565b6000816148cd57600080fd5b836148da575060006147c9565b838302838582816148e757fe5b041415614900578281816148f757fe5b049150506147c9565b8383868161490a57fe5b040295945050505050565b60008261492457506000610e76565b8282028284828161493157fe5b04146147c957600080fd5b6040518060c0016040528060006001600160a01b03168152602001600081526020016000815260200160001515815260200160008152602001600081525090565b6040518060c001604052806006906020820280388339509192915050565b604051806101e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160006001600160a01b031681526020016000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001614a3061497d565b815260200160608152602001600081525090565b600183019183908215614ac65791602002820160005b83821115614a9757835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302614a5a565b8015614ac45782816101000a81549060ff0219169055600101602081600001049283019260010302614a97565b505b50614ad2929150614b50565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614b1757805160ff1916838001178555614b44565b82800160010185558215614b44579182015b82811115614b44578251825591602001919060010190614b29565b50614ad2929150614b6e565b610ea891905b80821115614ad257805460ff19168155600101614b56565b610ea891905b80821115614ad25760008155600101614b7456fe63616e6e6f74206f7665727772697465206578697374696e672064656c6567617465206b6579735265656e7472616e637947756172643a207265656e7472616e742063616c6c0063616e6e6f7420726167657175697420756e74696c206869676865737420696e6465782070726f706f73616c206d656d62657220766f74656420594553206f6e2069732070726f63657373656470726f706f73616c206973206e6f7420726561647920746f2062652070726f6365737365646170706c6963616e7420616464726573732063616e6e6f7420626520726573657276656463616e6e6f74207375626d6974206d6f726520747269627574652070726f706f73616c7320666f72206e657720746f6b656e73202d206775696c6462616e6b2069732066756c6c6d656d626572206d757374206e6f7420616c7265616479206265206a61696c656470726576696f75732070726f706f73616c206d7573742062652070726f636573736564746f6b656e20746f20636f6c6c656374206d7573742062652077686974656c697374656463616e6e6f742073706f6e736f72206d6f72652077686974656c6973742070726f706f73616c736d656d626572206d7573742068617665206174206c65617374206f6e65207368617265206f72206f6e65206c6f6f74746f6b656e7320616e6420616d6f756e747320617272617973206d757374206265206d61746368696e67206c656e67746873dc7fafdc41998a74ecacb8f8bd877011aba1f1d03a3a0d37a2e7879a393b1d6a746f6b656e20746f20636f6c6c656374206d7573742068617665206e6f6e2d7a65726f206775696c642062616e6b2062616c616e636570726f706f73616c206170706c6963616e74206d757374206e6f74206265206a61696c656470726f706f73616c2068617320616c7265616479206265656e2073706f6e736f72656463616e6e6f74206f7665727772697465206578697374696e67206d656d6265727363616e6e6f74207375626d6974206d6f72652077686974656c6973742070726f706f73616c7363616e6e6f742073706f6e736f72206d6f726520747269627574652070726f706f73616c7320666f72206e657720746f6b656e73202d206775696c6462616e6b2069732066756c6c70726f706f73616c206465706f73697420746f6b656e207472616e73666572206661696c656470726f706f73616c20766f74696e6720706572696f6420686173206578706972656470726f706f73616c2068617320616c7265616479206265656e2063616e63656c6c656463616e6e6f7420616c726561647920686176652077686974656c69737465642074686520746f6b656e70726f706f73616c2068617320616c7265616479206265656e2070726f636573736564a265627a7a72315820048a48b6753d8b42a89602854a82e5e15754c76f7db613432ef0ee3b5e0e781864736f6c634300050c00325f766f74696e67506572696f644c656e6774682065786365656473206c696d69745f70726f706f73616c4465706f7369742063616e6e6f7420626520736d616c6c6572207468616e205f70726f63657373696e675265776172640000000000000000000000008c8b237bea3c23317d08b73d7137e90cafdf68e600000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001c200000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000002c68af0bb14000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000017a93c163440000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000bb698a2f29f5e21a4032f71f439359cb267e0b32000000000000000000000000892091bdd49fe955859d4bbb8a9a2b7685ccec8200000000000000000000000051876a15aff97a68ed7df051ce11fade0b91b384000000000000000000000000234922c6b8e6bae355435d22dfad49ae8f5fadcf00000000000000000000000037236cd05b34cc79d3715af2383e96dd7443dcf10000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000089d24a6b4ccb1b6faa2625fe562bdd9a23260359

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102955760003560e01c8063753d756311610167578063b2643aab116100ce578063e178034511610087578063e178034514610ae7578063e1a0e3fa14610b0d578063e63bc62d14610b2a578063e681c4aa14610b47578063f5d54c7714610b4f578063feb7ea1d14610b5757610295565b8063b2643aab14610a37578063b470aade14610a8c578063c89039c514610a94578063da35c66414610a9c578063dfdd369e14610aa4578063e0a8f6f514610aca57610295565b80639425a476116101205780639425a476146109aa5780639746d940146109c757806399653fbe146109e45780639d1722cb14610a0a578063a3dc380014610a12578063afe5475f14610a2f57610295565b8063753d75631461095c57806378a8956714610982578063797daf701461098a5780637d5b6c72146109925780638340bbce1461099a5780638b15a605146109a257610295565b80633793ab3c1161020b57806345f2d105116101c457806345f2d105146107ec578063590f940b1461081a57806359999b41146108f8578063635e99aa1461091e57806363858f2d1461092657806373f8fd4b1461092e57610295565b80633793ab3c146106255780633a98ef39146106425780633b214a741461064a5780633fc24bba14610667578063402c1794146106a15780634482394b146106c757610295565b80630cf20cc91161025d5780630cf20cc9146104b9578063115b2d18146104e757806315eb349e1461059b5780631dafede0146105be5780632582bf2a146105f757806327efc0861461061d57610295565b8063013cf08b1461029a57806303e32fa1146103e4578063044a0ca8146103fe578063086146d21461044e57806308ae4b0c14610456575b600080fd5b6102b7600480360360208110156102b057600080fd5b5035610c0b565b604051808f6001600160a01b03166001600160a01b031681526020018e6001600160a01b03166001600160a01b031681526020018d6001600160a01b03166001600160a01b031681526020018c81526020018b81526020018a8152602001896001600160a01b03166001600160a01b03168152602001888152602001876001600160a01b03166001600160a01b0316815260200186815260200185815260200184815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561039c578181015183820152602001610384565b50505050905090810190601f1680156103c95780820380516001836020036101000a031916815260200191505b509f5050505050505050505050505050505060405180910390f35b6103ec610d6e565b60408051918252519081900360200190f35b61042a6004803603604081101561041457600080fd5b506001600160a01b038135169060200135610d74565b6040518082600281111561043a57fe5b60ff16815260200191505060405180910390f35b6103ec610e7c565b61047c6004803603602081101561046c57600080fd5b50356001600160a01b0316610eab565b604080516001600160a01b0390971687526020870195909552858501939093529015156060850152608084015260a0830152519081900360c00190f35b6104e5600480360360408110156104cf57600080fd5b506001600160a01b038135169060200135610eee565b005b6103ec600480360360408110156104fd57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561052757600080fd5b82018360208201111561053957600080fd5b803590602001918460018302840111600160201b8311171561055a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610f58945050505050565b6104e5600480360360408110156105b157600080fd5b50803590602001356110fa565b6105db600480360360208110156105d457600080fd5b50356111c2565b604080516001600160a01b039092168252519081900360200190f35b6104e56004803603602081101561060d57600080fd5b50356001600160a01b03166111e9565b6105db611453565b6104e56004803603602081101561063b57600080fd5b5035611459565b6103ec611680565b6103ec6004803603602081101561066057600080fd5b5035611686565b61068d6004803603602081101561067d57600080fd5b50356001600160a01b03166116a4565b604080519115158252519081900360200190f35b6105db600480360360208110156106b757600080fd5b50356001600160a01b03166116b9565b6104e5600480360360608110156106dd57600080fd5b810190602081018135600160201b8111156106f757600080fd5b82018360208201111561070957600080fd5b803590602001918460208302840111600160201b8311171561072a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561077957600080fd5b82018360208201111561078b57600080fd5b803590602001918460208302840111600160201b831117156107ac57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050505035151590506116d4565b6103ec6004803603604081101561080257600080fd5b506001600160a01b0381358116916020013516611812565b6103ec600480360361010081101561083157600080fd5b6001600160a01b038235811692602081013592604082013592606083013592608081013582169260a08201359260c0830135169190810190610100810160e0820135600160201b81111561088457600080fd5b82018360208201111561089657600080fd5b803590602001918460018302840111600160201b831117156108b757600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061182f945050505050565b6104e56004803603602081101561090e57600080fd5b50356001600160a01b0316611c7b565b6103ec611f47565b6103ec611f4d565b6103ec6004803603604081101561094457600080fd5b506001600160a01b0381358116916020013516611f53565b61068d6004803603602081101561097257600080fd5b50356001600160a01b0316611f7e565b6103ec611f93565b6103ec611f99565b6103ec611f9f565b6103ec611fa5565b6103ec611fab565b61068d600480360360208110156109c057600080fd5b5035611fb1565b6104e5600480360360208110156109dd57600080fd5b5035611fd8565b6104e5600480360360408110156109fa57600080fd5b508035906020013560ff166126b6565b6103ec612b82565b61068d60048036036020811015610a2857600080fd5b5035612b88565b6103ec612c31565b610a5460048036036020811015610a4d57600080fd5b5035612c37565b604051808260c080838360005b83811015610a79578181015183820152602001610a61565b5050505090500191505060405180910390f35b6103ec612ca1565b6105db612ca7565b6103ec612cb6565b6104e560048036036020811015610aba57600080fd5b50356001600160a01b0316612cbc565b6104e560048036036020811015610ae057600080fd5b5035612e20565b61068d60048036036020811015610afd57600080fd5b50356001600160a01b0316612ff2565b6104e560048036036020811015610b2357600080fd5b5035613007565b6104e560048036036020811015610b4057600080fd5b503561321a565b6105db6137c3565b6105db6137c9565b6103ec60048036036040811015610b6d57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610b9757600080fd5b820183602082011115610ba957600080fd5b803590602001918460018302840111600160201b83111715610bca57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506137cf945050505050565b60146020528060005260406000206000915090508060000160009054906101000a90046001600160a01b0316908060010160009054906101000a90046001600160a01b0316908060020160009054906101000a90046001600160a01b0316908060030154908060040154908060050154908060060160009054906101000a90046001600160a01b0316908060070154908060080160009054906101000a90046001600160a01b03169080600901549080600a01549080600b01549080600d018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d5e5780601f10610d3357610100808354040283529160200191610d5e565b820191906000526020600020905b815481529060010190602001808311610d4157829003601f168201915b50505050509080600e015490508e565b60065481565b6001600160a01b03821660009081526012602052604081206003015460ff16610ddc576040805162461bcd60e51b81526020600482015260156024820152741b595b58995c88191bd95cc81b9bdd08195e1a5cdd605a1b604482015290519081900360640190fd5b6015548210610e2c576040805162461bcd60e51b81526020600482015260176024820152761c1c9bdc1bdcd85b08191bd95cc81b9bdd08195e1a5cdd604a1b604482015290519081900360640190fd5b6014600060158481548110610e3d57fe5b6000918252602080832090910154835282810193909352604091820181206001600160a01b0387168252600f0190925290205460ff1690505b92915050565b6000610ea5600154610e996007544261395190919063ffffffff16565b9063ffffffff61396616565b90505b90565b6012602052600090815260409020805460018201546002830154600384015460048501546005909501546001600160a01b03909416949293919260ff9091169186565b60005460ff16610f33576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff19169055610f478282613988565b50506000805460ff19166001179055565b6000805460ff16610f9e576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff19169055610fb061493c565b506001600160a01b03808416600090815260126020908152604091829020825160c081018452815490941684526001810154918401829052600281015492840192909252600382015460ff16151560608401526004820154608084015260059091015460a0830152151580611029575060008160400151115b6110645760405162461bcd60e51b815260040180806020018281038252602f815260200180614d3c602f913960400191505060405180910390fd5b6001600160a01b038416600090815260126020526040902060050154156110bc5760405162461bcd60e51b8152600401808060200182810382526021815260200180614cad6021913960400191505060405180910390fd5b6110c461497d565b600160a08201526110dd85600080808080808b89613b07565b50506009546000805460ff19166001179055600019019392505050565b60005460ff1661113f576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff191681553381526012602052604090206001015415158061117757503360009081526012602052604090206002015415155b6111b7576040805162461bcd60e51b815260206004820152600c60248201526b3737ba10309036b2b6b132b960a11b604482015290519081900360640190fd5b610f47338383613ec1565b600f81815481106111cf57fe5b6000918252602090912001546001600160a01b0316905081565b60005460ff1661122e576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff191681553381526012602052604090206001015461128d576040805162461bcd60e51b81526020600482015260116024820152703737ba10309039b430b932b437b63232b960791b604482015290519081900360640190fd5b6001600160a01b0381166112e8576040805162461bcd60e51b815260206004820152601a60248201527f6e657744656c65676174654b65792063616e6e6f742062652030000000000000604482015290519081900360640190fd5b6001600160a01b03811633146113bd576001600160a01b03811660009081526012602052604090206003015460ff16156113535760405162461bcd60e51b8152600401808060200182810382526021815260200180614e3b6021913960400191505060405180910390fd5b6001600160a01b03808216600090815260136020908152604080832054909316825260129052206003015460ff16156113bd5760405162461bcd60e51b8152600401808060200182810382526027815260200180614b896027913960400191505060405180910390fd5b33600081815260126020908152604080832080546001600160a01b0390811685526013845282852080546001600160a01b031990811690915590871680865294839020805482168717905581541684178155815193845290519093927fde7b64a369e10562cc2e71f0f1f944eaf144b75fead6ecb51fac9c4dd693488592908290030190a250506000805460ff19166001179055565b61babe81565b60005460ff1661149e576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff191690556114b1816141ba565b6000601582815481106114c057fe5b60009182526020808320919091015480835260149091526040909120600c81015491925090600160201b900460ff16611540576040805162461bcd60e51b815260206004820152601c60248201527f6d75737420626520612077686974656c6973742070726f706f73616c00000000604482015290519081900360640190fd5b600c8101805461ff001916610100179055600061155c84614523565b600f549091506101901161156e575060005b80156115ff57600c8201805462ff00001916620100001790556006820180546001600160a01b039081166000908152600e60205260408120805460ff191660019081179091559254600f805494850181559091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8029092018054929091166001600160a01b03199092169190911790555b60068201546001600160a01b039081166000908152601060205260409020805460ff1916905560028301546116349116614762565b6040805182151581529051849186917f2094fc13d2ecb0acd6861e82bd006c7e5ab6f312ec0c6cdfe3d1a01ee54d885a9181900360200190a350506000805460ff191660011790555050565b600a5481565b6015818154811061169357fe5b600091825260209091200154905081565b60116020526000908152604090205460ff1681565b6013602052600090815260409020546001600160a01b031681565b60005460ff16611719576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff1916905581518351146117635760405162461bcd60e51b8152600401808060200182810382526032815260200180614d6b6032913960400191505060405180910390fd5b60005b83518110156117ff57600083828151811061177d57fe5b6020026020010151905082156117d957336000908152600d6020526040812086519091908790859081106117ad57fe5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205490505b6117f68583815181106117e857fe5b602002602001015182613988565b50600101611766565b50506000805460ff191660011790555050565b600d60209081526000928352604080842090915290825290205481565b6000805460ff16611875576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff19169055670de0b6b3a7640000611898898963ffffffff6147b716565b11156118eb576040805162461bcd60e51b815260206004820152601960248201527f746f6f206d616e79207368617265732072657175657374656400000000000000604482015290519081900360640190fd5b6001600160a01b0385166000908152600e602052604090205460ff16611958576040805162461bcd60e51b815260206004820152601f60248201527f74726962757465546f6b656e206973206e6f742077686974656c697374656400604482015290519081900360640190fd5b6001600160a01b0383166000908152600e602052604090205460ff166119c5576040805162461bcd60e51b815260206004820152601a60248201527f7061796d656e74206973206e6f742077686974656c6973746564000000000000604482015290519081900360640190fd5b6001600160a01b038916611a18576040805162461bcd60e51b815260206004820152601560248201527406170706c6963616e742063616e6e6f74206265203605c1b604482015290519081900360640190fd5b6001600160a01b03891661dead14801590611a3e57506001600160a01b03891661beef14155b8015611a5557506001600160a01b03891661babe14155b611a905760405162461bcd60e51b8152600401808060200182810382526024815260200180614c426024913960400191505060405180910390fd5b6001600160a01b03891660009081526012602052604090206005015415611ae85760405162461bcd60e51b8152600401808060200182810382526025815260200180614df36025913960400191505060405180910390fd5b600086118015611b1b57506001600160a01b0385166000908152600080516020614d9d8339815191526020526040902054155b15611b615760c8600c5410611b615760405162461bcd60e51b8152600401808060200182810382526047815260200180614c666047913960600191505060405180910390fd5b604080516323b872dd60e01b81523360048201523060248201526044810188905290516001600160a01b038716916323b872dd9160648083019260209291908290030181600087803b158015611bb657600080fd5b505af1158015611bca573d6000803e3d6000fd5b505050506040513d6020811015611be057600080fd5b5051611c33576040805162461bcd60e51b815260206004820152601d60248201527f7472696275746520746f6b656e207472616e73666572206661696c6564000000604482015290519081900360640190fd5b611c4061beef86886147d0565b611c4861497d565b611c598a8a8a8a8a8a8a8a89613b07565b5050600954600019016000805460ff1916600117905598975050505050505050565b336000908152601360209081526040808320546001600160a01b031683526012909152902060010154611ce6576040805162461bcd60e51b815260206004820152600e60248201526d6e6f7420612064656c656761746560901b604482015290519081900360640190fd5b60005460ff16611d2b576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff191681556001600160a01b0382168082527fa30f7a7832bd8a7a8daa3a3f5b7a6f7cec6a2fbb1a121fa5b76520e44736771c602090815260408084205481516370a0823160e01b81523060048201529151611de494919391926370a08231926024808301939192829003018186803b158015611dac57600080fd5b505afa158015611dc0573d6000803e3d6000fd5b505050506040513d6020811015611dd657600080fd5b50519063ffffffff61395116565b905060008111611e32576040805162461bcd60e51b81526020600482015260146024820152731b9bc81d1bdad95b9cc81d1bc818dbdb1b1958dd60621b604482015290519081900360640190fd5b6001600160a01b0382166000908152600e602052604090205460ff16611e895760405162461bcd60e51b8152600401808060200182810382526024815260200180614cf16024913960400191505060405180910390fd5b6001600160a01b0382166000908152600080516020614d9d8339815191526020526040902054611eea5760405162461bcd60e51b8152600401808060200182810382526036815260200180614dbd6036913960400191505060405180910390fd5b611ef761dead83836147d0565b6040805182815290516001600160a01b038416917f9381e53ffdc9733a6783a6f8665be3f89c231bb81a6771996ed553b4e75c0fe3919081900360200190a250506000805460ff19166001179055565b600b5481565b60035481565b6001600160a01b039182166000908152600d6020908152604080832093909416825291909152205490565b600e6020526000908152604090205460ff1681565b600f5490565b60155490565b60075481565b60025481565b60045481565b6000611fc8600254836147b790919063ffffffff16565b611fd0610e7c565b101592915050565b60005460ff1661201d576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff19168155338152601360209081526040808320546001600160a01b03168352601290915290206001015461208f576040805162461bcd60e51b815260206004820152600e60248201526d6e6f7420612064656c656761746560901b604482015290519081900360640190fd5b60085460048054604080516323b872dd60e01b815233938101939093523060248401526044830191909152516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b1580156120ef57600080fd5b505af1158015612103573d6000803e3d6000fd5b505050506040513d602081101561211957600080fd5b50516121565760405162461bcd60e51b8152600401808060200182810382526026815260200180614eca6026913960400191505060405180910390fd5b6008546004546121759161beef916001600160a01b03909116906147d0565b600081815260146020526040902060018101546001600160a01b03166121e2576040805162461bcd60e51b815260206004820181905260248201527f70726f706f73616c206d7573742068617665206265656e2070726f706f736564604482015290519081900360640190fd5b600c81015460ff16156122265760405162461bcd60e51b8152600401808060200182810382526023815260200180614e186023913960400191505060405180910390fd5b600c8101546301000000900460ff1615612287576040805162461bcd60e51b815260206004820152601b60248201527f70726f706f73616c20686173206265656e2063616e63656c6c65640000000000604482015290519081900360640190fd5b80546001600160a01b0316600090815260126020526040902060050154156122e05760405162461bcd60e51b8152600401808060200182810382526025815260200180614df36025913960400191505060405180910390fd5b6000816005015411801561231b575060068101546001600160a01b03166000908152600080516020614d9d8339815191526020526040902054155b156123615760c8600c54106123615760405162461bcd60e51b8152600401808060200182810382526048815260200180614e826048913960600191505060405180910390fd5b600c810154600160201b900460ff16156124b15760068101546001600160a01b03166000908152600e602052604090205460ff16156123d15760405162461bcd60e51b8152600401808060200182810382526029815260200180614f356029913960400191505060405180910390fd5b60068101546001600160a01b031660009081526010602052604090205460ff1615612443576040805162461bcd60e51b815260206004820152601d60248201527f616c72656164792070726f706f73656420746f2077686974656c697374000000604482015290519081900360640190fd5b600f54610190116124855760405162461bcd60e51b8152600401808060200182810382526027815260200180614d156027913960400191505060405180910390fd5b60068101546001600160a01b03166000908152601060205260409020805460ff1916600117905561255b565b600c81015465010000000000900460ff161561255b5780546001600160a01b031660009081526011602052604090205460ff1615612536576040805162461bcd60e51b815260206004820152601860248201527f616c72656164792070726f706f73656420746f206b69636b0000000000000000604482015290519081900360640190fd5b80546001600160a01b03166000908152601160205260409020805460ff191660011790555b60006125d060016125c461256d610e7c565b601554156125bc576015805460149160009161259090600163ffffffff61395116565b8154811061259a57fe5b90600052602060002001548152602001908152602001600020600901546125bf565b60005b61482e565b9063ffffffff6147b716565b60098301819055336000818152601360205260408120546002860180546001600160a01b0319166001600160a01b039092169182179055600c8601805460ff19166001908117909155601580548083018255938190527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4759093018890559154939450928392917f2a383a979381335e3eb401ac01dd8083e024ff0256bf5338456ffc0063390bbd9188916126849190613951565b604080519283526020830191909152818101879052519081900360600190a350506000805460ff191660011790555050565b60005460ff166126fb576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff19168155338152601360209081526040808320546001600160a01b03168352601290915290206001015461276d576040805162461bcd60e51b815260206004820152600e60248201526d6e6f7420612064656c656761746560901b604482015290519081900360640190fd5b336000908152601360209081526040808320546001600160a01b0316808452601290925290912060155484106127e4576040805162461bcd60e51b81526020600482015260176024820152761c1c9bdc1bdcd85b08191bd95cc81b9bdd08195e1a5cdd604a1b604482015290519081900360640190fd5b600060146000601587815481106127f757fe5b90600052602060002001548152602001908152602001600020905060038460ff1610612860576040805162461bcd60e51b81526020600482015260136024820152726d757374206265206c657373207468616e203360681b604482015290519081900360640190fd5b60008460ff16600281111561287157fe5b90508160090154612880610e7c565b10156128d3576040805162461bcd60e51b815260206004820152601d60248201527f766f74696e6720706572696f6420686173206e6f742073746172746564000000604482015290519081900360640190fd5b6128e08260090154611fb1565b1561291c5760405162461bcd60e51b8152600401808060200182810382526022815260200180614ef06022913960400191505060405180910390fd5b6001600160a01b0384166000908152600f8301602052604081205460ff16600281111561294557fe5b14612997576040805162461bcd60e51b815260206004820152601860248201527f6d656d6265722068617320616c726561647920766f7465640000000000000000604482015290519081900360640190fd5b60018160028111156129a557fe5b14806129bc575060028160028111156129ba57fe5b145b612a0d576040805162461bcd60e51b815260206004820152601d60248201527f766f7465206d7573742062652065697468657220596573206f72204e6f000000604482015290519081900360640190fd5b6001600160a01b0384166000908152600f830160205260409020805482919060ff19166001836002811115612a3e57fe5b02179055506001816002811115612a5157fe5b1415612ac9576001830154600a830154612a709163ffffffff6147b716565b600a8301556004830154861115612a8957600483018690555b600e820154600b54600a54612aa39163ffffffff6147b716565b1115612ac457600b54600a54612abe9163ffffffff6147b716565b600e8301555b612afc565b6002816002811115612ad757fe5b1415612afc576001830154600b830154612af69163ffffffff6147b716565b600b8301555b836001600160a01b0316336001600160a01b0316877f804f03797630bf8b8a46b9371608abbf7d78a20df720e477bab641957ca68a2060158a81548110612b3f57fe5b906000526020600020015489604051808381526020018260ff1660ff1681526020019250505060405180910390a450506000805460ff1916600117905550505050565b600c5481565b6015546000908210612bdb576040805162461bcd60e51b81526020600482015260176024820152761c1c9bdc1bdcd85b08191bd95cc81b9bdd08195e1a5cdd604a1b604482015290519081900360640190fd5b6014600060158481548110612bec57fe5b90600052602060002001548152602001908152602001600020600c01600160068110612c1457fe5b602081049091015460ff601f9092166101000a9004169050919050565b60055481565b612c3f61497d565b600082815260146020526040808220815160c081019283905292600c909101916006918390855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411612c66575094979650505050505050565b60015481565b6008546001600160a01b031681565b60095481565b60005460ff16612d01576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff191681556001600160a01b03821681526012602052604090206005810154612d6f576040805162461bcd60e51b81526020600482015260166024820152751b595b58995c881b5d5cdd081899481a5b881a985a5b60521b604482015290519081900360640190fd5b6000816002015411612dc8576040805162461bcd60e51b815260206004820152601a60248201527f6d656d626572206d757374206861766520736f6d65206c6f6f74000000000000604482015290519081900360640190fd5b612dd58160040154612b88565b612e105760405162461bcd60e51b815260040180806020018281038252604d815260200180614bd0604d913960600191505060405180910390fd5b610f478260008360020154613ec1565b60005460ff16612e65576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff19168155818152601460205260409020600c81015460ff1615612ebf5760405162461bcd60e51b8152600401808060200182810382526023815260200180614e186023913960400191505060405180910390fd5b600c8101546301000000900460ff1615612f0a5760405162461bcd60e51b8152600401808060200182810382526023815260200180614f126023913960400191505060405180910390fd5b60018101546001600160a01b03163314612f6b576040805162461bcd60e51b815260206004820152601e60248201527f736f6c656c79207468652070726f706f7365722063616e2063616e63656c0000604482015290519081900360640190fd5b600c8101805463ff00000019166301000000179055600181015460068201546005830154612fab9261beef926001600160a01b0391821692911690614845565b60408051338152905183917fc215fed6680bb02d323dc3f8b8f85241572607538426059c9232601bd293c3be919081900360200190a250506000805460ff19166001179055565b60106020526000908152604090205460ff1681565b60005460ff1661304c576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff1916905561305f816141ba565b60006015828154811061306e57fe5b60009182526020808320919091015480835260149091526040909120600c8101549192509065010000000000900460ff166130f0576040805162461bcd60e51b815260206004820152601d60248201527f6d7573742062652061206775696c64206b69636b2070726f706f73616c000000604482015290519081900360640190fd5b600c8101805461ff001916610100179055600061310c84614523565b9050801561319c57600c8201805462ff000019166201000017905581546001600160a01b03166000908152601260205260409020600581018590556001810154600282015461315a916147b7565b60028201556001810154600a546131769163ffffffff61395116565b600a556001810154600b546131909163ffffffff6147b716565b600b5560006001909101555b81546001600160a01b039081166000908152601160205260409020805460ff1916905560028301546131ce9116614762565b6040805182151581529051849186917f0e347d00d3e9e6cdff9e6c09092c9ff1bd448f9b3dfb7091b30939ec5e7a3c739181900360200190a350506000805460ff191660011790555050565b60005460ff1661325f576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff19169055613272816141ba565b60006015828154811061328157fe5b60009182526020808320919091015480835260149091526040909120600c81015491925090600160201b900460ff161580156132cb5750600c81015465010000000000900460ff16155b61331c576040805162461bcd60e51b815260206004820152601b60248201527f6d7573742062652061207374616e646172642070726f706f73616c0000000000604482015290519081900360640190fd5b600c8101805461ff001916610100179055600061333884614523565b9050670de0b6b3a764000061336a83600401546125c485600301546125c4600b54600a546147b790919063ffffffff16565b1115613374575060005b60088201546001600160a01b03166000908152600080516020614d9d8339815191526020526040902054600783015411156133ad575060005b600082600501541180156133e8575060068201546001600160a01b03166000908152600080516020614d9d8339815191526020526040902054155b80156133f7575060c8600c5410155b15613400575060005b801561373557600c8201805462ff000019166201000017905581546001600160a01b031660009081526012602052604090206003015460ff16156134d757600382015482546001600160a01b031660009081526012602052604090206001015461346f9163ffffffff6147b716565b82546001600160a01b039081166000908152601260205260408082206001019390935560048501548554909216815291909120600201546134b59163ffffffff6147b716565b82546001600160a01b031660009081526012602052604090206002015561361a565b81546001600160a01b03908116600090815260136020908152604080832054909316825260129052206003015460ff161561355b5781546001600160a01b0390811660009081526013602090815260408083205490931680835283832080546001600160a01b03199081168317909155601290925292909120805490911690911790555b6040805160c08101825283546001600160a01b0390811680835260038087015460208086019182526004808a0154878901908152600160608901818152600060808b0181815260a08c01828152998252601287528c82209b518c54908c166001600160a01b0319918216178d559751938c0193909355925160028b015551958901805496151560ff1990971696909617909555935190870155925160059095019490945586549092168083526013909152929020805490911690911790555b6003820154600a546136319163ffffffff6147b716565b600a556004820154600b5461364b9163ffffffff6147b716565b600b5560068201546001600160a01b03166000908152600080516020614d9d8339815191526020526040902054158015613689575060008260050154115b1561369857600c805460010190555b600682015460058301546136bd9161beef9161dead916001600160a01b031690614845565b8154600883015460078401546136e59261dead926001600160a01b0391821692911690614845565b60088201546001600160a01b03166000908152600080516020614d9d8339815191526020526040902054158015613720575060008260070154115b1561373057600c80546000190190555b613760565b6001820154600683015460058401546137609261beef926001600160a01b0391821692911690614845565b6002820154613777906001600160a01b0316614762565b6040805182151581529051849186917f86f74240ecee9e4230d26ff92e17fee978460d9c0f78f5c88b2864c9e7a494279181900360200190a350506000805460ff191660011790555050565b61beef81565b61dead81565b6000805460ff16613815576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bb0833981519152604482015290519081900360640190fd5b6000805460ff191690556001600160a01b03831661387a576040805162461bcd60e51b815260206004820152601a60248201527f6d7573742070726f7669646520746f6b656e2061646472657373000000000000604482015290519081900360640190fd5b6001600160a01b0383166000908152600e602052604090205460ff16156138d25760405162461bcd60e51b8152600401808060200182810382526029815260200180614f356029913960400191505060405180910390fd5b600f54610190116139145760405162461bcd60e51b8152600401808060200182810382526026815260200180614e5c6026913960400191505060405180910390fd5b61391c61497d565b6001608082015261393560008080808881808a89613b07565b5050600954600019016000805460ff1916600117905592915050565b60008282111561396057600080fd5b50900390565b600080821161397457600080fd5b600082848161397f57fe5b04949350505050565b336000908152600d602090815260408083206001600160a01b03861684529091529020548111156139f7576040805162461bcd60e51b8152602060048201526014602482015273696e73756666696369656e742062616c616e636560601b604482015290519081900360640190fd5b613a02338383614861565b6040805163a9059cbb60e01b81523360048201526024810183905290516001600160a01b0384169163a9059cbb9160448083019260209291908290030181600087803b158015613a5157600080fd5b505af1158015613a65573d6000803e3d6000fd5b505050506040513d6020811015613a7b57600080fd5b5051613ac0576040805162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b604482015290519081900360640190fd5b604080516001600160a01b038416815260208101839052815133927f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb928290030190a25050565b613b0f61499b565b604051806101e001604052808b6001600160a01b03168152602001336001600160a01b0316815260200160006001600160a01b031681526020018a8152602001898152602001888152602001876001600160a01b03168152602001868152602001856001600160a01b03168152602001600081526020016000815260200160008152602001838152602001848152602001600081525090508060146000600954815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060e082015181600701556101008201518160080160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610120820151816009015561014082015181600a015561016082015181600b015561018082015181600c01906006613d00929190614a44565b506101a08201518051613d1d91600d840191602090910190614ad6565b506101c082015181600e0155905050600060136000336001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160a01b03169050806001600160a01b0316336001600160a01b03168c6001600160a01b03167fa763e0f5e4f4e33a3397b4ba22677c9b6fd2075ed6504596333006ff2f3e38748d8d8d8d8d8d8d8d600954604051808a8152602001898152602001888152602001876001600160a01b03166001600160a01b03168152602001868152602001856001600160a01b03166001600160a01b031681526020018060200184600660200280838360005b83811015613e27578181015183820152602001613e0f565b50505050905001838152602001828103825285818151815260200191508051906020019080838360005b83811015613e69578181015183820152602001613e51565b50505050905090810190601f168015613e965780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390a45050600980546001019055505050505050505050565b6000613eda600b54600a546147b790919063ffffffff16565b6001600160a01b0385166000908152601260205260409020600181015491925090841115613f45576040805162461bcd60e51b8152602060048201526013602482015272696e73756666696369656e742073686172657360681b604482015290519081900360640190fd5b8281600201541015613f92576040805162461bcd60e51b81526020600482015260116024820152701a5b9cdd59999a58da595b9d081b1bdbdd607a1b604482015290519081900360640190fd5b613f9f8160040154612b88565b613fda5760405162461bcd60e51b815260040180806020018281038252604d815260200180614bd0604d913960600191505060405180910390fd5b6000613fec858563ffffffff6147b716565b6001830154909150614004908663ffffffff61395116565b6001830155600282015461401e908563ffffffff61395116565b6002830155600a54614036908663ffffffff61395116565b600a55600b5461404c908563ffffffff61395116565b600b5560005b600f548110156141775761dead6000908152600d602052600f80546140ba91600080516020614d9d833981519152918491908690811061408e57fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205484876148c1565b9050801561416e5761dead6000908152600d602052600f80548392600080516020614d9d833981519152929091869081106140f157fe5b60009182526020808320909101546001600160a01b0390811684528382019490945260409283018220805495909503909455918b168252600d909252908120600f8054849391908690811061414257fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020805490910190555b50600101614052565b506040805186815260208101869052815133927fcad1a1c68982832d9abc314de8a1e5d5e8c81b0588961e360766736d10c3be1a928290030190a2505050505050565b601554811061420a576040805162461bcd60e51b81526020600482015260176024820152761c1c9bdc1bdcd85b08191bd95cc81b9bdd08195e1a5cdd604a1b604482015290519081900360640190fd5b61421261499b565b601460006015848154811061422357fe5b6000918252602080832091909101548352828101939093526040918201812082516101e08101845281546001600160a01b039081168252600183015481169582019590955260028201548516818501526003820154606082015260048201546080820152600582015460a0820152600680830154861660c080840191909152600784015460e084015260088401549096166101008301526009830154610120830152600a830154610140830152600b83015461016083015284519586019485905290949193610180860193600c86019291908390855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116142f957505050928452505050600d8201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156143bc5780601f10614391576101008083540402835291602001916143bc565b820191906000526020600020905b81548152906001019060200180831161439f57829003601f168201915b50505050508152602001600e8201548152505090506143f16003546125c46002548461012001516147b790919063ffffffff16565b6143f9610e7c565b10156144365760405162461bcd60e51b8152600401808060200182810382526025815260200180614c1d6025913960400191505060405180910390fd5b610180810151602001511561447c5760405162461bcd60e51b8152600401808060200182810382526023815260200180614f5e6023913960400191505060405180910390fd5b8115806144e4575060146000601561449b85600163ffffffff61395116565b815481106144a557fe5b90600052602060002001548152602001908152602001600020600c016001600681106144cd57fe5b602081049091015460ff601f9092166101000a9004165b61451f5760405162461bcd60e51b8152600401808060200182810382526023815260200180614cce6023913960400191505060405180910390fd5b5050565b600061452d61499b565b601460006015858154811061453e57fe5b6000918252602080832091909101548352828101939093526040918201812082516101e08101845281546001600160a01b039081168252600183015481169582019590955260028201548516818501526003820154606082015260048201546080820152600582015460a0820152600680830154861660c080840191909152600784015460e084015260088401549096166101008301526009830154610120830152600a830154610140830152600b83015461016083015284519586019485905290949193610180860193600c86019291908390855b825461010083900a900460ff16151581526020600192830181810494850194909303909202910180841161461457505050928452505050600d8201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156146d75780601f106146ac576101008083540402835291602001916146d7565b820191906000526020600020905b8154815290600101906020018083116146ba57829003601f168201915b50505050508152602001600e820154815250509050806101600151816101400151119150806101c0015161472a60055461471e600b54600a546147b790919063ffffffff16565b9063ffffffff61491516565b101561473557600091505b80516001600160a01b03166000908152601260205260409020600501541561475c57600091505b50919050565b6008546006546147819161beef9133916001600160a01b031690614845565b6008546006546004546147b49261beef9285926001600160a01b03909216916147af9163ffffffff61395116565b614845565b50565b6000828201838110156147c957600080fd5b9392505050565b6001600160a01b039283166000908152600d602090815260408083209490951682529283528381208054830190557fa30f7a7832bd8a7a8daa3a3f5b7a6f7cec6a2fbb1a121fa5b76520e44736771c90925291902080549091019055565b60008183101561483e57816147c9565b5090919050565b614850848383614861565b61485b8383836147d0565b50505050565b6001600160a01b039283166000908152600d60209081526040808320949095168252928352838120805483900390557fa30f7a7832bd8a7a8daa3a3f5b7a6f7cec6a2fbb1a121fa5b76520e44736771c9092529190208054919091039055565b6000816148cd57600080fd5b836148da575060006147c9565b838302838582816148e757fe5b041415614900578281816148f757fe5b049150506147c9565b8383868161490a57fe5b040295945050505050565b60008261492457506000610e76565b8282028284828161493157fe5b04146147c957600080fd5b6040518060c0016040528060006001600160a01b03168152602001600081526020016000815260200160001515815260200160008152602001600081525090565b6040518060c001604052806006906020820280388339509192915050565b604051806101e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160006001600160a01b031681526020016000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001614a3061497d565b815260200160608152602001600081525090565b600183019183908215614ac65791602002820160005b83821115614a9757835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302614a5a565b8015614ac45782816101000a81549060ff0219169055600101602081600001049283019260010302614a97565b505b50614ad2929150614b50565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614b1757805160ff1916838001178555614b44565b82800160010185558215614b44579182015b82811115614b44578251825591602001919060010190614b29565b50614ad2929150614b6e565b610ea891905b80821115614ad257805460ff19168155600101614b56565b610ea891905b80821115614ad25760008155600101614b7456fe63616e6e6f74206f7665727772697465206578697374696e672064656c6567617465206b6579735265656e7472616e637947756172643a207265656e7472616e742063616c6c0063616e6e6f7420726167657175697420756e74696c206869676865737420696e6465782070726f706f73616c206d656d62657220766f74656420594553206f6e2069732070726f63657373656470726f706f73616c206973206e6f7420726561647920746f2062652070726f6365737365646170706c6963616e7420616464726573732063616e6e6f7420626520726573657276656463616e6e6f74207375626d6974206d6f726520747269627574652070726f706f73616c7320666f72206e657720746f6b656e73202d206775696c6462616e6b2069732066756c6c6d656d626572206d757374206e6f7420616c7265616479206265206a61696c656470726576696f75732070726f706f73616c206d7573742062652070726f636573736564746f6b656e20746f20636f6c6c656374206d7573742062652077686974656c697374656463616e6e6f742073706f6e736f72206d6f72652077686974656c6973742070726f706f73616c736d656d626572206d7573742068617665206174206c65617374206f6e65207368617265206f72206f6e65206c6f6f74746f6b656e7320616e6420616d6f756e747320617272617973206d757374206265206d61746368696e67206c656e67746873dc7fafdc41998a74ecacb8f8bd877011aba1f1d03a3a0d37a2e7879a393b1d6a746f6b656e20746f20636f6c6c656374206d7573742068617665206e6f6e2d7a65726f206775696c642062616e6b2062616c616e636570726f706f73616c206170706c6963616e74206d757374206e6f74206265206a61696c656470726f706f73616c2068617320616c7265616479206265656e2073706f6e736f72656463616e6e6f74206f7665727772697465206578697374696e67206d656d6265727363616e6e6f74207375626d6974206d6f72652077686974656c6973742070726f706f73616c7363616e6e6f742073706f6e736f72206d6f726520747269627574652070726f706f73616c7320666f72206e657720746f6b656e73202d206775696c6462616e6b2069732066756c6c70726f706f73616c206465706f73697420746f6b656e207472616e73666572206661696c656470726f706f73616c20766f74696e6720706572696f6420686173206578706972656470726f706f73616c2068617320616c7265616479206265656e2063616e63656c6c656463616e6e6f7420616c726561647920686176652077686974656c69737465642074686520746f6b656e70726f706f73616c2068617320616c7265616479206265656e2070726f636573736564a265627a7a72315820048a48b6753d8b42a89602854a82e5e15754c76f7db613432ef0ee3b5e0e781864736f6c634300050c0032

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

0000000000000000000000008c8b237bea3c23317d08b73d7137e90cafdf68e600000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001c200000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000002c68af0bb14000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000017a93c163440000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000bb698a2f29f5e21a4032f71f439359cb267e0b32000000000000000000000000892091bdd49fe955859d4bbb8a9a2b7685ccec8200000000000000000000000051876a15aff97a68ed7df051ce11fade0b91b384000000000000000000000000234922c6b8e6bae355435d22dfad49ae8f5fadcf00000000000000000000000037236cd05b34cc79d3715af2383e96dd7443dcf10000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000089d24a6b4ccb1b6faa2625fe562bdd9a23260359

-----Decoded View---------------
Arg [0] : _summoner (address): 0x8C8b237bEa3C23317D08b73D7137e90cAFDF68E6
Arg [1] : _approvedTokens (address[]): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2,0xBB698a2F29f5E21A4032f71F439359cB267e0B32,0x892091bDd49FE955859D4bbB8a9A2B7685CCec82,0x51876a15Aff97A68ED7DF051cE11fade0b91b384,0x234922c6b8E6baE355435d22dFaD49Ae8F5fADCF,0x37236CD05b34Cc79d3715AF2383E96dd7443dCF1,0x6B175474E89094C44Da98b954EedeAC495271d0F,0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359
Arg [2] : _periodDuration (uint256): 7200
Arg [3] : _votingPeriodLength (uint256): 84
Arg [4] : _gracePeriodLength (uint256): 84
Arg [5] : _proposalDeposit (uint256): 200000000000000000
Arg [6] : _dilutionBound (uint256): 3
Arg [7] : _processingReward (uint256): 6660000000000000

-----Encoded View---------------
17 Constructor Arguments found :
Arg [0] : 0000000000000000000000008c8b237bea3c23317d08b73d7137e90cafdf68e6
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000001c20
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000054
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000054
Arg [5] : 00000000000000000000000000000000000000000000000002c68af0bb140000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [7] : 0000000000000000000000000000000000000000000000000017a93c16344000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [9] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [10] : 000000000000000000000000bb698a2f29f5e21a4032f71f439359cb267e0b32
Arg [11] : 000000000000000000000000892091bdd49fe955859d4bbb8a9a2b7685ccec82
Arg [12] : 00000000000000000000000051876a15aff97a68ed7df051ce11fade0b91b384
Arg [13] : 000000000000000000000000234922c6b8e6bae355435d22dfad49ae8f5fadcf
Arg [14] : 00000000000000000000000037236cd05b34cc79d3715af2383e96dd7443dcf1
Arg [15] : 0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f
Arg [16] : 00000000000000000000000089d24a6b4ccb1b6faa2625fe562bdd9a23260359


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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.