More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 7,618 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Execute | 11538329 | 1499 days ago | IN | 0 ETH | 0.01817865 | ||||
Execute | 11465810 | 1510 days ago | IN | 0 ETH | 0.01541895 | ||||
Execute | 11465806 | 1510 days ago | IN | 0 ETH | 0.0111081 | ||||
Vote | 11443406 | 1513 days ago | IN | 0 ETH | 0.00398571 | ||||
Vote | 11439792 | 1514 days ago | IN | 0 ETH | 0.00482271 | ||||
Execute | 11439761 | 1514 days ago | IN | 0 ETH | 0.02358705 | ||||
Stake | 11433224 | 1515 days ago | IN | 0 ETH | 0.00919952 | ||||
Execute | 10951674 | 1589 days ago | IN | 0 ETH | 0.0034638 | ||||
Execute | 10951674 | 1589 days ago | IN | 0 ETH | 0.02138055 | ||||
Execute | 10932541 | 1592 days ago | IN | 0 ETH | 0.02651325 | ||||
Vote | 10926084 | 1593 days ago | IN | 0 ETH | 0.04637698 | ||||
Stake | 10926084 | 1593 days ago | IN | 0 ETH | 0.03489474 | ||||
Execute | 10797041 | 1613 days ago | IN | 0 ETH | 0.0121191 | ||||
Execute | 10639812 | 1637 days ago | IN | 0 ETH | 0.0143022 | ||||
Vote | 10596387 | 1644 days ago | IN | 0 ETH | 0.01664088 | ||||
Execute | 10579105 | 1646 days ago | IN | 0 ETH | 0.0140699 | ||||
Execute | 10217165 | 1702 days ago | IN | 0 ETH | 0.0073165 | ||||
Execute | 10171382 | 1710 days ago | IN | 0 ETH | 0.00605955 | ||||
Execute | 10131598 | 1716 days ago | IN | 0 ETH | 0.0072207 | ||||
Execute | 10131597 | 1716 days ago | IN | 0 ETH | 0.0011546 | ||||
Execute | 10131597 | 1716 days ago | IN | 0 ETH | 0.00477195 | ||||
Execute | 10131597 | 1716 days ago | IN | 0 ETH | 0.0086516 | ||||
Execute | 10131595 | 1716 days ago | IN | 0 ETH | 0.00477195 | ||||
Execute | 10121908 | 1717 days ago | IN | 0 ETH | 0.0072329 | ||||
Execute | 10121907 | 1717 days ago | IN | 0 ETH | 0.0089316 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
GenesisProtocol
Compiler Version
v0.5.4+commit.9549d8ff
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-04-21 */ // File: openzeppelin-solidity/contracts/cryptography/ECDSA.sol pragma solidity ^0.5.0; /** * @title Elliptic curve signature operations * @dev Based on https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d * TODO Remove this library once solidity supports passing a signature to ecrecover. * See https://github.com/ethereum/solidity/issues/864 */ library ECDSA { /** * @dev Recover signer address from a message by using their signature * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address. * @param signature bytes signature, the signature is generated using web3.eth.sign() */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { bytes32 r; bytes32 s; uint8 v; // Check the signature length if (signature.length != 65) { return (address(0)); } // Divide the signature in r, s and v variables // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. // solhint-disable-next-line no-inline-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } // Version of signature should be 27 or 28, but 0 and 1 are also possible versions if (v < 27) { v += 27; } // If the version is correct return the signer address if (v != 27 && v != 28) { return (address(0)); } else { return ecrecover(hash, v, r, s); } } /** * toEthSignedMessageHash * @dev prefix a bytes32 value with "\x19Ethereum Signed Message:" * and hash the result */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } } // File: contracts/votingMachines/IntVoteInterface.sol pragma solidity ^0.5.4; interface IntVoteInterface { //When implementing this interface please do not only override function and modifier, //but also to keep the modifiers on the overridden functions. modifier onlyProposalOwner(bytes32 _proposalId) {revert(); _;} modifier votable(bytes32 _proposalId) {revert(); _;} event NewProposal( bytes32 indexed _proposalId, address indexed _organization, uint256 _numOfChoices, address _proposer, bytes32 _paramsHash ); event ExecuteProposal(bytes32 indexed _proposalId, address indexed _organization, uint256 _decision, uint256 _totalReputation ); event VoteProposal( bytes32 indexed _proposalId, address indexed _organization, address indexed _voter, uint256 _vote, uint256 _reputation ); event CancelProposal(bytes32 indexed _proposalId, address indexed _organization ); event CancelVoting(bytes32 indexed _proposalId, address indexed _organization, address indexed _voter); /** * @dev register a new proposal with the given parameters. Every proposal has a unique ID which is being * generated by calculating keccak256 of a incremented counter. * @param _numOfChoices number of voting choices * @param _proposalParameters defines the parameters of the voting machine used for this proposal * @param _proposer address * @param _organization address - if this address is zero the msg.sender will be used as the organization address. * @return proposal's id. */ function propose( uint256 _numOfChoices, bytes32 _proposalParameters, address _proposer, address _organization ) external returns(bytes32); function vote( bytes32 _proposalId, uint256 _vote, uint256 _rep, address _voter ) external returns(bool); function cancelVote(bytes32 _proposalId) external; function getNumberOfChoices(bytes32 _proposalId) external view returns(uint256); function isVotable(bytes32 _proposalId) external view returns(bool); /** * @dev voteStatus returns the reputation voted for a proposal for a specific voting choice. * @param _proposalId the ID of the proposal * @param _choice the index in the * @return voted reputation for the given choice */ function voteStatus(bytes32 _proposalId, uint256 _choice) external view returns(uint256); /** * @dev isAbstainAllow returns if the voting machine allow abstain (0) * @return bool true or false */ function isAbstainAllow() external pure returns(bool); /** * @dev getAllowedRangeOfChoices returns the allowed range of choices for a voting machine. * @return min - minimum number of choices max - maximum number of choices */ function getAllowedRangeOfChoices() external pure returns(uint256 min, uint256 max); } // File: contracts/libs/RealMath.sol pragma solidity ^0.5.4; /** * RealMath: fixed-point math library, based on fractional and integer parts. * Using uint256 as real216x40, which isn't in Solidity yet. * Internally uses the wider uint256 for some math. * * Note that for addition, subtraction, and mod (%), you should just use the * built-in Solidity operators. Functions for these operations are not provided. * */ library RealMath { /** * How many total bits are there? */ uint256 constant private REAL_BITS = 256; /** * How many fractional bits are there? */ uint256 constant private REAL_FBITS = 40; /** * What's the first non-fractional bit */ uint256 constant private REAL_ONE = uint256(1) << REAL_FBITS; /** * Raise a real number to any positive integer power */ function pow(uint256 realBase, uint256 exponent) internal pure returns (uint256) { uint256 tempRealBase = realBase; uint256 tempExponent = exponent; // Start with the 0th power uint256 realResult = REAL_ONE; while (tempExponent != 0) { // While there are still bits set if ((tempExponent & 0x1) == 0x1) { // If the low bit is set, multiply in the (many-times-squared) base realResult = mul(realResult, tempRealBase); } // Shift off the low bit tempExponent = tempExponent >> 1; if (tempExponent != 0) { // Do the squaring tempRealBase = mul(tempRealBase, tempRealBase); } } // Return the final result. return realResult; } /** * Create a real from a rational fraction. */ function fraction(uint216 numerator, uint216 denominator) internal pure returns (uint256) { return div(uint256(numerator) * REAL_ONE, uint256(denominator) * REAL_ONE); } /** * Multiply one real by another. Truncates overflows. */ function mul(uint256 realA, uint256 realB) private pure returns (uint256) { // When multiplying fixed point in x.y and z.w formats we get (x+z).(y+w) format. // So we just have to clip off the extra REAL_FBITS fractional bits. uint256 res = realA * realB; require(res/realA == realB, "RealMath mul overflow"); return (res >> REAL_FBITS); } /** * Divide one real by another real. Truncates overflows. */ function div(uint256 realNumerator, uint256 realDenominator) private pure returns (uint256) { // We use the reverse of the multiplication trick: convert numerator from // x.y to (x+z).(y+w) fixed point, then divide by denom in z.w fixed point. return uint256((uint256(realNumerator) * REAL_ONE) / uint256(realDenominator)); } } // File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol pragma solidity ^0.5.0; /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: contracts/votingMachines/VotingMachineCallbacksInterface.sol pragma solidity ^0.5.4; interface VotingMachineCallbacksInterface { function mintReputation(uint256 _amount, address _beneficiary, bytes32 _proposalId) external returns(bool); function burnReputation(uint256 _amount, address _owner, bytes32 _proposalId) external returns(bool); function stakingTokenTransfer(IERC20 _stakingToken, address _beneficiary, uint256 _amount, bytes32 _proposalId) external returns(bool); function getTotalReputationSupply(bytes32 _proposalId) external view returns(uint256); function reputationOf(address _owner, bytes32 _proposalId) external view returns(uint256); function balanceOfStakingToken(IERC20 _stakingToken, bytes32 _proposalId) external view returns(uint256); } // File: contracts/votingMachines/ProposalExecuteInterface.sol pragma solidity ^0.5.4; interface ProposalExecuteInterface { function executeProposal(bytes32 _proposalId, int _decision) external returns(bool); } // File: openzeppelin-solidity/contracts/math/SafeMath.sol pragma solidity ^0.5.0; /** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } // File: openzeppelin-solidity/contracts/math/Math.sol pragma solidity ^0.5.0; /** * @title Math * @dev Assorted math operations */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Calculates the average of two numbers. Since these are integers, * averages of an even and odd number cannot be represented, and will be * rounded down. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } } // File: openzeppelin-solidity/contracts/utils/Address.sol pragma solidity ^0.5.0; /** * Utility library of inline functions on addresses */ library Address { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check * @return whether the target address is a contract */ function isContract(address account) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details about how this works. // TODO Check this again before the Serenity release, because all addresses will be // contracts then. // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } // File: contracts/votingMachines/GenesisProtocolLogic.sol pragma solidity ^0.5.4; /** * @title GenesisProtocol implementation -an organization's voting machine scheme. */ contract GenesisProtocolLogic is IntVoteInterface { using SafeMath for uint256; using Math for uint256; using RealMath for uint216; using RealMath for uint256; using Address for address; enum ProposalState { None, ExpiredInQueue, Executed, Queued, PreBoosted, Boosted, QuietEndingPeriod} enum ExecutionState { None, QueueBarCrossed, QueueTimeOut, PreBoostedBarCrossed, BoostedTimeOut, BoostedBarCrossed} //Organization's parameters struct Parameters { uint256 queuedVoteRequiredPercentage; // the absolute vote percentages bar. uint256 queuedVotePeriodLimit; //the time limit for a proposal to be in an absolute voting mode. uint256 boostedVotePeriodLimit; //the time limit for a proposal to be in boost mode. uint256 preBoostedVotePeriodLimit; //the time limit for a proposal //to be in an preparation state (stable) before boosted. uint256 thresholdConst; //constant for threshold calculation . //threshold =thresholdConst ** (numberOfBoostedProposals) uint256 limitExponentValue;// an upper limit for numberOfBoostedProposals //in the threshold calculation to prevent overflow uint256 quietEndingPeriod; //quite ending period uint256 proposingRepReward;//proposer reputation reward. uint256 votersReputationLossRatio;//Unsuccessful pre booster //voters lose votersReputationLossRatio% of their reputation. uint256 minimumDaoBounty; uint256 daoBountyConst;//The DAO downstake for each proposal is calculate according to the formula //(daoBountyConst * averageBoostDownstakes)/100 . uint256 activationTime;//the point in time after which proposals can be created. //if this address is set so only this address is allowed to vote of behalf of someone else. address voteOnBehalf; } struct Voter { uint256 vote; // YES(1) ,NO(2) uint256 reputation; // amount of voter's reputation bool preBoosted; } struct Staker { uint256 vote; // YES(1) ,NO(2) uint256 amount; // amount of staker's stake uint256 amount4Bounty;// amount of staker's stake used for bounty reward calculation. } struct Proposal { bytes32 organizationId; // the organization unique identifier the proposal is target to. address callbacks; // should fulfill voting callbacks interface. ProposalState state; uint256 winningVote; //the winning vote. address proposer; //the proposal boosted period limit . it is updated for the case of quiteWindow mode. uint256 currentBoostedVotePeriodLimit; bytes32 paramsHash; uint256 daoBountyRemain; //use for checking sum zero bounty claims.it is set at the proposing time. uint256 daoBounty; uint256 totalStakes;// Total number of tokens staked which can be redeemable by stakers. uint256 confidenceThreshold; //The percentage from upper stakes which the caller for the expiration was given. uint256 expirationCallBountyPercentage; uint[3] times; //times[0] - submittedTime //times[1] - boostedPhaseTime //times[2] -preBoostedPhaseTime; bool daoRedeemItsWinnings; // vote reputation mapping(uint256 => uint256 ) votes; // vote reputation mapping(uint256 => uint256 ) preBoostedVotes; // address voter mapping(address => Voter ) voters; // vote stakes mapping(uint256 => uint256 ) stakes; // address staker mapping(address => Staker ) stakers; } event Stake(bytes32 indexed _proposalId, address indexed _organization, address indexed _staker, uint256 _vote, uint256 _amount ); event Redeem(bytes32 indexed _proposalId, address indexed _organization, address indexed _beneficiary, uint256 _amount ); event RedeemDaoBounty(bytes32 indexed _proposalId, address indexed _organization, address indexed _beneficiary, uint256 _amount ); event RedeemReputation(bytes32 indexed _proposalId, address indexed _organization, address indexed _beneficiary, uint256 _amount ); event StateChange(bytes32 indexed _proposalId, ProposalState _proposalState); event GPExecuteProposal(bytes32 indexed _proposalId, ExecutionState _executionState); event ExpirationCallBounty(bytes32 indexed _proposalId, address indexed _beneficiary, uint256 _amount); event ConfidenceLevelChange(bytes32 indexed _proposalId, uint256 _confidenceThreshold); mapping(bytes32=>Parameters) public parameters; // A mapping from hashes to parameters mapping(bytes32=>Proposal) public proposals; // Mapping from the ID of the proposal to the proposal itself. mapping(bytes32=>uint) public orgBoostedProposalsCnt; //organizationId => organization mapping(bytes32 => address ) public organizations; //organizationId => averageBoostDownstakes mapping(bytes32 => uint256 ) public averagesDownstakesOfBoosted; uint256 constant public NUM_OF_CHOICES = 2; uint256 constant public NO = 2; uint256 constant public YES = 1; uint256 public proposalsCnt; // Total number of proposals IERC20 public stakingToken; address constant private GEN_TOKEN_ADDRESS = 0x543Ff227F64Aa17eA132Bf9886cAb5DB55DCAddf; uint256 constant private MAX_BOOSTED_PROPOSALS = 4096; /** * @dev Constructor */ constructor(IERC20 _stakingToken) public { //The GEN token (staking token) address is hard coded in the contract by GEN_TOKEN_ADDRESS . //This will work for a network which already hosted the GEN token on this address (e.g mainnet). //If such contract address does not exist in the network (e.g ganache) //the contract will use the _stakingToken param as the //staking token address. if (address(GEN_TOKEN_ADDRESS).isContract()) { stakingToken = IERC20(GEN_TOKEN_ADDRESS); } else { stakingToken = _stakingToken; } } /** * @dev Check that the proposal is votable * a proposal is votable if it is in one of the following states: * PreBoosted,Boosted,QuietEndingPeriod or Queued */ modifier votable(bytes32 _proposalId) { require(_isVotable(_proposalId)); _; } /** * @dev register a new proposal with the given parameters. Every proposal has a unique ID which is being * generated by calculating keccak256 of a incremented counter. * @param _paramsHash parameters hash * @param _proposer address * @param _organization address */ function propose(uint256, bytes32 _paramsHash, address _proposer, address _organization) external returns(bytes32) { // solhint-disable-next-line not-rely-on-time require(now > parameters[_paramsHash].activationTime, "not active yet"); //Check parameters existence. require(parameters[_paramsHash].queuedVoteRequiredPercentage >= 50); // Generate a unique ID: bytes32 proposalId = keccak256(abi.encodePacked(this, proposalsCnt)); proposalsCnt = proposalsCnt.add(1); // Open proposal: Proposal memory proposal; proposal.callbacks = msg.sender; proposal.organizationId = keccak256(abi.encodePacked(msg.sender, _organization)); proposal.state = ProposalState.Queued; // solhint-disable-next-line not-rely-on-time proposal.times[0] = now;//submitted time proposal.currentBoostedVotePeriodLimit = parameters[_paramsHash].boostedVotePeriodLimit; proposal.proposer = _proposer; proposal.winningVote = NO; proposal.paramsHash = _paramsHash; if (organizations[proposal.organizationId] == address(0)) { if (_organization == address(0)) { organizations[proposal.organizationId] = msg.sender; } else { organizations[proposal.organizationId] = _organization; } } //calc dao bounty uint256 daoBounty = parameters[_paramsHash].daoBountyConst.mul(averagesDownstakesOfBoosted[proposal.organizationId]).div(100); if (daoBounty < parameters[_paramsHash].minimumDaoBounty) { proposal.daoBountyRemain = parameters[_paramsHash].minimumDaoBounty; } else { proposal.daoBountyRemain = daoBounty; } proposal.totalStakes = proposal.daoBountyRemain; proposals[proposalId] = proposal; proposals[proposalId].stakes[NO] = proposal.daoBountyRemain;//dao downstake on the proposal emit NewProposal(proposalId, organizations[proposal.organizationId], NUM_OF_CHOICES, _proposer, _paramsHash); return proposalId; } /** * @dev executeBoosted try to execute a boosted or QuietEndingPeriod proposal if it is expired * @param _proposalId the id of the proposal * @return uint256 expirationCallBounty the bounty amount for the expiration call */ function executeBoosted(bytes32 _proposalId) external returns(uint256 expirationCallBounty) { Proposal storage proposal = proposals[_proposalId]; require(proposal.state == ProposalState.Boosted || proposal.state == ProposalState.QuietEndingPeriod, "proposal state in not Boosted nor QuietEndingPeriod"); require(_execute(_proposalId), "proposal need to expire"); uint256 expirationCallBountyPercentage = // solhint-disable-next-line not-rely-on-time (uint(1).add(now.sub(proposal.currentBoostedVotePeriodLimit.add(proposal.times[1])).div(15))); if (expirationCallBountyPercentage > 100) { expirationCallBountyPercentage = 100; } proposal.expirationCallBountyPercentage = expirationCallBountyPercentage; expirationCallBounty = expirationCallBountyPercentage.mul(proposal.stakes[YES]).div(100); require(stakingToken.transfer(msg.sender, expirationCallBounty), "transfer to msg.sender failed"); emit ExpirationCallBounty(_proposalId, msg.sender, expirationCallBounty); } /** * @dev hash the parameters, save them if necessary, and return the hash value * @param _params a parameters array * _params[0] - _queuedVoteRequiredPercentage, * _params[1] - _queuedVotePeriodLimit, //the time limit for a proposal to be in an absolute voting mode. * _params[2] - _boostedVotePeriodLimit, //the time limit for a proposal to be in an relative voting mode. * _params[3] - _preBoostedVotePeriodLimit, //the time limit for a proposal to be in an preparation * state (stable) before boosted. * _params[4] -_thresholdConst * _params[5] -_quietEndingPeriod * _params[6] -_proposingRepReward * _params[7] -_votersReputationLossRatio * _params[8] -_minimumDaoBounty * _params[9] -_daoBountyConst * _params[10] -_activationTime * @param _voteOnBehalf - authorized to vote on behalf of others. */ function setParameters( uint[11] calldata _params, //use array here due to stack too deep issue. address _voteOnBehalf ) external returns(bytes32) { require(_params[0] <= 100 && _params[0] >= 50, "50 <= queuedVoteRequiredPercentage <= 100"); require(_params[4] <= 16000 && _params[4] > 1000, "1000 < thresholdConst <= 16000"); require(_params[7] <= 100, "votersReputationLossRatio <= 100"); require(_params[2] >= _params[5], "boostedVotePeriodLimit >= quietEndingPeriod"); require(_params[8] > 0, "minimumDaoBounty should be > 0"); require(_params[9] > 0, "daoBountyConst should be > 0"); bytes32 paramsHash = getParametersHash(_params, _voteOnBehalf); //set a limit for power for a given alpha to prevent overflow uint256 limitExponent = 172;//for alpha less or equal 2 uint256 j = 2; for (uint256 i = 2000; i < 16000; i = i*2) { if ((_params[4] > i) && (_params[4] <= i*2)) { limitExponent = limitExponent/j; break; } j++; } parameters[paramsHash] = Parameters({ queuedVoteRequiredPercentage: _params[0], queuedVotePeriodLimit: _params[1], boostedVotePeriodLimit: _params[2], preBoostedVotePeriodLimit: _params[3], thresholdConst:uint216(_params[4]).fraction(uint216(1000)), limitExponentValue:limitExponent, quietEndingPeriod: _params[5], proposingRepReward: _params[6], votersReputationLossRatio:_params[7], minimumDaoBounty:_params[8], daoBountyConst:_params[9], activationTime:_params[10], voteOnBehalf:_voteOnBehalf }); return paramsHash; } /** * @dev redeem a reward for a successful stake, vote or proposing. * The function use a beneficiary address as a parameter (and not msg.sender) to enable * users to redeem on behalf of someone else. * @param _proposalId the ID of the proposal * @param _beneficiary - the beneficiary address * @return rewards - * [0] stakerTokenReward * [1] voterReputationReward * [2] proposerReputationReward */ // solhint-disable-next-line function-max-lines,code-complexity function redeem(bytes32 _proposalId, address _beneficiary) public returns (uint[3] memory rewards) { Proposal storage proposal = proposals[_proposalId]; require((proposal.state == ProposalState.Executed)||(proposal.state == ProposalState.ExpiredInQueue), "Proposal should be Executed or ExpiredInQueue"); Parameters memory params = parameters[proposal.paramsHash]; uint256 lostReputation; if (proposal.winningVote == YES) { lostReputation = proposal.preBoostedVotes[NO]; } else { lostReputation = proposal.preBoostedVotes[YES]; } lostReputation = (lostReputation.mul(params.votersReputationLossRatio))/100; //as staker Staker storage staker = proposal.stakers[_beneficiary]; uint256 totalStakes = proposal.stakes[NO].add(proposal.stakes[YES]); uint256 totalWinningStakes = proposal.stakes[proposal.winningVote]; if (staker.amount > 0) { uint256 totalStakesLeftAfterCallBounty = totalStakes.sub(proposal.expirationCallBountyPercentage.mul(proposal.stakes[YES]).div(100)); if (proposal.state == ProposalState.ExpiredInQueue) { //Stakes of a proposal that expires in Queue are sent back to stakers rewards[0] = staker.amount; } else if (staker.vote == proposal.winningVote) { if (staker.vote == YES) { if (proposal.daoBounty < totalStakesLeftAfterCallBounty) { uint256 _totalStakes = totalStakesLeftAfterCallBounty.sub(proposal.daoBounty); rewards[0] = (staker.amount.mul(_totalStakes))/totalWinningStakes; } } else { rewards[0] = (staker.amount.mul(totalStakesLeftAfterCallBounty))/totalWinningStakes; } } staker.amount = 0; } //dao redeem its winnings if (proposal.daoRedeemItsWinnings == false && _beneficiary == organizations[proposal.organizationId] && proposal.state != ProposalState.ExpiredInQueue && proposal.winningVote == NO) { rewards[0] = rewards[0].add((proposal.daoBounty.mul(totalStakes))/totalWinningStakes).sub(proposal.daoBounty); proposal.daoRedeemItsWinnings = true; } //as voter Voter storage voter = proposal.voters[_beneficiary]; if ((voter.reputation != 0) && (voter.preBoosted)) { if (proposal.state == ProposalState.ExpiredInQueue) { //give back reputation for the voter rewards[1] = ((voter.reputation.mul(params.votersReputationLossRatio))/100); } else if (proposal.winningVote == voter.vote) { rewards[1] = ((voter.reputation.mul(params.votersReputationLossRatio))/100) .add((voter.reputation.mul(lostReputation))/proposal.preBoostedVotes[proposal.winningVote]); } voter.reputation = 0; } //as proposer if ((proposal.proposer == _beneficiary)&&(proposal.winningVote == YES)&&(proposal.proposer != address(0))) { rewards[2] = params.proposingRepReward; proposal.proposer = address(0); } if (rewards[0] != 0) { proposal.totalStakes = proposal.totalStakes.sub(rewards[0]); require(stakingToken.transfer(_beneficiary, rewards[0]), "transfer to beneficiary failed"); emit Redeem(_proposalId, organizations[proposal.organizationId], _beneficiary, rewards[0]); } if (rewards[1].add(rewards[2]) != 0) { VotingMachineCallbacksInterface(proposal.callbacks) .mintReputation(rewards[1].add(rewards[2]), _beneficiary, _proposalId); emit RedeemReputation( _proposalId, organizations[proposal.organizationId], _beneficiary, rewards[1].add(rewards[2]) ); } } /** * @dev redeemDaoBounty a reward for a successful stake. * The function use a beneficiary address as a parameter (and not msg.sender) to enable * users to redeem on behalf of someone else. * @param _proposalId the ID of the proposal * @param _beneficiary - the beneficiary address * @return redeemedAmount - redeem token amount * @return potentialAmount - potential redeem token amount(if there is enough tokens bounty at the organization ) */ function redeemDaoBounty(bytes32 _proposalId, address _beneficiary) public returns(uint256 redeemedAmount, uint256 potentialAmount) { Proposal storage proposal = proposals[_proposalId]; require(proposal.state == ProposalState.Executed); uint256 totalWinningStakes = proposal.stakes[proposal.winningVote]; Staker storage staker = proposal.stakers[_beneficiary]; if ( (staker.amount4Bounty > 0)&& (staker.vote == proposal.winningVote)&& (proposal.winningVote == YES)&& (totalWinningStakes != 0)) { //as staker potentialAmount = (staker.amount4Bounty * proposal.daoBounty)/totalWinningStakes; } if ((potentialAmount != 0)&& (VotingMachineCallbacksInterface(proposal.callbacks) .balanceOfStakingToken(stakingToken, _proposalId) >= potentialAmount)) { staker.amount4Bounty = 0; proposal.daoBountyRemain = proposal.daoBountyRemain.sub(potentialAmount); require( VotingMachineCallbacksInterface(proposal.callbacks) .stakingTokenTransfer(stakingToken, _beneficiary, potentialAmount, _proposalId)); redeemedAmount = potentialAmount; emit RedeemDaoBounty(_proposalId, organizations[proposal.organizationId], _beneficiary, redeemedAmount); } } /** * @dev shouldBoost check if a proposal should be shifted to boosted phase. * @param _proposalId the ID of the proposal * @return bool true or false. */ function shouldBoost(bytes32 _proposalId) public view returns(bool) { Proposal memory proposal = proposals[_proposalId]; return (_score(_proposalId) > threshold(proposal.paramsHash, proposal.organizationId)); } /** * @dev threshold return the organization's score threshold which required by * a proposal to shift to boosted state. * This threshold is dynamically set and it depend on the number of boosted proposal. * @param _organizationId the organization identifier * @param _paramsHash the organization parameters hash * @return uint256 organization's score threshold as real number. */ function threshold(bytes32 _paramsHash, bytes32 _organizationId) public view returns(uint256) { uint256 power = orgBoostedProposalsCnt[_organizationId]; Parameters storage params = parameters[_paramsHash]; if (power > params.limitExponentValue) { power = params.limitExponentValue; } return params.thresholdConst.pow(power); } /** * @dev hashParameters returns a hash of the given parameters */ function getParametersHash( uint[11] memory _params,//use array here due to stack too deep issue. address _voteOnBehalf ) public pure returns(bytes32) { //double call to keccak256 to avoid deep stack issue when call with too many params. return keccak256( abi.encodePacked( keccak256( abi.encodePacked( _params[0], _params[1], _params[2], _params[3], _params[4], _params[5], _params[6], _params[7], _params[8], _params[9], _params[10]) ), _voteOnBehalf )); } /** * @dev execute check if the proposal has been decided, and if so, execute the proposal * @param _proposalId the id of the proposal * @return bool true - the proposal has been executed * false - otherwise. */ // solhint-disable-next-line function-max-lines,code-complexity function _execute(bytes32 _proposalId) internal votable(_proposalId) returns(bool) { Proposal storage proposal = proposals[_proposalId]; Parameters memory params = parameters[proposal.paramsHash]; Proposal memory tmpProposal = proposal; uint256 totalReputation = VotingMachineCallbacksInterface(proposal.callbacks).getTotalReputationSupply(_proposalId); //first divide by 100 to prevent overflow uint256 executionBar = (totalReputation/100) * params.queuedVoteRequiredPercentage; ExecutionState executionState = ExecutionState.None; uint256 averageDownstakesOfBoosted; uint256 confidenceThreshold; if (proposal.votes[proposal.winningVote] > executionBar) { // someone crossed the absolute vote execution bar. if (proposal.state == ProposalState.Queued) { executionState = ExecutionState.QueueBarCrossed; } else if (proposal.state == ProposalState.PreBoosted) { executionState = ExecutionState.PreBoostedBarCrossed; } else { executionState = ExecutionState.BoostedBarCrossed; } proposal.state = ProposalState.Executed; } else { if (proposal.state == ProposalState.Queued) { // solhint-disable-next-line not-rely-on-time if ((now - proposal.times[0]) >= params.queuedVotePeriodLimit) { proposal.state = ProposalState.ExpiredInQueue; proposal.winningVote = NO; executionState = ExecutionState.QueueTimeOut; } else { confidenceThreshold = threshold(proposal.paramsHash, proposal.organizationId); if (_score(_proposalId) > confidenceThreshold) { //change proposal mode to PreBoosted mode. proposal.state = ProposalState.PreBoosted; // solhint-disable-next-line not-rely-on-time proposal.times[2] = now; proposal.confidenceThreshold = confidenceThreshold; } } } if (proposal.state == ProposalState.PreBoosted) { confidenceThreshold = threshold(proposal.paramsHash, proposal.organizationId); // solhint-disable-next-line not-rely-on-time if ((now - proposal.times[2]) >= params.preBoostedVotePeriodLimit) { if (_score(_proposalId) > confidenceThreshold) { if (orgBoostedProposalsCnt[proposal.organizationId] < MAX_BOOSTED_PROPOSALS) { //change proposal mode to Boosted mode. proposal.state = ProposalState.Boosted; // solhint-disable-next-line not-rely-on-time proposal.times[1] = now; orgBoostedProposalsCnt[proposal.organizationId]++; //add a value to average -> average = average + ((value - average) / nbValues) averageDownstakesOfBoosted = averagesDownstakesOfBoosted[proposal.organizationId]; // solium-disable-next-line indentation averagesDownstakesOfBoosted[proposal.organizationId] = uint256(int256(averageDownstakesOfBoosted) + ((int256(proposal.stakes[NO])-int256(averageDownstakesOfBoosted))/ int256(orgBoostedProposalsCnt[proposal.organizationId]))); } } else { proposal.state = ProposalState.Queued; } } else { //check the Confidence level is stable uint256 proposalScore = _score(_proposalId); if (proposalScore <= proposal.confidenceThreshold.min(confidenceThreshold)) { proposal.state = ProposalState.Queued; } else if (proposal.confidenceThreshold > proposalScore) { proposal.confidenceThreshold = confidenceThreshold; emit ConfidenceLevelChange(_proposalId, confidenceThreshold); } } } } if ((proposal.state == ProposalState.Boosted) || (proposal.state == ProposalState.QuietEndingPeriod)) { // solhint-disable-next-line not-rely-on-time if ((now - proposal.times[1]) >= proposal.currentBoostedVotePeriodLimit) { proposal.state = ProposalState.Executed; executionState = ExecutionState.BoostedTimeOut; } } if (executionState != ExecutionState.None) { if ((executionState == ExecutionState.BoostedTimeOut) || (executionState == ExecutionState.BoostedBarCrossed)) { orgBoostedProposalsCnt[tmpProposal.organizationId] = orgBoostedProposalsCnt[tmpProposal.organizationId].sub(1); //remove a value from average = ((average * nbValues) - value) / (nbValues - 1); uint256 boostedProposals = orgBoostedProposalsCnt[tmpProposal.organizationId]; if (boostedProposals == 0) { averagesDownstakesOfBoosted[proposal.organizationId] = 0; } else { averageDownstakesOfBoosted = averagesDownstakesOfBoosted[proposal.organizationId]; averagesDownstakesOfBoosted[proposal.organizationId] = (averageDownstakesOfBoosted.mul(boostedProposals+1).sub(proposal.stakes[NO]))/boostedProposals; } } emit ExecuteProposal( _proposalId, organizations[proposal.organizationId], proposal.winningVote, totalReputation ); emit GPExecuteProposal(_proposalId, executionState); ProposalExecuteInterface(proposal.callbacks).executeProposal(_proposalId, int(proposal.winningVote)); proposal.daoBounty = proposal.daoBountyRemain; } if (tmpProposal.state != proposal.state) { emit StateChange(_proposalId, proposal.state); } return (executionState != ExecutionState.None); } /** * @dev staking function * @param _proposalId id of the proposal * @param _vote NO(2) or YES(1). * @param _amount the betting amount * @return bool true - the proposal has been executed * false - otherwise. */ function _stake(bytes32 _proposalId, uint256 _vote, uint256 _amount, address _staker) internal returns(bool) { // 0 is not a valid vote. require(_vote <= NUM_OF_CHOICES && _vote > 0, "wrong vote value"); require(_amount > 0, "staking amount should be >0"); if (_execute(_proposalId)) { return true; } Proposal storage proposal = proposals[_proposalId]; if ((proposal.state != ProposalState.PreBoosted) && (proposal.state != ProposalState.Queued)) { return false; } // enable to increase stake only on the previous stake vote Staker storage staker = proposal.stakers[_staker]; if ((staker.amount > 0) && (staker.vote != _vote)) { return false; } uint256 amount = _amount; require(stakingToken.transferFrom(_staker, address(this), amount), "fail transfer from staker"); proposal.totalStakes = proposal.totalStakes.add(amount); //update totalRedeemableStakes staker.amount = staker.amount.add(amount); //This is to prevent average downstakes calculation overflow //Note that any how GEN cap is 100000000 ether. require(staker.amount <= 0x100000000000000000000000000000000, "staking amount is too high"); require(proposal.totalStakes <= 0x100000000000000000000000000000000, "total stakes is too high"); if (_vote == YES) { staker.amount4Bounty = staker.amount4Bounty.add(amount); } staker.vote = _vote; proposal.stakes[_vote] = amount.add(proposal.stakes[_vote]); emit Stake(_proposalId, organizations[proposal.organizationId], _staker, _vote, _amount); return _execute(_proposalId); } /** * @dev Vote for a proposal, if the voter already voted, cancel the last vote and set a new one instead * @param _proposalId id of the proposal * @param _voter used in case the vote is cast for someone else * @param _vote a value between 0 to and the proposal's number of choices. * @param _rep how many reputation the voter would like to stake for this vote. * if _rep==0 so the voter full reputation will be use. * @return true in case of proposal execution otherwise false * throws if proposal is not open or if it has been executed * NB: executes the proposal if a decision has been reached */ // solhint-disable-next-line function-max-lines,code-complexity function internalVote(bytes32 _proposalId, address _voter, uint256 _vote, uint256 _rep) internal returns(bool) { require(_vote <= NUM_OF_CHOICES && _vote > 0, "0 < _vote <= 2"); if (_execute(_proposalId)) { return true; } Parameters memory params = parameters[proposals[_proposalId].paramsHash]; Proposal storage proposal = proposals[_proposalId]; // Check voter has enough reputation: uint256 reputation = VotingMachineCallbacksInterface(proposal.callbacks).reputationOf(_voter, _proposalId); require(reputation > 0, "_voter must have reputation"); require(reputation >= _rep, "reputation >= _rep"); uint256 rep = _rep; if (rep == 0) { rep = reputation; } // If this voter has already voted, return false. if (proposal.voters[_voter].reputation != 0) { return false; } // The voting itself: proposal.votes[_vote] = rep.add(proposal.votes[_vote]); //check if the current winningVote changed or there is a tie. //for the case there is a tie the current winningVote set to NO. if ((proposal.votes[_vote] > proposal.votes[proposal.winningVote]) || ((proposal.votes[NO] == proposal.votes[proposal.winningVote]) && proposal.winningVote == YES)) { if (proposal.state == ProposalState.Boosted && // solhint-disable-next-line not-rely-on-time ((now - proposal.times[1]) >= (params.boostedVotePeriodLimit - params.quietEndingPeriod))|| proposal.state == ProposalState.QuietEndingPeriod) { //quietEndingPeriod if (proposal.state != ProposalState.QuietEndingPeriod) { proposal.currentBoostedVotePeriodLimit = params.quietEndingPeriod; proposal.state = ProposalState.QuietEndingPeriod; } // solhint-disable-next-line not-rely-on-time proposal.times[1] = now; } proposal.winningVote = _vote; } proposal.voters[_voter] = Voter({ reputation: rep, vote: _vote, preBoosted:((proposal.state == ProposalState.PreBoosted) || (proposal.state == ProposalState.Queued)) }); if ((proposal.state == ProposalState.PreBoosted) || (proposal.state == ProposalState.Queued)) { proposal.preBoostedVotes[_vote] = rep.add(proposal.preBoostedVotes[_vote]); uint256 reputationDeposit = (params.votersReputationLossRatio.mul(rep))/100; VotingMachineCallbacksInterface(proposal.callbacks).burnReputation(reputationDeposit, _voter, _proposalId); } emit VoteProposal(_proposalId, organizations[proposal.organizationId], _voter, _vote, rep); return _execute(_proposalId); } /** * @dev _score return the proposal score (Confidence level) * For dual choice proposal S = (S+)/(S-) * @param _proposalId the ID of the proposal * @return uint256 proposal score as real number. */ function _score(bytes32 _proposalId) internal view returns(uint256) { Proposal storage proposal = proposals[_proposalId]; //proposal.stakes[NO] cannot be zero as the dao downstake > 0 for each proposal. return uint216(proposal.stakes[YES]).fraction(uint216(proposal.stakes[NO])); } /** * @dev _isVotable check if the proposal is votable * @param _proposalId the ID of the proposal * @return bool true or false */ function _isVotable(bytes32 _proposalId) internal view returns(bool) { ProposalState pState = proposals[_proposalId].state; return ((pState == ProposalState.PreBoosted)|| (pState == ProposalState.Boosted)|| (pState == ProposalState.QuietEndingPeriod)|| (pState == ProposalState.Queued) ); } } // File: contracts/votingMachines/GenesisProtocol.sol pragma solidity ^0.5.4; /** * @title GenesisProtocol implementation -an organization's voting machine scheme. */ contract GenesisProtocol is IntVoteInterface, GenesisProtocolLogic { using ECDSA for bytes32; // Digest describing the data the user signs according EIP 712. // Needs to match what is passed to Metamask. bytes32 public constant DELEGATION_HASH_EIP712 = keccak256(abi.encodePacked( "address GenesisProtocolAddress", "bytes32 ProposalId", "uint256 Vote", "uint256 AmountToStake", "uint256 Nonce" )); mapping(address=>uint256) public stakesNonce; //stakes Nonce /** * @dev Constructor */ constructor(IERC20 _stakingToken) public // solhint-disable-next-line no-empty-blocks GenesisProtocolLogic(_stakingToken) { } /** * @dev staking function * @param _proposalId id of the proposal * @param _vote NO(2) or YES(1). * @param _amount the betting amount * @return bool true - the proposal has been executed * false - otherwise. */ function stake(bytes32 _proposalId, uint256 _vote, uint256 _amount) external returns(bool) { return _stake(_proposalId, _vote, _amount, msg.sender); } /** * @dev stakeWithSignature function * @param _proposalId id of the proposal * @param _vote NO(2) or YES(1). * @param _amount the betting amount * @param _nonce nonce value ,it is part of the signature to ensure that a signature can be received only once. * @param _signatureType signature type 1 - for web3.eth.sign 2 - for eth_signTypedData according to EIP #712. * @param _signature - signed data by the staker * @return bool true - the proposal has been executed * false - otherwise. */ function stakeWithSignature( bytes32 _proposalId, uint256 _vote, uint256 _amount, uint256 _nonce, uint256 _signatureType, bytes calldata _signature ) external returns(bool) { // Recreate the digest the user signed bytes32 delegationDigest; if (_signatureType == 2) { delegationDigest = keccak256( abi.encodePacked( DELEGATION_HASH_EIP712, keccak256( abi.encodePacked( address(this), _proposalId, _vote, _amount, _nonce) ) ) ); } else { delegationDigest = keccak256( abi.encodePacked( address(this), _proposalId, _vote, _amount, _nonce) ).toEthSignedMessageHash(); } address staker = delegationDigest.recover(_signature); //a garbage staker address due to wrong signature will revert due to lack of approval and funds. require(staker != address(0), "staker address cannot be 0"); require(stakesNonce[staker] == _nonce); stakesNonce[staker] = stakesNonce[staker].add(1); return _stake(_proposalId, _vote, _amount, staker); } /** * @dev voting function * @param _proposalId id of the proposal * @param _vote NO(2) or YES(1). * @param _amount the reputation amount to vote with . if _amount == 0 it will use all voter reputation. * @param _voter voter address * @return bool true - the proposal has been executed * false - otherwise. */ function vote(bytes32 _proposalId, uint256 _vote, uint256 _amount, address _voter) external votable(_proposalId) returns(bool) { Proposal storage proposal = proposals[_proposalId]; Parameters memory params = parameters[proposal.paramsHash]; address voter; if (params.voteOnBehalf != address(0)) { require(msg.sender == params.voteOnBehalf); voter = _voter; } else { voter = msg.sender; } return internalVote(_proposalId, voter, _vote, _amount); } /** * @dev Cancel the vote of the msg.sender. * cancel vote is not allow in genesisProtocol so this function doing nothing. * This function is here in order to comply to the IntVoteInterface . */ function cancelVote(bytes32 _proposalId) external votable(_proposalId) { //this is not allowed return; } /** * @dev execute check if the proposal has been decided, and if so, execute the proposal * @param _proposalId the id of the proposal * @return bool true - the proposal has been executed * false - otherwise. */ function execute(bytes32 _proposalId) external votable(_proposalId) returns(bool) { return _execute(_proposalId); } /** * @dev getNumberOfChoices returns the number of choices possible in this proposal * @return uint256 that contains number of choices */ function getNumberOfChoices(bytes32) external view returns(uint256) { return NUM_OF_CHOICES; } /** * @dev getProposalTimes returns proposals times variables. * @param _proposalId id of the proposal * @return proposals times array */ function getProposalTimes(bytes32 _proposalId) external view returns(uint[3] memory times) { return proposals[_proposalId].times; } /** * @dev voteInfo returns the vote and the amount of reputation of the user committed to this proposal * @param _proposalId the ID of the proposal * @param _voter the address of the voter * @return uint256 vote - the voters vote * uint256 reputation - amount of reputation committed by _voter to _proposalId */ function voteInfo(bytes32 _proposalId, address _voter) external view returns(uint, uint) { Voter memory voter = proposals[_proposalId].voters[_voter]; return (voter.vote, voter.reputation); } /** * @dev voteStatus returns the reputation voted for a proposal for a specific voting choice. * @param _proposalId the ID of the proposal * @param _choice the index in the * @return voted reputation for the given choice */ function voteStatus(bytes32 _proposalId, uint256 _choice) external view returns(uint256) { return proposals[_proposalId].votes[_choice]; } /** * @dev isVotable check if the proposal is votable * @param _proposalId the ID of the proposal * @return bool true or false */ function isVotable(bytes32 _proposalId) external view returns(bool) { return _isVotable(_proposalId); } /** * @dev proposalStatus return the total votes and stakes for a given proposal * @param _proposalId the ID of the proposal * @return uint256 preBoostedVotes YES * @return uint256 preBoostedVotes NO * @return uint256 total stakes YES * @return uint256 total stakes NO */ function proposalStatus(bytes32 _proposalId) external view returns(uint256, uint256, uint256, uint256) { return ( proposals[_proposalId].preBoostedVotes[YES], proposals[_proposalId].preBoostedVotes[NO], proposals[_proposalId].stakes[YES], proposals[_proposalId].stakes[NO] ); } /** * @dev getProposalOrganization return the organizationId for a given proposal * @param _proposalId the ID of the proposal * @return bytes32 organization identifier */ function getProposalOrganization(bytes32 _proposalId) external view returns(bytes32) { return (proposals[_proposalId].organizationId); } /** * @dev getStaker return the vote and stake amount for a given proposal and staker * @param _proposalId the ID of the proposal * @param _staker staker address * @return uint256 vote * @return uint256 amount */ function getStaker(bytes32 _proposalId, address _staker) external view returns(uint256, uint256) { return (proposals[_proposalId].stakers[_staker].vote, proposals[_proposalId].stakers[_staker].amount); } /** * @dev voteStake return the amount stakes for a given proposal and vote * @param _proposalId the ID of the proposal * @param _vote vote number * @return uint256 stake amount */ function voteStake(bytes32 _proposalId, uint256 _vote) external view returns(uint256) { return proposals[_proposalId].stakes[_vote]; } /** * @dev voteStake return the winningVote for a given proposal * @param _proposalId the ID of the proposal * @return uint256 winningVote */ function winningVote(bytes32 _proposalId) external view returns(uint256) { return proposals[_proposalId].winningVote; } /** * @dev voteStake return the state for a given proposal * @param _proposalId the ID of the proposal * @return ProposalState proposal state */ function state(bytes32 _proposalId) external view returns(ProposalState) { return proposals[_proposalId].state; } /** * @dev isAbstainAllow returns if the voting machine allow abstain (0) * @return bool true or false */ function isAbstainAllow() external pure returns(bool) { return false; } /** * @dev getAllowedRangeOfChoices returns the allowed range of choices for a voting machine. * @return min - minimum number of choices max - maximum number of choices */ function getAllowedRangeOfChoices() external pure returns(uint256 min, uint256 max) { return (YES, NO); } /** * @dev score return the proposal score * @param _proposalId the ID of the proposal * @return uint256 proposal score. */ function score(bytes32 _proposalId) public view returns(uint256) { return _score(_proposalId); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"parameters","outputs":[{"name":"queuedVoteRequiredPercentage","type":"uint256"},{"name":"queuedVotePeriodLimit","type":"uint256"},{"name":"boostedVotePeriodLimit","type":"uint256"},{"name":"preBoostedVotePeriodLimit","type":"uint256"},{"name":"thresholdConst","type":"uint256"},{"name":"limitExponentValue","type":"uint256"},{"name":"quietEndingPeriod","type":"uint256"},{"name":"proposingRepReward","type":"uint256"},{"name":"votersReputationLossRatio","type":"uint256"},{"name":"minimumDaoBounty","type":"uint256"},{"name":"daoBountyConst","type":"uint256"},{"name":"activationTime","type":"uint256"},{"name":"voteOnBehalf","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_params","type":"uint256[11]"},{"name":"_voteOnBehalf","type":"address"}],"name":"getParametersHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"NO","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_proposalId","type":"bytes32"},{"name":"_voter","type":"address"}],"name":"voteInfo","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_proposalId","type":"bytes32"},{"name":"_staker","type":"address"}],"name":"getStaker","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"getProposalOrganization","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"proposalsCnt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_paramsHash","type":"bytes32"},{"name":"_organizationId","type":"bytes32"}],"name":"threshold","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_proposalId","type":"bytes32"},{"name":"_vote","type":"uint256"},{"name":"_amount","type":"uint256"}],"name":"stake","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"DELEGATION_HASH_EIP712","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"proposals","outputs":[{"name":"organizationId","type":"bytes32"},{"name":"callbacks","type":"address"},{"name":"state","type":"uint8"},{"name":"winningVote","type":"uint256"},{"name":"proposer","type":"address"},{"name":"currentBoostedVotePeriodLimit","type":"uint256"},{"name":"paramsHash","type":"bytes32"},{"name":"daoBountyRemain","type":"uint256"},{"name":"daoBounty","type":"uint256"},{"name":"totalStakes","type":"uint256"},{"name":"confidenceThreshold","type":"uint256"},{"name":"expirationCallBountyPercentage","type":"uint256"},{"name":"daoRedeemItsWinnings","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_proposalId","type":"bytes32"},{"name":"_vote","type":"uint256"},{"name":"_amount","type":"uint256"},{"name":"_voter","type":"address"}],"name":"vote","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"winningVote","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_proposalId","type":"bytes32"},{"name":"_vote","type":"uint256"},{"name":"_amount","type":"uint256"},{"name":"_nonce","type":"uint256"},{"name":"_signatureType","type":"uint256"},{"name":"_signature","type":"bytes"}],"name":"stakeWithSignature","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getAllowedRangeOfChoices","outputs":[{"name":"min","type":"uint256"},{"name":"max","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"isAbstainAllow","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"state","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_proposalId","type":"bytes32"},{"name":"_beneficiary","type":"address"}],"name":"redeemDaoBounty","outputs":[{"name":"redeemedAmount","type":"uint256"},{"name":"potentialAmount","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_proposalId","type":"bytes32"},{"name":"_vote","type":"uint256"}],"name":"voteStake","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stakingToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"proposalStatus","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"shouldBoost","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"","type":"uint256"},{"name":"_paramsHash","type":"bytes32"},{"name":"_proposer","type":"address"},{"name":"_organization","type":"address"}],"name":"propose","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_params","type":"uint256[11]"},{"name":"_voteOnBehalf","type":"address"}],"name":"setParameters","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"cancelVote","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"NUM_OF_CHOICES","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"getNumberOfChoices","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"stakesNonce","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"YES","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_proposalId","type":"bytes32"},{"name":"_choice","type":"uint256"}],"name":"voteStatus","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"organizations","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"averagesDownstakesOfBoosted","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"executeBoosted","outputs":[{"name":"expirationCallBounty","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"isVotable","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"getProposalTimes","outputs":[{"name":"times","type":"uint256[3]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_proposalId","type":"bytes32"},{"name":"_beneficiary","type":"address"}],"name":"redeem","outputs":[{"name":"rewards","type":"uint256[3]"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"score","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"execute","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"orgBoostedProposalsCnt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_stakingToken","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalId","type":"bytes32"},{"indexed":true,"name":"_organization","type":"address"},{"indexed":true,"name":"_staker","type":"address"},{"indexed":false,"name":"_vote","type":"uint256"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalId","type":"bytes32"},{"indexed":true,"name":"_organization","type":"address"},{"indexed":true,"name":"_beneficiary","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalId","type":"bytes32"},{"indexed":true,"name":"_organization","type":"address"},{"indexed":true,"name":"_beneficiary","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"RedeemDaoBounty","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalId","type":"bytes32"},{"indexed":true,"name":"_organization","type":"address"},{"indexed":true,"name":"_beneficiary","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"RedeemReputation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalId","type":"bytes32"},{"indexed":false,"name":"_proposalState","type":"uint8"}],"name":"StateChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalId","type":"bytes32"},{"indexed":false,"name":"_executionState","type":"uint8"}],"name":"GPExecuteProposal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalId","type":"bytes32"},{"indexed":true,"name":"_beneficiary","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"ExpirationCallBounty","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalId","type":"bytes32"},{"indexed":false,"name":"_confidenceThreshold","type":"uint256"}],"name":"ConfidenceLevelChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalId","type":"bytes32"},{"indexed":true,"name":"_organization","type":"address"},{"indexed":false,"name":"_numOfChoices","type":"uint256"},{"indexed":false,"name":"_proposer","type":"address"},{"indexed":false,"name":"_paramsHash","type":"bytes32"}],"name":"NewProposal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalId","type":"bytes32"},{"indexed":true,"name":"_organization","type":"address"},{"indexed":false,"name":"_decision","type":"uint256"},{"indexed":false,"name":"_totalReputation","type":"uint256"}],"name":"ExecuteProposal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalId","type":"bytes32"},{"indexed":true,"name":"_organization","type":"address"},{"indexed":true,"name":"_voter","type":"address"},{"indexed":false,"name":"_vote","type":"uint256"},{"indexed":false,"name":"_reputation","type":"uint256"}],"name":"VoteProposal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalId","type":"bytes32"},{"indexed":true,"name":"_organization","type":"address"}],"name":"CancelProposal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalId","type":"bytes32"},{"indexed":true,"name":"_organization","type":"address"},{"indexed":true,"name":"_voter","type":"address"}],"name":"CancelVoting","type":"event"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051602080620044df833981018060405260208110156200003357600080fd5b5051806200006373543ff227f64aa17ea132bf9886cab5db55dcaddf64010000000062004326620000b982021704565b15620000955760068054600160a060020a03191673543ff227f64aa17ea132bf9886cab5db55dcaddf179055620000b1565b60068054600160a060020a031916600160a060020a0383161790555b5050620000c1565b6000903b1190565b61440e80620000d16000396000f3fe608060405234801561001057600080fd5b506004361061025a576000357c01000000000000000000000000000000000000000000000000000000009004806372f702f311610158578063b4512913116100d5578063c8f526e811610099578063c8f526e81461087c578063cc3bf9e9146108d1578063e5af18c5146108fd578063e751f2711461091a578063fb6c0cbb146109375761025a565b8063b4512913146107e5578063ba51b14e14610808578063bb5a05ed14610825578063beda801514610842578063c08351061461085f5761025a565b80639525c0cc1161011c5780639525c0cc1461077b5780639bc5689d14610359578063a003651d1461079a578063a05ea6e4146107b7578063b2449d65146107dd5761025a565b806372f702f31461069157806379a1c1f6146106b557806380f5e0a1146106f857806388737b5e146107155780638894c41b1461074f5761025a565b806330ca0a53116101e65780635142bc1e116101aa5780635142bc1e146105f157806351d997b2146105f957806361d585da146106015780636359036b14610642578063707437681461066e5761025a565b806330ca0a531461045757806332ed5b121461045f578063359afa491461050d5780633c13381814610545578063488c65fc146105625761025a565b806316db51721161022d57806316db5172146103a65780631702ef0c146103d257806321b4b3dc146103ef5780632d598e58146103f75780632daedd521461041a5761025a565b8063025068041461025f57806307b4e1e3146102ea5780630d48344214610359578063119ce91b14610361575b600080fd5b61027c6004803603602081101561027557600080fd5b5035610954565b604080519d8e5260208e019c909c528c8c019a909a5260608c019890985260808b019690965260a08a019490945260c089019290925260e0880152610100870152610120860152610140850152610160840152600160a060020a031661018083015251908190036101a00190f35b610347600480360361018081101561030157600080fd5b81019080806101600190600b806020026040519081016040528092919082600b60200280828437600092019190915250919450505035600160a060020a031690506109c4565b60408051918252519081900360200190f35b610347610ae1565b61038d6004803603604081101561037757600080fd5b5080359060200135600160a060020a0316610ae6565b6040805192835260208301919091528051918290030190f35b61038d600480360360408110156103bc57600080fd5b5080359060200135600160a060020a0316610b49565b610347600480360360208110156103e857600080fd5b5035610b7a565b610347610b8c565b6103476004803603604081101561040d57600080fd5b5080359060200135610b92565b6104436004803603606081101561043057600080fd5b5080359060208101359060400135610bdf565b604080519115158252519081900360200190f35b610347610bf5565b61047c6004803603602081101561047557600080fd5b5035610cd5565b604080518e8152600160a060020a038e1660208201529081018c60068111156104a157fe5b60ff168152602081019b909b5250600160a060020a039098166040808b019190915260608a0197909752608089019590955260a088019390935260c087019190915260e08601526101008501526101208401529015156101408301525190819003610160019350915050f35b6104436004803603608081101561052357600080fd5b5080359060208101359060408101359060600135600160a060020a0316610d43565b6103476004803603602081101561055b57600080fd5b5035610e61565b610443600480360360c081101561057857600080fd5b8135916020810135916040820135916060810135916080820135919081019060c0810160a08201356401000000008111156105b257600080fd5b8201836020820111156105c457600080fd5b803590602001918460018302840111640100000000831117156105e657600080fd5b509092509050610e76565b61038d611163565b61044361116b565b61061e6004803603602081101561061757600080fd5b5035611171565b6040518082600681111561062e57fe5b60ff16815260200191505060405180910390f35b61038d6004803603604081101561065857600080fd5b5080359060200135600160a060020a0316611191565b6103476004803603604081101561068457600080fd5b5080359060200135611440565b610699611461565b60408051600160a060020a039092168252519081900360200190f35b6106d2600480360360208110156106cb57600080fd5b5035611470565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6104436004803603602081101561070e57600080fd5b50356114b3565b6103476004803603608081101561072b57600080fd5b50803590602081013590600160a060020a03604082013581169160600135166115f0565b610347600480360361018081101561076657600080fd5b50600160a060020a0361016082013516611a2e565b6107986004803603602081101561079157600080fd5b5035611e74565b005b610347600480360360208110156107b057600080fd5b5035611e8d565b610347600480360360208110156107cd57600080fd5b5035600160a060020a0316611e93565b610347611ea5565b610347600480360360408110156107fb57600080fd5b5080359060200135611eaa565b6106996004803603602081101561081e57600080fd5b5035611ecb565b6103476004803603602081101561083b57600080fd5b5035611ee6565b6103476004803603602081101561085857600080fd5b5035611ef8565b6104436004803603602081101561087557600080fd5b503561219b565b6108996004803603602081101561089257600080fd5b50356121a6565b6040518082606080838360005b838110156108be5781810151838201526020016108a6565b5050505090500191505060405180910390f35b610899600480360360408110156108e757600080fd5b5080359060200135600160a060020a03166121f5565b6103476004803603602081101561091357600080fd5b5035612a0a565b6104436004803603602081101561093057600080fd5b5035612a15565b6103476004803603602081101561094d57600080fd5b5035612a3c565b600060208190529081526040902080546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a8b0154600b8c0154600c909c01549a9b999a98999798969795969495939492939192909190600160a060020a03168d565b60008281602002015183600160200201518460026020020151856003602002015186600460200201518760056020020151886006602002015189600760200201518a600860200201518b600960200201518c600a6020020151604051602001808c81526020018b81526020018a81526020018981526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019b50505050505050505050505060405160208183030381529060405280519060200120826040516020018083815260200182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040528051906020012090505b92915050565b600281565b600080610af1614198565b5050506000918252600160208181526040808520600160a060020a039490941685526011909301815292829020825160608101845281548082529282015494810185905260029091015460ff16151592019190915291565b6000918252600160208181526040808520600160a060020a0394909416855260139093019052912080549101549091565b60009081526001602052604090205490565b60055481565b6000818152600260209081526040808320548584529183905282206005810154821115610bc157806005015491505b6004810154610bd6908363ffffffff612a4e16565b95945050505050565b6000610bed84848433612a97565b949350505050565b604080517f616464726573732047656e6573697350726f746f636f6c4164647265737300006020808301919091527f627974657333322050726f706f73616c49640000000000000000000000000000603e8301527f75696e7432353620566f7465000000000000000000000000000000000000000060508301527f75696e7432353620416d6f756e74546f5374616b650000000000000000000000605c8301527f75696e74323536204e6f6e63650000000000000000000000000000000000000060718301528251605e818403018152607e909201909252805191012081565b600160208190526000918252604090912080549181015460028201546003830154600484015460058501546006860154600787015460088801546009890154600a8a0154600e909a0154600160a060020a03808b169b60ff60a060020a909c048c169b99909116989091168d565b600084610d4f81612edc565b1515610d5a57600080fd5b6000868152600160205260409020610d706141bc565b5060058082015460009081526020818152604080832081516101a0810183528154815260018201549381019390935260028101549183019190915260038101546060830152600481015460808301529283015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c90920154600160a060020a0316610180830181905215610e4557610180820151600160a060020a03163314610e3e57600080fd5b5084610e48565b50335b610e5489828a8a612f4f565b9998505050505050505050565b60009081526001602052604090206002015490565b6000808460021415610fd95750604080517f616464726573732047656e6573697350726f746f636f6c4164647265737300006020808301919091527f627974657333322050726f706f73616c49640000000000000000000000000000603e8301527f75696e7432353620566f7465000000000000000000000000000000000000000060508301527f75696e7432353620416d6f756e74546f5374616b650000000000000000000000605c8301527f75696e74323536204e6f6e63650000000000000000000000000000000000000060718301528251605e818403018152607e830184528051908201206c010000000000000000000000003002609e84015260b283018c905260d283018b905260f283018a90526101128084018a9052845180850390910181526101328401855280519083012061015284019190915261017280840191909152835180840390910181526101929092019092528051910120611036565b604080516c010000000000000000000000003002602080830191909152603482018c9052605482018b9052607482018a905260948083018a90528351808403909101815260b49092019092528051910120611033906135a3565b90505b600061108085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250869392505063ffffffff6135f4169050565b9050600160a060020a03811615156110e2576040805160e560020a62461bcd02815260206004820152601a60248201527f7374616b657220616464726573732063616e6e6f742062652030000000000000604482015290519081900360640190fd5b600160a060020a038116600090815260076020526040902054871461110657600080fd5b600160a060020a03811660009081526007602052604090205461113090600163ffffffff6136ca16565b600160a060020a0382166000908152600760205260409020556111558a8a8a84612a97565b9a9950505050505050505050565b600160029091565b60005b90565b6000908152600160208190526040909120015460a060020a900460ff1690565b600082815260016020526040812081906002600182015460a060020a900460ff1660068111156111bd57fe5b146111c757600080fd5b6002808201546000908152601283016020908152604080832054600160a060020a03891684526013860190925282209283015490929110801561120e575060028301548154145b801561121e575060018360020154145b801561122957508115155b156112475781836007015482600201540281151561124357fe5b0493505b83158015906112f557506001830154600654604080517f6b8eb403000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152602481018b9052905187939290921691636b8eb40391604480820192602092909190829003018186803b1580156112c657600080fd5b505afa1580156112da573d6000803e3d6000fd5b505050506040513d60208110156112f057600080fd5b505110155b1561143657600060028201556006830154611316908563ffffffff6136dc16565b60068085019190915560018401549054604080517fbea75f28000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152898316602482015260448101889052606481018b90529051919092169163bea75f289160848083019260209291908290030181600087803b1580156113a157600080fd5b505af11580156113b5573d6000803e3d6000fd5b505050506040513d60208110156113cb57600080fd5b505115156113d857600080fd5b825460009081526003602090815260409182902054825187815292519697508796600160a060020a03808b16949216928b927fb4a37163ec93e05e09b62e52f7f2ea8cfde431802edede7dfebe53d2ad969dbb929081900390910190a45b5050509250929050565b60009182526001602090815260408084209284526012909201905290205490565b600654600160a060020a031681565b6000908152600160208181526040808420838552601081018352818520546002808752838720549587526012909201909352818520549085529320549093919291565b60006114bd61422e565b60008381526001602081815260409283902083516101c0810185528154815292810154600160a060020a03811692840192909252919283019060a060020a900460ff16600681111561150b57fe5b600681111561151657fe5b815260028201546020820152600380830154600160a060020a0316604080840191909152600484015460608085019190915260058501546080850152600685015460a0850152600785015460c0850152600885015460e08501526009850154610100850152600a8501546101208501528151908101918290526101409093019291600b85019182845b81548152602001906001019080831161159f575050509183525050600e919091015460ff16151560209091015260c081015181519192506115df91610b92565b6115e8846136f1565b119392505050565b6000838152602081905260408120600b01544211611658576040805160e560020a62461bcd02815260206004820152600e60248201527f6e6f742061637469766520796574000000000000000000000000000000000000604482015290519081900360640190fd5b6000848152602081905260409020546032111561167457600080fd5b600554604080516c01000000000000000000000000300260208083019190915260348083018590528351808403909101815260549092019092528051910120906116c590600163ffffffff6136ca16565b6005556116d061422e565b336020828101829052604080516c0100000000000000000000000093840281840152600160a060020a03888116909402603482015281516028818303018152604890910182528051908301208452600381850181905261018085015142905260008a815280845282812060029081015460a08801528a86166080880152606087015260c086018b90528551815292529020541615156117e257600160a060020a03841615156117ab5780516000908152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff1916331790556117e2565b80516000908152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0386161790555b8051600090815260046020908152604080832054898452918390528220600a0154611825916064916118199163ffffffff61374616565b9063ffffffff61377116565b60008881526020819052604090206009015490915081101561185d5760008781526020819052604090206009015460e0830152611865565b60e082018190525b60e08201516101208301526000838152600160208181526040928390208551815590850151918101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909316929092178083559285015185939192909160a060020a60ff02191660a060020a8360068111156118dd57fe5b02179055506060820151600282015560808201516003808301805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039093169290921790915560a0830151600483015560c0830151600583015560e08301516006830155610100830151600783015561012083015160088301556101408301516009830155610160830151600a83015561018083015161198091600b840191906142af565b506101a09190910151600e909101805460ff191691151591909117905560e0820151600084815260016020908152604080832060028085526012909101835281842094909455855183526003825291829020548251938452600160a060020a038a8116928501929092528383018b9052915191169185917f75b4ff136cc5de5957574c797de3334eb1c141271922b825eb071e0487ba2c5c916060908290030190a350909695505050505050565b60006064833511801590611a4457506032833510155b1515611a845760405160e560020a62461bcd0281526004018080602001828103825260298152602001806143876029913960400191505060405180910390fd5b613e80608084013511801590611a9f57506103e86080840135115b1515611af5576040805160e560020a62461bcd02815260206004820152601e60248201527f31303030203c207468726573686f6c64436f6e7374203c3d2031363030300000604482015290519081900360640190fd5b606460e08401351115611b52576040805160e560020a62461bcd02815260206004820181905260248201527f766f7465727352657075746174696f6e4c6f7373526174696f203c3d20313030604482015290519081900360640190fd5b60a083013560408401351015611b9c5760405160e560020a62461bcd02815260040180806020018281038252602b81526020018061435c602b913960400191505060405180910390fd5b600061010084013511611bf9576040805160e560020a62461bcd02815260206004820152601e60248201527f6d696e696d756d44616f426f756e74792073686f756c64206265203e20300000604482015290519081900360640190fd5b600061012084013511611c56576040805160e560020a62461bcd02815260206004820152601c60248201527f64616f426f756e7479436f6e73742073686f756c64206265203e203000000000604482015290519081900360640190fd5b6000611c8c84600b806020026040519081016040528092919082600b602002808284376000920191909152508691506109c49050565b905060ac60026107d05b613e80811015611ce057608087013581108015611cba575060028102608088013511155b15611cd2578183811515611cca57fe5b049250611ce0565b600190910190600202611c96565b50604080516101a0810182528735815260208089013590820152878201359181019190915260608088013590820152608080820190611d41908901357affffffffffffffffffffffffffffffffffffffffffffffffffffff166103e8613795565b815260208101849052604001876005602090810291909101358252018760066020908102919091013582520187600760209081029190910135825201876008602090810291909101358252018760096020908102919091013582520187600a602090810291909101358252600160a060020a03978816918101919091526000858152808252604090819020835181559183015160018301558201516002820155606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e0820151600782015561010082015160088201556101208201516009820155610140820151600a820155610160820151600b82015561018090910151600c909101805473ffffffffffffffffffffffffffffffffffffffff19169190961617909455509392505050565b80611e7e81612edc565b1515611e8957600080fd5b5050565b50600290565b60076020526000908152604090205481565b600181565b6000918252600160209081526040808420928452600f909201905290205490565b600360205260009081526040902054600160a060020a031681565b60046020526000908152604090205481565b60008181526001602052604081206005600182015460a060020a900460ff166006811115611f2257fe5b1480611f4757506006600182015460a060020a900460ff166006811115611f4557fe5b145b1515611f875760405160e560020a62461bcd0281526004018080602001828103825260338152602001806143b06033913960400191505060405180910390fd5b611f90836137cc565b1515611fe6576040805160e560020a62461bcd02815260206004820152601760248201527f70726f706f73616c206e65656420746f20657870697265000000000000000000604482015290519081900360640190fd5b600061202a61201c600f61181961200f600b87016001015460048801549063ffffffff6136ca16565b429063ffffffff6136dc16565b60019063ffffffff6136ca16565b90506064811115612039575060645b600a82018190556001600090815260128301602052604090205461206b9060649061181990849063ffffffff61374616565b600654604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018490529051929550600160a060020a039091169163a9059cbb916044808201926020929091908290030181600087803b1580156120db57600080fd5b505af11580156120ef573d6000803e3d6000fd5b505050506040513d602081101561210557600080fd5b5051151561215d576040805160e560020a62461bcd02815260206004820152601d60248201527f7472616e7366657220746f206d73672e73656e646572206661696c6564000000604482015290519081900360640190fd5b604080518481529051339186917f7468017f6ff596af88244327e88fe691ac48cc1db88b033d11c335f2c7ccdd039181900360200190a35050919050565b6000610adb82612edc565b6121ae6142ed565b60008281526001602052604090819020815160608101909252600b0160038282826020028201915b8154815260200190600101908083116121d65750505050509050919050565b6121fd6142ed565b60008381526001602052604090206002600182015460a060020a900460ff16600681111561222757fe5b148061224b575060018082015460a060020a900460ff16600681111561224957fe5b145b151561228b5760405160e560020a62461bcd02815260040180806020018281038252602d81526020018061432f602d913960400191505060405180910390fd5b6122936141bc565b5060058082015460009081526020818152604080832081516101a08101835281548152600180830154948201949094526002808301549382019390935260038201546060820152600482015460808201529481015460a0860152600681015460c0860152600781015460e086015260088101546101008601526009810154610120860152600a810154610140860152600b810154610160860152600c0154600160a060020a03166101808501528401541415612362575060026000908152601083016020526040902054612377565b50600160009081526010830160205260409020545b60646123918361010001518361374690919063ffffffff16565b81151561239a57fe5b600160a060020a0387166000908152601386016020908152604080832060018452601289019092528083205460028452908320549490930494509290916123e7919063ffffffff6136ca16565b6002860154600090815260128701602052604081205460018501549293509111156125115760016000908152601287016020526040812054600a88015461244c9161243f91606491611819919063ffffffff61374616565b849063ffffffff6136dc16565b905060018088015460a060020a900460ff16600681111561246957fe5b141561247b5760018401548852612508565b600287015484541415612508578354600114156124e45780876007015410156124df5760006124b78860070154836136dc90919063ffffffff16565b9050826124d182876001015461374690919063ffffffff16565b8115156124da57fe5b048952505b612508565b600184015482906124fb908363ffffffff61374616565b81151561250457fe5b0488525b50600060018401555b600e86015460ff1615801561254157508554600090815260036020526040902054600160a060020a038981169116145b8015612566575060018087015460a060020a900460ff16600681111561256357fe5b14155b8015612576575060028660020154145b156125d55760078601546125c3906125b783612598838763ffffffff61374616565b8115156125a157fe5b048a60005b60200201519063ffffffff6136ca16565b9063ffffffff6136dc16565b8752600e8601805460ff191660011790555b600160a060020a038816600090815260118701602052604090206001810154158015906126065750600281015460ff165b156126e75760018088015460a060020a900460ff16600681111561262657fe5b141561265e57606461264a876101000151836001015461374690919063ffffffff16565b81151561265357fe5b0460208901526126df565b8054600288015414156126df576002870154600090815260108801602052604090205460018201546126d9919061269b908863ffffffff61374616565b8115156126a457fe5b0460646126c3896101000151856001015461374690919063ffffffff16565b8115156126cc57fe5b049063ffffffff6136ca16565b60208901525b600060018201555b6003870154600160a060020a038a8116911614801561270a575060018760020154145b801561272257506003870154600160a060020a031615155b156127515760e0860151604089015260038701805473ffffffffffffffffffffffffffffffffffffffff191690555b8751156128bc5787516008880154612768916136dc565b60088801556006548851604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038d8116600483015260248201939093529051919092169163a9059cbb9160448083019260209291908290030181600087803b1580156127df57600080fd5b505af11580156127f3573d6000803e3d6000fd5b505050506040513d602081101561280957600080fd5b50511515612861576040805160e560020a62461bcd02815260206004820152601e60248201527f7472616e7366657220746f2062656e6566696369617279206661696c65640000604482015290519081900360640190fd5b8654600090815260036020908152604091829020548a5183519081529251600160a060020a038d8116949216928e927f6d26871c9f457d104b2122485f659f126f7a0cf6938cf20482c03f49794a2fbf929081900390910190a45b60408801516128cd908960016125a6565b156129fd576001870154600160a060020a031663d29b5d2f6128f88a600260200201518b60016125a6565b8b8d6040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084815260200183600160a060020a0316600160a060020a031681526020018281526020019350505050602060405180830381600087803b15801561296c57600080fd5b505af1158015612980573d6000803e3d6000fd5b505050506040513d602081101561299657600080fd5b50508654600090815260036020526040902054600160a060020a03808b1691168b7f7419b736daacf66d5c1645948c956fca2b83be1e2e02d486d65713f289d683b86129eb8c600260200201518d60016125a6565b60408051918252519081900360200190a45b5050505050505092915050565b6000610adb826136f1565b600081612a2181612edc565b1515612a2c57600080fd5b612a35836137cc565b9392505050565b60026020526000908152604090205481565b60008282650100000000005b8115610bd6578160011660011415612a7957612a7681846140ee565b90505b6002909104908115612a9257612a8f83846140ee565b92505b612a5a565b600060028411158015612aaa5750600084115b1515612b00576040805160e560020a62461bcd02815260206004820152601060248201527f77726f6e6720766f74652076616c756500000000000000000000000000000000604482015290519081900360640190fd5b60008311612b58576040805160e560020a62461bcd02815260206004820152601b60248201527f7374616b696e6720616d6f756e742073686f756c64206265203e300000000000604482015290519081900360640190fd5b612b61856137cc565b15612b6e57506001610bed565b60008581526001602052604090206004600182015460a060020a900460ff166006811115612b9857fe5b14158015612bc057506003600182015460a060020a900460ff166006811115612bbd57fe5b14155b15612bcf576000915050610bed565b600160a060020a0383166000908152601382016020526040812060018101549091108015612bfe575080548614155b15612c0e57600092505050610bed565b600654604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152306024830152604482018990529151889392909216916323b872dd916064808201926020929091908290030181600087803b158015612c8657600080fd5b505af1158015612c9a573d6000803e3d6000fd5b505050506040513d6020811015612cb057600080fd5b50511515612d08576040805160e560020a62461bcd02815260206004820152601960248201527f6661696c207472616e736665722066726f6d207374616b657200000000000000604482015290519081900360640190fd5b6008830154612d1d908263ffffffff6136ca16565b60088401556001820154612d37908263ffffffff6136ca16565b600183018190557001000000000000000000000000000000001015612da6576040805160e560020a62461bcd02815260206004820152601a60248201527f7374616b696e6720616d6f756e7420697320746f6f2068696768000000000000604482015290519081900360640190fd5b60088301547001000000000000000000000000000000001015612e13576040805160e560020a62461bcd02815260206004820152601860248201527f746f74616c207374616b657320697320746f6f20686967680000000000000000604482015290519081900360640190fd5b6001871415612e37576002820154612e31908263ffffffff6136ca16565b60028301555b8682556000878152601284016020526040902054612e5c90829063ffffffff6136ca16565b60008881526012850160209081526040808320939093558554825260038152908290205482518a81529182018990528251600160a060020a03808a16949216928c927fd0239d7d4acf51def4507fa173be466927de5d75d8b10d840cd6994d6e10231092918290030190a4612ed0886137cc565b98975050505050505050565b60008181526001602081905260408220015460a060020a900460ff166004816006811115612f0657fe5b1480612f1d57506005816006811115612f1b57fe5b145b80612f3357506006816006811115612f3157fe5b145b80612a3557506003816006811115612f4757fe5b149392505050565b600060028311158015612f625750600083115b1515612fb8576040805160e560020a62461bcd02815260206004820152600e60248201527f30203c205f766f7465203c3d2032000000000000000000000000000000000000604482015290519081900360640190fd5b612fc1856137cc565b15612fce57506001610bed565b612fd66141bc565b506000858152600160208181526040808420600580820154865285845282862083516101a0810185528154815281870154818701526002820154818601526003820154606082015260048083015460808301529282015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c90910154600160a060020a039081166101808301528c88528686529583015484517f9588378e0000000000000000000000000000000000000000000000000000000081528c881693810193909352602483018d905293519096929592949390921692639588378e92604480840193829003018186803b1580156130f657600080fd5b505afa15801561310a573d6000803e3d6000fd5b505050506040513d602081101561312057600080fd5b505190506000811161317c576040805160e560020a62461bcd02815260206004820152601b60248201527f5f766f746572206d75737420686176652072657075746174696f6e0000000000604482015290519081900360640190fd5b848110156131d4576040805160e560020a62461bcd02815260206004820152601260248201527f72657075746174696f6e203e3d205f7265700000000000000000000000000000604482015290519081900360640190fd5b848015156131df5750805b600160a060020a03881660009081526011840160205260409020600101541561320f576000945050505050610bed565b6000878152600f8401602052604090205461323190829063ffffffff6136ca16565b6000888152600f850160205260408082208390556002860154825281205490899052108061328957506002808401546000908152600f8501602052604080822054928252902054148015613289575060018360020154145b15613357576005600184015460a060020a900460ff1660068111156132aa57fe5b1480156132ca575060c0840151604085015103600b840160010154420310155b806132ee57506006600184015460a060020a900460ff1660068111156132ec57fe5b145b1561334f576006600184015460a060020a900460ff16600681111561330f57fe5b146133485760c0840151600484015560018301805460a060020a60ff021916740600000000000000000000000000000000000000001790555b42600c8401555b600283018790555b60408051606081018252888152602081018390529081016004600186015460a060020a900460ff16600681111561338a57fe5b14806133af57506003600186015460a060020a900460ff1660068111156133ad57fe5b145b15159052600160a060020a0389166000908152601185016020908152604091829020835181559083015160018201559101516002909101805460ff19169115159190911790556004600184015460a060020a900460ff16600681111561341157fe5b148061343657506003600184015460a060020a900460ff16600681111561343457fe5b145b1561353e57600087815260108401602052604090205461345d90829063ffffffff6136ca16565b600088815260108501602052604081209190915561010085015160649061348a908463ffffffff61374616565b81151561349357fe5b6001860154604080517ff81f8bf60000000000000000000000000000000000000000000000000000000081529390920460048401819052600160a060020a038d81166024860152604485018f9052925190945091169163f81f8bf69160648083019260209291908290030181600087803b15801561351057600080fd5b505af1158015613524573d6000803e3d6000fd5b505050506040513d602081101561353a57600080fd5b5050505b82546000908152600360209081526040918290205482518a81529182018490528251600160a060020a03808d16949216928d927f066c061a3792cb3eb64a441a928655fcbafb4a54b49725fe9cd2951df5e7189e92918290030190a4610e54896137cc565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b600080600080845160411415156136115760009350505050610adb565b50505060208201516040830151606084015160001a601b60ff8216101561363657601b015b8060ff16601b1415801561364e57508060ff16601c14155b1561365f5760009350505050610adb565b6040805160008152602080820180845289905260ff8416828401526060820186905260808201859052915160019260a0808401939192601f1981019281900390910190855afa1580156136b6573d6000803e3d6000fd5b505050602060405103519350505050610adb565b600082820183811015612a3557600080fd5b6000828211156136eb57600080fd5b50900390565b60008181526001602081815260408084206002855260128101909252808420549284528320549091612a35917affffffffffffffffffffffffffffffffffffffffffffffffffffff169063ffffffff61379516565b600082151561375757506000610adb565b82820282848281151561376657fe5b0414612a3557600080fd5b600080821161377f57600080fd5b6000828481151561378c57fe5b04949350505050565b6000612a357affffffffffffffffffffffffffffffffffffffffffffffffffffff8085166501000000000090810291851602614165565b6000816137d881612edc565b15156137e357600080fd5b60008381526001602052604090206137f96141bc565b506005808201546000908152602081815260409182902082516101a0810184528154815260018201549281019290925260028101549282019290925260038201546060820152600482015460808201529181015460a0830152600681015460c0830152600781015460e083015260088101546101008301526009810154610120830152600a810154610140830152600b810154610160830152600c0154600160a060020a03166101808201526138ad61422e565b604080516101c081018252845481526001850154600160a060020a0381166020830152909185919083019060a060020a900460ff1660068111156138ed57fe5b60068111156138f857fe5b815260028201546020820152600380830154600160a060020a0316604080840191909152600484015460608085019190915260058501546080850152600685015460a0850152600785015460c0850152600885015460e08501526009850154610100850152600a8501546101208501528151908101918290526101409093019291600b85019182845b815481526020019060010190808311613981575050509183525050600e919091015460ff1615156020918201526001850154604080517fb551c373000000000000000000000000000000000000000000000000000000008152600481018b90529051939450600093600160a060020a039092169263b551c37392602480840193829003018186803b158015613a1557600080fd5b505afa158015613a29573d6000803e3d6000fd5b505050506040513d6020811015613a3f57600080fd5b5051835160028601546000908152600f87016020526040812054929350606484049091029181908190841015613aef576003600189015460a060020a900460ff166006811115613a8b57fe5b1415613a9a5760019250613aca565b6004600189015460a060020a900460ff166006811115613ab657fe5b1415613ac55760039250613aca565b600592505b6001880180546002919060a060020a60ff02191660a060020a835b0217905550613d7a565b6003600189015460a060020a900460ff166006811115613b0b57fe5b1415613ba4576020870151600b890154420310613b495760018801805460a060020a60ff02191660a060020a17905560028089018190559250613ba4565b613b5b88600501548960000154610b92565b905080613b678c6136f1565b1115613ba45760018801805460a060020a60ff0219167404000000000000000000000000000000000000000017905542600d890155600988018190555b6004600189015460a060020a900460ff166006811115613bc057fe5b1415613d7a57613bd888600501548960000154610b92565b6060880151909150600b890160020154420310613cd75780613bf98c6136f1565b1115613cb35787546000908152600260205260409020546110001115613cae576001888101805460a060020a60ff0219167405000000000000000000000000000000000000000017905542600c8a01558854600090815260026020818152604080842080549095019094558b54835260048152838320548282528484205492845260128d01909152929091205491935090839003811515613c9657fe5b89546000908152600460205260409020919005830190555b613cd2565b6001880180546003919060a060020a60ff02191660a060020a83613ae5565b613d7a565b6000613ce28c6136f1565b60098a0154909150613cfa908363ffffffff61418216565b8111613d2e5760018901805460a060020a60ff02191674030000000000000000000000000000000000000000179055613d78565b8089600901541115613d7857600989018290556040805183815290518d917fad767d61af51c7895fa3cc0497dde01afb610c74e55ee4d8a71fa5e3ee136d54919081900360200190a25b505b6005600189015460a060020a900460ff166006811115613d9657fe5b1480613dbb57506006600189015460a060020a900460ff166006811115613db957fe5b145b15613dff576004880154600c890154420310613dff5760018801805460a060020a60ff02191674020000000000000000000000000000000000000000179055600492505b6000836005811115613e0d57fe5b14614048576004836005811115613e2057fe5b1480613e3757506005836005811115613e3557fe5b145b15613ef6578551600090815260026020526040902054613e5e90600163ffffffff6136dc16565b865160009081526002602052604080822092909255875181522054801515613e96578854600090815260046020526040812055613ef4565b88546000908152600460209081526040808320546002845260128d01909252909120549093508190613ed5906125b7866001850163ffffffff61374616565b811515613ede57fe5b8a54600090815260046020526040902091900490555b505b87546000908152600360209081526040918290205460028b015483519081529182018890528251600160a060020a03909116928e927f37471b9c9d295ffb1309ad070b8964700bfb7b555e8e8292d0b6cbc7dba35d10929081900390910190a38a7f46a713b994c752c68fbefa9048bec9a0010cc7d933ad95a3c3dbb25931a167e78460405180826005811115613f8957fe5b60ff16815260200191505060405180910390a260018801546002890154604080517f9d4c162d000000000000000000000000000000000000000000000000000000008152600481018f9052602481019290925251600160a060020a0390921691639d4c162d916044808201926020929091908290030181600087803b15801561401157600080fd5b505af1158015614025573d6000803e3d6000fd5b505050506040513d602081101561403b57600080fd5b5050600688015460078901555b600188015460a060020a900460ff16600681111561406257fe5b8660400151600681111561407257fe5b146140cf578a7f21aca7f0285ccddeca2935074d3e36b5ab8fea0327f84cbbf12cf1b6d1a749f98960010160149054906101000a900460ff16604051808260068111156140bb57fe5b60ff16815260200191505060405180910390a25b60008360058111156140dd57fe5b14159b9a5050505050505050505050565b60008282028284828115156140ff57fe5b0414614155576040805160e560020a62461bcd02815260206004820152601560248201527f5265616c4d617468206d756c206f766572666c6f770000000000000000000000604482015290519081900360640190fd5b6501000000000090049392505050565b60008165010000000000840281151561417a57fe5b049392505050565b60008183106141915781612a35565b5090919050565b60606040519081016040528060008152602001600081526020016000151581525090565b6101a0604051908101604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000600160a060020a031681525090565b604080516102008101825260008082526020820181905290918201908152602001600081526020016000600160a060020a03168152602001600081526020016000801916815260200160008152602001600081526020016000815260200160008152602001600081526020016142a26142ed565b8152600060209091015290565b82600381019282156142dd579160200282015b828111156142dd5782518255916020019190600101906142c2565b506142e992915061430c565b5090565b6060604051908101604052806003906020820280388339509192915050565b61116e91905b808211156142e95760008155600101614312565b6000903b119056fe50726f706f73616c2073686f756c64206265204578656375746564206f722045787069726564496e5175657565626f6f73746564566f7465506572696f644c696d6974203e3d207175696574456e64696e67506572696f643530203c3d20717565756564566f7465526571756972656450657263656e74616765203c3d2031303070726f706f73616c20737461746520696e206e6f7420426f6f73746564206e6f72205175696574456e64696e67506572696f64a165627a7a72305820c0896fe1d94476b4186d81da5d58570048474a0c3ac1fe8ae2a449c1db3a1ec70029000000000000000000000000543ff227f64aa17ea132bf9886cab5db55dcaddf
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061025a576000357c01000000000000000000000000000000000000000000000000000000009004806372f702f311610158578063b4512913116100d5578063c8f526e811610099578063c8f526e81461087c578063cc3bf9e9146108d1578063e5af18c5146108fd578063e751f2711461091a578063fb6c0cbb146109375761025a565b8063b4512913146107e5578063ba51b14e14610808578063bb5a05ed14610825578063beda801514610842578063c08351061461085f5761025a565b80639525c0cc1161011c5780639525c0cc1461077b5780639bc5689d14610359578063a003651d1461079a578063a05ea6e4146107b7578063b2449d65146107dd5761025a565b806372f702f31461069157806379a1c1f6146106b557806380f5e0a1146106f857806388737b5e146107155780638894c41b1461074f5761025a565b806330ca0a53116101e65780635142bc1e116101aa5780635142bc1e146105f157806351d997b2146105f957806361d585da146106015780636359036b14610642578063707437681461066e5761025a565b806330ca0a531461045757806332ed5b121461045f578063359afa491461050d5780633c13381814610545578063488c65fc146105625761025a565b806316db51721161022d57806316db5172146103a65780631702ef0c146103d257806321b4b3dc146103ef5780632d598e58146103f75780632daedd521461041a5761025a565b8063025068041461025f57806307b4e1e3146102ea5780630d48344214610359578063119ce91b14610361575b600080fd5b61027c6004803603602081101561027557600080fd5b5035610954565b604080519d8e5260208e019c909c528c8c019a909a5260608c019890985260808b019690965260a08a019490945260c089019290925260e0880152610100870152610120860152610140850152610160840152600160a060020a031661018083015251908190036101a00190f35b610347600480360361018081101561030157600080fd5b81019080806101600190600b806020026040519081016040528092919082600b60200280828437600092019190915250919450505035600160a060020a031690506109c4565b60408051918252519081900360200190f35b610347610ae1565b61038d6004803603604081101561037757600080fd5b5080359060200135600160a060020a0316610ae6565b6040805192835260208301919091528051918290030190f35b61038d600480360360408110156103bc57600080fd5b5080359060200135600160a060020a0316610b49565b610347600480360360208110156103e857600080fd5b5035610b7a565b610347610b8c565b6103476004803603604081101561040d57600080fd5b5080359060200135610b92565b6104436004803603606081101561043057600080fd5b5080359060208101359060400135610bdf565b604080519115158252519081900360200190f35b610347610bf5565b61047c6004803603602081101561047557600080fd5b5035610cd5565b604080518e8152600160a060020a038e1660208201529081018c60068111156104a157fe5b60ff168152602081019b909b5250600160a060020a039098166040808b019190915260608a0197909752608089019590955260a088019390935260c087019190915260e08601526101008501526101208401529015156101408301525190819003610160019350915050f35b6104436004803603608081101561052357600080fd5b5080359060208101359060408101359060600135600160a060020a0316610d43565b6103476004803603602081101561055b57600080fd5b5035610e61565b610443600480360360c081101561057857600080fd5b8135916020810135916040820135916060810135916080820135919081019060c0810160a08201356401000000008111156105b257600080fd5b8201836020820111156105c457600080fd5b803590602001918460018302840111640100000000831117156105e657600080fd5b509092509050610e76565b61038d611163565b61044361116b565b61061e6004803603602081101561061757600080fd5b5035611171565b6040518082600681111561062e57fe5b60ff16815260200191505060405180910390f35b61038d6004803603604081101561065857600080fd5b5080359060200135600160a060020a0316611191565b6103476004803603604081101561068457600080fd5b5080359060200135611440565b610699611461565b60408051600160a060020a039092168252519081900360200190f35b6106d2600480360360208110156106cb57600080fd5b5035611470565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6104436004803603602081101561070e57600080fd5b50356114b3565b6103476004803603608081101561072b57600080fd5b50803590602081013590600160a060020a03604082013581169160600135166115f0565b610347600480360361018081101561076657600080fd5b50600160a060020a0361016082013516611a2e565b6107986004803603602081101561079157600080fd5b5035611e74565b005b610347600480360360208110156107b057600080fd5b5035611e8d565b610347600480360360208110156107cd57600080fd5b5035600160a060020a0316611e93565b610347611ea5565b610347600480360360408110156107fb57600080fd5b5080359060200135611eaa565b6106996004803603602081101561081e57600080fd5b5035611ecb565b6103476004803603602081101561083b57600080fd5b5035611ee6565b6103476004803603602081101561085857600080fd5b5035611ef8565b6104436004803603602081101561087557600080fd5b503561219b565b6108996004803603602081101561089257600080fd5b50356121a6565b6040518082606080838360005b838110156108be5781810151838201526020016108a6565b5050505090500191505060405180910390f35b610899600480360360408110156108e757600080fd5b5080359060200135600160a060020a03166121f5565b6103476004803603602081101561091357600080fd5b5035612a0a565b6104436004803603602081101561093057600080fd5b5035612a15565b6103476004803603602081101561094d57600080fd5b5035612a3c565b600060208190529081526040902080546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a8b0154600b8c0154600c909c01549a9b999a98999798969795969495939492939192909190600160a060020a03168d565b60008281602002015183600160200201518460026020020151856003602002015186600460200201518760056020020151886006602002015189600760200201518a600860200201518b600960200201518c600a6020020151604051602001808c81526020018b81526020018a81526020018981526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019b50505050505050505050505060405160208183030381529060405280519060200120826040516020018083815260200182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401925050506040516020818303038152906040528051906020012090505b92915050565b600281565b600080610af1614198565b5050506000918252600160208181526040808520600160a060020a039490941685526011909301815292829020825160608101845281548082529282015494810185905260029091015460ff16151592019190915291565b6000918252600160208181526040808520600160a060020a0394909416855260139093019052912080549101549091565b60009081526001602052604090205490565b60055481565b6000818152600260209081526040808320548584529183905282206005810154821115610bc157806005015491505b6004810154610bd6908363ffffffff612a4e16565b95945050505050565b6000610bed84848433612a97565b949350505050565b604080517f616464726573732047656e6573697350726f746f636f6c4164647265737300006020808301919091527f627974657333322050726f706f73616c49640000000000000000000000000000603e8301527f75696e7432353620566f7465000000000000000000000000000000000000000060508301527f75696e7432353620416d6f756e74546f5374616b650000000000000000000000605c8301527f75696e74323536204e6f6e63650000000000000000000000000000000000000060718301528251605e818403018152607e909201909252805191012081565b600160208190526000918252604090912080549181015460028201546003830154600484015460058501546006860154600787015460088801546009890154600a8a0154600e909a0154600160a060020a03808b169b60ff60a060020a909c048c169b99909116989091168d565b600084610d4f81612edc565b1515610d5a57600080fd5b6000868152600160205260409020610d706141bc565b5060058082015460009081526020818152604080832081516101a0810183528154815260018201549381019390935260028101549183019190915260038101546060830152600481015460808301529283015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c90920154600160a060020a0316610180830181905215610e4557610180820151600160a060020a03163314610e3e57600080fd5b5084610e48565b50335b610e5489828a8a612f4f565b9998505050505050505050565b60009081526001602052604090206002015490565b6000808460021415610fd95750604080517f616464726573732047656e6573697350726f746f636f6c4164647265737300006020808301919091527f627974657333322050726f706f73616c49640000000000000000000000000000603e8301527f75696e7432353620566f7465000000000000000000000000000000000000000060508301527f75696e7432353620416d6f756e74546f5374616b650000000000000000000000605c8301527f75696e74323536204e6f6e63650000000000000000000000000000000000000060718301528251605e818403018152607e830184528051908201206c010000000000000000000000003002609e84015260b283018c905260d283018b905260f283018a90526101128084018a9052845180850390910181526101328401855280519083012061015284019190915261017280840191909152835180840390910181526101929092019092528051910120611036565b604080516c010000000000000000000000003002602080830191909152603482018c9052605482018b9052607482018a905260948083018a90528351808403909101815260b49092019092528051910120611033906135a3565b90505b600061108085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250869392505063ffffffff6135f4169050565b9050600160a060020a03811615156110e2576040805160e560020a62461bcd02815260206004820152601a60248201527f7374616b657220616464726573732063616e6e6f742062652030000000000000604482015290519081900360640190fd5b600160a060020a038116600090815260076020526040902054871461110657600080fd5b600160a060020a03811660009081526007602052604090205461113090600163ffffffff6136ca16565b600160a060020a0382166000908152600760205260409020556111558a8a8a84612a97565b9a9950505050505050505050565b600160029091565b60005b90565b6000908152600160208190526040909120015460a060020a900460ff1690565b600082815260016020526040812081906002600182015460a060020a900460ff1660068111156111bd57fe5b146111c757600080fd5b6002808201546000908152601283016020908152604080832054600160a060020a03891684526013860190925282209283015490929110801561120e575060028301548154145b801561121e575060018360020154145b801561122957508115155b156112475781836007015482600201540281151561124357fe5b0493505b83158015906112f557506001830154600654604080517f6b8eb403000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152602481018b9052905187939290921691636b8eb40391604480820192602092909190829003018186803b1580156112c657600080fd5b505afa1580156112da573d6000803e3d6000fd5b505050506040513d60208110156112f057600080fd5b505110155b1561143657600060028201556006830154611316908563ffffffff6136dc16565b60068085019190915560018401549054604080517fbea75f28000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152898316602482015260448101889052606481018b90529051919092169163bea75f289160848083019260209291908290030181600087803b1580156113a157600080fd5b505af11580156113b5573d6000803e3d6000fd5b505050506040513d60208110156113cb57600080fd5b505115156113d857600080fd5b825460009081526003602090815260409182902054825187815292519697508796600160a060020a03808b16949216928b927fb4a37163ec93e05e09b62e52f7f2ea8cfde431802edede7dfebe53d2ad969dbb929081900390910190a45b5050509250929050565b60009182526001602090815260408084209284526012909201905290205490565b600654600160a060020a031681565b6000908152600160208181526040808420838552601081018352818520546002808752838720549587526012909201909352818520549085529320549093919291565b60006114bd61422e565b60008381526001602081815260409283902083516101c0810185528154815292810154600160a060020a03811692840192909252919283019060a060020a900460ff16600681111561150b57fe5b600681111561151657fe5b815260028201546020820152600380830154600160a060020a0316604080840191909152600484015460608085019190915260058501546080850152600685015460a0850152600785015460c0850152600885015460e08501526009850154610100850152600a8501546101208501528151908101918290526101409093019291600b85019182845b81548152602001906001019080831161159f575050509183525050600e919091015460ff16151560209091015260c081015181519192506115df91610b92565b6115e8846136f1565b119392505050565b6000838152602081905260408120600b01544211611658576040805160e560020a62461bcd02815260206004820152600e60248201527f6e6f742061637469766520796574000000000000000000000000000000000000604482015290519081900360640190fd5b6000848152602081905260409020546032111561167457600080fd5b600554604080516c01000000000000000000000000300260208083019190915260348083018590528351808403909101815260549092019092528051910120906116c590600163ffffffff6136ca16565b6005556116d061422e565b336020828101829052604080516c0100000000000000000000000093840281840152600160a060020a03888116909402603482015281516028818303018152604890910182528051908301208452600381850181905261018085015142905260008a815280845282812060029081015460a08801528a86166080880152606087015260c086018b90528551815292529020541615156117e257600160a060020a03841615156117ab5780516000908152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff1916331790556117e2565b80516000908152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0386161790555b8051600090815260046020908152604080832054898452918390528220600a0154611825916064916118199163ffffffff61374616565b9063ffffffff61377116565b60008881526020819052604090206009015490915081101561185d5760008781526020819052604090206009015460e0830152611865565b60e082018190525b60e08201516101208301526000838152600160208181526040928390208551815590850151918101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909316929092178083559285015185939192909160a060020a60ff02191660a060020a8360068111156118dd57fe5b02179055506060820151600282015560808201516003808301805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039093169290921790915560a0830151600483015560c0830151600583015560e08301516006830155610100830151600783015561012083015160088301556101408301516009830155610160830151600a83015561018083015161198091600b840191906142af565b506101a09190910151600e909101805460ff191691151591909117905560e0820151600084815260016020908152604080832060028085526012909101835281842094909455855183526003825291829020548251938452600160a060020a038a8116928501929092528383018b9052915191169185917f75b4ff136cc5de5957574c797de3334eb1c141271922b825eb071e0487ba2c5c916060908290030190a350909695505050505050565b60006064833511801590611a4457506032833510155b1515611a845760405160e560020a62461bcd0281526004018080602001828103825260298152602001806143876029913960400191505060405180910390fd5b613e80608084013511801590611a9f57506103e86080840135115b1515611af5576040805160e560020a62461bcd02815260206004820152601e60248201527f31303030203c207468726573686f6c64436f6e7374203c3d2031363030300000604482015290519081900360640190fd5b606460e08401351115611b52576040805160e560020a62461bcd02815260206004820181905260248201527f766f7465727352657075746174696f6e4c6f7373526174696f203c3d20313030604482015290519081900360640190fd5b60a083013560408401351015611b9c5760405160e560020a62461bcd02815260040180806020018281038252602b81526020018061435c602b913960400191505060405180910390fd5b600061010084013511611bf9576040805160e560020a62461bcd02815260206004820152601e60248201527f6d696e696d756d44616f426f756e74792073686f756c64206265203e20300000604482015290519081900360640190fd5b600061012084013511611c56576040805160e560020a62461bcd02815260206004820152601c60248201527f64616f426f756e7479436f6e73742073686f756c64206265203e203000000000604482015290519081900360640190fd5b6000611c8c84600b806020026040519081016040528092919082600b602002808284376000920191909152508691506109c49050565b905060ac60026107d05b613e80811015611ce057608087013581108015611cba575060028102608088013511155b15611cd2578183811515611cca57fe5b049250611ce0565b600190910190600202611c96565b50604080516101a0810182528735815260208089013590820152878201359181019190915260608088013590820152608080820190611d41908901357affffffffffffffffffffffffffffffffffffffffffffffffffffff166103e8613795565b815260208101849052604001876005602090810291909101358252018760066020908102919091013582520187600760209081029190910135825201876008602090810291909101358252018760096020908102919091013582520187600a602090810291909101358252600160a060020a03978816918101919091526000858152808252604090819020835181559183015160018301558201516002820155606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e0820151600782015561010082015160088201556101208201516009820155610140820151600a820155610160820151600b82015561018090910151600c909101805473ffffffffffffffffffffffffffffffffffffffff19169190961617909455509392505050565b80611e7e81612edc565b1515611e8957600080fd5b5050565b50600290565b60076020526000908152604090205481565b600181565b6000918252600160209081526040808420928452600f909201905290205490565b600360205260009081526040902054600160a060020a031681565b60046020526000908152604090205481565b60008181526001602052604081206005600182015460a060020a900460ff166006811115611f2257fe5b1480611f4757506006600182015460a060020a900460ff166006811115611f4557fe5b145b1515611f875760405160e560020a62461bcd0281526004018080602001828103825260338152602001806143b06033913960400191505060405180910390fd5b611f90836137cc565b1515611fe6576040805160e560020a62461bcd02815260206004820152601760248201527f70726f706f73616c206e65656420746f20657870697265000000000000000000604482015290519081900360640190fd5b600061202a61201c600f61181961200f600b87016001015460048801549063ffffffff6136ca16565b429063ffffffff6136dc16565b60019063ffffffff6136ca16565b90506064811115612039575060645b600a82018190556001600090815260128301602052604090205461206b9060649061181990849063ffffffff61374616565b600654604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018490529051929550600160a060020a039091169163a9059cbb916044808201926020929091908290030181600087803b1580156120db57600080fd5b505af11580156120ef573d6000803e3d6000fd5b505050506040513d602081101561210557600080fd5b5051151561215d576040805160e560020a62461bcd02815260206004820152601d60248201527f7472616e7366657220746f206d73672e73656e646572206661696c6564000000604482015290519081900360640190fd5b604080518481529051339186917f7468017f6ff596af88244327e88fe691ac48cc1db88b033d11c335f2c7ccdd039181900360200190a35050919050565b6000610adb82612edc565b6121ae6142ed565b60008281526001602052604090819020815160608101909252600b0160038282826020028201915b8154815260200190600101908083116121d65750505050509050919050565b6121fd6142ed565b60008381526001602052604090206002600182015460a060020a900460ff16600681111561222757fe5b148061224b575060018082015460a060020a900460ff16600681111561224957fe5b145b151561228b5760405160e560020a62461bcd02815260040180806020018281038252602d81526020018061432f602d913960400191505060405180910390fd5b6122936141bc565b5060058082015460009081526020818152604080832081516101a08101835281548152600180830154948201949094526002808301549382019390935260038201546060820152600482015460808201529481015460a0860152600681015460c0860152600781015460e086015260088101546101008601526009810154610120860152600a810154610140860152600b810154610160860152600c0154600160a060020a03166101808501528401541415612362575060026000908152601083016020526040902054612377565b50600160009081526010830160205260409020545b60646123918361010001518361374690919063ffffffff16565b81151561239a57fe5b600160a060020a0387166000908152601386016020908152604080832060018452601289019092528083205460028452908320549490930494509290916123e7919063ffffffff6136ca16565b6002860154600090815260128701602052604081205460018501549293509111156125115760016000908152601287016020526040812054600a88015461244c9161243f91606491611819919063ffffffff61374616565b849063ffffffff6136dc16565b905060018088015460a060020a900460ff16600681111561246957fe5b141561247b5760018401548852612508565b600287015484541415612508578354600114156124e45780876007015410156124df5760006124b78860070154836136dc90919063ffffffff16565b9050826124d182876001015461374690919063ffffffff16565b8115156124da57fe5b048952505b612508565b600184015482906124fb908363ffffffff61374616565b81151561250457fe5b0488525b50600060018401555b600e86015460ff1615801561254157508554600090815260036020526040902054600160a060020a038981169116145b8015612566575060018087015460a060020a900460ff16600681111561256357fe5b14155b8015612576575060028660020154145b156125d55760078601546125c3906125b783612598838763ffffffff61374616565b8115156125a157fe5b048a60005b60200201519063ffffffff6136ca16565b9063ffffffff6136dc16565b8752600e8601805460ff191660011790555b600160a060020a038816600090815260118701602052604090206001810154158015906126065750600281015460ff165b156126e75760018088015460a060020a900460ff16600681111561262657fe5b141561265e57606461264a876101000151836001015461374690919063ffffffff16565b81151561265357fe5b0460208901526126df565b8054600288015414156126df576002870154600090815260108801602052604090205460018201546126d9919061269b908863ffffffff61374616565b8115156126a457fe5b0460646126c3896101000151856001015461374690919063ffffffff16565b8115156126cc57fe5b049063ffffffff6136ca16565b60208901525b600060018201555b6003870154600160a060020a038a8116911614801561270a575060018760020154145b801561272257506003870154600160a060020a031615155b156127515760e0860151604089015260038701805473ffffffffffffffffffffffffffffffffffffffff191690555b8751156128bc5787516008880154612768916136dc565b60088801556006548851604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038d8116600483015260248201939093529051919092169163a9059cbb9160448083019260209291908290030181600087803b1580156127df57600080fd5b505af11580156127f3573d6000803e3d6000fd5b505050506040513d602081101561280957600080fd5b50511515612861576040805160e560020a62461bcd02815260206004820152601e60248201527f7472616e7366657220746f2062656e6566696369617279206661696c65640000604482015290519081900360640190fd5b8654600090815260036020908152604091829020548a5183519081529251600160a060020a038d8116949216928e927f6d26871c9f457d104b2122485f659f126f7a0cf6938cf20482c03f49794a2fbf929081900390910190a45b60408801516128cd908960016125a6565b156129fd576001870154600160a060020a031663d29b5d2f6128f88a600260200201518b60016125a6565b8b8d6040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084815260200183600160a060020a0316600160a060020a031681526020018281526020019350505050602060405180830381600087803b15801561296c57600080fd5b505af1158015612980573d6000803e3d6000fd5b505050506040513d602081101561299657600080fd5b50508654600090815260036020526040902054600160a060020a03808b1691168b7f7419b736daacf66d5c1645948c956fca2b83be1e2e02d486d65713f289d683b86129eb8c600260200201518d60016125a6565b60408051918252519081900360200190a45b5050505050505092915050565b6000610adb826136f1565b600081612a2181612edc565b1515612a2c57600080fd5b612a35836137cc565b9392505050565b60026020526000908152604090205481565b60008282650100000000005b8115610bd6578160011660011415612a7957612a7681846140ee565b90505b6002909104908115612a9257612a8f83846140ee565b92505b612a5a565b600060028411158015612aaa5750600084115b1515612b00576040805160e560020a62461bcd02815260206004820152601060248201527f77726f6e6720766f74652076616c756500000000000000000000000000000000604482015290519081900360640190fd5b60008311612b58576040805160e560020a62461bcd02815260206004820152601b60248201527f7374616b696e6720616d6f756e742073686f756c64206265203e300000000000604482015290519081900360640190fd5b612b61856137cc565b15612b6e57506001610bed565b60008581526001602052604090206004600182015460a060020a900460ff166006811115612b9857fe5b14158015612bc057506003600182015460a060020a900460ff166006811115612bbd57fe5b14155b15612bcf576000915050610bed565b600160a060020a0383166000908152601382016020526040812060018101549091108015612bfe575080548614155b15612c0e57600092505050610bed565b600654604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152306024830152604482018990529151889392909216916323b872dd916064808201926020929091908290030181600087803b158015612c8657600080fd5b505af1158015612c9a573d6000803e3d6000fd5b505050506040513d6020811015612cb057600080fd5b50511515612d08576040805160e560020a62461bcd02815260206004820152601960248201527f6661696c207472616e736665722066726f6d207374616b657200000000000000604482015290519081900360640190fd5b6008830154612d1d908263ffffffff6136ca16565b60088401556001820154612d37908263ffffffff6136ca16565b600183018190557001000000000000000000000000000000001015612da6576040805160e560020a62461bcd02815260206004820152601a60248201527f7374616b696e6720616d6f756e7420697320746f6f2068696768000000000000604482015290519081900360640190fd5b60088301547001000000000000000000000000000000001015612e13576040805160e560020a62461bcd02815260206004820152601860248201527f746f74616c207374616b657320697320746f6f20686967680000000000000000604482015290519081900360640190fd5b6001871415612e37576002820154612e31908263ffffffff6136ca16565b60028301555b8682556000878152601284016020526040902054612e5c90829063ffffffff6136ca16565b60008881526012850160209081526040808320939093558554825260038152908290205482518a81529182018990528251600160a060020a03808a16949216928c927fd0239d7d4acf51def4507fa173be466927de5d75d8b10d840cd6994d6e10231092918290030190a4612ed0886137cc565b98975050505050505050565b60008181526001602081905260408220015460a060020a900460ff166004816006811115612f0657fe5b1480612f1d57506005816006811115612f1b57fe5b145b80612f3357506006816006811115612f3157fe5b145b80612a3557506003816006811115612f4757fe5b149392505050565b600060028311158015612f625750600083115b1515612fb8576040805160e560020a62461bcd02815260206004820152600e60248201527f30203c205f766f7465203c3d2032000000000000000000000000000000000000604482015290519081900360640190fd5b612fc1856137cc565b15612fce57506001610bed565b612fd66141bc565b506000858152600160208181526040808420600580820154865285845282862083516101a0810185528154815281870154818701526002820154818601526003820154606082015260048083015460808301529282015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c90910154600160a060020a039081166101808301528c88528686529583015484517f9588378e0000000000000000000000000000000000000000000000000000000081528c881693810193909352602483018d905293519096929592949390921692639588378e92604480840193829003018186803b1580156130f657600080fd5b505afa15801561310a573d6000803e3d6000fd5b505050506040513d602081101561312057600080fd5b505190506000811161317c576040805160e560020a62461bcd02815260206004820152601b60248201527f5f766f746572206d75737420686176652072657075746174696f6e0000000000604482015290519081900360640190fd5b848110156131d4576040805160e560020a62461bcd02815260206004820152601260248201527f72657075746174696f6e203e3d205f7265700000000000000000000000000000604482015290519081900360640190fd5b848015156131df5750805b600160a060020a03881660009081526011840160205260409020600101541561320f576000945050505050610bed565b6000878152600f8401602052604090205461323190829063ffffffff6136ca16565b6000888152600f850160205260408082208390556002860154825281205490899052108061328957506002808401546000908152600f8501602052604080822054928252902054148015613289575060018360020154145b15613357576005600184015460a060020a900460ff1660068111156132aa57fe5b1480156132ca575060c0840151604085015103600b840160010154420310155b806132ee57506006600184015460a060020a900460ff1660068111156132ec57fe5b145b1561334f576006600184015460a060020a900460ff16600681111561330f57fe5b146133485760c0840151600484015560018301805460a060020a60ff021916740600000000000000000000000000000000000000001790555b42600c8401555b600283018790555b60408051606081018252888152602081018390529081016004600186015460a060020a900460ff16600681111561338a57fe5b14806133af57506003600186015460a060020a900460ff1660068111156133ad57fe5b145b15159052600160a060020a0389166000908152601185016020908152604091829020835181559083015160018201559101516002909101805460ff19169115159190911790556004600184015460a060020a900460ff16600681111561341157fe5b148061343657506003600184015460a060020a900460ff16600681111561343457fe5b145b1561353e57600087815260108401602052604090205461345d90829063ffffffff6136ca16565b600088815260108501602052604081209190915561010085015160649061348a908463ffffffff61374616565b81151561349357fe5b6001860154604080517ff81f8bf60000000000000000000000000000000000000000000000000000000081529390920460048401819052600160a060020a038d81166024860152604485018f9052925190945091169163f81f8bf69160648083019260209291908290030181600087803b15801561351057600080fd5b505af1158015613524573d6000803e3d6000fd5b505050506040513d602081101561353a57600080fd5b5050505b82546000908152600360209081526040918290205482518a81529182018490528251600160a060020a03808d16949216928d927f066c061a3792cb3eb64a441a928655fcbafb4a54b49725fe9cd2951df5e7189e92918290030190a4610e54896137cc565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b600080600080845160411415156136115760009350505050610adb565b50505060208201516040830151606084015160001a601b60ff8216101561363657601b015b8060ff16601b1415801561364e57508060ff16601c14155b1561365f5760009350505050610adb565b6040805160008152602080820180845289905260ff8416828401526060820186905260808201859052915160019260a0808401939192601f1981019281900390910190855afa1580156136b6573d6000803e3d6000fd5b505050602060405103519350505050610adb565b600082820183811015612a3557600080fd5b6000828211156136eb57600080fd5b50900390565b60008181526001602081815260408084206002855260128101909252808420549284528320549091612a35917affffffffffffffffffffffffffffffffffffffffffffffffffffff169063ffffffff61379516565b600082151561375757506000610adb565b82820282848281151561376657fe5b0414612a3557600080fd5b600080821161377f57600080fd5b6000828481151561378c57fe5b04949350505050565b6000612a357affffffffffffffffffffffffffffffffffffffffffffffffffffff8085166501000000000090810291851602614165565b6000816137d881612edc565b15156137e357600080fd5b60008381526001602052604090206137f96141bc565b506005808201546000908152602081815260409182902082516101a0810184528154815260018201549281019290925260028101549282019290925260038201546060820152600482015460808201529181015460a0830152600681015460c0830152600781015460e083015260088101546101008301526009810154610120830152600a810154610140830152600b810154610160830152600c0154600160a060020a03166101808201526138ad61422e565b604080516101c081018252845481526001850154600160a060020a0381166020830152909185919083019060a060020a900460ff1660068111156138ed57fe5b60068111156138f857fe5b815260028201546020820152600380830154600160a060020a0316604080840191909152600484015460608085019190915260058501546080850152600685015460a0850152600785015460c0850152600885015460e08501526009850154610100850152600a8501546101208501528151908101918290526101409093019291600b85019182845b815481526020019060010190808311613981575050509183525050600e919091015460ff1615156020918201526001850154604080517fb551c373000000000000000000000000000000000000000000000000000000008152600481018b90529051939450600093600160a060020a039092169263b551c37392602480840193829003018186803b158015613a1557600080fd5b505afa158015613a29573d6000803e3d6000fd5b505050506040513d6020811015613a3f57600080fd5b5051835160028601546000908152600f87016020526040812054929350606484049091029181908190841015613aef576003600189015460a060020a900460ff166006811115613a8b57fe5b1415613a9a5760019250613aca565b6004600189015460a060020a900460ff166006811115613ab657fe5b1415613ac55760039250613aca565b600592505b6001880180546002919060a060020a60ff02191660a060020a835b0217905550613d7a565b6003600189015460a060020a900460ff166006811115613b0b57fe5b1415613ba4576020870151600b890154420310613b495760018801805460a060020a60ff02191660a060020a17905560028089018190559250613ba4565b613b5b88600501548960000154610b92565b905080613b678c6136f1565b1115613ba45760018801805460a060020a60ff0219167404000000000000000000000000000000000000000017905542600d890155600988018190555b6004600189015460a060020a900460ff166006811115613bc057fe5b1415613d7a57613bd888600501548960000154610b92565b6060880151909150600b890160020154420310613cd75780613bf98c6136f1565b1115613cb35787546000908152600260205260409020546110001115613cae576001888101805460a060020a60ff0219167405000000000000000000000000000000000000000017905542600c8a01558854600090815260026020818152604080842080549095019094558b54835260048152838320548282528484205492845260128d01909152929091205491935090839003811515613c9657fe5b89546000908152600460205260409020919005830190555b613cd2565b6001880180546003919060a060020a60ff02191660a060020a83613ae5565b613d7a565b6000613ce28c6136f1565b60098a0154909150613cfa908363ffffffff61418216565b8111613d2e5760018901805460a060020a60ff02191674030000000000000000000000000000000000000000179055613d78565b8089600901541115613d7857600989018290556040805183815290518d917fad767d61af51c7895fa3cc0497dde01afb610c74e55ee4d8a71fa5e3ee136d54919081900360200190a25b505b6005600189015460a060020a900460ff166006811115613d9657fe5b1480613dbb57506006600189015460a060020a900460ff166006811115613db957fe5b145b15613dff576004880154600c890154420310613dff5760018801805460a060020a60ff02191674020000000000000000000000000000000000000000179055600492505b6000836005811115613e0d57fe5b14614048576004836005811115613e2057fe5b1480613e3757506005836005811115613e3557fe5b145b15613ef6578551600090815260026020526040902054613e5e90600163ffffffff6136dc16565b865160009081526002602052604080822092909255875181522054801515613e96578854600090815260046020526040812055613ef4565b88546000908152600460209081526040808320546002845260128d01909252909120549093508190613ed5906125b7866001850163ffffffff61374616565b811515613ede57fe5b8a54600090815260046020526040902091900490555b505b87546000908152600360209081526040918290205460028b015483519081529182018890528251600160a060020a03909116928e927f37471b9c9d295ffb1309ad070b8964700bfb7b555e8e8292d0b6cbc7dba35d10929081900390910190a38a7f46a713b994c752c68fbefa9048bec9a0010cc7d933ad95a3c3dbb25931a167e78460405180826005811115613f8957fe5b60ff16815260200191505060405180910390a260018801546002890154604080517f9d4c162d000000000000000000000000000000000000000000000000000000008152600481018f9052602481019290925251600160a060020a0390921691639d4c162d916044808201926020929091908290030181600087803b15801561401157600080fd5b505af1158015614025573d6000803e3d6000fd5b505050506040513d602081101561403b57600080fd5b5050600688015460078901555b600188015460a060020a900460ff16600681111561406257fe5b8660400151600681111561407257fe5b146140cf578a7f21aca7f0285ccddeca2935074d3e36b5ab8fea0327f84cbbf12cf1b6d1a749f98960010160149054906101000a900460ff16604051808260068111156140bb57fe5b60ff16815260200191505060405180910390a25b60008360058111156140dd57fe5b14159b9a5050505050505050505050565b60008282028284828115156140ff57fe5b0414614155576040805160e560020a62461bcd02815260206004820152601560248201527f5265616c4d617468206d756c206f766572666c6f770000000000000000000000604482015290519081900360640190fd5b6501000000000090049392505050565b60008165010000000000840281151561417a57fe5b049392505050565b60008183106141915781612a35565b5090919050565b60606040519081016040528060008152602001600081526020016000151581525090565b6101a0604051908101604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000600160a060020a031681525090565b604080516102008101825260008082526020820181905290918201908152602001600081526020016000600160a060020a03168152602001600081526020016000801916815260200160008152602001600081526020016000815260200160008152602001600081526020016142a26142ed565b8152600060209091015290565b82600381019282156142dd579160200282015b828111156142dd5782518255916020019190600101906142c2565b506142e992915061430c565b5090565b6060604051908101604052806003906020820280388339509192915050565b61116e91905b808211156142e95760008155600101614312565b6000903b119056fe50726f706f73616c2073686f756c64206265204578656375746564206f722045787069726564496e5175657565626f6f73746564566f7465506572696f644c696d6974203e3d207175696574456e64696e67506572696f643530203c3d20717565756564566f7465526571756972656450657263656e74616765203c3d2031303070726f706f73616c20737461746520696e206e6f7420426f6f73746564206e6f72205175696574456e64696e67506572696f64a165627a7a72305820c0896fe1d94476b4186d81da5d58570048474a0c3ac1fe8ae2a449c1db3a1ec70029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000543ff227f64aa17ea132bf9886cab5db55dcaddf
-----Decoded View---------------
Arg [0] : _stakingToken (address): 0x543Ff227F64Aa17eA132Bf9886cAb5DB55DCAddf
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000543ff227f64aa17ea132bf9886cab5db55dcaddf
Swarm Source
bzzr://c0896fe1d94476b4186d81da5d58570048474a0c3ac1fe8ae2a449c1db3a1ec7
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.