@gooddollar/goodcontracts
Version:
GoodDollar Contracts
2 lines (1 loc) • 13.7 kB
JSON
{"contractName":"GenesisProtocolLogic","abi":[{"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":"NO","outputs":[{"name":"","type":"uint256"}],"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":"","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":"_rep","type":"uint256"},{"name":"_voter","type":"address"}],"name":"vote","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":"stakingToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","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":"_proposalId","type":"bytes32"}],"name":"getNumberOfChoices","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":true,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"isVotable","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","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"},{"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":"_proposalId","type":"bytes32"}],"name":"executeBoosted","outputs":[{"name":"expirationCallBounty","type":"uint256"}],"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":"_beneficiary","type":"address"}],"name":"redeem","outputs":[{"name":"rewards","type":"uint256[3]"}],"payable":false,"stateMutability":"nonpayable","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":"shouldBoost","outputs":[{"name":"","type":"bool"}],"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":true,"inputs":[{"name":"_params","type":"uint256[11]"},{"name":"_voteOnBehalf","type":"address"}],"name":"getParametersHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"}],"metadata":"","sourceMap":"","compiler":{"name":"solc","version":"0.5.4+commit.9549d8ff.Emscripten.clang"},"networks":{},"schemaVersion":"3.0.16","updatedAt":"2020-07-07T14:28:02.158Z","devdoc":{"methods":{"constructor":{"details":"Constructor"},"executeBoosted(bytes32)":{"details":"executeBoosted try to execute a boosted or QuietEndingPeriod proposal if it is expired","params":{"_proposalId":"the id of the proposal"},"return":"uint256 expirationCallBounty the bounty amount for the expiration call"},"getAllowedRangeOfChoices()":{"details":"getAllowedRangeOfChoices returns the allowed range of choices for a voting machine.","return":"min - minimum number of choices max - maximum number of choices"},"getParametersHash(uint256[11],address)":{"details":"hashParameters returns a hash of the given parameters"},"isAbstainAllow()":{"details":"isAbstainAllow returns if the voting machine allow abstain (0)","return":"bool true or false"},"propose(uint256,bytes32,address,address)":{"details":"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.","params":{"_organization":"address","_paramsHash":"parameters hash","_proposer":"address"}},"redeem(bytes32,address)":{"details":"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.","params":{"_beneficiary":"- the beneficiary address","_proposalId":"the ID of the proposal"},"return":"rewards - [0] stakerTokenReward [1] voterReputationReward [2] proposerReputationReward"},"redeemDaoBounty(bytes32,address)":{"details":"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.","params":{"_beneficiary":"- the beneficiary address","_proposalId":"the ID of the proposal"},"return":"redeemedAmount - redeem token amountpotentialAmount - potential redeem token amount(if there is enough tokens bounty at the organization )"},"setParameters(uint256[11],address)":{"details":"hash the parameters, save them if necessary, and return the hash value","params":{"_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","_voteOnBehalf":"- authorized to vote on behalf of others."}},"shouldBoost(bytes32)":{"details":"shouldBoost check if a proposal should be shifted to boosted phase.","params":{"_proposalId":"the ID of the proposal"},"return":"bool true or false."},"threshold(bytes32,bytes32)":{"details":"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.","params":{"_organizationId":"the organization identifier","_paramsHash":"the organization parameters hash"},"return":"uint256 organization's score threshold as real number."},"voteStatus(bytes32,uint256)":{"details":"voteStatus returns the reputation voted for a proposal for a specific voting choice.","params":{"_choice":"the index in the","_proposalId":"the ID of the proposal"},"return":"voted reputation for the given choice"}},"title":"GenesisProtocol implementation -an organization's voting machine scheme."}}