-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose VotingFor and ClassLocksFor in ConvictionVoting precompile #2220
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
librelois
approved these changes
Apr 12, 2023
crystalin
reviewed
Apr 12, 2023
} | ||
}, | ||
"ewasm": { "wasm": "" }, | ||
"metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"delegatedAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"conviction\",\"type\":\"uint8\"}],\"name\":\"Delegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Undelegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unlocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"VoteRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"VoteRemovedForTrack\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"}],\"name\":\"VoteRemovedOther\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"aye\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nay\",\"type\":\"uint256\"}],\"name\":\"VoteSplit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"aye\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nay\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"abstain\",\"type\":\"uint256\"}],\"name\":\"VoteSplitAbstained\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"aye\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"voteAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"conviction\",\"type\":\"uint8\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"representative\",\"type\":\"address\"},{\"internalType\":\"enum ConvictionVoting.Conviction\",\"name\":\"conviction\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"}],\"name\":\"removeOtherVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"}],\"name\":\"removeVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"}],\"name\":\"removeVoteForTrack\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"}],\"name\":\"undelegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"unlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"voteAmount\",\"type\":\"uint256\"},{\"internalType\":\"enum ConvictionVoting.Conviction\",\"name\":\"conviction\",\"type\":\"uint8\"}],\"name\":\"voteNo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"aye\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nay\",\"type\":\"uint256\"}],\"name\":\"voteSplit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"aye\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstain\",\"type\":\"uint256\"}],\"name\":\"voteSplitAbstain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"voteAmount\",\"type\":\"uint256\"},{\"internalType\":\"enum ConvictionVoting.Conviction\",\"name\":\"conviction\",\"type\":\"uint8\"}],\"name\":\"voteYes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Moonbeam Team\",\"custom:address\":\"0x0000000000000000000000000000000000000812\",\"events\":{\"Delegated(uint16,address,address,uint256,uint8)\":{\"custom:selector\":\"6cc151d547592e227b1e85a264ac3699c6f1014112b08bb3832de1f23b9c66db\",\"details\":\"An account delegated for the given trackId.\",\"params\":{\"conviction\":\"uint8 Conviction being delegated.\",\"delegatedAmount\":\"uint256 Amount being delegated.\",\"from\":\"address Address of the caller.\",\"to\":\"address Address of the representative.\",\"trackId\":\"uint16 The trackId.\"}},\"Undelegated(uint16,address)\":{\"custom:selector\":\"1053303328f6db14014ccced6297bcad2b3897157ce46070711ab995a05dfa14\",\"details\":\"An account undelegated for the given trackId.\",\"params\":{\"caller\":\"address Address of the caller.\",\"trackId\":\"uint16 The trackId.\"}},\"Unlocked(uint16,address)\":{\"custom:selector\":\"dcf72fa65ca7fb720b9ccc8ee28e0188edc3d943115124cdd4086c49f836a128\",\"details\":\"An account called to unlock tokens for the given trackId.\",\"params\":{\"caller\":\"address Address of the caller.\",\"trackId\":\"uint16 The trackId.\"}},\"VoteRemoved(uint32,address)\":{\"custom:selector\":\"49fc1dd929f126e1d88cbb9c135625e30c2deba291adeea4740e446098b9957b\",\"details\":\"An account removed its vote from an ongoing poll.\",\"params\":{\"pollIndex\":\"uint32 Index of the poll.\",\"voter\":\"address Address of the voter.\"}},\"VoteRemovedForTrack(uint32,uint16,address)\":{\"custom:selector\":\"49fc1dd929f126e1d88cbb9c135625e30c2deba291adeea4740e446098b9957b\",\"details\":\"An account removed its vote from an ongoing poll.\",\"params\":{\"pollIndex\":\"uint32 Index of the poll.\",\"trackId\":\"uint32 TrackId of the poll.\",\"voter\":\"address Address of the voter.\"}},\"VoteRemovedOther(uint32,address,address,uint16)\":{\"custom:selector\":\"c1d068675720ab00d0c8792a0cbc7e198c0d2202111f0280f039f2c09c50491b\",\"details\":\"An account removed a vote from a poll.\",\"params\":{\"caller\":\"address Address of the origin caller.\",\"pollIndex\":\"uint32 Index of the poll.\",\"target\":\"address Address of the address which's vote is being removed.\",\"trackId\":\"uint16 The trackId.\"}},\"VoteSplit(uint32,address,uint256,uint256)\":{\"custom:selector\":\"022787093a8aa26fe59d28969068711f73e0e78ae67d9359c71058b6a21f7ef0\",\"details\":\"An account made a split vote in a poll.\",\"params\":{\"aye\":\"uint256 Amount for aye vote.\",\"nay\":\"uint256 Amount for nay vote.\",\"pollIndex\":\"uint32 Index of the poll.\",\"voter\":\"address Address of the voter.\"}},\"VoteSplitAbstained(uint32,address,uint256,uint256,uint256)\":{\"custom:selector\":\"476e687ab5e38fc714552f3acc083d7d83ccaa12ea11dd5f3393478d158c6fd4\",\"details\":\"An account made a split abstain vote in a poll.\",\"params\":{\"abstain\":\"uint256 Amount for abstained.\",\"aye\":\"uint256 Amount for aye vote.\",\"nay\":\"uint256 Amount for nay vote.\",\"pollIndex\":\"uint32 Index of the poll.\",\"voter\":\"address Address of the voter.\"}},\"Voted(uint32,address,bool,uint256,uint8)\":{\"custom:selector\":\"3839f7832b2a6263aa1fd5040f37d10fd4f9e9c4a9ef07ec384cb1cef9fb4c0e\",\"details\":\"An account made a vote in a poll.\",\"params\":{\"aye\":\"bool Is it a vote for or against the poll.\",\"conviction\":\"uint8 Conviction of the vote.\",\"pollIndex\":\"uint32 Index of the poll.\",\"voteAmount\":\"uint256 Amount used to vote.\",\"voter\":\"address Address of the voter.\"}}},\"kind\":\"dev\",\"methods\":{\"delegate(uint16,address,uint8,uint256)\":{\"custom:selector\":\"681750e8\",\"details\":\"Delegate to a representative for the vote trackId\",\"params\":{\"amount\":\"delegated to representative for this vote trackId\",\"conviction\":\"The conviction multiplier\",\"representative\":\"The representative for the trackId\",\"trackId\":\"The trackId\"}},\"removeOtherVote(address,uint16,uint32)\":{\"params\":{\"pollIndex\":\"the poll index\",\"trackId\":\"The trackId\"}},\"removeVote(uint32)\":{\"custom:selector\":\"79cae220\",\"details\":\"Remove vote in poll\",\"params\":{\"pollIndex\":\"Index of the poll\"}},\"removeVoteForTrack(uint32,uint16)\":{\"custom:selector\":\"cc3aee1a\",\"details\":\"Remove vote in poll for track\",\"params\":{\"pollIndex\":\"Index of the poll\",\"trackId\":\"Id of the track\"}},\"undelegate(uint16)\":{\"custom:selector\":\"98be4094\",\"details\":\"Undelegate for the trackId\",\"params\":{\"trackId\":\"The trackId\"}},\"unlock(uint16,address)\":{\"custom:selector\":\"4259d98c\",\"details\":\"Unlock tokens locked for trackId\",\"params\":{\"target\":\"The target address\",\"trackId\":\"The trackId\"}},\"voteNo(uint32,uint256,uint8)\":{\"custom:selector\":\"cc600eba\",\"details\":\"Vote no in a poll.\",\"params\":{\"conviction\":\"Conviction multiplier for length of vote lock\",\"pollIndex\":\"Index of poll\",\"voteAmount\":\"Balance locked for vote\"}},\"voteSplit(uint32,uint256,uint256)\":{\"custom:selector\":\"dd6c52a4\",\"details\":\"Vote split in a poll.\",\"params\":{\"aye\":\"Balance locked for aye vote\",\"nay\":\"Balance locked for nay vote\",\"pollIndex\":\"Index of poll\"}},\"voteSplitAbstain(uint32,uint256,uint256,uint256)\":{\"custom:selector\":\"52004540\",\"details\":\"Vote split abstain in a poll.\",\"params\":{\"abstain\":\"Balance locked for abstain vote (support)\",\"aye\":\"Balance locked for aye vote\",\"nay\":\"Balance locked for nay vote\",\"pollIndex\":\"Index of poll\"}},\"voteYes(uint32,uint256,uint8)\":{\"custom:selector\":\"da9df518\",\"details\":\"Vote yes in a poll.\",\"params\":{\"conviction\":\"Conviction multiplier for length of vote lock\",\"pollIndex\":\"Index of poll\",\"voteAmount\":\"Balance locked for vote\"}}},\"title\":\"Pallet Conviction Voting InterfaceThe interface through which solidity contracts will interact with the Conviction Voting pallet\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"main.sol\":\"ConvictionVoting\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"main.sol\":{\"keccak256\":\"0x792ed63d767cc168bd810adbc54f89958d6cfed6ce92c7adcfea5567c31c8f89\",\"license\":\"GPL-3.0-only\",\"urls\":[\"bzz-raw://26c0a267d2e4516b9f21ea61cb70809a1518eac5e0e40452c16fa98d5779f905\",\"dweb:/ipfs/QmfWBRAAZxwzTSzVhpGxo3oG83tRaHkkqkv5tjGjMU7zk1\"]}},\"version\":1}", | ||
"metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"delegatedAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"conviction\",\"type\":\"uint8\"}],\"name\":\"Delegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Undelegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unlocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"VoteRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"}],\"name\":\"VoteRemovedOther\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"aye\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nay\",\"type\":\"uint256\"}],\"name\":\"VoteSplit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"aye\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nay\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"abstain\",\"type\":\"uint256\"}],\"name\":\"VoteSplitAbstained\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"aye\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"voteAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"conviction\",\"type\":\"uint8\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"classLocksFor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"representative\",\"type\":\"address\"},{\"internalType\":\"enum ConvictionVoting.Conviction\",\"name\":\"conviction\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"}],\"name\":\"removeOtherVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"}],\"name\":\"removeVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"}],\"name\":\"undelegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"unlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"voteAmount\",\"type\":\"uint256\"},{\"internalType\":\"enum ConvictionVoting.Conviction\",\"name\":\"conviction\",\"type\":\"uint8\"}],\"name\":\"voteNo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"aye\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nay\",\"type\":\"uint256\"}],\"name\":\"voteSplit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"aye\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstain\",\"type\":\"uint256\"}],\"name\":\"voteSplitAbstain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"pollIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"voteAmount\",\"type\":\"uint256\"},{\"internalType\":\"enum ConvictionVoting.Conviction\",\"name\":\"conviction\",\"type\":\"uint8\"}],\"name\":\"voteYes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"}],\"name\":\"votingFor\",\"outputs\":[{\"components\":[{\"internalType\":\"uint16\",\"name\":\"trackId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct ConvictionVoting.ClassLock[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Moonbeam Team\",\"custom:address\":\"0x0000000000000000000000000000000000000812\",\"events\":{\"Delegated(uint16,address,address,uint256,uint8)\":{\"custom:selector\":\"6cc151d547592e227b1e85a264ac3699c6f1014112b08bb3832de1f23b9c66db\",\"details\":\"An account delegated for the given trackId.\",\"params\":{\"conviction\":\"uint8 Conviction being delegated.\",\"delegatedAmount\":\"uint256 Amount being delegated.\",\"from\":\"address Address of the caller.\",\"to\":\"address Address of the representative.\",\"trackId\":\"uint16 The trackId.\"}},\"Undelegated(uint16,address)\":{\"custom:selector\":\"1053303328f6db14014ccced6297bcad2b3897157ce46070711ab995a05dfa14\",\"details\":\"An account undelegated for the given trackId.\",\"params\":{\"caller\":\"address Address of the caller.\",\"trackId\":\"uint16 The trackId.\"}},\"Unlocked(uint16,address)\":{\"custom:selector\":\"dcf72fa65ca7fb720b9ccc8ee28e0188edc3d943115124cdd4086c49f836a128\",\"details\":\"An account called to unlock tokens for the given trackId.\",\"params\":{\"caller\":\"address Address of the caller.\",\"trackId\":\"uint16 The trackId.\"}},\"VoteRemoved(uint32,address)\":{\"custom:selector\":\"49fc1dd929f126e1d88cbb9c135625e30c2deba291adeea4740e446098b9957b\",\"details\":\"An account removed its vote from an ongoing poll.\",\"params\":{\"pollIndex\":\"uint32 Index of the poll.\",\"voter\":\"address Address of the voter.\"}},\"VoteRemovedOther(uint32,address,address,uint16)\":{\"custom:selector\":\"c1d068675720ab00d0c8792a0cbc7e198c0d2202111f0280f039f2c09c50491b\",\"details\":\"An account removed a vote from a poll.\",\"params\":{\"caller\":\"address Address of the origin caller.\",\"pollIndex\":\"uint32 Index of the poll.\",\"target\":\"address Address of the address which's vote is being removed.\",\"trackId\":\"uint16 The trackId.\"}},\"VoteSplit(uint32,address,uint256,uint256)\":{\"custom:selector\":\"022787093a8aa26fe59d28969068711f73e0e78ae67d9359c71058b6a21f7ef0\",\"details\":\"An account made a split vote in a poll.\",\"params\":{\"aye\":\"uint256 Amount for aye vote.\",\"nay\":\"uint256 Amount for nay vote.\",\"pollIndex\":\"uint32 Index of the poll.\",\"voter\":\"address Address of the voter.\"}},\"VoteSplitAbstained(uint32,address,uint256,uint256,uint256)\":{\"custom:selector\":\"476e687ab5e38fc714552f3acc083d7d83ccaa12ea11dd5f3393478d158c6fd4\",\"details\":\"An account made a split abstain vote in a poll.\",\"params\":{\"abstain\":\"uint256 Amount for abstained.\",\"aye\":\"uint256 Amount for aye vote.\",\"nay\":\"uint256 Amount for nay vote.\",\"pollIndex\":\"uint32 Index of the poll.\",\"voter\":\"address Address of the voter.\"}},\"Voted(uint32,address,bool,uint256,uint8)\":{\"custom:selector\":\"3839f7832b2a6263aa1fd5040f37d10fd4f9e9c4a9ef07ec384cb1cef9fb4c0e\",\"details\":\"An account made a vote in a poll.\",\"params\":{\"aye\":\"bool Is it a vote for or against the poll.\",\"conviction\":\"uint8 Conviction of the vote.\",\"pollIndex\":\"uint32 Index of the poll.\",\"voteAmount\":\"uint256 Amount used to vote.\",\"voter\":\"address Address of the voter.\"}}},\"kind\":\"dev\",\"methods\":{\"classLocksFor(address)\":{\"custom:selector\":\"7ae8ac92\",\"details\":\"Retrieve class locks for a given account.\",\"params\":{\"who\":\"The requested account\"}},\"delegate(uint16,address,uint8,uint256)\":{\"custom:selector\":\"681750e8\",\"details\":\"Delegate to a representative for the vote trackId\",\"params\":{\"amount\":\"delegated to representative for this vote trackId\",\"conviction\":\"The conviction multiplier\",\"representative\":\"The representative for the trackId\",\"trackId\":\"The trackId\"}},\"removeOtherVote(address,uint16,uint32)\":{\"params\":{\"pollIndex\":\"the poll index\",\"trackId\":\"The trackId\"}},\"removeVote(uint32)\":{\"custom:selector\":\"79cae220\",\"details\":\"Remove vote in poll\",\"params\":{\"pollIndex\":\"Index of the poll\"}},\"undelegate(uint16)\":{\"custom:selector\":\"98be4094\",\"details\":\"Undelegate for the trackId\",\"params\":{\"trackId\":\"The trackId\"}},\"unlock(uint16,address)\":{\"custom:selector\":\"4259d98c\",\"details\":\"Unlock tokens locked for trackId\",\"params\":{\"target\":\"The target address\",\"trackId\":\"The trackId\"}},\"voteNo(uint32,uint256,uint8)\":{\"custom:selector\":\"cc600eba\",\"details\":\"Vote no in a poll.\",\"params\":{\"conviction\":\"Conviction multiplier for length of vote lock\",\"pollIndex\":\"Index of poll\",\"voteAmount\":\"Balance locked for vote\"}},\"voteSplit(uint32,uint256,uint256)\":{\"custom:selector\":\"dd6c52a4\",\"details\":\"Vote split in a poll.\",\"params\":{\"aye\":\"Balance locked for aye vote\",\"nay\":\"Balance locked for nay vote\",\"pollIndex\":\"Index of poll\"}},\"voteSplitAbstain(uint32,uint256,uint256,uint256)\":{\"custom:selector\":\"52004540\",\"details\":\"Vote split abstain in a poll.\",\"params\":{\"abstain\":\"Balance locked for abstain vote (support)\",\"aye\":\"Balance locked for aye vote\",\"nay\":\"Balance locked for nay vote\",\"pollIndex\":\"Index of poll\"}},\"voteYes(uint32,uint256,uint8)\":{\"custom:selector\":\"da9df518\",\"details\":\"Vote yes in a poll.\",\"params\":{\"conviction\":\"Conviction multiplier for length of vote lock\",\"pollIndex\":\"Index of poll\",\"voteAmount\":\"Balance locked for vote\"}},\"votingFor(address,uint16)\":{\"custom:selector\":\"501447ee\",\"details\":\"Retrieve votings for a given account and track.\",\"params\":{\"trackId\":\"The requested track\",\"who\":\"The requested account\"}}},\"title\":\"Pallet Conviction Voting InterfaceThe interface through which solidity contracts will interact with the Conviction Voting pallet\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"main.sol\":\"ConvictionVoting\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"main.sol\":{\"keccak256\":\"0x0d6f117e5e73047989b58590df44bc74dc08576c9a75bbf174d3a1eca0d392ce\",\"license\":\"GPL-3.0-only\",\"urls\":[\"bzz-raw://81142d09769a9d06674d0a4aa7c9f894a3a183aea18d28cf3fa5a166dd0501eb\",\"dweb:/ipfs/QmXZj52xsvJsRmwzAK9MH9rsBAGHtWJ9t1J4oJZiUe5GYu\"]}},\"version\":1}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the same compiler:
rm package-lock.json && npm ci && npm run pre-build-contracts
nanocryk
approved these changes
Apr 12, 2023
crystalin
approved these changes
Apr 12, 2023
imstar15
pushed a commit
to AvaProtocol/moonbeam
that referenced
this pull request
May 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
B7-runtimenoteworthy
Changes should be noted in any runtime-upgrade release notes
D1-audited👍
PR contains changes to fund-managing logic that has been properly reviewed and externally audited
not-breaking
Does not need to be mentioned in breaking changes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does it do?
expose VotingFor and ClassLocksFor data in precompile