ETH Price: $3,549.15 (+2.23%)
Gas: 125 Gwei

Contract

0x8C1bB3855710294c520F7094887AB504946DA124
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x60806040112750772020-11-17 11:08:471203 days ago1605611327IN
 Create: TwoKeyBudgetCampaignsPaymentsHandler
0 ETH0.2837180460

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TwoKeyBudgetCampaignsPaymentsHandler

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

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

pragma solidity ^0.4.13;

contract IERC20 {
    function balanceOf(
        address whom
    )
    external
    view
    returns (uint);


    function transfer(
        address _to,
        uint256 _value
    )
    external
    returns (bool);


    function transferFrom(
        address _from,
        address _to,
        uint256 _value
    )
    external
    returns (bool);



    function approve(
        address _spender,
        uint256 _value
    )
    public
    returns (bool);



    function decimals()
    external
    view
    returns (uint);


    function symbol()
    external
    view
    returns (string);


    function name()
    external
    view
    returns (string);


    function freezeTransfers()
    external;


    function unfreezeTransfers()
    external;
}

contract IStructuredStorage {

    function setProxyLogicContractAndDeployer(address _proxyLogicContract, address _deployer) external;
    function setProxyLogicContract(address _proxyLogicContract) external;

    // *** Getter Methods ***
    function getUint(bytes32 _key) external view returns(uint);
    function getString(bytes32 _key) external view returns(string);
    function getAddress(bytes32 _key) external view returns(address);
    function getBytes(bytes32 _key) external view returns(bytes);
    function getBool(bytes32 _key) external view returns(bool);
    function getInt(bytes32 _key) external view returns(int);
    function getBytes32(bytes32 _key) external view returns(bytes32);

    // *** Getter Methods For Arrays ***
    function getBytes32Array(bytes32 _key) external view returns (bytes32[]);
    function getAddressArray(bytes32 _key) external view returns (address[]);
    function getUintArray(bytes32 _key) external view returns (uint[]);
    function getIntArray(bytes32 _key) external view returns (int[]);
    function getBoolArray(bytes32 _key) external view returns (bool[]);

    // *** Setter Methods ***
    function setUint(bytes32 _key, uint _value) external;
    function setString(bytes32 _key, string _value) external;
    function setAddress(bytes32 _key, address _value) external;
    function setBytes(bytes32 _key, bytes _value) external;
    function setBool(bytes32 _key, bool _value) external;
    function setInt(bytes32 _key, int _value) external;
    function setBytes32(bytes32 _key, bytes32 _value) external;

    // *** Setter Methods For Arrays ***
    function setBytes32Array(bytes32 _key, bytes32[] _value) external;
    function setAddressArray(bytes32 _key, address[] _value) external;
    function setUintArray(bytes32 _key, uint[] _value) external;
    function setIntArray(bytes32 _key, int[] _value) external;
    function setBoolArray(bytes32 _key, bool[] _value) external;

    // *** Delete Methods ***
    function deleteUint(bytes32 _key) external;
    function deleteString(bytes32 _key) external;
    function deleteAddress(bytes32 _key) external;
    function deleteBytes(bytes32 _key) external;
    function deleteBool(bytes32 _key) external;
    function deleteInt(bytes32 _key) external;
    function deleteBytes32(bytes32 _key) external;
}

contract ITether {
    function transferFrom(address _from, address _to, uint256 _value) external;

    function transfer(address _to, uint256 _value) external;
}

contract ITwoKeyAdmin {
    function getDefaultIntegratorFeePercent() public view returns (uint);
    function getDefaultNetworkTaxPercent() public view returns (uint);
    function getTwoKeyRewardsReleaseDate() external view returns(uint);
    function updateReceivedTokensAsModerator(uint amountOfTokens) public;
    function updateReceivedTokensAsModeratorPPC(uint amountOfTokens, address campaignPlasma) public;
    function addFeesCollectedInCurrency(string currency, uint amount) public payable;

    function updateTokensReceivedFromDistributionFees(uint amountOfTokens) public;
}

contract ITwoKeyEventSource {

    function ethereumOf(address me) public view returns (address);
    function plasmaOf(address me) public view returns (address);
    function isAddressMaintainer(address _maintainer) public view returns (bool);
    function getTwoKeyDefaultIntegratorFeeFromAdmin() public view returns (uint);
    function joined(address _campaign, address _from, address _to) external;
    function rejected(address _campaign, address _converter) external;

    function convertedAcquisition(
        address _campaign,
        address _converterPlasma,
        uint256 _baseTokens,
        uint256 _bonusTokens,
        uint256 _conversionAmount,
        bool _isFiatConversion,
        uint _conversionId
    )
    external;

    function getTwoKeyDefaultNetworkTaxPercent()
    public
    view
    returns (uint);

    function convertedDonation(
        address _campaign,
        address _converterPlasma,
        uint256 _conversionAmount,
        uint256 _conversionId
    )
    external;

    function executed(
        address _campaignAddress,
        address _converterPlasmaAddress,
        uint _conversionId,
        uint tokens
    )
    external;

    function tokensWithdrawnFromPurchasesHandler(
        address campaignAddress,
        uint _conversionID,
        uint _tokensAmountWithdrawn
    )
    external;

    function emitDebtEvent(
        address _plasmaAddress,
        uint _amount,
        bool _isAddition,
        string _currency
    )
    external;

    function emitReceivedTokensToDeepFreezeTokenPool(
        address _campaignAddress,
        uint _amountOfTokens
    )
    public;

    function emitReceivedTokensAsModerator(
        address _campaignAddress,
        uint _amountOfTokens
    )
    public;

    function emitDAIReleasedAsIncome(
        address _campaignContractAddress,
        uint _amountOfDAI
    )
    public;

    function emitEndedBudgetCampaign(
        address campaignPlasmaAddress,
        uint contractorLeftover,
        uint moderatorEarningsDistributed
    )
    public;


    function emitUserWithdrawnNetworkEarnings(
        address user,
        uint amountOfTokens
    )
    public;

    function emitRebalancedRewards(
        uint cycleId,
        uint difference,
        string action
    )
    public;
}

contract ITwoKeyExchangeRateContract {
    function getBaseToTargetRate(string _currency) public view returns (uint);
    function getStableCoinTo2KEYQuota(address stableCoinAddress) public view returns (uint,uint);
    function getStableCoinToUSDQuota(address stableCoin) public view returns (uint);
}

contract ITwoKeyMaintainersRegistry {
    function checkIsAddressMaintainer(address _sender) public view returns (bool);
    function checkIsAddressCoreDev(address _sender) public view returns (bool);

    function addMaintainers(address [] _maintainers) public;
    function addCoreDevs(address [] _coreDevs) public;
    function removeMaintainers(address [] _maintainers) public;
    function removeCoreDevs(address [] _coreDevs) public;
}

contract ITwoKeySingletoneRegistryFetchAddress {
    function getContractProxyAddress(string _contractName) public view returns (address);
    function getNonUpgradableContractAddress(string contractName) public view returns (address);
    function getLatestCampaignApprovedVersion(string campaignType) public view returns (string);
}

interface ITwoKeySingletonesRegistry {

    /**
    * @dev This event will be emitted every time a new proxy is created
    * @param proxy representing the address of the proxy created
    */
    event ProxyCreated(address proxy);


    /**
    * @dev This event will be emitted every time a new implementation is registered
    * @param version representing the version name of the registered implementation
    * @param implementation representing the address of the registered implementation
    * @param contractName is the name of the contract we added new version
    */
    event VersionAdded(string version, address implementation, string contractName);

    /**
    * @dev Registers a new version with its implementation address
    * @param version representing the version name of the new implementation to be registered
    * @param implementation representing the address of the new implementation to be registered
    */
    function addVersion(string _contractName, string version, address implementation) public;

    /**
    * @dev Tells the address of the implementation for a given version
    * @param _contractName is the name of the contract we're querying
    * @param version to query the implementation of
    * @return address of the implementation registered for the given version
    */
    function getVersion(string _contractName, string version) public view returns (address);
}

contract IUpgradableExchange {

    function buyRate2key() public view returns (uint);
    function sellRate2key() public view returns (uint);

    function buyTokensWithERC20(
        uint amountOfTokens,
        address tokenAddress
    )
    public
    returns (uint,uint);

    function buyTokens(
        address _beneficiary
    )
    public
    payable
    returns (uint,uint);

    function buyStableCoinWith2key(
        uint _twoKeyUnits,
        address _beneficiary
    )
    public
    payable;

    function report2KEYWithdrawnFromNetwork(
        uint amountOfTokensWithdrawn
    )
    public;

    function getEth2DaiAverageExchangeRatePerContract(
        uint _contractID
    )
    public
    view
    returns (uint);

    function getContractId(
        address _contractAddress
    )
    public
    view
    returns (uint);

    function getEth2KeyAverageRatePerContract(
        uint _contractID
    )
    public
    view
    returns (uint);

    function returnLeftoverAfterRebalancing(
        uint amountOf2key
    )
    public;


    function getMore2KeyTokensForRebalancing(
        uint amountOf2KeyRequested
    )
    public
    view
    returns (uint);


    function releaseAllDAIFromContractToReserve()
    public;

    function setKyberReserveInterfaceContractAddress(
        address kyberReserveContractAddress
    )
    public;

    function setSpreadWei(
        uint newSpreadWei
    )
    public;

    function withdrawDAIAvailableToFill2KEYReserve(
        uint amountOfDAI
    )
    public
    returns (uint);

    function returnTokensBackToExchangeV1(
        uint amountOfTokensToReturn
    )
    public;


    function getMore2KeyTokensForRebalancingV1(
        uint amountOfTokensRequested
    )
    public;
}

contract ITwoKeyBudgetCampaignsPaymentsHandlerStorage is IStructuredStorage{

}

library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
    // Gas optimization: this is cheaper than asserting 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (_a == 0) {
      return 0;
    }

    c = _a * _b;
    require(c / _a == _b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
    // assert(_b > 0); // Solidity automatically throws when dividing by 0
    // uint256 c = _a / _b;
    // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold
    return _a / _b;
  }

  /**
  * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
    require(_b <= _a);
    return _a - _b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
    c = _a + _b;
    require(c >= _a);
    return c;
  }
}

contract ITwoKeySingletonUtils {

    address public TWO_KEY_SINGLETON_REGISTRY;

    // Modifier to restrict method calls only to maintainers
    modifier onlyMaintainer {
        address twoKeyMaintainersRegistry = getAddressFromTwoKeySingletonRegistry("TwoKeyMaintainersRegistry");
        require(ITwoKeyMaintainersRegistry(twoKeyMaintainersRegistry).checkIsAddressMaintainer(msg.sender));
        _;
    }

    /**
     * @notice Function to get any singleton contract proxy address from TwoKeySingletonRegistry contract
     * @param contractName is the name of the contract we're looking for
     */
    function getAddressFromTwoKeySingletonRegistry(
        string contractName
    )
    internal
    view
    returns (address)
    {
        return ITwoKeySingletoneRegistryFetchAddress(TWO_KEY_SINGLETON_REGISTRY)
            .getContractProxyAddress(contractName);
    }

    function getNonUpgradableContractAddressFromTwoKeySingletonRegistry(
        string contractName
    )
    internal
    view
    returns (address)
    {
        return ITwoKeySingletoneRegistryFetchAddress(TWO_KEY_SINGLETON_REGISTRY)
            .getNonUpgradableContractAddress(contractName);
    }
}

contract UpgradeabilityStorage {
    // Versions registry
    ITwoKeySingletonesRegistry internal registry;

    // Address of the current implementation
    address internal _implementation;

    /**
    * @dev Tells the address of the current implementation
    * @return address of the current implementation
    */
    function implementation() public view returns (address) {
        return _implementation;
    }
}

contract Upgradeable is UpgradeabilityStorage {
    /**
     * @dev Validates the caller is the versions registry.
     * @param sender representing the address deploying the initial behavior of the contract
     */
    function initialize(address sender) public payable {
        require(msg.sender == address(registry));
    }
}

contract TwoKeyBudgetCampaignsPaymentsHandler is Upgradeable, ITwoKeySingletonUtils {

    using SafeMath for *;

    /**
     * State variables
     * TO BE EXPANDED
     */

    string constant _campaignPlasma2initialBudget2Key = "campaignPlasma2initialBudget2Key";
    string constant _campaignPlasma2isCampaignEnded = "campaignPlasma2isCampaignEnded";
    string constant _campaignPlasma2contractor = "campaignPlasma2contractor";

    string constant _campaignPlasma2isBudgetedWith2KeyDirectly = "campaignPlasma2isBudgetedWith2KeyDirectly";
    string constant _campaignPlasma2StableCoinAddress = "campaignPlasma2StableCoinAddress";
    string constant _campaignPlasma2rebalancingRatio = "campaignPlasma2rebalancingRatio";
    string constant _campaignPlasma2initialRate = "campaignPlasma2initalRate";
    string constant _campaignPlasma2bountyPerConversion2KEY = "campaignPlasma2bountyPerConversion2KEY";
    string constant _campaignPlasma2amountOfStableCoins = "campaignPlasma2amountOfStableCoins";
    string constant _numberOfDistributionCycles = "numberOfDistributionCycles";
    string constant _distributionCycleToTotalDistributed = "_distributionCycleToTotalDistributed";
    string constant _campaignPlasma2ReferrerRewardsTotal = "campaignPlasma2ReferrerRewardsTotal";
    string constant _campaignPlasmaToModeratorEarnings = "campaignPlasmaToModeratorEarnings";
    string constant _campaignPlasmaToLeftOverForContractor = "campaignPlasmaToLeftOverForContractor";
    string constant _campaignPlasmaToLeftoverWithdrawnByContractor = "campaignPlasmaToLeftoverWithdrawnByContractor";
    string constant _feePerCycleIdPerReferrer = "feePerCycleIdPerReferrer";

    ITwoKeyBudgetCampaignsPaymentsHandlerStorage public PROXY_STORAGE_CONTRACT;

    bool initialized;

    function setInitialParams(
        address _twoKeySingletonRegistry,
        address _proxyStorageContract
    )
    public
    {
        require(initialized == false);

        TWO_KEY_SINGLETON_REGISTRY = _twoKeySingletonRegistry;
        PROXY_STORAGE_CONTRACT = ITwoKeyBudgetCampaignsPaymentsHandlerStorage(_proxyStorageContract);

        initialized = true;
    }

    /**
     * ------------------------------------
     *          Contractor actions
     * ------------------------------------
     */

    /**
     * @notice          Function which will be used in order to add inventory for campaign
     *                  directly with 2KEY tokens. In order to make this
     *                  transfer secure,
     *                  user will firstly have to approve this contract to take from him
     *                  amount of tokens and then call contract function which will execute
     *                  transferFrom action. This function can be called only once.
     *
     * @param           campaignPlasma is the plasma campaign address which is user adding inventory for.
     * @param           amountOf2KEYTokens is the amount of 2KEY tokens user adds to budget
     */
    function addInventory2KEY(
        address campaignPlasma,
        uint amountOf2KEYTokens,
        uint bountyPerConversionFiat
    )
    public
    {
        // Require that budget is not previously set and assign amount of 2KEY tokens
        requireBudgetNotSetAndSetBudget(campaignPlasma, amountOf2KEYTokens);
        // Set that contractor is the msg.sender of this method for the campaign passed
        setAddress(keccak256(_campaignPlasma2contractor, campaignPlasma), msg.sender);

        // Get 2KEY sell rate at the moment
        uint rate = IUpgradableExchange(getAddressFromTwoKeySingletonRegistry("TwoKeyUpgradableExchange")).sellRate2key();

        // calculate bounty per conversion 2KEY
        uint bountyPerConversion2KEY = bountyPerConversionFiat.mul(10**18).div(rate);

        // Calculate and set bounty per conversion in 2KEY units
        setUint(
            keccak256(_campaignPlasma2bountyPerConversion2KEY, campaignPlasma),
            bountyPerConversion2KEY
        );

        // Set rate at which 2KEY is put to campaign
        setUint(
            keccak256(_campaignPlasma2initialRate, campaignPlasma),
            rate
        );

        // Set that campaign is budgeted directly with 2KEY tokens
        setBool(
            keccak256(_campaignPlasma2isBudgetedWith2KeyDirectly, campaignPlasma),
            true
        );

        // Take 2KEY tokens from the contractor
        IERC20(getNonUpgradableContractAddressFromTwoKeySingletonRegistry("TwoKeyEconomy")).transferFrom(
            msg.sender,
            address(this),
            amountOf2KEYTokens
        );
    }

    /**
     * @notice          Function which will be used in order to add inventory for campaign
     *                  directly with stable coin tokens. In order to make this
     *                  transfer secure,
     *                  user will firstly have to approve this contract to take from him
     *                  amount of tokens and then call contract function which will execute
     *                  transferFrom action. This function can be called only once.
     *
     * @param           campaignPlasma is the plasma campaign address which is user adding inventory for.
     * @param           amountOfStableCoins is the amount of stable coins user adds to budget
     * @param           tokenAddress is stableCoinAddress
     */
    function addInventory(
        address campaignPlasma,
        uint amountOfStableCoins,
        uint bountyPerConversionFiat,
        address tokenAddress
    )
    public
    {
        // Set that contractor is the msg.sender of this method for the campaign passed
        setAddress(keccak256(_campaignPlasma2contractor, campaignPlasma), msg.sender);

        address twoKeyUpgradableExchange = getAddressFromTwoKeySingletonRegistry("TwoKeyUpgradableExchange");

        // Handle case for Tether due to different ERC20 interface it has
        if (tokenAddress == getNonUpgradableContractAddressFromTwoKeySingletonRegistry("USDT")) {
            // Take stable coins from the contractor and directly transfer them to upgradable exchange
            ITether(tokenAddress).transferFrom(
                msg.sender,
                twoKeyUpgradableExchange,
                amountOfStableCoins
            );
        } else {
            // Take stable coins from the contractor and directly transfer them to upgradable exchange
            IERC20(tokenAddress).transferFrom(
                msg.sender,
                twoKeyUpgradableExchange,
                amountOfStableCoins
            );
        }


        uint totalTokensBought;
        uint tokenPrice;

        // Buy tokens
        (totalTokensBought, tokenPrice) = IUpgradableExchange(twoKeyUpgradableExchange).buyTokensWithERC20(amountOfStableCoins, tokenAddress);

        // Calculate and set bounty per conversion in 2KEY units
        uint bountyPerConversion2KEY = bountyPerConversionFiat.mul(10 ** 18).div(tokenPrice);

        // Require that budget is not previously set and set initial budget to amount of 2KEY tokens
        requireBudgetNotSetAndSetBudget(campaignPlasma, totalTokensBought);

        // SSTORE 20k gas * 3 = 60k 3x uint ==> 256 bytes * 3 * 8 =  6144 gas
        // 375 gas + 5 gas for each byte
        // 10%   60000 - 6144 = 53856 saving

        setUint(
            keccak256(_campaignPlasma2bountyPerConversion2KEY, campaignPlasma),
            bountyPerConversion2KEY
        );

        setUint(
            keccak256(_campaignPlasma2amountOfStableCoins, campaignPlasma),
            amountOfStableCoins
        );

        // Set stable coin which is used to budget campaign
        setAddress(
            keccak256(_campaignPlasma2StableCoinAddress, campaignPlasma),
            tokenAddress
        );

        // Set the rate at which we have bought 2KEY tokens
        setUint(
            keccak256(_campaignPlasma2initialRate, campaignPlasma),
            tokenPrice
        );
    }


    /**
     * @notice          Function where contractor can withdraw if there's any leftover on his campaign
     * @param           campaignPlasmaAddress is plasma address of campaign
     */
    function withdrawLeftoverForContractor(
        address campaignPlasmaAddress
    )
    public
    {
        // Require that this function is possible to call only by contractor
        require(
            getAddress(keccak256(_campaignPlasma2contractor,campaignPlasmaAddress)) == msg.sender
        );

        // Get the leftover for contractor
        uint leftoverForContractor = getUint(
            keccak256(_campaignPlasmaToLeftOverForContractor, campaignPlasmaAddress)
        );

        // Check that he has some leftover which can be zero in case that campaign is not ended yet
        require(leftoverForContractor > 0);

        // Generate key if contractor have withdrawn his leftover for specific campaign
        bytes32 key = keccak256(_campaignPlasmaToLeftoverWithdrawnByContractor, campaignPlasmaAddress);

        // Require that he didn't withdraw it
        require(getBool(key) == false);

        // State that now he has withdrawn the tokens.
        setBool(key, true);

        transfer2KEY(
            msg.sender,
            leftoverForContractor
        );
    }


    /**
     * ------------------------------------
     *          Maintainer actions
     * ------------------------------------
     */

    /**
     * @notice          Function to end selected budget campaign by maintainer, and perform
     *                  actions regarding rebalancing, reserving tokens, and distributing
     *                  moderator earnings, as well as calculating leftover for contractor
     *
     * @param           campaignPlasma is the plasma address of the campaign
     * @param           totalAmountForReferrerRewards is the total amount before rebalancing referrers earned
     * @param           totalAmountForModeratorRewards is the total amount moderator earned before rebalancing
     */
    function endCampaignReserveTokensAndRebalanceRates(
        address campaignPlasma,
        uint totalAmountForReferrerRewards,
        uint totalAmountForModeratorRewards
    )
    public
    onlyMaintainer
    {
        // Generate key for storage variable isCampaignEnded
        bytes32 keyIsCampaignEnded = keccak256(_campaignPlasma2isCampaignEnded, campaignPlasma);

        // Require that campaign is not ended yet
        require(getBool(keyIsCampaignEnded) == false);

        // End campaign
        setBool(keyIsCampaignEnded, true);

        // Get how many tokens were inserted at the beginning
        uint initialBountyForCampaign = getInitialBountyForCampaign(campaignPlasma);

        // Rebalancing everything except referrer rewards
        uint amountToRebalance = initialBountyForCampaign.sub(totalAmountForReferrerRewards);

        // Amount after rebalancing is initially amount to rebalance
        uint amountAfterRebalancing = amountToRebalance;

        // Initially rebalanced moderator rewards are total moderator rewards
        uint rebalancedModeratorRewards = totalAmountForModeratorRewards;

        // Initial ratio is 1
        uint rebalancingRatio = 10**18;

        if(getIsCampaignBudgetedDirectlyWith2KEY(campaignPlasma) == false) {
            // If budget added as stable coin we do rebalancing
            (amountAfterRebalancing, rebalancingRatio)
                = rebalanceRates(
                    getInitial2KEYRateForCampaign(campaignPlasma),
                    amountToRebalance
            );

            rebalancedModeratorRewards = totalAmountForModeratorRewards.mul(rebalancingRatio).div(10**18);
        }

        uint leftoverForContractor = amountAfterRebalancing.sub(rebalancedModeratorRewards);

        // Set moderator earnings for this campaign and immediately distribute them
        setAndDistributeModeratorEarnings(campaignPlasma, rebalancedModeratorRewards);

        // Set total amount to use for referrers
        setUint(
            keccak256(_campaignPlasma2ReferrerRewardsTotal, campaignPlasma),
            totalAmountForReferrerRewards
        );

        // Leftover for contractor
        setUint(
            keccak256(_campaignPlasmaToLeftOverForContractor, campaignPlasma),
            leftoverForContractor
        );

        // Set rebalancing ratio for campaign
        setRebalancingRatioForCampaign(campaignPlasma, rebalancingRatio);

        // Emit an event to checksum all the balances per campaign
        ITwoKeyEventSource(getAddressFromTwoKeySingletonRegistry("TwoKeyEventSource"))
            .emitEndedBudgetCampaign(
                campaignPlasma,
                leftoverForContractor,
                rebalancedModeratorRewards
            );
    }


    /**
     * @notice          Function to distribute rewards between influencers, increment global cycle id,
     *                  and update how much rewards are ever being distributed from this contract
     *
     * @param           influencers is the array of influencers
     * @param           balances is the array of corresponding balances for the influencers above
     *
     */
    function pushAndDistributeRewardsBetweenInfluencers(
        address [] influencers,
        uint [] balances,
        uint nonRebalancedTotalPayout,
        uint rebalancedTotalPayout,
        uint cycleId,
        uint feePerReferrerIn2KEY
    )
    public
    onlyMaintainer
    {
        // Get the address of 2KEY token
        address twoKeyEconomy = getNonUpgradableContractAddressFromTwoKeySingletonRegistry("TwoKeyEconomy");
        // Get the address of twoKeyUpgradableExchange contract
        address twoKeyUpgradableExchange = getAddressFromTwoKeySingletonRegistry("TwoKeyUpgradableExchange");
        // Total distributed in cycle
        uint totalDistributed;
        // Iterator
        uint i;

        uint difference;
        // Leads to we need to return some tokens back to Upgradable Exchange
        if(nonRebalancedTotalPayout > rebalancedTotalPayout) {
            difference = nonRebalancedTotalPayout.sub(rebalancedTotalPayout);
            IERC20(twoKeyEconomy).approve(twoKeyUpgradableExchange, difference);
            IUpgradableExchange(twoKeyUpgradableExchange).returnTokensBackToExchangeV1(difference);
            ITwoKeyEventSource(getAddressFromTwoKeySingletonRegistry("TwoKeyEventSource")).emitRebalancedRewards(
                cycleId,
                difference,
                "RETURN_TOKENS_TO_EXCHANGE"
            );
        } else if (nonRebalancedTotalPayout < rebalancedTotalPayout) {
            // Leads to we need to get more tokens from Upgradable Exchange
            difference = rebalancedTotalPayout.sub(nonRebalancedTotalPayout);
            IUpgradableExchange(twoKeyUpgradableExchange).getMore2KeyTokensForRebalancingV1(difference);
            ITwoKeyEventSource(getAddressFromTwoKeySingletonRegistry("TwoKeyEventSource")).emitRebalancedRewards(
                cycleId,
                difference,
                "GET_TOKENS_FROM_EXCHANGE"
            );
        }

        uint numberOfReferrers = influencers.length;

        // Iterate through all influencers, distribute them rewards, and account amount received per cycle id
        for (i = 0; i < numberOfReferrers; i++) {
            // Require that referrer earned more than fees
            require(balances[i] > feePerReferrerIn2KEY);
            // Sub fee per referrer from balance to pay
            uint balance = balances[i].sub(feePerReferrerIn2KEY);
            // Transfer required tokens to influencer
            IERC20(twoKeyEconomy).transfer(influencers[i], balance);
            // Sum up to totalDistributed to referrers
            totalDistributed = totalDistributed.add(balance);
        }


        transferFeesToAdmin(feePerReferrerIn2KEY, numberOfReferrers, twoKeyEconomy);


        // Set how much is total distributed per distribution cycle
        setUint(
            keccak256(_distributionCycleToTotalDistributed, cycleId),
            totalDistributed
        );
    }


    /**
     * ------------------------------------------------
     *        Internal functions performing logic operations
     * ------------------------------------------------
     */

    /**
     * @notice          Function to transfer fees taken from referrer rewards to admin contract
     * @param           feePerReferrer is fee taken per referrer equaling 0.5$ in 2KEY at the moment
     * @param           numberOfReferrers is number of referrers being rewarded in this cycle
     * @param           twoKeyEconomy is 2KEY token contract
     */
    function transferFeesToAdmin(
        uint feePerReferrer,
        uint numberOfReferrers,
        address twoKeyEconomy
    )
    internal
    {
        address twoKeyAdmin = getAddressFromTwoKeySingletonRegistry("TwoKeyAdmin");

        IERC20(twoKeyEconomy).transfer(
            twoKeyAdmin,
            feePerReferrer.mul(numberOfReferrers)
        );

        // Update in admin tokens receiving from fees
        ITwoKeyAdmin(twoKeyAdmin).updateTokensReceivedFromDistributionFees(feePerReferrer.mul(numberOfReferrers));
    }


    /**
     * @notice          Function to set how many tokens are being distributed to moderator
     *                  as well as distribute them.
     * @param           campaignPlasma is the plasma address of selected campaign
     * @param           rebalancedModeratorRewards is the amount for moderator after rebalancing
     */
    function setAndDistributeModeratorEarnings(
        address campaignPlasma,
        uint rebalancedModeratorRewards
    )
    internal
    {
        // Account amount moderator earned on this campaign
        setUint(
            keccak256(_campaignPlasmaToModeratorEarnings, campaignPlasma),
            rebalancedModeratorRewards
        );

        // Get twoKeyAdmin address
        address twoKeyAdmin = getAddressFromTwoKeySingletonRegistry("TwoKeyAdmin");

        // Transfer 2KEY tokens to moderator
        transfer2KEY(
            twoKeyAdmin,
            rebalancedModeratorRewards
        );

        // Update moderator on received tokens so it can proceed distribution to TwoKeyDeepFreezeTokenPool
        ITwoKeyAdmin(twoKeyAdmin).updateReceivedTokensAsModeratorPPC(rebalancedModeratorRewards, campaignPlasma);
    }

    /**
     * @notice          Function to require that initial budget is not set, which
     *                  will prevent any way of adding inventory to specific campaigns
     *                  after it's first time added
     * @param           campaignPlasma is campaign plasma address
     */
    function requireBudgetNotSetAndSetBudget(
        address campaignPlasma,
        uint amount2KEYTokens
    )
    internal
    {

        bytes32 keyHashForInitialBudget = keccak256(_campaignPlasma2initialBudget2Key, campaignPlasma);
        // Require that initial budget is not being added, since it can be done only once.
        require(getUint(keyHashForInitialBudget) == 0);
        // Set initial budget added
        setUint(keyHashForInitialBudget, amount2KEYTokens);
    }

    function rebalanceRates(
        uint initial2KEYRate,
        uint amountOfTokensToRebalance
    )
    internal
    returns (uint,uint)
    {

        // Load twoKeyEconomy address
        address twoKeyEconomy = getNonUpgradableContractAddressFromTwoKeySingletonRegistry("TwoKeyEconomy");
        // Load twoKeyUpgradableExchange address
        address twoKeyUpgradableExchange = getAddressFromTwoKeySingletonRegistry("TwoKeyUpgradableExchange");
        // Take the current usd to 2KEY rate against we're rebalancing contractor leftover and moderator rewards
        uint usd2KEYRateWeiNow = IUpgradableExchange(twoKeyUpgradableExchange).sellRate2key();

        // Ratio is initial rate divided by new rate, so if rate went up, this will be less than 1
        uint rebalancingRatio = initial2KEYRate.mul(10**18).div(usd2KEYRateWeiNow);

        // Calculate new rebalanced amount of tokens
        uint rebalancedAmount = amountOfTokensToRebalance.mul(rebalancingRatio).div(10**18);

        // If price went up, leads to ratio is going to be less than 10**18
        if(rebalancingRatio < 10**18) {
            // Calculate how much tokens should be given back to exchange
            uint tokensToGiveBackToExchange = amountOfTokensToRebalance.sub(rebalancedAmount);
            // Approve upgradable exchange to take leftover back
            IERC20(twoKeyEconomy).approve(twoKeyUpgradableExchange, tokensToGiveBackToExchange);
            // Call the function to release all DAI for this contract to reserve and to take approved amount of 2key back to liquidity pool
            IUpgradableExchange(twoKeyUpgradableExchange).returnTokensBackToExchangeV1(tokensToGiveBackToExchange);
        }
        // Otherwise we assume that price went down, which leads that ratio will be greater than 10**18
        else  {
            uint tokensToTakeFromExchange = rebalancedAmount.sub(amountOfTokensToRebalance);
            // Get more tokens we need
            IUpgradableExchange(twoKeyUpgradableExchange).getMore2KeyTokensForRebalancingV1(tokensToTakeFromExchange);
        }
        // Return new rebalanced amount as well as ratio against which rebalancing was done.
        return (rebalancedAmount, rebalancingRatio);
    }


    /**
     * ------------------------------------------------
     *        Internal getters and setters
     * ------------------------------------------------
     */

    function getUint(
        bytes32 key
    )
    internal
    view
    returns (uint)
    {
        return PROXY_STORAGE_CONTRACT.getUint(key);
    }

    function setUint(
        bytes32 key,
        uint value
    )
    internal
    {
        PROXY_STORAGE_CONTRACT.setUint(key,value);
    }

    function getBool(
        bytes32 key
    )
    internal
    view
    returns (bool)
    {
        return PROXY_STORAGE_CONTRACT.getBool(key);
    }

    function setBool(
        bytes32 key,
        bool value
    )
    internal
    {
        PROXY_STORAGE_CONTRACT.setBool(key,value);
    }

    function getAddress(
        bytes32 key
    )
    internal
    view
    returns (address)
    {
        return PROXY_STORAGE_CONTRACT.getAddress(key);
    }

    function setAddress(
        bytes32 key,
        address value
    )
    internal
    {
        PROXY_STORAGE_CONTRACT.setAddress(key,value);
    }

    function equals(
        string a,
        string b
    )
    internal
    pure
    returns (bool) {
        return keccak256(a) == keccak256(b) ? true : false;
    }


    /**
     * @notice          Function whenever called, will increment number of distribution cycles
     */
    function incrementNumberOfDistributionCycles()
    internal
    {
        bytes32 key = keccak256(_numberOfDistributionCycles);
        setUint(key,getUint(key) + 1);
    }


    /**
     * @notice 			Function to transfer 2KEY tokens
     *
     * @param			receiver is the address of tokens receiver
     * @param			amount is the amount of tokens to be transfered
     */
    function transfer2KEY(
        address receiver,
        uint amount
    )
    internal
    {
        IERC20(getNonUpgradableContractAddressFromTwoKeySingletonRegistry("TwoKeyEconomy")).transfer(
            receiver,
            amount
        );
    }

    /**
     * @notice          Internal setter function to store how much stable coins were
     *                  added to fund this campaign
     * @param           campaignPlasma is plasma campaign address
     * @param           amountOfStableCoins is the amount used for campaign funding
     */
    function setAmountOfStableCoinsUsedToFundCampaign(
        address campaignPlasma,
        uint amountOfStableCoins
    )
    internal
    {
        setUint(
            keccak256(_campaignPlasma2amountOfStableCoins, campaignPlasma),
            amountOfStableCoins
        );
    }

    function setRebalancingRatioForCampaign(
        address campaignPlasma,
        uint rebalancingRatio
    )
    internal
    {
        setUint(
            keccak256(_campaignPlasma2rebalancingRatio, campaignPlasma),
            rebalancingRatio
        );
    }


    /**
     * ------------------------------------------------
     *              Public getters
     * ------------------------------------------------
     */

    /**
     * @notice          Function to return rebalancing ratio for specific campaign,
     *                  in case campaign was funded with 2KEY will return 1 ETH as neutral
     * @param           campaignPlasma is plasma campaign address
     */
    function getRebalancingRatioForCampaign(
        address campaignPlasma
    )
    public
    view
    returns (uint)
    {
        uint ratio = getUint(keccak256(_campaignPlasma2rebalancingRatio, campaignPlasma));
        return  ratio != 0 ? ratio : 10**18;
    }

    /**
     * @notice          Function to get number of distribution cycles ever
     */
    function getNumberOfCycles()
    public
    view
    returns (uint)
    {
        return getUint(keccak256(_numberOfDistributionCycles));
    }


    /**
     * @notice          Function to get how much was initial bounty for selected camapaign in 2KEY tokens
     *
     * @param           campaignPlasma is the plasma address of the campaign
     */
    function getInitialBountyForCampaign(
        address campaignPlasma
    )
    public
    view
    returns (uint)
    {
        return getUint(keccak256(_campaignPlasma2initialBudget2Key, campaignPlasma));
    }


    /**
     * @notice          Function to retrieve the initial rate at which 2KEY tokens were bought if
     *                  were bought at all. Otherwise it returns 0.
     * @param           campaignPlasma is plasma address of the campaign
     */
    function getInitial2KEYRateForCampaign(
        address campaignPlasma
    )
    public
    view
    returns (uint)
    {
        return getUint(keccak256(_campaignPlasma2initialRate, campaignPlasma));
    }


    /**
     * @notice          Function to get how much is distributed in cycle
     * @param           cycleId is the ID of that cycle
     */
    function getTotalDistributedInCycle(
        uint cycleId
    )
    public
    view
    returns (uint)
    {
        return getUint(keccak256(_distributionCycleToTotalDistributed, cycleId));
    }


    /**
     * @notice          Function to get moderator rebalanced earnings for this campaign
     * @param           campaignAddress is plasma campaign address
     */
    function getModeratorEarningsRebalancedForCampaign(
        address campaignAddress
    )
    public
    view
    returns (uint)
    {
        return (
            getUint(keccak256(_campaignPlasmaToModeratorEarnings, campaignAddress)) //moderator earnings)
        );
    }


    /**
     * @notice          Function to get contractor rebalanced leftover for campaign
     * @param           campaignAddress is plasma campaign address
     */
    function getContractorRebalancedLeftoverForCampaign(
        address campaignAddress
    )
    public
    view
    returns (uint)
    {
        return (
            getUint(keccak256(_campaignPlasmaToLeftOverForContractor, campaignAddress)) // contractor leftover
        );
    }


    /**
     * @notice          Function to get moderator earnings and contractor leftover after we rebalanced campaign
     * @param           campaignAddress is the address of campaign
     */
    function getModeratorEarningsAndContractorLeftoverRebalancedForCampaign(
        address campaignAddress
    )
    public
    view
    returns (uint,uint)
    {
        return (
            getModeratorEarningsRebalancedForCampaign(campaignAddress),
            getContractorRebalancedLeftoverForCampaign(campaignAddress)
        );
    }

    function getIfLeftoverForCampaignIsWithdrawn(
        address campaignPlasma
    )
    public
    view
    returns (bool)
    {
        bool isWithdrawn = getBool(keccak256(_campaignPlasmaToLeftoverWithdrawnByContractor, campaignPlasma));
        return isWithdrawn;
    }

    function getNonRebalancedReferrerRewards(
        address campaignPlasma
    )
    public
    view
    returns (uint)
    {
        return getUint(keccak256(_campaignPlasma2ReferrerRewardsTotal, campaignPlasma));
    }

    /**
     * @notice          Function to get balance of stable coins on this contract
     * @param           stableCoinsAddresses is the array of stable coins addresses we want to fetch
     *                  balances for
     */
    function getBalanceOfStableCoinsOnContract(
        address [] stableCoinsAddresses
    )
    public
    view
    returns (uint[])
    {
        uint len = stableCoinsAddresses.length;
        uint [] memory balances = new uint[](len);
        uint i;
        for(i = 0; i < len; i++) {
            balances[i] = IERC20(stableCoinsAddresses[i]).balanceOf(address(this));
        }
        return balances;
    }


    /**
     * @notice          Function to check amount of stable coins used to func ppc campaign
     * @param           campaignPlasma is campaign plasma address
     */
    function getAmountOfStableCoinsUsedToFundCampaign(
        address campaignPlasma
    )
    public
    view
    returns (uint)
    {
        return getUint(keccak256(_campaignPlasma2amountOfStableCoins, campaignPlasma));
    }

    /**
     * @notice          Function to return bounty per conversion in 2KEY tokens
     * @param           campaignPlasma is plasma campaign of address requested
     */
    function getBountyPerConversion2KEY(
        address campaignPlasma
    )
    public
    view
    returns (uint)
    {
        return getUint(
            keccak256(_campaignPlasma2bountyPerConversion2KEY, campaignPlasma)
        );
    }

    /**
     * @notice          Function to check if campaign is budgeted directly with 2KEY
     */
    function getIsCampaignBudgetedDirectlyWith2KEY(
        address campaignPlasma
    )
    public
    view
    returns (bool)
    {
        return getBool(keccak256(_campaignPlasma2isBudgetedWith2KeyDirectly, campaignPlasma));
    }

    function getStableCoinAddressUsedToFundCampaign(
        address campaignPlasma
    )
    public
    view
    returns (address)
    {
        return getAddress(keccak256(_campaignPlasma2StableCoinAddress, campaignPlasma));
    }

    /**
     * @notice          Function to return summary related to specific campaign
     * @param           campaignPlasma is plasma campaign of address
     */
    function getCampaignSummary(
        address campaignPlasma
    )
    public
    view
    returns (bytes)
    {
        return (
            abi.encodePacked(
                getInitialBountyForCampaign(campaignPlasma),
                getBountyPerConversion2KEY(campaignPlasma),
                getAmountOfStableCoinsUsedToFundCampaign(campaignPlasma),
                getInitial2KEYRateForCampaign(campaignPlasma),
                getContractorRebalancedLeftoverForCampaign(campaignPlasma),
                getModeratorEarningsRebalancedForCampaign(campaignPlasma),
                getRebalancingRatioForCampaign(campaignPlasma),
                getNonRebalancedReferrerRewards(campaignPlasma),
                getIfLeftoverForCampaignIsWithdrawn(campaignPlasma)
        )
        );
    }

    /**
     * @notice          Function to fetch inital params computed while adding inventory
     * @param           campaignPlasma is the plasma address of the campaign being requested
     */
    function getInitialParamsForCampaign(
        address campaignPlasma
    )
    public
    view
    returns (uint,uint,uint,bool,address)
    {
        return (
            getInitialBountyForCampaign(campaignPlasma), // initial bounty for campaign
            getBountyPerConversion2KEY(campaignPlasma), // bounty per conversion in 2KEY tokens
            getInitial2KEYRateForCampaign(campaignPlasma), // rate at the moment of inventory adding
            getIsCampaignBudgetedDirectlyWith2KEY(campaignPlasma), // Get if campaign is funded directly with 2KEY
            getCampaignContractor(campaignPlasma) // get contractor of campaign
        );
    }

    function getCampaignContractor(
        address campaignAddress
    )
    public
    view
    returns (address)
    {
        return getAddress(keccak256(_campaignPlasma2contractor, campaignAddress));
    }

    /**
     *
     */
    function getRequiredBudget2KEY(
        string fiatCurrency,
        uint fiatBudgetAmount
    )
    public
    view
    returns (uint)
    {
        // GET 2KEY - USD rate
        uint rate = IUpgradableExchange(getAddressFromTwoKeySingletonRegistry("TwoKeyUpgradableExchange")).sellRate2key();

        // For now ignore fiat currency assuming it's USD always
        return fiatBudgetAmount.mul(10 ** 18).div(rate);
    }

    function getFeePerCycleIdPerReferrer(
        uint cycleId
    )
    public
    view
    returns (uint)
    {
        return getUint(keccak256(_feePerCycleIdPerReferrer, cycleId));
    }

}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"_twoKeySingletonRegistry","type":"address"},{"name":"_proxyStorageContract","type":"address"}],"name":"setInitialParams","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"campaignPlasma","type":"address"}],"name":"getAmountOfStableCoinsUsedToFundCampaign","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PROXY_STORAGE_CONTRACT","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"campaignPlasma","type":"address"},{"name":"totalAmountForReferrerRewards","type":"uint256"},{"name":"totalAmountForModeratorRewards","type":"uint256"}],"name":"endCampaignReserveTokensAndRebalanceRates","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"campaignPlasma","type":"address"}],"name":"getIsCampaignBudgetedDirectlyWith2KEY","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"cycleId","type":"uint256"}],"name":"getFeePerCycleIdPerReferrer","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"implementation","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"cycleId","type":"uint256"}],"name":"getTotalDistributedInCycle","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"campaignPlasma","type":"address"}],"name":"getInitialParamsForCampaign","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"bool"},{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"campaignAddress","type":"address"}],"name":"getContractorRebalancedLeftoverForCampaign","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"campaignPlasma","type":"address"}],"name":"getNonRebalancedReferrerRewards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"campaignPlasma","type":"address"}],"name":"getInitialBountyForCampaign","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"campaignAddress","type":"address"}],"name":"getCampaignContractor","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"TWO_KEY_SINGLETON_REGISTRY","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"campaignPlasma","type":"address"}],"name":"getInitial2KEYRateForCampaign","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"campaignPlasma","type":"address"},{"name":"amountOfStableCoins","type":"uint256"},{"name":"bountyPerConversionFiat","type":"uint256"},{"name":"tokenAddress","type":"address"}],"name":"addInventory","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"campaignPlasma","type":"address"},{"name":"amountOf2KEYTokens","type":"uint256"},{"name":"bountyPerConversionFiat","type":"uint256"}],"name":"addInventory2KEY","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getNumberOfCycles","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"campaignPlasma","type":"address"}],"name":"getIfLeftoverForCampaignIsWithdrawn","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"campaignAddress","type":"address"}],"name":"getModeratorEarningsRebalancedForCampaign","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"campaignPlasma","type":"address"}],"name":"getRebalancingRatioForCampaign","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"influencers","type":"address[]"},{"name":"balances","type":"uint256[]"},{"name":"nonRebalancedTotalPayout","type":"uint256"},{"name":"rebalancedTotalPayout","type":"uint256"},{"name":"cycleId","type":"uint256"},{"name":"feePerReferrerIn2KEY","type":"uint256"}],"name":"pushAndDistributeRewardsBetweenInfluencers","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"campaignPlasmaAddress","type":"address"}],"name":"withdrawLeftoverForContractor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"fiatCurrency","type":"string"},{"name":"fiatBudgetAmount","type":"uint256"}],"name":"getRequiredBudget2KEY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"stableCoinsAddresses","type":"address[]"}],"name":"getBalanceOfStableCoinsOnContract","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"}],"name":"initialize","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"campaignPlasma","type":"address"}],"name":"getCampaignSummary","outputs":[{"name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"campaignAddress","type":"address"}],"name":"getModeratorEarningsAndContractorLeftoverRebalancedForCampaign","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"campaignPlasma","type":"address"}],"name":"getBountyPerConversion2KEY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"campaignPlasma","type":"address"}],"name":"getStableCoinAddressUsedToFundCampaign","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50615500806100206000396000f300608060405260043610610180576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305dbe412146101855780630c723a35146101e8578063105005a11461023f57806337a712241461029657806351175c85146102ed5780635699adfc146103485780635c60da1b146103895780635cc4b5a8146103e05780637ee9ad58146104215780637fbe4376146104c45780638172b7b21461051b578063857cf35f14610572578063858c6f5b146105c95780638830afa01461064c5780638b207fb2146106a357806398c3f52c146106fa5780639930f84114610771578063a3a414cc146107c8578063a4709d94146107f3578063a4e3cd841461084e578063a4fb9adf146108a5578063a951b3ad146108fc578063aa2576bf146109cd578063aeeb3ac614610a10578063b93727ec14610a97578063c4d66de814610b52578063cd37603314610b88578063d47ca90214610c44578063df988aae14610ca2578063f759a5c414610cf9575b600080fd5b34801561019157600080fd5b506101e6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d7c565b005b3480156101f457600080fd5b50610229600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e3f565b6040518082815260200191505060405180910390f35b34801561024b57600080fd5b50610254610f52565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102a257600080fd5b506102eb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610f78565b005b3480156102f957600080fd5b5061032e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611584565b604051808215151515815260200191505060405180910390f35b34801561035457600080fd5b5061037360048036038101908080359060200190929190505050611697565b6040518082815260200191505060405180910390f35b34801561039557600080fd5b5061039e611748565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103ec57600080fd5b5061040b60048036038101908080359060200190929190505050611772565b6040518082815260200191505060405180910390f35b34801561042d57600080fd5b50610462600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061184a565b60405180868152602001858152602001848152602001831515151581526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060405180910390f35b3480156104d057600080fd5b50610505600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611892565b6040518082815260200191505060405180910390f35b34801561052757600080fd5b5061055c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119a5565b6040518082815260200191505060405180910390f35b34801561057e57600080fd5b506105b3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ab8565b6040518082815260200191505060405180910390f35b3480156105d557600080fd5b5061060a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ba4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561065857600080fd5b50610661611c90565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106af57600080fd5b506106e4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611cb6565b6040518082815260200191505060405180910390f35b34801561070657600080fd5b5061076f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611da2565b005b34801561077d57600080fd5b506107c6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050612655565b005b3480156107d457600080fd5b506107dd612ca5565b6040518082815260200191505060405180910390f35b3480156107ff57600080fd5b50610834600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612d4c565b604051808215151515815260200191505060405180910390f35b34801561085a57600080fd5b5061088f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612e64565b6040518082815260200191505060405180910390f35b3480156108b157600080fd5b506108e6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f77565b6040518082815260200191505060405180910390f35b34801561090857600080fd5b506109cb600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190929190803590602001909291908035906020019092919080359060200190929190505050613080565b005b3480156109d957600080fd5b50610a0e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506138ca565b005b348015610a1c57600080fd5b50610a81600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929080359060200190929190505050613c3d565b6040518082815260200191505060405180910390f35b348015610aa357600080fd5b50610afb60048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050613d54565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610b3e578082015181840152602081019050610b23565b505050509050019250505060405180910390f35b610b86600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613ec0565b005b348015610b9457600080fd5b50610bc9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613f1e565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610c09578082015181840152602081019050610bee565b50505050905090810190601f168015610c365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610c5057600080fd5b50610c85600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613ff5565b604051808381526020018281526020019250505060405180910390f35b348015610cae57600080fd5b50610ce3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614013565b6040518082815260200191505060405180910390f35b348015610d0557600080fd5b50610d3a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614126565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60001515600360149054906101000a900460ff161515141515610d9e57600080fd5b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600360146101000a81548160ff0219169083151502179055505050565b6000610f4b606060405190810160405280602281526020017f63616d706169676e506c61736d6132616d6f756e744f66537461626c65436f6981526020017f6e73000000000000000000000000000000000000000000000000000000000000815250836040518083805190602001908083835b602083101515610ed75780518252602082019150602081019050602083039250610eb2565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600080600080610fc26040805190810160405280601981526020017f54776f4b65794d61696e7461696e6572735265676973747279000000000000008152506142ef565b90508073ffffffffffffffffffffffffffffffffffffffff16635cc7815c336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561105f57600080fd5b505af1158015611073573d6000803e3d6000fd5b505050506040513d602081101561108957600080fd5b810190808051906020019092919050505015156110a557600080fd5b6040805190810160405280601e81526020017f63616d706169676e506c61736d6132697343616d706169676e456e64656400008152508b6040518083805190602001908083835b60208310151561111157805182526020820191506020810190506020830392506110ec565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902097506000151561118f89614429565b151514151561119d57600080fd5b6111a8886001614506565b6111b18b611ab8565b96506111c68a886145c790919063ffffffff16565b9550859450889350670de0b6b3a76400009250600015156111e68c611584565b15151415611238576112006111fa8c611cb6565b876145e3565b8094508196505050611235670de0b6b3a7640000611227858c6149b190919063ffffffff16565b6149ec90919063ffffffff16565b93505b61124b84866145c790919063ffffffff16565b91506112578b85614a02565b611362606060405190810160405280602381526020017f63616d706169676e506c61736d6132526566657272657252657761726473546f81526020017f74616c00000000000000000000000000000000000000000000000000000000008152508c6040518083805190602001908083835b6020831015156112ed57805182526020820191506020810190506020830392506112c8565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014019250505060405180910390208b614c19565b61146d606060405190810160405280602581526020017f63616d706169676e506c61736d61546f4c6566744f766572466f72436f6e747281526020017f6163746f720000000000000000000000000000000000000000000000000000008152508c6040518083805190602001908083835b6020831015156113f857805182526020820191506020810190506020830392506113d3565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902083614c19565b6114778b84614cd6565b6114b56040805190810160405280601181526020017f54776f4b65794576656e74536f757263650000000000000000000000000000008152506142ef565b73ffffffffffffffffffffffffffffffffffffffff16636bfa36f48c84876040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019350505050600060405180830381600087803b15801561155f57600080fd5b505af1158015611573573d6000803e3d6000fd5b505050505050505050505050505050565b6000611690606060405190810160405280602981526020017f63616d706169676e506c61736d61326973427564676574656457697468324b6581526020017f794469726563746c790000000000000000000000000000000000000000000000815250836040518083805190602001908083835b60208310151561161c57805182526020820191506020810190506020830392506115f7565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614429565b9050919050565b60006117416040805190810160405280601881526020017f6665655065724379636c65496450657252656665727265720000000000000000815250836040518083805190602001908083835b60208310151561170857805182526020820191506020810190506020830392506116e3565b6001836020036101000a038019825116818451168082178552505050505050905001828152602001925050506040518091039020614212565b9050919050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000611843606060405190810160405280602481526020017f5f646973747269627574696f6e4379636c65546f546f74616c4469737472696281526020017f7574656400000000000000000000000000000000000000000000000000000000815250836040518083805190602001908083835b60208310151561180a57805182526020820191506020810190506020830392506117e5565b6001836020036101000a038019825116818451168082178552505050505050905001828152602001925050506040518091039020614212565b9050919050565b600080600080600061185b86611ab8565b61186487614013565b61186d88611cb6565b61187689611584565b61187f8a611ba4565b9450945094509450945091939590929450565b600061199e606060405190810160405280602581526020017f63616d706169676e506c61736d61546f4c6566744f766572466f72436f6e747281526020017f6163746f72000000000000000000000000000000000000000000000000000000815250836040518083805190602001908083835b60208310151561192a5780518252602082019150602081019050602083039250611905565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050919050565b6000611ab1606060405190810160405280602381526020017f63616d706169676e506c61736d6132526566657272657252657761726473546f81526020017f74616c0000000000000000000000000000000000000000000000000000000000815250836040518083805190602001908083835b602083101515611a3d5780518252602082019150602081019050602083039250611a18565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050919050565b6000611b9d6040805190810160405280602081526020017f63616d706169676e506c61736d6132696e697469616c427564676574324b6579815250836040518083805190602001908083835b602083101515611b295780518252602082019150602081019050602083039250611b04565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050919050565b6000611c896040805190810160405280601981526020017f63616d706169676e506c61736d6132636f6e74726163746f7200000000000000815250836040518083805190602001908083835b602083101515611c155780518252602082019150602081019050602083039250611bf0565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614dbe565b9050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611d9b6040805190810160405280601981526020017f63616d706169676e506c61736d6132696e6974616c5261746500000000000000815250836040518083805190602001908083835b602083101515611d275780518252602082019150602081019050602083039250611d02565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050919050565b600080600080611e8c6040805190810160405280601981526020017f63616d706169676e506c61736d6132636f6e74726163746f7200000000000000815250896040518083805190602001908083835b602083101515611e175780518252602082019150602081019050602083039250611df2565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902033614e9b565b611eca6040805190810160405280601881526020017f54776f4b657955706772616461626c6545786368616e676500000000000000008152506142ef565b9350611f0a6040805190810160405280600481526020017f5553445400000000000000000000000000000000000000000000000000000000815250614f84565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612031578473ffffffffffffffffffffffffffffffffffffffff166323b872dd33868a6040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b15801561201457600080fd5b505af1158015612028573d6000803e3d6000fd5b50505050612145565b8473ffffffffffffffffffffffffffffffffffffffff166323b872dd33868a6040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561210857600080fd5b505af115801561211c573d6000803e3d6000fd5b505050506040513d602081101561213257600080fd5b8101908080519060200190929190505050505b8373ffffffffffffffffffffffffffffffffffffffff16636df3d0fa88876040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001925050506040805180830381600087803b1580156121e757600080fd5b505af11580156121fb573d6000803e3d6000fd5b505050506040513d604081101561221157600080fd5b810190808051906020019092919080519060200190929190505050809350819450505061226182612253670de0b6b3a7640000896149b190919063ffffffff16565b6149ec90919063ffffffff16565b905061226d88846150be565b612378606060405190810160405280602681526020017f63616d706169676e506c61736d6132626f756e7479506572436f6e766572736981526020017f6f6e324b45590000000000000000000000000000000000000000000000000000815250896040518083805190602001908083835b60208310151561230357805182526020820191506020810190506020830392506122de565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902082614c19565b612483606060405190810160405280602281526020017f63616d706169676e506c61736d6132616d6f756e744f66537461626c65436f6981526020017f6e73000000000000000000000000000000000000000000000000000000000000815250896040518083805190602001908083835b60208310151561240e57805182526020820191506020810190506020830392506123e9565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902088614c19565b6125676040805190810160405280602081526020017f63616d706169676e506c61736d6132537461626c65436f696e41646472657373815250896040518083805190602001908083835b6020831015156124f257805182526020820191506020810190506020830392506124cd565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902086614e9b565b61264b6040805190810160405280601981526020017f63616d706169676e506c61736d6132696e6974616c5261746500000000000000815250896040518083805190602001908083835b6020831015156125d657805182526020820191506020810190506020830392506125b1565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902083614c19565b5050505050505050565b60008061266285856150be565b6127466040805190810160405280601981526020017f63616d706169676e506c61736d6132636f6e74726163746f7200000000000000815250866040518083805190602001908083835b6020831015156126d157805182526020820191506020810190506020830392506126ac565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902033614e9b565b6127846040805190810160405280601881526020017f54776f4b657955706772616461626c6545786368616e676500000000000000008152506142ef565b73ffffffffffffffffffffffffffffffffffffffff1663a6276f136040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156127e757600080fd5b505af11580156127fb573d6000803e3d6000fd5b505050506040513d602081101561281157600080fd5b8101908080519060200190929190505050915061285182612843670de0b6b3a7640000866149b190919063ffffffff16565b6149ec90919063ffffffff16565b905061295e606060405190810160405280602681526020017f63616d706169676e506c61736d6132626f756e7479506572436f6e766572736981526020017f6f6e324b45590000000000000000000000000000000000000000000000000000815250866040518083805190602001908083835b6020831015156128e957805182526020820191506020810190506020830392506128c4565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902082614c19565b612a426040805190810160405280601981526020017f63616d706169676e506c61736d6132696e6974616c5261746500000000000000815250866040518083805190602001908083835b6020831015156129cd57805182526020820191506020810190506020830392506129a8565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902083614c19565b612b4e606060405190810160405280602981526020017f63616d706169676e506c61736d61326973427564676574656457697468324b6581526020017f794469726563746c790000000000000000000000000000000000000000000000815250866040518083805190602001908083835b602083101515612ad85780518252602082019150602081019050602083039250612ab3565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014019250505060405180910390206001614506565b612b8c6040805190810160405280600d81526020017f54776f4b657945636f6e6f6d7900000000000000000000000000000000000000815250614f84565b73ffffffffffffffffffffffffffffffffffffffff166323b872dd3330876040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612c6257600080fd5b505af1158015612c76573d6000803e3d6000fd5b505050506040513d6020811015612c8c57600080fd5b8101908080519060200190929190505050505050505050565b6000612d476040805190810160405280601a81526020017f6e756d6265724f66446973747269627574696f6e4379636c65730000000000008152506040518082805190602001908083835b602083101515612d155780518252602082019150602081019050602083039250612cf0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020614212565b905090565b600080612e59606060405190810160405280602d81526020017f63616d706169676e506c61736d61546f4c6566746f766572576974686472617781526020017f6e4279436f6e74726163746f7200000000000000000000000000000000000000815250846040518083805190602001908083835b602083101515612de55780518252602082019150602081019050602083039250612dc0565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614429565b905080915050919050565b6000612f70606060405190810160405280602181526020017f63616d706169676e506c61736d61546f4d6f64657261746f724561726e696e6781526020017f7300000000000000000000000000000000000000000000000000000000000000815250836040518083805190602001908083835b602083101515612efc5780518252602082019150602081019050602083039250612ed7565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050919050565b60008061305d6040805190810160405280601f81526020017f63616d706169676e506c61736d6132726562616c616e63696e67526174696f00815250846040518083805190602001908083835b602083101515612fe95780518252602082019150602081019050602083039250612fc4565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050600081141561307657670de0b6b3a7640000613078565b805b915050919050565b6000806000806000806000806130ca6040805190810160405280601981526020017f54776f4b65794d61696e7461696e6572735265676973747279000000000000008152506142ef565b90508073ffffffffffffffffffffffffffffffffffffffff16635cc7815c336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561316757600080fd5b505af115801561317b573d6000803e3d6000fd5b505050506040513d602081101561319157600080fd5b810190808051906020019092919050505015156131ad57600080fd5b6131eb6040805190810160405280600d81526020017f54776f4b657945636f6e6f6d7900000000000000000000000000000000000000815250614f84565b975061322b6040805190810160405280601881526020017f54776f4b657955706772616461626c6545786368616e676500000000000000008152506142ef565b96508a8c11156134ba576132488b8d6145c790919063ffffffff16565b93508773ffffffffffffffffffffffffffffffffffffffff1663095ea7b388866040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156132ed57600080fd5b505af1158015613301573d6000803e3d6000fd5b505050506040513d602081101561331757600080fd5b8101908080519060200190929190505050508673ffffffffffffffffffffffffffffffffffffffff1663e65dafc7856040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561339857600080fd5b505af11580156133ac573d6000803e3d6000fd5b505050506133ee6040805190810160405280601181526020017f54776f4b65794576656e74536f757263650000000000000000000000000000008152506142ef565b73ffffffffffffffffffffffffffffffffffffffff1663e202e5728b866040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200180602001828103825260198152602001807f52455455524e5f544f4b454e535f544f5f45584348414e4745000000000000008152506020019350505050600060405180830381600087803b15801561349d57600080fd5b505af11580156134b1573d6000803e3d6000fd5b50505050613665565b8a8c1015613664576134d58c8c6145c790919063ffffffff16565b93508673ffffffffffffffffffffffffffffffffffffffff1663907f7861856040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561354657600080fd5b505af115801561355a573d6000803e3d6000fd5b5050505061359c6040805190810160405280601181526020017f54776f4b65794576656e74536f757263650000000000000000000000000000008152506142ef565b73ffffffffffffffffffffffffffffffffffffffff1663e202e5728b866040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200180602001828103825260188152602001807f4745545f544f4b454e535f46524f4d5f45584348414e474500000000000000008152506020019350505050600060405180830381600087803b15801561364b57600080fd5b505af115801561365f573d6000803e3d6000fd5b505050505b5b8d519250600094505b828510156137df57888d8681518110151561368557fe5b9060200190602002015111151561369b57600080fd5b6136c5898e878151811015156136ad57fe5b906020019060200201516145c790919063ffffffff16565b91508773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8f878151811015156136f157fe5b90602001906020020151846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561378157600080fd5b505af1158015613795573d6000803e3d6000fd5b505050506040513d60208110156137ab57600080fd5b8101908080519060200190929190505050506137d082876151c390919063ffffffff16565b9550848060010195505061366e565b6137ea89848a6151e2565b6138ba606060405190810160405280602481526020017f5f646973747269627574696f6e4379636c65546f546f74616c4469737472696281526020017f75746564000000000000000000000000000000000000000000000000000000008152508b6040518083805190602001908083835b602083101515613880578051825260208201915060208101905060208303925061385b565b6001836020036101000a03801982511681845116808217855250505050505090500182815260200192505050604051809103902087614c19565b5050505050505050505050505050565b6000803373ffffffffffffffffffffffffffffffffffffffff166139c76040805190810160405280601981526020017f63616d706169676e506c61736d6132636f6e74726163746f7200000000000000815250856040518083805190602001908083835b602083101515613953578051825260208201915060208101905060208303925061392e565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614dbe565b73ffffffffffffffffffffffffffffffffffffffff161415156139e957600080fd5b613af3606060405190810160405280602581526020017f63616d706169676e506c61736d61546f4c6566744f766572466f72436f6e747281526020017f6163746f72000000000000000000000000000000000000000000000000000000815250846040518083805190602001908083835b602083101515613a7f5780518252602082019150602081019050602083039250613a5a565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9150600082111515613b0457600080fd5b606060405190810160405280602d81526020017f63616d706169676e506c61736d61546f4c6566746f766572576974686472617781526020017f6e4279436f6e74726163746f7200000000000000000000000000000000000000815250836040518083805190602001908083835b602083101515613b975780518252602082019150602081019050602083039250613b72565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020905060001515613c1582614429565b1515141515613c2357600080fd5b613c2e816001614506565b613c3833836153b4565b505050565b600080613c7e6040805190810160405280601881526020017f54776f4b657955706772616461626c6545786368616e676500000000000000008152506142ef565b73ffffffffffffffffffffffffffffffffffffffff1663a6276f136040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015613ce157600080fd5b505af1158015613cf5573d6000803e3d6000fd5b505050506040513d6020811015613d0b57600080fd5b81019080805190602001909291905050509050613d4b81613d3d670de0b6b3a7640000866149b190919063ffffffff16565b6149ec90919063ffffffff16565b91505092915050565b60606000606060008451925082604051908082528060200260200182016040528015613d8f5781602001602082028038833980820191505090505b509150600090505b82811015613eb5578481815181101515613dad57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015613e5157600080fd5b505af1158015613e65573d6000803e3d6000fd5b505050506040513d6020811015613e7b57600080fd5b81019080805190602001909291905050508282815181101515613e9a57fe5b90602001906020020181815250508080600101915050613d97565b819350505050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613f1b57600080fd5b50565b6060613f2982611ab8565b613f3283614013565b613f3b84610e3f565b613f4485611cb6565b613f4d86611892565b613f5687612e64565b613f5f88612f77565b613f68896119a5565b613f718a612d4c565b604051602001808a815260200189815260200188815260200187815260200186815260200185815260200184815260200183815260200182151515157f010000000000000000000000000000000000000000000000000000000000000002815260010199505050505050505050506040516020818303038152906040529050919050565b60008061400183612e64565b61400a84611892565b91509150915091565b600061411f606060405190810160405280602681526020017f63616d706169676e506c61736d6132626f756e7479506572436f6e766572736981526020017f6f6e324b45590000000000000000000000000000000000000000000000000000815250836040518083805190602001908083835b6020831015156140ab5780518252602082019150602081019050602083039250614086565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050919050565b600061420b6040805190810160405280602081526020017f63616d706169676e506c61736d6132537461626c65436f696e41646472657373815250836040518083805190602001908083835b6020831015156141975780518252602082019150602081019050602083039250614172565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614dbe565b9050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bd02d0f5836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b1580156142ad57600080fd5b505af11580156142c1573d6000803e3d6000fd5b505050506040513d60208110156142d757600080fd5b81019080805190602001909291905050509050919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663db7a6d90836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561439b578082015181840152602081019050614380565b50505050905090810190601f1680156143c85780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1580156143e757600080fd5b505af11580156143fb573d6000803e3d6000fd5b505050506040513d602081101561441157600080fd5b81019080805190602001909291905050509050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637ae1cfca836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b1580156144c457600080fd5b505af11580156144d8573d6000803e3d6000fd5b505050506040513d60208110156144ee57600080fd5b81019080805190602001909291905050509050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663abfdcced83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600019166000191681526020018215151515815260200192505050600060405180830381600087803b1580156145ab57600080fd5b505af11580156145bf573d6000803e3d6000fd5b505050505050565b60008282111515156145d857600080fd5b818303905092915050565b600080600080600080600080600061462f6040805190810160405280600d81526020017f54776f4b657945636f6e6f6d7900000000000000000000000000000000000000815250614f84565b965061466f6040805190810160405280601881526020017f54776f4b657955706772616461626c6545786368616e676500000000000000008152506142ef565b95508573ffffffffffffffffffffffffffffffffffffffff1663a6276f136040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156146d557600080fd5b505af11580156146e9573d6000803e3d6000fd5b505050506040513d60208110156146ff57600080fd5b8101908080519060200190929190505050945061473f85614731670de0b6b3a76400008e6149b190919063ffffffff16565b6149ec90919063ffffffff16565b935061476e670de0b6b3a7640000614760868d6149b190919063ffffffff16565b6149ec90919063ffffffff16565b9250670de0b6b3a764000084101561490057614793838b6145c790919063ffffffff16565b91508673ffffffffffffffffffffffffffffffffffffffff1663095ea7b387846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561483857600080fd5b505af115801561484c573d6000803e3d6000fd5b505050506040513d602081101561486257600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663e65dafc7836040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156148e357600080fd5b505af11580156148f7573d6000803e3d6000fd5b5050505061499d565b6149138a846145c790919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff1663907f7861826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561498457600080fd5b505af1158015614998573d6000803e3d6000fd5b505050505b828498509850505050505050509250929050565b6000808314156149c457600090506149e6565b81830290508183828115156149d557fe5b041415156149e257600080fd5b8090505b92915050565b600081838115156149f957fe5b04905092915050565b6000614b0f606060405190810160405280602181526020017f63616d706169676e506c61736d61546f4d6f64657261746f724561726e696e6781526020017f7300000000000000000000000000000000000000000000000000000000000000815250846040518083805190602001908083835b602083101515614a9a5780518252602082019150602081019050602083039250614a75565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902083614c19565b614b4d6040805190810160405280600b81526020017f54776f4b657941646d696e0000000000000000000000000000000000000000008152506142ef565b9050614b5981836153b4565b8073ffffffffffffffffffffffffffffffffffffffff16630c644a1b83856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b158015614bfc57600080fd5b505af1158015614c10573d6000803e3d6000fd5b50505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e2a4853a83836040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180836000191660001916815260200182815260200192505050600060405180830381600087803b158015614cba57600080fd5b505af1158015614cce573d6000803e3d6000fd5b505050505050565b614dba6040805190810160405280601f81526020017f63616d706169676e506c61736d6132726562616c616e63696e67526174696f00815250836040518083805190602001908083835b602083101515614d455780518252602082019150602081019050602083039250614d20565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902082614c19565b5050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166321f8a721836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b158015614e5957600080fd5b505af1158015614e6d573d6000803e3d6000fd5b505050506040513d6020811015614e8357600080fd5b81019080805190602001909291905050509050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca446dd983836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b158015614f6857600080fd5b505af1158015614f7c573d6000803e3d6000fd5b505050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f716c79a836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615030578082015181840152602081019050615015565b50505050905090810190601f16801561505d5780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15801561507c57600080fd5b505af1158015615090573d6000803e3d6000fd5b505050506040513d60208110156150a657600080fd5b81019080805190602001909291905050509050919050565b60006040805190810160405280602081526020017f63616d706169676e506c61736d6132696e697469616c427564676574324b6579815250836040518083805190602001908083835b60208310151561512c5780518252602082019150602081019050602083039250615107565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020905060006151a882614212565b1415156151b457600080fd5b6151be8183614c19565b505050565b600081830190508281101515156151d957600080fd5b80905092915050565b60006152226040805190810160405280600b81526020017f54776f4b657941646d696e0000000000000000000000000000000000000000008152506142ef565b90508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8261525486886149b190919063ffffffff16565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156152d957600080fd5b505af11580156152ed573d6000803e3d6000fd5b505050506040513d602081101561530357600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff16636c48769261534485876149b190919063ffffffff16565b6040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561539657600080fd5b505af11580156153aa573d6000803e3d6000fd5b5050505050505050565b6153f26040805190810160405280600d81526020017f54776f4b657945636f6e6f6d7900000000000000000000000000000000000000815250614f84565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561549457600080fd5b505af11580156154a8573d6000803e3d6000fd5b505050506040513d60208110156154be57600080fd5b81019080805190602001909291905050505050505600a165627a7a72305820016a52c032a2074c06c75728621f19d5cebf1d1c041314730ac18650f20286230029

Deployed Bytecode

0x608060405260043610610180576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305dbe412146101855780630c723a35146101e8578063105005a11461023f57806337a712241461029657806351175c85146102ed5780635699adfc146103485780635c60da1b146103895780635cc4b5a8146103e05780637ee9ad58146104215780637fbe4376146104c45780638172b7b21461051b578063857cf35f14610572578063858c6f5b146105c95780638830afa01461064c5780638b207fb2146106a357806398c3f52c146106fa5780639930f84114610771578063a3a414cc146107c8578063a4709d94146107f3578063a4e3cd841461084e578063a4fb9adf146108a5578063a951b3ad146108fc578063aa2576bf146109cd578063aeeb3ac614610a10578063b93727ec14610a97578063c4d66de814610b52578063cd37603314610b88578063d47ca90214610c44578063df988aae14610ca2578063f759a5c414610cf9575b600080fd5b34801561019157600080fd5b506101e6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d7c565b005b3480156101f457600080fd5b50610229600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e3f565b6040518082815260200191505060405180910390f35b34801561024b57600080fd5b50610254610f52565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102a257600080fd5b506102eb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610f78565b005b3480156102f957600080fd5b5061032e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611584565b604051808215151515815260200191505060405180910390f35b34801561035457600080fd5b5061037360048036038101908080359060200190929190505050611697565b6040518082815260200191505060405180910390f35b34801561039557600080fd5b5061039e611748565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103ec57600080fd5b5061040b60048036038101908080359060200190929190505050611772565b6040518082815260200191505060405180910390f35b34801561042d57600080fd5b50610462600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061184a565b60405180868152602001858152602001848152602001831515151581526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060405180910390f35b3480156104d057600080fd5b50610505600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611892565b6040518082815260200191505060405180910390f35b34801561052757600080fd5b5061055c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119a5565b6040518082815260200191505060405180910390f35b34801561057e57600080fd5b506105b3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ab8565b6040518082815260200191505060405180910390f35b3480156105d557600080fd5b5061060a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ba4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561065857600080fd5b50610661611c90565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106af57600080fd5b506106e4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611cb6565b6040518082815260200191505060405180910390f35b34801561070657600080fd5b5061076f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611da2565b005b34801561077d57600080fd5b506107c6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050612655565b005b3480156107d457600080fd5b506107dd612ca5565b6040518082815260200191505060405180910390f35b3480156107ff57600080fd5b50610834600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612d4c565b604051808215151515815260200191505060405180910390f35b34801561085a57600080fd5b5061088f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612e64565b6040518082815260200191505060405180910390f35b3480156108b157600080fd5b506108e6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f77565b6040518082815260200191505060405180910390f35b34801561090857600080fd5b506109cb600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190929190803590602001909291908035906020019092919080359060200190929190505050613080565b005b3480156109d957600080fd5b50610a0e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506138ca565b005b348015610a1c57600080fd5b50610a81600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929080359060200190929190505050613c3d565b6040518082815260200191505060405180910390f35b348015610aa357600080fd5b50610afb60048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050613d54565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610b3e578082015181840152602081019050610b23565b505050509050019250505060405180910390f35b610b86600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613ec0565b005b348015610b9457600080fd5b50610bc9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613f1e565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610c09578082015181840152602081019050610bee565b50505050905090810190601f168015610c365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610c5057600080fd5b50610c85600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613ff5565b604051808381526020018281526020019250505060405180910390f35b348015610cae57600080fd5b50610ce3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614013565b6040518082815260200191505060405180910390f35b348015610d0557600080fd5b50610d3a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614126565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60001515600360149054906101000a900460ff161515141515610d9e57600080fd5b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600360146101000a81548160ff0219169083151502179055505050565b6000610f4b606060405190810160405280602281526020017f63616d706169676e506c61736d6132616d6f756e744f66537461626c65436f6981526020017f6e73000000000000000000000000000000000000000000000000000000000000815250836040518083805190602001908083835b602083101515610ed75780518252602082019150602081019050602083039250610eb2565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600080600080610fc26040805190810160405280601981526020017f54776f4b65794d61696e7461696e6572735265676973747279000000000000008152506142ef565b90508073ffffffffffffffffffffffffffffffffffffffff16635cc7815c336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561105f57600080fd5b505af1158015611073573d6000803e3d6000fd5b505050506040513d602081101561108957600080fd5b810190808051906020019092919050505015156110a557600080fd5b6040805190810160405280601e81526020017f63616d706169676e506c61736d6132697343616d706169676e456e64656400008152508b6040518083805190602001908083835b60208310151561111157805182526020820191506020810190506020830392506110ec565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902097506000151561118f89614429565b151514151561119d57600080fd5b6111a8886001614506565b6111b18b611ab8565b96506111c68a886145c790919063ffffffff16565b9550859450889350670de0b6b3a76400009250600015156111e68c611584565b15151415611238576112006111fa8c611cb6565b876145e3565b8094508196505050611235670de0b6b3a7640000611227858c6149b190919063ffffffff16565b6149ec90919063ffffffff16565b93505b61124b84866145c790919063ffffffff16565b91506112578b85614a02565b611362606060405190810160405280602381526020017f63616d706169676e506c61736d6132526566657272657252657761726473546f81526020017f74616c00000000000000000000000000000000000000000000000000000000008152508c6040518083805190602001908083835b6020831015156112ed57805182526020820191506020810190506020830392506112c8565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014019250505060405180910390208b614c19565b61146d606060405190810160405280602581526020017f63616d706169676e506c61736d61546f4c6566744f766572466f72436f6e747281526020017f6163746f720000000000000000000000000000000000000000000000000000008152508c6040518083805190602001908083835b6020831015156113f857805182526020820191506020810190506020830392506113d3565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902083614c19565b6114778b84614cd6565b6114b56040805190810160405280601181526020017f54776f4b65794576656e74536f757263650000000000000000000000000000008152506142ef565b73ffffffffffffffffffffffffffffffffffffffff16636bfa36f48c84876040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019350505050600060405180830381600087803b15801561155f57600080fd5b505af1158015611573573d6000803e3d6000fd5b505050505050505050505050505050565b6000611690606060405190810160405280602981526020017f63616d706169676e506c61736d61326973427564676574656457697468324b6581526020017f794469726563746c790000000000000000000000000000000000000000000000815250836040518083805190602001908083835b60208310151561161c57805182526020820191506020810190506020830392506115f7565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614429565b9050919050565b60006117416040805190810160405280601881526020017f6665655065724379636c65496450657252656665727265720000000000000000815250836040518083805190602001908083835b60208310151561170857805182526020820191506020810190506020830392506116e3565b6001836020036101000a038019825116818451168082178552505050505050905001828152602001925050506040518091039020614212565b9050919050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000611843606060405190810160405280602481526020017f5f646973747269627574696f6e4379636c65546f546f74616c4469737472696281526020017f7574656400000000000000000000000000000000000000000000000000000000815250836040518083805190602001908083835b60208310151561180a57805182526020820191506020810190506020830392506117e5565b6001836020036101000a038019825116818451168082178552505050505050905001828152602001925050506040518091039020614212565b9050919050565b600080600080600061185b86611ab8565b61186487614013565b61186d88611cb6565b61187689611584565b61187f8a611ba4565b9450945094509450945091939590929450565b600061199e606060405190810160405280602581526020017f63616d706169676e506c61736d61546f4c6566744f766572466f72436f6e747281526020017f6163746f72000000000000000000000000000000000000000000000000000000815250836040518083805190602001908083835b60208310151561192a5780518252602082019150602081019050602083039250611905565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050919050565b6000611ab1606060405190810160405280602381526020017f63616d706169676e506c61736d6132526566657272657252657761726473546f81526020017f74616c0000000000000000000000000000000000000000000000000000000000815250836040518083805190602001908083835b602083101515611a3d5780518252602082019150602081019050602083039250611a18565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050919050565b6000611b9d6040805190810160405280602081526020017f63616d706169676e506c61736d6132696e697469616c427564676574324b6579815250836040518083805190602001908083835b602083101515611b295780518252602082019150602081019050602083039250611b04565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050919050565b6000611c896040805190810160405280601981526020017f63616d706169676e506c61736d6132636f6e74726163746f7200000000000000815250836040518083805190602001908083835b602083101515611c155780518252602082019150602081019050602083039250611bf0565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614dbe565b9050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611d9b6040805190810160405280601981526020017f63616d706169676e506c61736d6132696e6974616c5261746500000000000000815250836040518083805190602001908083835b602083101515611d275780518252602082019150602081019050602083039250611d02565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050919050565b600080600080611e8c6040805190810160405280601981526020017f63616d706169676e506c61736d6132636f6e74726163746f7200000000000000815250896040518083805190602001908083835b602083101515611e175780518252602082019150602081019050602083039250611df2565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902033614e9b565b611eca6040805190810160405280601881526020017f54776f4b657955706772616461626c6545786368616e676500000000000000008152506142ef565b9350611f0a6040805190810160405280600481526020017f5553445400000000000000000000000000000000000000000000000000000000815250614f84565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612031578473ffffffffffffffffffffffffffffffffffffffff166323b872dd33868a6040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b15801561201457600080fd5b505af1158015612028573d6000803e3d6000fd5b50505050612145565b8473ffffffffffffffffffffffffffffffffffffffff166323b872dd33868a6040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561210857600080fd5b505af115801561211c573d6000803e3d6000fd5b505050506040513d602081101561213257600080fd5b8101908080519060200190929190505050505b8373ffffffffffffffffffffffffffffffffffffffff16636df3d0fa88876040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001925050506040805180830381600087803b1580156121e757600080fd5b505af11580156121fb573d6000803e3d6000fd5b505050506040513d604081101561221157600080fd5b810190808051906020019092919080519060200190929190505050809350819450505061226182612253670de0b6b3a7640000896149b190919063ffffffff16565b6149ec90919063ffffffff16565b905061226d88846150be565b612378606060405190810160405280602681526020017f63616d706169676e506c61736d6132626f756e7479506572436f6e766572736981526020017f6f6e324b45590000000000000000000000000000000000000000000000000000815250896040518083805190602001908083835b60208310151561230357805182526020820191506020810190506020830392506122de565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902082614c19565b612483606060405190810160405280602281526020017f63616d706169676e506c61736d6132616d6f756e744f66537461626c65436f6981526020017f6e73000000000000000000000000000000000000000000000000000000000000815250896040518083805190602001908083835b60208310151561240e57805182526020820191506020810190506020830392506123e9565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902088614c19565b6125676040805190810160405280602081526020017f63616d706169676e506c61736d6132537461626c65436f696e41646472657373815250896040518083805190602001908083835b6020831015156124f257805182526020820191506020810190506020830392506124cd565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902086614e9b565b61264b6040805190810160405280601981526020017f63616d706169676e506c61736d6132696e6974616c5261746500000000000000815250896040518083805190602001908083835b6020831015156125d657805182526020820191506020810190506020830392506125b1565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902083614c19565b5050505050505050565b60008061266285856150be565b6127466040805190810160405280601981526020017f63616d706169676e506c61736d6132636f6e74726163746f7200000000000000815250866040518083805190602001908083835b6020831015156126d157805182526020820191506020810190506020830392506126ac565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902033614e9b565b6127846040805190810160405280601881526020017f54776f4b657955706772616461626c6545786368616e676500000000000000008152506142ef565b73ffffffffffffffffffffffffffffffffffffffff1663a6276f136040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156127e757600080fd5b505af11580156127fb573d6000803e3d6000fd5b505050506040513d602081101561281157600080fd5b8101908080519060200190929190505050915061285182612843670de0b6b3a7640000866149b190919063ffffffff16565b6149ec90919063ffffffff16565b905061295e606060405190810160405280602681526020017f63616d706169676e506c61736d6132626f756e7479506572436f6e766572736981526020017f6f6e324b45590000000000000000000000000000000000000000000000000000815250866040518083805190602001908083835b6020831015156128e957805182526020820191506020810190506020830392506128c4565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902082614c19565b612a426040805190810160405280601981526020017f63616d706169676e506c61736d6132696e6974616c5261746500000000000000815250866040518083805190602001908083835b6020831015156129cd57805182526020820191506020810190506020830392506129a8565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902083614c19565b612b4e606060405190810160405280602981526020017f63616d706169676e506c61736d61326973427564676574656457697468324b6581526020017f794469726563746c790000000000000000000000000000000000000000000000815250866040518083805190602001908083835b602083101515612ad85780518252602082019150602081019050602083039250612ab3565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014019250505060405180910390206001614506565b612b8c6040805190810160405280600d81526020017f54776f4b657945636f6e6f6d7900000000000000000000000000000000000000815250614f84565b73ffffffffffffffffffffffffffffffffffffffff166323b872dd3330876040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612c6257600080fd5b505af1158015612c76573d6000803e3d6000fd5b505050506040513d6020811015612c8c57600080fd5b8101908080519060200190929190505050505050505050565b6000612d476040805190810160405280601a81526020017f6e756d6265724f66446973747269627574696f6e4379636c65730000000000008152506040518082805190602001908083835b602083101515612d155780518252602082019150602081019050602083039250612cf0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020614212565b905090565b600080612e59606060405190810160405280602d81526020017f63616d706169676e506c61736d61546f4c6566746f766572576974686472617781526020017f6e4279436f6e74726163746f7200000000000000000000000000000000000000815250846040518083805190602001908083835b602083101515612de55780518252602082019150602081019050602083039250612dc0565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614429565b905080915050919050565b6000612f70606060405190810160405280602181526020017f63616d706169676e506c61736d61546f4d6f64657261746f724561726e696e6781526020017f7300000000000000000000000000000000000000000000000000000000000000815250836040518083805190602001908083835b602083101515612efc5780518252602082019150602081019050602083039250612ed7565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050919050565b60008061305d6040805190810160405280601f81526020017f63616d706169676e506c61736d6132726562616c616e63696e67526174696f00815250846040518083805190602001908083835b602083101515612fe95780518252602082019150602081019050602083039250612fc4565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050600081141561307657670de0b6b3a7640000613078565b805b915050919050565b6000806000806000806000806130ca6040805190810160405280601981526020017f54776f4b65794d61696e7461696e6572735265676973747279000000000000008152506142ef565b90508073ffffffffffffffffffffffffffffffffffffffff16635cc7815c336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561316757600080fd5b505af115801561317b573d6000803e3d6000fd5b505050506040513d602081101561319157600080fd5b810190808051906020019092919050505015156131ad57600080fd5b6131eb6040805190810160405280600d81526020017f54776f4b657945636f6e6f6d7900000000000000000000000000000000000000815250614f84565b975061322b6040805190810160405280601881526020017f54776f4b657955706772616461626c6545786368616e676500000000000000008152506142ef565b96508a8c11156134ba576132488b8d6145c790919063ffffffff16565b93508773ffffffffffffffffffffffffffffffffffffffff1663095ea7b388866040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156132ed57600080fd5b505af1158015613301573d6000803e3d6000fd5b505050506040513d602081101561331757600080fd5b8101908080519060200190929190505050508673ffffffffffffffffffffffffffffffffffffffff1663e65dafc7856040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561339857600080fd5b505af11580156133ac573d6000803e3d6000fd5b505050506133ee6040805190810160405280601181526020017f54776f4b65794576656e74536f757263650000000000000000000000000000008152506142ef565b73ffffffffffffffffffffffffffffffffffffffff1663e202e5728b866040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200180602001828103825260198152602001807f52455455524e5f544f4b454e535f544f5f45584348414e4745000000000000008152506020019350505050600060405180830381600087803b15801561349d57600080fd5b505af11580156134b1573d6000803e3d6000fd5b50505050613665565b8a8c1015613664576134d58c8c6145c790919063ffffffff16565b93508673ffffffffffffffffffffffffffffffffffffffff1663907f7861856040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561354657600080fd5b505af115801561355a573d6000803e3d6000fd5b5050505061359c6040805190810160405280601181526020017f54776f4b65794576656e74536f757263650000000000000000000000000000008152506142ef565b73ffffffffffffffffffffffffffffffffffffffff1663e202e5728b866040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200180602001828103825260188152602001807f4745545f544f4b454e535f46524f4d5f45584348414e474500000000000000008152506020019350505050600060405180830381600087803b15801561364b57600080fd5b505af115801561365f573d6000803e3d6000fd5b505050505b5b8d519250600094505b828510156137df57888d8681518110151561368557fe5b9060200190602002015111151561369b57600080fd5b6136c5898e878151811015156136ad57fe5b906020019060200201516145c790919063ffffffff16565b91508773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8f878151811015156136f157fe5b90602001906020020151846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561378157600080fd5b505af1158015613795573d6000803e3d6000fd5b505050506040513d60208110156137ab57600080fd5b8101908080519060200190929190505050506137d082876151c390919063ffffffff16565b9550848060010195505061366e565b6137ea89848a6151e2565b6138ba606060405190810160405280602481526020017f5f646973747269627574696f6e4379636c65546f546f74616c4469737472696281526020017f75746564000000000000000000000000000000000000000000000000000000008152508b6040518083805190602001908083835b602083101515613880578051825260208201915060208101905060208303925061385b565b6001836020036101000a03801982511681845116808217855250505050505090500182815260200192505050604051809103902087614c19565b5050505050505050505050505050565b6000803373ffffffffffffffffffffffffffffffffffffffff166139c76040805190810160405280601981526020017f63616d706169676e506c61736d6132636f6e74726163746f7200000000000000815250856040518083805190602001908083835b602083101515613953578051825260208201915060208101905060208303925061392e565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614dbe565b73ffffffffffffffffffffffffffffffffffffffff161415156139e957600080fd5b613af3606060405190810160405280602581526020017f63616d706169676e506c61736d61546f4c6566744f766572466f72436f6e747281526020017f6163746f72000000000000000000000000000000000000000000000000000000815250846040518083805190602001908083835b602083101515613a7f5780518252602082019150602081019050602083039250613a5a565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9150600082111515613b0457600080fd5b606060405190810160405280602d81526020017f63616d706169676e506c61736d61546f4c6566746f766572576974686472617781526020017f6e4279436f6e74726163746f7200000000000000000000000000000000000000815250836040518083805190602001908083835b602083101515613b975780518252602082019150602081019050602083039250613b72565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020905060001515613c1582614429565b1515141515613c2357600080fd5b613c2e816001614506565b613c3833836153b4565b505050565b600080613c7e6040805190810160405280601881526020017f54776f4b657955706772616461626c6545786368616e676500000000000000008152506142ef565b73ffffffffffffffffffffffffffffffffffffffff1663a6276f136040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015613ce157600080fd5b505af1158015613cf5573d6000803e3d6000fd5b505050506040513d6020811015613d0b57600080fd5b81019080805190602001909291905050509050613d4b81613d3d670de0b6b3a7640000866149b190919063ffffffff16565b6149ec90919063ffffffff16565b91505092915050565b60606000606060008451925082604051908082528060200260200182016040528015613d8f5781602001602082028038833980820191505090505b509150600090505b82811015613eb5578481815181101515613dad57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015613e5157600080fd5b505af1158015613e65573d6000803e3d6000fd5b505050506040513d6020811015613e7b57600080fd5b81019080805190602001909291905050508282815181101515613e9a57fe5b90602001906020020181815250508080600101915050613d97565b819350505050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613f1b57600080fd5b50565b6060613f2982611ab8565b613f3283614013565b613f3b84610e3f565b613f4485611cb6565b613f4d86611892565b613f5687612e64565b613f5f88612f77565b613f68896119a5565b613f718a612d4c565b604051602001808a815260200189815260200188815260200187815260200186815260200185815260200184815260200183815260200182151515157f010000000000000000000000000000000000000000000000000000000000000002815260010199505050505050505050506040516020818303038152906040529050919050565b60008061400183612e64565b61400a84611892565b91509150915091565b600061411f606060405190810160405280602681526020017f63616d706169676e506c61736d6132626f756e7479506572436f6e766572736981526020017f6f6e324b45590000000000000000000000000000000000000000000000000000815250836040518083805190602001908083835b6020831015156140ab5780518252602082019150602081019050602083039250614086565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614212565b9050919050565b600061420b6040805190810160405280602081526020017f63616d706169676e506c61736d6132537461626c65436f696e41646472657373815250836040518083805190602001908083835b6020831015156141975780518252602082019150602081019050602083039250614172565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020614dbe565b9050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bd02d0f5836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b1580156142ad57600080fd5b505af11580156142c1573d6000803e3d6000fd5b505050506040513d60208110156142d757600080fd5b81019080805190602001909291905050509050919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663db7a6d90836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561439b578082015181840152602081019050614380565b50505050905090810190601f1680156143c85780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1580156143e757600080fd5b505af11580156143fb573d6000803e3d6000fd5b505050506040513d602081101561441157600080fd5b81019080805190602001909291905050509050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637ae1cfca836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b1580156144c457600080fd5b505af11580156144d8573d6000803e3d6000fd5b505050506040513d60208110156144ee57600080fd5b81019080805190602001909291905050509050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663abfdcced83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600019166000191681526020018215151515815260200192505050600060405180830381600087803b1580156145ab57600080fd5b505af11580156145bf573d6000803e3d6000fd5b505050505050565b60008282111515156145d857600080fd5b818303905092915050565b600080600080600080600080600061462f6040805190810160405280600d81526020017f54776f4b657945636f6e6f6d7900000000000000000000000000000000000000815250614f84565b965061466f6040805190810160405280601881526020017f54776f4b657955706772616461626c6545786368616e676500000000000000008152506142ef565b95508573ffffffffffffffffffffffffffffffffffffffff1663a6276f136040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156146d557600080fd5b505af11580156146e9573d6000803e3d6000fd5b505050506040513d60208110156146ff57600080fd5b8101908080519060200190929190505050945061473f85614731670de0b6b3a76400008e6149b190919063ffffffff16565b6149ec90919063ffffffff16565b935061476e670de0b6b3a7640000614760868d6149b190919063ffffffff16565b6149ec90919063ffffffff16565b9250670de0b6b3a764000084101561490057614793838b6145c790919063ffffffff16565b91508673ffffffffffffffffffffffffffffffffffffffff1663095ea7b387846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561483857600080fd5b505af115801561484c573d6000803e3d6000fd5b505050506040513d602081101561486257600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663e65dafc7836040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156148e357600080fd5b505af11580156148f7573d6000803e3d6000fd5b5050505061499d565b6149138a846145c790919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff1663907f7861826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561498457600080fd5b505af1158015614998573d6000803e3d6000fd5b505050505b828498509850505050505050509250929050565b6000808314156149c457600090506149e6565b81830290508183828115156149d557fe5b041415156149e257600080fd5b8090505b92915050565b600081838115156149f957fe5b04905092915050565b6000614b0f606060405190810160405280602181526020017f63616d706169676e506c61736d61546f4d6f64657261746f724561726e696e6781526020017f7300000000000000000000000000000000000000000000000000000000000000815250846040518083805190602001908083835b602083101515614a9a5780518252602082019150602081019050602083039250614a75565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902083614c19565b614b4d6040805190810160405280600b81526020017f54776f4b657941646d696e0000000000000000000000000000000000000000008152506142ef565b9050614b5981836153b4565b8073ffffffffffffffffffffffffffffffffffffffff16630c644a1b83856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b158015614bfc57600080fd5b505af1158015614c10573d6000803e3d6000fd5b50505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e2a4853a83836040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180836000191660001916815260200182815260200192505050600060405180830381600087803b158015614cba57600080fd5b505af1158015614cce573d6000803e3d6000fd5b505050505050565b614dba6040805190810160405280601f81526020017f63616d706169676e506c61736d6132726562616c616e63696e67526174696f00815250836040518083805190602001908083835b602083101515614d455780518252602082019150602081019050602083039250614d20565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902082614c19565b5050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166321f8a721836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b158015614e5957600080fd5b505af1158015614e6d573d6000803e3d6000fd5b505050506040513d6020811015614e8357600080fd5b81019080805190602001909291905050509050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca446dd983836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b158015614f6857600080fd5b505af1158015614f7c573d6000803e3d6000fd5b505050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f716c79a836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615030578082015181840152602081019050615015565b50505050905090810190601f16801561505d5780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15801561507c57600080fd5b505af1158015615090573d6000803e3d6000fd5b505050506040513d60208110156150a657600080fd5b81019080805190602001909291905050509050919050565b60006040805190810160405280602081526020017f63616d706169676e506c61736d6132696e697469616c427564676574324b6579815250836040518083805190602001908083835b60208310151561512c5780518252602082019150602081019050602083039250615107565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040518091039020905060006151a882614212565b1415156151b457600080fd5b6151be8183614c19565b505050565b600081830190508281101515156151d957600080fd5b80905092915050565b60006152226040805190810160405280600b81526020017f54776f4b657941646d696e0000000000000000000000000000000000000000008152506142ef565b90508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8261525486886149b190919063ffffffff16565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156152d957600080fd5b505af11580156152ed573d6000803e3d6000fd5b505050506040513d602081101561530357600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff16636c48769261534485876149b190919063ffffffff16565b6040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561539657600080fd5b505af11580156153aa573d6000803e3d6000fd5b5050505050505050565b6153f26040805190810160405280600d81526020017f54776f4b657945636f6e6f6d7900000000000000000000000000000000000000815250614f84565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561549457600080fd5b505af11580156154a8573d6000803e3d6000fd5b505050506040513d60208110156154be57600080fd5b81019080805190602001909291905050505050505600a165627a7a72305820016a52c032a2074c06c75728621f19d5cebf1d1c041314730ac18650f20286230029

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

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