@gooddollar/goodcontracts
Version:
GoodDollar Contracts
617 lines (616 loc) • 378 kB
JSON
{
"contractName": "VotingMachineCallbacks",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
},
{
"name": "",
"type": "bytes32"
}
],
"name": "proposalsInfo",
"outputs": [
{
"name": "blockNumber",
"type": "uint256"
},
{
"name": "avatar",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_amount",
"type": "uint256"
},
{
"name": "_beneficiary",
"type": "address"
},
{
"name": "_proposalId",
"type": "bytes32"
}
],
"name": "mintReputation",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_amount",
"type": "uint256"
},
{
"name": "_beneficiary",
"type": "address"
},
{
"name": "_proposalId",
"type": "bytes32"
}
],
"name": "burnReputation",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_stakingToken",
"type": "address"
},
{
"name": "_beneficiary",
"type": "address"
},
{
"name": "_amount",
"type": "uint256"
},
{
"name": "_proposalId",
"type": "bytes32"
}
],
"name": "stakingTokenTransfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_stakingToken",
"type": "address"
},
{
"name": "_proposalId",
"type": "bytes32"
}
],
"name": "balanceOfStakingToken",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_proposalId",
"type": "bytes32"
}
],
"name": "getTotalReputationSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_proposalId",
"type": "bytes32"
}
],
"name": "reputationOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"proposalsInfo\",\"outputs\":[{\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"name\":\"avatar\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_stakingToken\",\"type\":\"address\"},{\"name\":\"_proposalId\",\"type\":\"bytes32\"}],\"name\":\"balanceOfStakingToken\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_proposalId\",\"type\":\"bytes32\"}],\"name\":\"reputationOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_proposalId\",\"type\":\"bytes32\"}],\"name\":\"getTotalReputationSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_stakingToken\",\"type\":\"address\"},{\"name\":\"_beneficiary\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_proposalId\",\"type\":\"bytes32\"}],\"name\":\"stakingTokenTransfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_beneficiary\",\"type\":\"address\"},{\"name\":\"_proposalId\",\"type\":\"bytes32\"}],\"name\":\"mintReputation\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_beneficiary\",\"type\":\"address\"},{\"name\":\"_proposalId\",\"type\":\"bytes32\"}],\"name\":\"burnReputation\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@daostack/arc/contracts/votingMachines/VotingMachineCallbacks.sol\":\"VotingMachineCallbacks\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@daostack/arc/contracts/controller/Avatar.sol\":{\"keccak256\":\"0x4e4fb9d3bc21f42fbfc6a01e9f8aa483a59e9f447b0d604f55b587a81ec09ef4\",\"urls\":[\"bzzr://b0af60e651a75274a028dc4b53d06091a46ca0efa3bfb4153879e76cf86a49dc\"]},\"@daostack/arc/contracts/controller/ControllerInterface.sol\":{\"keccak256\":\"0x933e92612c90f292c7b59908958b003f1a13d90b97bed0572b566353c20974dc\",\"urls\":[\"bzzr://e8050774c20b9b22636b47cdd353eaf5df72e0bca8f2b8569365be30f4eaef0c\"]},\"@daostack/arc/contracts/controller/DAOToken.sol\":{\"keccak256\":\"0x9b213e4e3ceeffcfc1c962a43b70b8d763d8091a2dd713fc1989b97bb68786e6\",\"urls\":[\"bzzr://7ba306fdbad344e01474e3ae9c37b27b64efdc1cb17ffc0f3ec1c4427fde359d\"]},\"@daostack/arc/contracts/globalConstraints/GlobalConstraintInterface.sol\":{\"keccak256\":\"0xc006c4591ec10b845a56e13f6791db2c428610953034686d52b2a934b6c8f36f\",\"urls\":[\"bzzr://d1f293a0bbaa292296a83977cb36a14048db404a32e3f6aa9bd79ea61ac3c4c3\"]},\"@daostack/arc/contracts/libs/SafeERC20.sol\":{\"keccak256\":\"0xf6727d432f67046145b078f40c1cc4f6be7b0d12a6678ecaf457edf7550d244c\",\"urls\":[\"bzzr://cd706a2dc7540d093b591a280b464256c596ddad598b68886e6db2e7958f9916\"]},\"@daostack/arc/contracts/universalSchemes/UniversalScheme.sol\":{\"keccak256\":\"0xcfdb7d336d21b3b16a31125d3bd8c88f7c4c944510f4488162247badb6411017\",\"urls\":[\"bzzr://6cd99ec0b19ae06f7845a3ca56d2dc43ec122cfa809969248e6742e0c56076ca\"]},\"@daostack/arc/contracts/universalSchemes/UniversalSchemeInterface.sol\":{\"keccak256\":\"0x956b0dbe20b6aeea74565a9204f72fba1580874d27cd63955f93e9491cabb6b1\",\"urls\":[\"bzzr://29eac5d525cc39129df30c5b8deada4350d40c5261a85ce0b29c12fe80b10b15\"]},\"@daostack/arc/contracts/votingMachines/VotingMachineCallbacks.sol\":{\"keccak256\":\"0x4052c6f57add891f5f6514a7837f54955ac1f3ad4654fa45d864e4aad19864ba\",\"urls\":[\"bzzr://b013e9ee810bf43f6de254cc61dceb59a9cf102d795d4abc527c2989ff5df568\"]},\"@daostack/infra/contracts/Reputation.sol\":{\"keccak256\":\"0x3d226dac0fe7d758f0287fb28bc25fcec1f69d19888ae3a550fa49856d61c482\",\"urls\":[\"bzzr://7f219e1874d4f1aea860cc665b75015797f55f149e9bf490abab5d7ad2adfeb9\"]},\"@daostack/infra/contracts/libs/RealMath.sol\":{\"keccak256\":\"0x3ee79c4b483da327916ac36f9d5cc6a1f2f0363db3ad06793ec67f46e1f653db\",\"urls\":[\"bzzr://548cdb33afa45d2d4bfb0ed3f557257f77c7d9ae142326d04584e20d00c153d3\"]},\"@daostack/infra/contracts/votingMachines/GenesisProtocol.sol\":{\"keccak256\":\"0x0321da6019e0e1a7fc4e1ca484d7d5d376805abb17f9eb9c46a6731e9dfe58dc\",\"urls\":[\"bzzr://4cf93479ffb97b0f90d2974a0404136bfda093edb9e4b6dd3d9737a29202ee63\"]},\"@daostack/infra/contracts/votingMachines/GenesisProtocolLogic.sol\":{\"keccak256\":\"0x2bf5fba64fbda5605b9250ea8ca6d8e28dab41fb0e2b43c9145b91e1d0425eef\",\"urls\":[\"bzzr://bf7d5bb906c1f0f627d028214b0d8d2cbf0f766ead5d7b27f116b834255ffa76\"]},\"@daostack/infra/contracts/votingMachines/IntVoteInterface.sol\":{\"keccak256\":\"0x877991da94b1fe9c2accf69367b32fff474c4e4f7897e9cf5a61fa5d1378908f\",\"urls\":[\"bzzr://a7bb7b3a39a1553cb39378801976c8b192b801f9627098385eca24e62440826b\"]},\"@daostack/infra/contracts/votingMachines/ProposalExecuteInterface.sol\":{\"keccak256\":\"0xb80a153793e1723b35e70ba1c3800975fbc1fae63c989cfb8134a4e58085e181\",\"urls\":[\"bzzr://e5ff7e9f77e596fff366bb31326a7d2ca82d0fdeed1d612c09589eb9fb69d9bf\"]},\"@daostack/infra/contracts/votingMachines/VotingMachineCallbacksInterface.sol\":{\"keccak256\":\"0xec215d305f0aa5a5193b6f0302a1aa6bb84e85460167f80b261faf9d30564563\",\"urls\":[\"bzzr://baae21ef9ee3e315191aece7767d3a9ab62810aff5063ad144cb2120eebdabf0\"]},\"openzeppelin-solidity/contracts/cryptography/ECDSA.sol\":{\"keccak256\":\"0xb48974d92a87053dc1d6c5389f3d1b2ad522dec23afcb508eaa935d98dfdc0b6\",\"urls\":[\"bzzr://e665a84309432c27a26e622665dd97ff29d4d6ad7ad655d6e2c50226a5e99b56\"]},\"openzeppelin-solidity/contracts/math/Math.sol\":{\"keccak256\":\"0x37605dd0606b349cfb1b679892e1bb0ef4ddc16dedb06e229cc4402610a7a848\",\"urls\":[\"bzzr://c2253b0f57a80ee1ab7d90192aec144310e9c9a420d2ca2fcfd5999ae66e8f33\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzzr://41ca38f6b0fa4b77b0feec43e422cfbec48b7eb38a41edf0b85c77e8d9a296b1\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0x980de387a1a020a498f53d00f89fecebb12c949a17e8f160093c0303ede2b786\",\"urls\":[\"bzzr://08894efa2a557982070beda6a81a032407e70532d24bdafe80d39660c74904d9\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xba431353cb4fe70777ac026231eb5468e41aa1e81240a2b8136917acc5fff4dc\",\"urls\":[\"bzzr://80cd02a56e6e33504318124d0d645c82e615cc8a4b5829cc9d82d17635c644c8\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol\":{\"keccak256\":\"0xa3e68fd7f987c8fbdaf4867d428a69a15f3cf2f69709a5b0a0fbef750b0e6fbc\",\"urls\":[\"bzzr://f4ebb7c5b9e429b98b07e2caca6156c13c3724e9b1191cca8423ab8427bc6265\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzzr://48248e86f64407a95f241d6c5c8cfea6b4d4ebf4ebb467e5c98c8af3868fafe4\"]},\"openzeppelin-solidity/contracts/utils/Address.sol\":{\"keccak256\":\"0x5c731061b804fa256fc8c05150eafe5d20b6bb94541a8f187912bf84f7033f34\",\"urls\":[\"bzzr://63fc4af0d7a99a770925b96a6cf48f25fc00d30274266f82db05f30baa238267\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50610b2f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100815760003560e060020a90048063b551c3731161005f578063b551c3731461013d578063bea75f281461015a578063d29b5d2f146101aa578063f81f8bf6146101dc57610081565b806360bdbb3f146100865780636b8eb403146100d35780639588378e14610111575b600080fd5b6100b26004803603604081101561009c57600080fd5b50600160a060020a03813516906020013561020e565b60408051928352600160a060020a0390911660208301528051918290030190f35b6100ff600480360360408110156100e957600080fd5b50600160a060020a038135169060200135610238565b60408051918252519081900360200190f35b6100ff6004803603604081101561012757600080fd5b50600160a060020a0381351690602001356102fd565b6100ff6004803603602081101561015357600080fd5b5035610429565b6101966004803603608081101561017057600080fd5b50600160a060020a03813581169160208101359091169060408101359060600135610581565b604080519115158252519081900360200190f35b610196600480360360608110156101c057600080fd5b50803590600160a060020a036020820135169060400135610768565b610196600480360360608110156101f257600080fd5b50803590600160a060020a036020820135169060400135610946565b600060208181529281526040808220909352908152208054600190910154600160a060020a031682565b33600090815260208181526040808320848452909152812060010154600160a060020a031680151561026e5760009150506102f7565b83600160a060020a03166370a08231826040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a0316815260200191505060206040518083038186803b1580156102c757600080fd5b505afa1580156102db573d6000803e3d6000fd5b505050506040513d60208110156102f157600080fd5b50519150505b92915050565b6000610307610aec565b503360009081526020818152604080832085845282529182902082518084019093528054835260010154600160a060020a031690820181905215156103505760009150506102f7565b8060200151600160a060020a03166389ae1c906040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561039057600080fd5b505afa1580156103a4573d6000803e3d6000fd5b505050506040513d60208110156103ba57600080fd5b50518151604080517f4ee2cd7e000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482019390935290519190921691634ee2cd7e916044808301926020929190829003018186803b1580156102c757600080fd5b6000610433610aec565b503360009081526020818152604080832085845282529182902082518084019093528054835260010154600160a060020a0316908201819052151561047c57600091505061057c565b8060200151600160a060020a03166389ae1c906040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156104bc57600080fd5b505afa1580156104d0573d6000803e3d6000fd5b505050506040513d60208110156104e657600080fd5b50518151604080517f981b24d0000000000000000000000000000000000000000000000000000000008152600481019290925251600160a060020a039092169163981b24d091602480820192602092909190829003018186803b15801561054c57600080fd5b505afa158015610560573d6000803e3d6000fd5b505050506040513d602081101561057657600080fd5b50519150505b919050565b336000908152602081815260408083208484529091528120600101548290600160a060020a0316151561061557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6f6e6c7920566f74696e674d616368696e650000000000000000000000000000604482015290519081900360640190fd5b33600090815260208181526040808320868452909152902060010154600160a060020a031680151561064b57600092505061075f565b80600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561068757600080fd5b505afa15801561069b573d6000803e3d6000fd5b505050506040513d60208110156106b157600080fd5b5051604080517fb9a04cdd000000000000000000000000000000000000000000000000000000008152600160a060020a038a8116600483015289811660248301526044820189905284811660648301529151919092169163b9a04cdd9160848083019260209291908290030181600087803b15801561072f57600080fd5b505af1158015610743573d6000803e3d6000fd5b505050506040513d602081101561075957600080fd5b50519250505b50949350505050565b336000908152602081815260408083208484529091528120600101548290600160a060020a031615156107fc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6f6e6c7920566f74696e674d616368696e650000000000000000000000000000604482015290519081900360640190fd5b33600090815260208181526040808320868452909152902060010154600160a060020a031680151561083257600092505061093e565b80600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d602081101561089857600080fd5b5051604080517feaf994b200000000000000000000000000000000000000000000000000000000815260048101899052600160a060020a03888116602483015284811660448301529151919092169163eaf994b29160648083019260209291908290030181600087803b15801561090e57600080fd5b505af1158015610922573d6000803e3d6000fd5b505050506040513d602081101561093857600080fd5b50519250505b509392505050565b336000908152602081815260408083208484529091528120600101548290600160a060020a031615156109da57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6f6e6c7920566f74696e674d616368696e650000000000000000000000000000604482015290519081900360640190fd5b33600090815260208181526040808320868452909152902060010154600160a060020a0316801515610a1057600092505061093e565b80600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a02815260040160206040518083038186803b158015610a4c57600080fd5b505afa158015610a60573d6000803e3d6000fd5b505050506040513d6020811015610a7657600080fd5b5051604080517f6e94d27800000000000000000000000000000000000000000000000000000000815260048101899052600160a060020a038881166024830152848116604483015291519190921691636e94d2789160648083019260209291908290030181600087803b15801561090e57600080fd5b60408051808201909152600080825260208201529056fea165627a7a72305820e8479c0ea4f6b58577bed54dbefc24dea73fbc8eb73747ab884102dae0b6220d0029",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100815760003560e060020a90048063b551c3731161005f578063b551c3731461013d578063bea75f281461015a578063d29b5d2f146101aa578063f81f8bf6146101dc57610081565b806360bdbb3f146100865780636b8eb403146100d35780639588378e14610111575b600080fd5b6100b26004803603604081101561009c57600080fd5b50600160a060020a03813516906020013561020e565b60408051928352600160a060020a0390911660208301528051918290030190f35b6100ff600480360360408110156100e957600080fd5b50600160a060020a038135169060200135610238565b60408051918252519081900360200190f35b6100ff6004803603604081101561012757600080fd5b50600160a060020a0381351690602001356102fd565b6100ff6004803603602081101561015357600080fd5b5035610429565b6101966004803603608081101561017057600080fd5b50600160a060020a03813581169160208101359091169060408101359060600135610581565b604080519115158252519081900360200190f35b610196600480360360608110156101c057600080fd5b50803590600160a060020a036020820135169060400135610768565b610196600480360360608110156101f257600080fd5b50803590600160a060020a036020820135169060400135610946565b600060208181529281526040808220909352908152208054600190910154600160a060020a031682565b33600090815260208181526040808320848452909152812060010154600160a060020a031680151561026e5760009150506102f7565b83600160a060020a03166370a08231826040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a0316815260200191505060206040518083038186803b1580156102c757600080fd5b505afa1580156102db573d6000803e3d6000fd5b505050506040513d60208110156102f157600080fd5b50519150505b92915050565b6000610307610aec565b503360009081526020818152604080832085845282529182902082518084019093528054835260010154600160a060020a031690820181905215156103505760009150506102f7565b8060200151600160a060020a03166389ae1c906040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561039057600080fd5b505afa1580156103a4573d6000803e3d6000fd5b505050506040513d60208110156103ba57600080fd5b50518151604080517f4ee2cd7e000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482019390935290519190921691634ee2cd7e916044808301926020929190829003018186803b1580156102c757600080fd5b6000610433610aec565b503360009081526020818152604080832085845282529182902082518084019093528054835260010154600160a060020a0316908201819052151561047c57600091505061057c565b8060200151600160a060020a03166389ae1c906040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156104bc57600080fd5b505afa1580156104d0573d6000803e3d6000fd5b505050506040513d60208110156104e657600080fd5b50518151604080517f981b24d0000000000000000000000000000000000000000000000000000000008152600481019290925251600160a060020a039092169163981b24d091602480820192602092909190829003018186803b15801561054c57600080fd5b505afa158015610560573d6000803e3d6000fd5b505050506040513d602081101561057657600080fd5b50519150505b919050565b336000908152602081815260408083208484529091528120600101548290600160a060020a0316151561061557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6f6e6c7920566f74696e674d616368696e650000000000000000000000000000604482015290519081900360640190fd5b33600090815260208181526040808320868452909152902060010154600160a060020a031680151561064b57600092505061075f565b80600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561068757600080fd5b505afa15801561069b573d6000803e3d6000fd5b505050506040513d60208110156106b157600080fd5b5051604080517fb9a04cdd000000000000000000000000000000000000000000000000000000008152600160a060020a038a8116600483015289811660248301526044820189905284811660648301529151919092169163b9a04cdd9160848083019260209291908290030181600087803b15801561072f57600080fd5b505af1158015610743573d6000803e3d6000fd5b505050506040513d602081101561075957600080fd5b50519250505b50949350505050565b336000908152602081815260408083208484529091528120600101548290600160a060020a031615156107fc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6f6e6c7920566f74696e674d616368696e650000000000000000000000000000604482015290519081900360640190fd5b33600090815260208181526040808320868452909152902060010154600160a060020a031680151561083257600092505061093e565b80600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d602081101561089857600080fd5b5051604080517feaf994b200000000000000000000000000000000000000000000000000000000815260048101899052600160a060020a03888116602483015284811660448301529151919092169163eaf994b29160648083019260209291908290030181600087803b15801561090e57600080fd5b505af1158015610922573d6000803e3d6000fd5b505050506040513d602081101561093857600080fd5b50519250505b509392505050565b336000908152602081815260408083208484529091528120600101548290600160a060020a031615156109da57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6f6e6c7920566f74696e674d616368696e650000000000000000000000000000604482015290519081900360640190fd5b33600090815260208181526040808320868452909152902060010154600160a060020a0316801515610a1057600092505061093e565b80600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a02815260040160206040518083038186803b158015610a4c57600080fd5b505afa158015610a60573d6000803e3d6000fd5b505050506040513d6020811015610a7657600080fd5b5051604080517f6e94d27800000000000000000000000000000000000000000000000000000000815260048101899052600160a060020a038881166024830152848116604483015291519190921691636e94d2789160648083019260209291908290030181600087803b15801561090e57600080fd5b60408051808201909152600080825260208201529056fea165627a7a72305820e8479c0ea4f6b58577bed54dbefc24dea73fbc8eb73747ab884102dae0b6220d0029",
"sourceMap": "148:2892:52:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;148:2892:52;;;;;;;",
"deployedSourceMap": "148:2892:52:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;148:2892:52;;;;;;;;-1:-1:-1;;;148:2892:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;598:73;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;598:73:52;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;598:73:52;;;;;;;;;;;;;;;;2000:346;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2000:346:52;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;2693:345;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2693:345:52;;;;;;;;:::i;2352:335::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2352:335:52;;:::i;1510:484::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;1510:484:52;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;678:410;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;678:410:52;;;-1:-1:-1;;;;;678:410:52;;;;;;;;;;:::i;1094:::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1094:410:52;;;-1:-1:-1;;;;;1094:410:52;;;;;;;;;;:::i;598:73::-;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;598:73:52;;:::o;2000:346::-;2145:10;2096:7;2131:25;;;;;;;;;;;:38;;;;;;;;:45;;;-1:-1:-1;;;;;2131:45:52;2190:58;;2186:97;;;2271:1;2264:8;;;;;2186:97;2299:13;-1:-1:-1;;;;;2299:23:52;;2331:6;2299:40;;;;;-1:-1:-1;;;2299:40:52;;;;;;;-1:-1:-1;;;;;2299:40:52;-1:-1:-1;;;;;2299:40:52;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2299:40:52;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2299:40:52;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2299:40:52;;-1:-1:-1;;2000:346:52;;;;;:::o;2693:345::-;2774:7;2793:28;;:::i;:::-;-1:-1:-1;2838:10:52;2824:13;:25;;;;;;;;;;;:38;;;;;;;;;2793:69;;;;;;;;;;;;;;;-1:-1:-1;;;;;2793:69:52;;;;;;;2876:28;2872:67;;;2927:1;2920:8;;;;;2872:67;2955:8;:15;;;-1:-1:-1;;;;;2955:32:52;;:34;;;;;-1:-1:-1;;;2955:34:52;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2955:34:52;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2955:34:52;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2955:34:52;3010:20;;2955:76;;;;;;-1:-1:-1;;;;;2955:76:52;;;;;;;;;;;;;;;;:46;;;;;;;:76;;;;;:34;;:76;;;;;;;:46;:76;;;5:2:-1;;;;30:1;27;20:12;2352:335:52;2429:7;2448:28;;:::i;:::-;-1:-1:-1;2493:10:52;2479:13;:25;;;;;;;;;;;:38;;;;;;;;;2448:69;;;;;;;;;;;;;;;-1:-1:-1;;;;;2448:69:52;;;;;;;2531:28;2527:67;;;2582:1;2575:8;;;;;2527:67;2610:8;:15;;;-1:-1:-1;;;;;2610:32:52;;:34;;;;;-1:-1:-1;;;2610:34:52;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2610:34:52;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2610:34:52;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2610:34:52;2659:20;;2610:70;;;;;;;;;;;;;;-1:-1:-1;;;;;2610:48:52;;;;;;:70;;;;;:34;;:70;;;;;;;;:48;:70;;;5:2:-1;;;;30:1;27;20:12;5:2;2610:70:52;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2610:70:52;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2610:70:52;;-1:-1:-1;;2352:335:52;;;;:::o;1510:484::-;443:10;1715:4;429:25;;;;;;;;;;;:38;;;;;;;;:45;;;1690:11;;-1:-1:-1;;;;;429:45:52;:67;;421:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1765:10;1735:13;1751:25;;;;;;;;;;;:38;;;;;;;;:45;;;-1:-1:-1;;;;;1751:45:52;1810:19;;1806:62;;;1852:5;1845:12;;;;;1806:62;1904:6;-1:-1:-1;;;;;1904:12:52;;:14;;;;;-1:-1:-1;;;1904:14:52;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1904:14:52;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1904:14:52;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1904:14:52;1884:103;;;;;;-1:-1:-1;;;;;1884:103:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:57;;;;;;;:103;;;;;1904:14;;1884:103;;;;;;;-1:-1:-1;1884:57:52;:103;;;5:2:-1;;;;30:1;27;20:12;5:2;1884:103:52;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1884:103:52;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1884:103:52;;-1:-1:-1;;529:1:52;1510:484;;;;;;;:::o;678:410::-;443:10;822:4;429:25;;;;;;;;;;;:38;;;;;;;;:45;;;797:11;;-1:-1:-1;;;;;429:45:52;:67;;421:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;872:10;842:13;858:25;;;;;;;;;;;:38;;;;;;;;:45;;;-1:-1:-1;;;;;858:45:52;917:19;;913:62;;;959:5;952:12;;;;;913:62;1011:6;-1:-1:-1;;;;;1011:12:52;;:14;;;;;-1:-1:-1;;;1011:14:52;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1011:14:52;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1011:14:52;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1011:14:52;991:90;;;;;;;;;;;;-1:-1:-1;;;;;991:90:52;;;;;;;;;;;;;;;;:50;;;;;;;:90;;;;;1011:14;;991:90;;;;;;;-1:-1:-1;991:50:52;:90;;;5:2:-1;;;;30:1;27;20:12;5:2;991:90:52;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;991:90:52;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;991:90:52;;-1:-1:-1;;529:1:52;678:410;;;;;;:::o;1094:::-;443:10;1238:4;429:25;;;;;;;;;;;:38;;;;;;;;:45;;;1213:11;;-1:-1:-1;;;;;429:45:52;:67;;421:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1288:10;1258:13;1274:25;;;;;;;;;;;:38;;;;;;;;:45;;;-1:-1:-1;;;;;1274:45:52;1333:19;;1329:62;;;1375:5;1368:12;;;;;1329:62;1427:6;-1:-1:-1;;;;;1427:12:52;;:14;;;;;-1:-1:-1;;;1427:14:52;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1427:14:52;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1427:14:52;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1427:14:52;1407:90;;;;;;;;;;;;-1:-1:-1;;;;;1407:90:52;;;;;;;;;;;;;;;;:50;;;;;;;:90;;;;;1427:14;;1407:90;;;;;;;-1:-1:-1;1407:50:52;:90;;;5:2:-1;;;;30:1;27;20:12;148:2892:52;;;;;;;;;;-1:-1:-1;148:2892:52;;;;;;;;:::o",
"source": "pragma solidity ^0.5.4;\n\nimport \"../universalSchemes/UniversalScheme.sol\";\nimport \"@daostack/infra/contracts/votingMachines/GenesisProtocol.sol\";\n\n\ncontract VotingMachineCallbacks is VotingMachineCallbacksInterface {\n\n struct ProposalInfo {\n uint256 blockNumber; // the proposal's block number\n Avatar avatar; // the proposal's avatar\n }\n\n modifier onlyVotingMachine(bytes32 _proposalId) {\n require(proposalsInfo[msg.sender][_proposalId].avatar != Avatar(address(0)), \"only VotingMachine\");\n _;\n }\n\n // VotingMaching -> proposalId -> ProposalInfo\n mapping(address => mapping(bytes32 => ProposalInfo)) public proposalsInfo;\n\n function mintReputation(uint256 _amount, address _beneficiary, bytes32 _proposalId)\n external\n onlyVotingMachine(_proposalId)\n returns(bool)\n {\n Avatar avatar = proposalsInfo[msg.sender][_proposalId].avatar;\n if (avatar == Avatar(0)) {\n return false;\n }\n return ControllerInterface(avatar.owner()).mintReputation(_amount, _beneficiary, address(avatar));\n }\n\n function burnReputation(uint256 _amount, address _beneficiary, bytes32 _proposalId)\n external\n onlyVotingMachine(_proposalId)\n returns(bool)\n {\n Avatar avatar = proposalsInfo[msg.sender][_proposalId].avatar;\n if (avatar == Avatar(0)) {\n return false;\n }\n return ControllerInterface(avatar.owner()).burnReputation(_amount, _beneficiary, address(avatar));\n }\n\n function stakingTokenTransfer(\n IERC20 _stakingToken,\n address _beneficiary,\n uint256 _amount,\n bytes32 _proposalId)\n external\n onlyVotingMachine(_proposalId)\n returns(bool)\n {\n Avatar avatar = proposalsInfo[msg.sender][_proposalId].avatar;\n if (avatar == Avatar(0)) {\n return false;\n }\n return ControllerInterface(avatar.owner()).externalTokenTransfer(_stakingToken, _beneficiary, _amount, avatar);\n }\n\n function balanceOfStakingToken(IERC20 _stakingToken, bytes32 _proposalId) external view returns(uint256) {\n Avatar avatar = proposalsInfo[msg.sender][_proposalId].avatar;\n if (proposalsInfo[msg.sender][_proposalId].avatar == Avatar(0)) {\n return 0;\n }\n return _stakingToken.balanceOf(address(avatar));\n }\n\n function getTotalReputationSupply(bytes32 _proposalId) external view returns(uint256) {\n ProposalInfo memory proposal = proposalsInfo[msg.sender][_proposalId];\n if (proposal.avatar == Avatar(0)) {\n return 0;\n }\n return proposal.avatar.nativeReputation().totalSupplyAt(proposal.blockNumber);\n }\n\n function reputationOf(address _owner, bytes32 _proposalId) external view returns(uint256) {\n ProposalInfo memory proposal = proposalsInfo[msg.sender][_proposalId];\n if (proposal.avatar == Avatar(0)) {\n return 0;\n }\n return proposal.avatar.nativeReputation().balanceOfAt(_owner, proposal.blockNumber);\n }\n}\n",
"sourcePath": "@daostack/arc/contracts/votingMachines/VotingMachineCallbacks.sol",
"ast": {
"absolutePath": "@daostack/arc/contracts/votingMachines/VotingMachineCallbacks.sol",
"exportedSymbols": {
"VotingMachineCallbacks": [
10602
]
},
"id": 10603,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 10304,
"literals": [
"solidity",
"^",
"0.5",
".4"
],
"nodeType": "PragmaDirective",
"src": "0:23:52"
},
{
"absolutePath": "@daostack/arc/contracts/universalSchemes/UniversalScheme.sol",
"file": "../universalSchemes/UniversalScheme.sol",
"id": 10305,
"nodeType": "ImportDirective",
"scope": 10603,
"sourceUnit": 9835,
"src": "25:49:52",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@daostack/infra/contracts/votingMachines/GenesisProtocol.sol",
"file": "@daostack/infra/contracts/votingMachines/GenesisProtocol.sol",
"id": 10306,
"nodeType": "ImportDirective",
"scope": 10603,
"sourceUnit": 12479,
"src": "75:70:52",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 10307,
"name": "VotingMachineCallbacksInterface",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 15258,
"src": "183:31:52",
"typeDescriptions": {
"typeIdentifier": "t_contract$_VotingMachineCallbacksInterface_$15258",
"typeString": "contract VotingMachineCallbacksInterface"
}
},
"id": 10308,
"nodeType": "InheritanceSpecifier",
"src": "183:31:52"
}
],
"contractDependencies": [
15258
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 10602,
"linearizedBaseContracts": [
10602,
15258
],
"name": "VotingMachineCallbacks",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "VotingMachineCallbacks.ProposalInfo",
"id": 10313,
"members": [
{
"constant": false,
"id": 10310,
"name": "blockNumber",
"nodeType": "VariableDeclaration",
"scope": 10313,
"src": "252:19:52",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10309,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "252:7:52",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 10312,
"name": "avatar",
"nodeType": "VariableDeclaration",
"scope": 10313,
"src": "312:13:52",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$7316",
"typeString": "contract Avatar"
},
"typeName": {
"contractScope": null,
"id": 10311,
"name": "Avatar",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 7316,
"src": "312:6:52",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$7316",
"typeString": "contract Avatar"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "ProposalInfo",
"nodeType": "StructDefinition",
"scope": 10602,
"src": "222:135:52",
"visibility": "public"
},
{
"body": {
"id": 10335,
"nodeType": "Block",
"src": "411:126:52",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_contract$_Avatar_$7316",
"typeString": "contract Avatar"
},
"id": 10330,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 10318,
"name": "proposalsInfo",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10342,
"src": "429:13:52",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_bytes32_$_t_struct$_ProposalInfo_$10313_storage_$_$",
"typeString": "mapping(address => mapping(bytes32 => struct VotingMachineCallbacks.ProposalInfo storage ref))"
}
},
"id": 10321,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 10319,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 16782,
"src": "443:3:52",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 10320,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "443:10:52",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "429:25:52",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_ProposalInfo_$10313_storage_$",
"typeString": "mapping(bytes32 => struct VotingMachineCallbacks.ProposalInfo storage ref)"
}
},
"id": 10323,
"indexExpression": {
"argumentTypes": null,
"id": 10322,
"name": "_proposalId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10315,
"src": "455:11:52",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "429:38:52",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ProposalInfo_$10313_storage",
"typeString": "struct VotingMachineCallbacks.ProposalInfo storage ref"
}
},
"id": 10324,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "avatar",
"nodeType": "MemberAccess",
"referencedDeclaration": 10312,
"src": "429:45:52",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$7316",
"typeString": "contract Avatar"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 10327,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "493:1:52",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 10326,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "485:7:52",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 10328,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "485:10:52",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 10325,
"name": "Avatar",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7316,
"src": "478:6:52",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Avatar_$7316_$",
"typeString": "type(contract Avatar)"
}
},
"id": 10329,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "478:18:52",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$7316",
"typeString": "contract Avatar"
}
},
"src": "429:67:52",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6f6e6c7920566f74696e674d616368696e65",
"id": 10331,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "498:20:52",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_d09f602d792b11aff19268ca8644e6115c2e269c3f2202bcaa79f7e4908e11bb",
"typeString": "literal_string \"only VotingMachine\""
},
"value": "only VotingMachine"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_d09f602d792b11aff19268ca8644e6115c2e269c3f2202bcaa79f7e4908e11bb",
"typeString": "literal_string \"only VotingMachine\""
}
],
"id": 10317,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
16785,
16786
],
"referencedDeclaration": 16786,
"src": "421:7:52",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 10332,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "421:98:52",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 10333,
"nodeType": "ExpressionStatement",
"src": "421:98:52"
},
{
"id": 10334,
"nodeType": "PlaceholderStatement",