evm-tokenvote

Voting machine using ERC20 tokens as votes.
Info | Log | Files | Refs | README

Voter.json (6580B)


      1 [{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_protectSupply","type":"bool"},{"internalType":"address","name":"_voterRegistry","type":"address"},{"internalType":"address","name":"_proposerRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_blockDeadline","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"voteTargetPpm","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_proposalIdx","type":"uint256"}],"name":"ProposalAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_proposalIdx","type":"uint256"},{"indexed":true,"internalType":"bool","name":"_cancelled","type":"bool"},{"indexed":true,"internalType":"bool","name":"_insufficient","type":"bool"},{"indexed":false,"internalType":"uint256","name":"_totalVote","type":"uint256"}],"name":"ProposalCompleted","type":"event"},{"inputs":[{"internalType":"uint256","name":"_proposalIdx","type":"uint256"},{"internalType":"bytes32","name":"_optionDescription","type":"bytes32"}],"name":"addOption","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockWaitLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalize","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrentProposal","outputs":[{"components":[{"internalType":"bytes32","name":"description","type":"bytes32"},{"internalType":"bytes32[]","name":"options","type":"bytes32[]"},{"internalType":"uint256[]","name":"optionVotes","type":"uint256[]"},{"internalType":"uint256","name":"cancelVotes","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"blockDeadline","type":"uint256"},{"internalType":"uint24","name":"targetVotePpm","type":"uint24"},{"internalType":"address","name":"proposer","type":"address"},{"internalType":"uint8","name":"state","type":"uint8"},{"internalType":"uint8","name":"scanCursor","type":"uint8"},{"internalType":"bool","name":"internals","type":"bool"}],"internalType":"struct ERC20Vote.Proposal","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalIdx","type":"uint256"},{"internalType":"uint256","name":"_optionIdx","type":"uint256"}],"name":"getOption","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalIdx","type":"uint256"}],"name":"getProposal","outputs":[{"components":[{"internalType":"bytes32","name":"description","type":"bytes32"},{"internalType":"bytes32[]","name":"options","type":"bytes32[]"},{"internalType":"uint256[]","name":"optionVotes","type":"uint256[]"},{"internalType":"uint256","name":"cancelVotes","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"blockDeadline","type":"uint256"},{"internalType":"uint24","name":"targetVotePpm","type":"uint24"},{"internalType":"address","name":"proposer","type":"address"},{"internalType":"uint8","name":"state","type":"uint8"},{"internalType":"uint8","name":"scanCursor","type":"uint8"},{"internalType":"bool","name":"internals","type":"bool"}],"internalType":"struct ERC20Vote.Proposal","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalIdx","type":"uint256"}],"name":"optionCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_description","type":"bytes32"},{"internalType":"uint256","name":"_blockWait","type":"uint256"},{"internalType":"uint24","name":"_targetVotePpm","type":"uint24"}],"name":"propose","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_description","type":"bytes32"},{"internalType":"bytes32","name":"_option","type":"bytes32"},{"internalType":"uint256","name":"_blockWait","type":"uint256"},{"internalType":"uint24","name":"_targetVotePpm","type":"uint24"}],"name":"proposeInternal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalIndex","type":"uint256"},{"internalType":"uint8","name":"_count","type":"uint8"}],"name":"scan","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"vote","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"voteCancel","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalIdx","type":"uint256"},{"internalType":"uint256","name":"_optionIdx","type":"uint256"}],"name":"voteCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_optionIndex","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"voteOption","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]