要求投票使您可以解锁您通过使用此投票的胸部阻止的 ETI。根据提案结果,您还将获得 ETI 奖励或被削减。
要求投票没有截止日期,在您要求投票之前,您用于对该提案进行投票的 Bosoms 数量将被锁定且无法取回。
如果您从投票中获得奖励,则当您要求投票时,您将立即获得 ETI 奖励。您可以取消质押的 ETI 的最大数量是增加的,实际上,您用于对提案进行投票的胸怀会从您的地址锁定的 ETI 数量中移除。
当您对一项提案进行投票时,它会锁定 ETI。这意味着一旦您持有的股份的持续时间结束,如果您的投票数量大于您的股份,您将无法取回您的 ETI。
为此,您必须通过认领您的选票来解锁被您的选票阻止的 ETI。
然后将显示在您的元掩码上连接的当前帐户的所有股份。
如果质押可用于索取(意味着质押期限已过),它将显示一个索取质押按钮。 如果您的质押期限尚未完成
,您可以索取股份,前提是它的金额不高于您地址的投票系统中阻止的 ETI(投票系统中阻止的 ETI 金额显示在页面的左上角)
在质押期限结束之前,您无法申领质押,并且您的 ETI 将保持锁定状态。
如何进行 Stake 快照
先决条件:没有先决条件,你只需要至少有一个股份。
为什么要拍?
如果您在投票系统上阻止了 ETI,那么抢购股份可能会很有用。
例如,假设您总共有 100 个 eti,在这 100 个 eti 中,有 65 个 eti 在投票系统中被阻止(这意味着它们被用来对提案进行投票或提交提案)。
如果您要申领的股份超过 35 eti (100 eti – 65 eti),那么即使其持续时间已满,您也无法申领。
为了能够申领应申领的 35 个 ETI,您可以将您的股份分成 2 份股份。例如,如果您想要认领的股份有 90 个 eti,您可以快速获得 35 个 eti。然后您将拥有 2 个赌注,一个 35 eti,另一个是 55 eti (90 eti – 35 eti)
现在您可以索取 35 ETI 的赌注,一旦您解锁了被阻止的 65 eti,另一个将可以索取投票系统通过揭示锁定这些 ETI 的选票
./build/bin/geth attach
If it doesn't work, type:./build/bin/geth attach http://127.0.0.1:8545(replace http://127.0.0.1:8545 by the rpc url of your node if different)
var abi =[{"constant":true,"inputs":[],"name":"PERIOD_EDITOR_REWARD_RATIO","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"supply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"tokens","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"PROPOSERS_INCREASER","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"diseasesbyIds","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastRewardEthBlockNumber","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getMiningDifficulty","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"nonce","type":"uint256"},{"name":"challenge_digest","type":"bytes32"}],"name":"mint","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"IntervalsPeriodsCounter","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"accessibleSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"tokens","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balances","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"STAKING_DURATION","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"chunksCounter","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getMiningTarget","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"proposals","outputs":[{"name":"id","type":"uint256"},{"name":"proposed_release_hash","type":"bytes32"},{"name":"disease_id","type":"bytes32"},{"name":"period_id","type":"uint256"},{"name":"chunk_id","type":"uint256"},{"name":"proposer","type":"address"},{"name":"title","type":"string"},{"name":"description","type":"string"},{"name":"freefield","type":"string"},{"name":"raw_release_hash","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"proposalsbyIndex","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DISEASE_CREATION_AMOUNT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DEFAULT_VOTING_TIME","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LAST_PERIOD_COST_UPDATE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DEFAULT_REVEALING_TIME","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"APPROVAL_THRESHOLD","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_totalMiningSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"uint256"}],"name":"diseasechunks","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"diseases","outputs":[{"name":"disease_hash","type":"bytes32"},{"name":"name","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getMiningReward","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"propsdatas","outputs":[{"name":"starttime","type":"uint256"},{"name":"endtime","type":"uint256"},{"name":"finalized_time","type":"uint256"},{"name":"status","type":"uint8"},{"name":"prestatus","type":"uint8"},{"name":"istie","type":"bool"},{"name":"nbvoters","type":"uint256"},{"name":"slashingratio","type":"uint256"},{"name":"forvotes","type":"uint256"},{"name":"againstvotes","type":"uint256"},{"name":"lastcuration_weight","type":"uint256"},{"name":"lasteditor_weight","type":"uint256"},{"name":"approvalthreshold","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getChallengeNumber","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"UNRECOVERABLE_ETI","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"bosoms","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"uint256"}],"name":"stakes","outputs":[{"name":"amount","type":"uint256"},{"name":"endTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"initiatormsg","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"chunks","outputs":[{"name":"id","type":"uint256"},{"name":"diseaseid","type":"bytes32"},{"name":"idx","type":"uint256"},{"name":"title","type":"string"},{"name":"desc","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"REWARD_INTERVAL","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"uint256"}],"name":"diseaseproposals","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokensMinted","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"diseasesCounter","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastRewardTo","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SEVERITY_LEVEL","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenOwner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"bytes32"}],"name":"commits","outputs":[{"name":"amount","type":"uint256"},{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"nonce","type":"uint256"},{"name":"challenge_digest","type":"bytes32"},{"name":"challenge_number","type":"bytes32"},{"name":"testTarget","type":"uint256"}],"name":"checkMintSolution","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"epochCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"diseaseProposalsCounter","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_MAXIMUM_TARGET","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"IntervalsPeriods","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"miningTarget","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"challengeNumber","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"address"}],"name":"votes","outputs":[{"name":"proposal_hash","type":"bytes32"},{"name":"approve","type":"bool"},{"name":"is_editor","type":"bool"},{"name":"amount","type":"uint256"},{"name":"voter","type":"address"},{"name":"timestamp","type":"uint256"},{"name":"is_claimed","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"nonce","type":"uint256"},{"name":"challenge_digest","type":"bytes32"},{"name":"challenge_number","type":"bytes32"}],"name":"getMintDigest","outputs":[{"name":"digesttest","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PROPOSAL_DEFAULT_VOTE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"proposalsCounter","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"tokens","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"PERIOD_CURATION_REWARD_RATIO","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_BLOCKS_PER_READJUSTMENT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"inflationrate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERIODS_PER_THRESHOLD","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"chunkproposals","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"stakesAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"latestDifficultyPeriodStarted","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"blockreward","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PeriodsIssuedCounter","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"periodrewardtemp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"stakesCounters","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"periodsCounter","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_MINIMUM_TARGET","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenOwner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"chunkProposalsCounter","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"diseaseChunksCounter","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PROTOCOL_RATIO_TARGET","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"periods","outputs":[{"name":"id","type":"uint256"},{"name":"interval","type":"uint256"},{"name":"curation_sum","type":"uint256"},{"name":"editor_sum","type":"uint256"},{"name":"reward_for_curation","type":"uint256"},{"name":"reward_for_editor","type":"uint256"},{"name":"forprops","type":"uint256"},{"name":"againstprops","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"PeriodsIssued","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"blockedeticas","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"period_id","type":"uint256"},{"indexed":false,"name":"interval","type":"uint256"}],"name":"CreatedPeriod","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"diseaseindex","type":"uint256"},{"indexed":false,"name":"title","type":"string"}],"name":"NewDisease","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"proposed_release_hash","type":"bytes32"},{"indexed":true,"name":"_proposer","type":"address"},{"indexed":true,"name":"diseasehash","type":"bytes32"},{"indexed":true,"name":"chunkid","type":"uint256"}],"name":"NewProposal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"chunkid","type":"uint256"},{"indexed":true,"name":"diseasehash","type":"bytes32"}],"name":"NewChunk","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"voter","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"proposal_hash","type":"bytes32"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"voter","type":"address"},{"indexed":false,"name":"fee","type":"uint256"},{"indexed":false,"name":"proposal_hash","type":"bytes32"}],"name":"NewFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"voter","type":"address"},{"indexed":false,"name":"duration","type":"uint256"},{"indexed":false,"name":"proposal_hash","type":"bytes32"}],"name":"NewSlash","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_voter","type":"address"},{"indexed":false,"name":"votehash","type":"bytes32"}],"name":"NewCommit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_voter","type":"address"},{"indexed":true,"name":"_proposal","type":"bytes32"}],"name":"NewReveal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"staker","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"NewStake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"staker","type":"address"},{"indexed":false,"name":"stakeamount","type":"uint256"}],"name":"StakeClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"tokenOwner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"blockreward","type":"uint256"},{"indexed":false,"name":"epochCount","type":"uint256"},{"indexed":false,"name":"newChallengeNumber","type":"bytes32"}],"name":"Mint","type":"event"},{"constant":false,"inputs":[{"name":"_staker","type":"address"},{"name":"_amount","type":"uint256"}],"name":"eticatobosoms","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_stakeidx","type":"uint256"}],"name":"stakeclmidx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_endTime","type":"uint256"},{"name":"_min_limit","type":"uint256"},{"name":"_maxidx","type":"uint256"}],"name":"stakescsldt","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_stakeidx","type":"uint256"},{"name":"_snapamount","type":"uint256"}],"name":"stakesnap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_staker","type":"address"}],"name":"stakescount","outputs":[{"name":"slength","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"createdisease","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_diseasehash","type":"bytes32"},{"name":"_title","type":"string"},{"name":"_description","type":"string"},{"name":"raw_release_hash","type":"string"},{"name":"_freefield","type":"string"},{"name":"_chunkid","type":"uint256"}],"name":"propose","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"updatecost","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"},{"name":"_votehash","type":"bytes32"}],"name":"commitvote","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_proposed_release_hash","type":"bytes32"},{"name":"_approved","type":"bool"},{"name":"_vary","type":"string"}],"name":"revealvote","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_proposed_release_hash","type":"bytes32"}],"name":"clmpropbyhash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_diseasehash","type":"bytes32"},{"name":"_title","type":"string"},{"name":"_description","type":"string"}],"name":"createchunk","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"tokenOwner","type":"address"}],"name":"bosomsOf","outputs":[{"name":"_bosoms","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"string"}],"name":"getdiseasehashbyName","outputs":[{"name":"_diseasehash","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"}]
4.粘贴该行并按Enter
5. 加载 Etica 智能合约的地址:
var address =0x34c61EA91bAcdA647269d4e310A86b875c09946f;
6. 加载 Etica 智能合约:
var EticaContract = web3.eth.contract(abi).at("0x34c61EA91bAcdA647269d4e310A86b875c09946f");
EticaContract.stakes('0x2a674CC92dE583590f96135F6259553EaAABeD28',1);// Get 1st stake of address '0x2a674CC92dE583590f96135F6259553EaAABeD28'
EticaContract.stakes('0x2a674CC92dE583590f96135F6259553EaAABeD28',2);// Get 2nd stake of address '0x2a674CC92dE583590f96135F6259553EaAABeD28'
EticaContract.stakes('0x2a674CC92dE583590f96135F6259553EaAABeD28',3);// Get 3rd stake of address '0x2a674CC92dE583590f96135F6259553EaAABeD28'// returns stake if exists:// returned array result correspond to this:// struct Stake{// uint amount; // stake amount in ETI wei (need to divide by 10^18 to get ETI amount)// uint endtime; // timestamp in second of when the stake becomes claimable// }
从地址和提交哈希获取提交:
EticaContract.commits('0x2a674CC92dE583590f96135F6259553EaAABeD28','0xzoiin85suhduih45zuhziuhzhi');// replace 0x2a674CC92dE583590f96135F6259553EaAABeD28 by an address and 0xzoiin85suhduih45zuhziuhzhi with your commit hash// returns commit if exists:// returned array result correspond to this:// struct Commit{// uint amount;// uint timestamp; // epoch time of the vote// }
EticaContract.votes('0x2a979a78e48bba15ec0586eeeb4029dd361ff4b844b00c9ba22a78184c558c23','0x2a674CC92dE583590f96135F6259553EaAABeD28');// Get vote on Proposal '0x2a979a78e48bba15ec0586eeeb4029dd361ff4b844b00c9ba22a78184c558c23' by address '0x2a674CC92dE583590f96135F6259553EaAABeD28'// returns vote if exists:// returned array result correspond to this:// struct Vote{// bytes32 proposal_hash; // proposed_release_hash of proposal// bool approve;// bool is_editor;// uint amount;// address voter; // address of the voter// uint timestamp; // epoch time of the vote// bool is_claimed; // keeps track of whether or not vote has been claimed to avoid double claim on same vote// }
获取当前的采矿挑战编号:
EticaContract.challengeNumber();
获取当前挖矿难度:
EticaContract.getMiningDifficulty();
获取开采的 ETI 区块总数:
EticaContract.epochCount();
获取当前的批准阈值:
EticaContract.APPROVAL_THRESHOLD();// returns current approval threshold in integer format// example: 5030 means 50.30%, 6324 means 60.24% ...
获取 ETI 供应:
web3.fromWei(EticaContract.supply(),'ether');// (Note: Actual ETI circulating supply is less because this shows total ETI ever issued // without taking into account eti burnt by fees, diseases creation ...)
获得曾经开采的总 ETI:
web3.fromWei(EticaContract._totalMiningSupply(),'ether');// (Note: doesn't take into account ETI issued for research rewards ...) // ETI for research rewards are not mined but issued for each new period
EticaContract.getdiseasehashbyName('Malaria');// returns disease's hash if name exists
通过哈希获取疾病指数:
EticaContract.diseasesbyIds('0xf6d8716087544b8fe1a306611913078dd677450d90295497e433503483ffea6e');// returns disease index if hash exists
按指数得病:
EticaContract.diseases(1);
EticaContract.diseases(2);...// returns disease if index exists, the max index is number of diseases// number of diseases can be obtained with diseasesCounter() function above
获取疾病的提案数量:
EticaContract.diseasesProposalsCounter();
得病第n个提案:
EticaContract.diseaseproposals('0xf6d8716087544b8fe1a306611913078dd677450d90295497e433503483ffea6e',1);// Get 1st proposal of disease '0xf6d8716087544b8fe1a306611913078dd677450d90295497e433503483ffea6e'
EticaContract.diseaseproposals('0xf6d8716087544b8fe1a306611913078dd677450d90295497e433503483ffea6e',2);// Get 2nd proposal of disease '0xf6d8716087544b8fe1a306611913078dd677450d90295497e433503483ffea6e'...// returns the proposal's hash if proposal exists, the max index is number of proposals for specified disease// number of proposals can be obtained with diseaseProposalsCounter() function above
获取疾病的块数:
EticaContract.diseasesChunksCounter();
获取疾病的块:
EticaContract.diseasechunks('0xf6d8716087544b8fe1a306611913078dd677450d90295497e433503483ffea6e',1);// Get 1st chunk of disease '0xf6d8716087544b8fe1a306611913078dd677450d90295497e433503483ffea6e'
EticaContract.diseasechunks('0xf6d8716087544b8fe1a306611913078dd677450d90295497e433503483ffea6e',2);// Get 2nd chunk of disease '0xf6d8716087544b8fe1a306611913078dd677450d90295497e433503483ffea6e'...// returns the chunk's ID if chunk exists, the max index is number of chunks for specified disease// number of chunks can be obtained with diseaseChunksCounter() function above
获取块数:
EticaContract.chunksCounter();
按索引获取块:
EticaContract.chunks(1);
EticaContract.chunks(2);...// returns chunk if index exists, the max index is number of chunks// result array conrrespond to this:// struct Chunk{// uint id;// bytes32 diseaseid; // hash of the disease// uint idx;// string title;// string desc;// }// number of chunks can be obtained with chunksCounter() function above
通过索引获取块的提案:( 为块提交的提案)
EticaContract.chunkproposals(1,1);// get 1st chunk's 1st proposal// EticaContract.chunkproposals(1,2); // get 1st chunk's 2nd proposal// EticaContract.chunkproposals(2,1); // get 2nd chunk's 1st proposal...// returns proposal hash
获取区块的提案数量:( 为区块提交的提案数量)
EticaContract.chunkProposalsCounter(1);// get chunk number of (1 is chunk_id)
EticaContract.chunkProposalsCounter(2);// get chunk number of proposals (2 is chunk_id)...// returns chunk number of proposals
获取提案数量:
EticaContract.proposalsCounter();
按索引获取提案哈希:
EticaContract.proposalsbyIndex(1);
EticaContract.proposalsbyIndex(2);...// returns proposal's hash if index exists, the max index is number of proposals// number of proposals can be obtained with proposalsCounter() function above
通过哈希获取提案:
EticaContract.proposals('0x2a979a78e48bba15ec0586eeeb4029dd361ff4b844b00c9ba22a78184c558c23');
EticaContract.proposals('0xc2328b05d5833bbf24ecbabb6b6ad203560e4809de79cfd24b98ca7775207f4c');...// returns proposal if hash exists (hash can be obtained with proposalsbyIndex() function above)// result array conrrespond to this://struct Proposal{// uint id;// bytes32 proposed_release_hash; // Hash of "raw_release_hash + name of Disease"// bytes32 disease_id;// uint period_id;// uint chunk_id;// address proposer; // address of the proposer// string title; // Title of the Proposal// string description; // Description of the Proposal// string freefield;// string raw_release_hash;// }
通过 Hash 获取提案数据:
EticaContract.propsdatas('0x2a979a78e48bba15ec0586eeeb4029dd361ff4b844b00c9ba22a78184c558c23');
EticaContract.propsdatas('0xc2328b05d5833bbf24ecbabb6b6ad203560e4809de79cfd24b98ca7775207f4c');...// returns proposal if hash exists (hash can be obtained with proposalsbyIndex() function above)// result array conrrespond to this:// struct ProposalData{// uint starttime; // epoch time of the proposal// uint endtime; // voting limite// uint finalized_time; // when first clmpropbyhash() was called// ProposalStatus status; // Only updates once, when the voting process is over// ProposalStatus prestatus; // Updates During voting process// bool istie; // will be initialized with value 0. if prop is tie it won't slash nor reward participants// uint nbvoters;// uint slashingratio; // solidity does not support float type. So will emulate float type by using uint// uint forvotes;// uint againstvotes;// uint lastcuration_weight; // period curation weight of proposal// uint lasteditor_weight; // period editor weight of proposal// uint approvalthreshold; // proposal approvalthreshold// }
获取周期数(至少有一个提案的周数):
EticaContract.periodsCounter();
从其索引中获取期间:
EticaContract.periods(1);
EticaContract.periods(2);...// returns period if index exists, the max index is number of periods// result array conrrespond to this:// struct Period{// uint id;// uint interval;// uint curation_sum; // used for proposals weight system// uint editor_sum; // used for proposals weight system// uint reward_for_curation; // total ETI issued to be used as Period reward for Curation// uint reward_for_editor; // total ETI issued to be used as Period reward for Editor// uint forprops; // number of accepted proposals in this period// uint againstprops; // number of rejected proposals in this period// }// number of periods can be obtained with periodsCounter() function above
EticaContract.propose('diseasehashhere','Proposal title','Proposal description','IPFS hash here','Freefield add additional info here',0,{from:'0x2a674CC92dE583590f96135F6259553EaAABeD28', gas:1000000})
b) 为特定块向疾病提交提案:
验证您的块 id 对应于正确的块:
EticaContract.chunks(1)// replace 1 by your chunk id// results correspond to this://struct Chunk{// uint id; // id of the chunk at protocol level// bytes32 diseaseid; // hash of the disease// uint idx; // index of the chunk within the disease. For instance if the chunk was the 4th chunk added to this disease this index value will be 4// string title;// string desc; // description//}
如果块 ID 是正确的,则使用以下命令创建提案: 替换字段(对于块 ID 替换为数字而不是字符串,例如,如果块 ID 为 1,则替换为 1 而不是“1”)
EticaContract.propose('diseasehashhere','Proposal title','Proposal description','IPFS hash here','Freefield add additional info here',chunkid,{from:'0x2a674CC92dE583590f96135F6259553EaAABeD28', gas:1000000})
此命令将为提交哈希 ‘0x524e9b9941ea6bfb289ec7d0f90c4b744906d579d982134b40a1e6c52fd42a81’ 进行价值 1.18 ETI 的投票提交:
EticaContract.commitvote(web3.toWei('1.18','ether'),'0x524e9b9941ea6bfb289ec7d0f90c4b744906d579d982134b40a1e6c52fd42a81',{from:'0x2a674CC92dE583590f96135F6259553EaAABeD28', gas:200000})// note you can increase your commits. To increase just make a new commit to same hash
EticaContract.stakeclmidx(1,{from:'0x2a674CC92dE583590f96135F6259553EaAABeD28', gas:200000})// this command claims your stake whose index is 1
EticaContract.stakeclmidx(2,{from:'0x2a674CC92dE583590f96135F6259553EaAABeD28', gas:200000})// this command claims your stake whose index is 2
股权整合
先决条件:你需要在你的地址上有几个股份。
此命令合并权益(减少权益总数):
EticaContract.stakescsldt(_endTime, _min_limit, _maxidx,{from:'0x2a674CC92dE583590f96135F6259553EaAABeD28', gas:200000})// this command cconsolidate your stakes
股权快照
先决条件:没有先决条件,你只需要至少有一个股份。
此命令捕捉桩(将桩分成两个桩):
快照价值 2.07 ETI。如果最初的股份价值 10 ETI,它将把股份分成 2.07 ETI 的股份和另外 7.93 ETI 的股份
EticaContract.stakesnap(1, web3.toWei(2.07,'ether'),{from:'0x2a674CC92dE583590f96135F6259553EaAABeD28', gas:200000})// this command snap a stake// EticaContract.stakesnap(_stakeidx, web3.toWei(_snapamount,'ether'), {from: '0x2a674CC92dE583590f96135F6259553EaAABeD28', gas:200000}) // _stakeidx : The index of the stake you want to snap// _snapamount : The amount of the new stake (must be less than previous )
1. 打开一个 linux 终端
2. 移动到要导入区块链的文件夹
例如,以下命令使您可以创建并移动到文件夹 eticanode:
cd /home/myuser //(this command move to /home/myuser folder, replace /home/myuser by a folder of your computer)
mkdir eticanode //(this command creates a folder eticanode within /home/myuser folder)
cd eticanode //(this command move to folder eticanode)