UNPKG

arc_dx

Version:

A platform for building DAOs

1,062 lines 307 kB
{ "contractName": "GenesisProtocolCallbacksMock", "abi": [ { "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "stakingToken", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "reputation", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "name": "_reputation", "type": "address" }, { "name": "_stakingToken", "type": "address" }, { "name": "_genesisProtocol", "type": "address" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "_proposalId", "type": "bytes32" }, { "indexed": true, "name": "_organization", "type": "address" }, { "indexed": false, "name": "_numOfChoices", "type": "uint256" }, { "indexed": false, "name": "_proposer", "type": "address" }, { "indexed": false, "name": "_paramsHash", "type": "bytes32" } ], "name": "NewProposal", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "previousOwner", "type": "address" } ], "name": "OwnershipRenounced", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "previousOwner", "type": "address" }, { "indexed": true, "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "_msg", "type": "address" } ], "name": "LogAddress", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "_msg", "type": "int256" } ], "name": "LogInt", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "_msg", "type": "string" } ], "name": "LogString", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "_msg", "type": "uint256" } ], "name": "LogUint", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "_msg", "type": "bytes" } ], "name": "LogBytes", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "_msg", "type": "bytes32" } ], "name": "LogBytes32", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "_msg", "type": "bool" } ], "name": "LogBool", "type": "event" }, { "constant": true, "inputs": [ { "name": "_proposalId", "type": "bytes32" } ], "name": "getTotalReputationSupply", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_amount", "type": "uint256" }, { "name": "_beneficiary", "type": "address" }, { "name": "", "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": "", "type": "bytes32" } ], "name": "burnReputation", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "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": false, "inputs": [ { "name": "_stakingToken", "type": "address" }, { "name": "_beneficiary", "type": "address" }, { "name": "_amount", "type": "uint256" }, { "name": "", "type": "bytes32" } ], "name": "stakingTokenTransfer", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "_stakingToken", "type": "address" }, { "name": "", "type": "bytes32" } ], "name": "balanceOfStakingToken", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_params", "type": "uint256[14]" }, { "name": "_voteOnBehalf", "type": "address" } ], "name": "setParameters", "outputs": [ { "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_proposalId", "type": "bytes32" }, { "name": "_decision", "type": "int256" } ], "name": "executeProposal", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_numOfChoices", "type": "uint256" }, { "name": "_paramsHash", "type": "bytes32" }, { "name": "", "type": "address" }, { "name": "_proposer", "type": "address" }, { "name": "_organization", "type": "address" } ], "name": "propose", "outputs": [ { "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_amount", "type": "uint256" }, { "name": "_beneficiary", "type": "address" }, { "name": "", "type": "bytes32" } ], "name": "burnReputationTest", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_proposalId", "type": "bytes32" } ], "name": "setProposal", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b50604051606080610c288339810160409081528151602083015191909201516000805433600160a060020a031991821617909155600180548216600160a060020a038087169190911790915560028054831682861617905560038054909216818416179182905561008a9116640100000000610092810204565b50505061012e565b600054600160a060020a031633146100a957600080fd5b6100bb816401000000006100be810204565b50565b600160a060020a03811615156100d357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600160a060020a031916600160a060020a0392909216919091179055565b610aeb8061013d6000396000f3006080604052600436106100e55763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630905c9f981146100ea578063245d775e1461012f5780636b8eb4031461015357806370a5374814610177578063715018a6146101a357806372f702f3146101ba5780638da5cb5b146101eb5780639588378e146102005780639d4c162d14610224578063abcc9cb91461023f578063b551c37314610266578063bea75f281461027e578063c52164c6146102ab578063d29b5d2f146102c0578063f2fde38b146102e7578063f81f8bf614610308575b600080fd5b3480156100f657600080fd5b5061011d600435602435600160a060020a036044358116906064358116906084351661032f565b60408051918252519081900360200190f35b34801561013b57600080fd5b5061011d6004600160a060020a036101c43516610445565b34801561015f57600080fd5b5061011d600160a060020a03600435166024356104ff565b34801561018357600080fd5b5061018f600435610563565b604080519115158252519081900360200190f35b3480156101af57600080fd5b506101b8610577565b005b3480156101c657600080fd5b506101cf6105e3565b60408051600160a060020a039092168252519081900360200190f35b3480156101f757600080fd5b506101cf6105f2565b34801561020c57600080fd5b5061011d600160a060020a0360043516602435610601565b34801561023057600080fd5b5061018f600435602435610681565b34801561024b57600080fd5b5061018f600435600160a060020a03602435166044356106f3565b34801561027257600080fd5b5061011d600435610799565b34801561028a57600080fd5b5061018f600160a060020a0360043581169060243516604435606435610839565b3480156102b757600080fd5b506101cf610902565b3480156102cc57600080fd5b5061018f600435600160a060020a0360243516604435610911565b3480156102f357600080fd5b506101b8600160a060020a0360043516610998565b34801561031457600080fd5b5061018f600435600160a060020a03602435166044356109bb565b600354604080517f88737b5e0000000000000000000000000000000000000000000000000000000081526004810188905260248101879052600160a060020a03858116604483015284811660648301529151600093849316916388737b5e91608480830192602092919082900301818787803b1580156103ae57600080fd5b505af11580156103c2573d6000803e3d6000fd5b505050506040513d60208110156103d857600080fd5b505160408051898152600160a060020a03871660208201528082018990529051919250309183917f75b4ff136cc5de5957574c797de3334eb1c141271922b825eb071e0487ba2c5c919081900360600190a360008181526004602052604090204390559695505050505050565b6003546040517f245d775e000000000000000000000000000000000000000000000000000000008152600091600160a060020a03169063245d775e908590859060040180836101c080828437820191505082600160a060020a0316600160a060020a0316815260200192505050602060405180830381600087803b1580156104cc57600080fd5b505af11580156104e0573d6000803e3d6000fd5b505050506040513d60208110156104f657600080fd5b50519392505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038516916370a082319160248082019260209290919082900301818787803b1580156104cc57600080fd5b600090815260046020526040812043905590565b600054600160a060020a0316331461058e57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600254600160a060020a031681565b600054600160a060020a031681565b60015460008281526004602081815260408084205481517f4ee2cd7e000000000000000000000000000000000000000000000000000000008152600160a060020a03898116958201959095526024810191909152905193949290921692634ee2cd7e92604480820193929182900301818787803b1580156104cc57600080fd5b6040805183815290516000917e9fd52f05c0ded31d6fb0ee580b923f85e99cf1a5a1da342f25e73c45829c83919081900360200190a16040805183815290517f1aa4309bfd99af8afa7454590e1bdaa5a9b3b63e5baa109ae9afa3ecd0c67f399181900360200190a150600192915050565b600154604080517f9dc29fac000000000000000000000000000000000000000000000000000000008152600160a060020a0385811660048301526024820187905291516000939290921691639dc29fac9160448082019260209290919082900301818787803b15801561076557600080fd5b505af1158015610779573d6000803e3d6000fd5b505050506040513d602081101561078f57600080fd5b5051949350505050565b60015460008281526004602081815260408084205481517f981b24d000000000000000000000000000000000000000000000000000000000815293840152519293600160a060020a03169263981b24d092602480820193929182900301818787803b15801561080757600080fd5b505af115801561081b573d6000803e3d6000fd5b505050506040513d602081101561083157600080fd5b505192915050565b60008054600160a060020a0316331461085157600080fd5b84600160a060020a031663a9059cbb85856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156108cd57600080fd5b505af11580156108e1573d6000803e3d6000fd5b505050506040513d60208110156108f757600080fd5b505195945050505050565b600154600160a060020a031681565b60008054600160a060020a0316331461092957600080fd5b600154604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a03868116600483015260248201889052915191909216916340c10f199160448083019260209291908290030181600087803b15801561076557600080fd5b600054600160a060020a031633146109af57600080fd5b6109b881610a42565b50565b60008054600160a060020a031633146109d357600080fd5b600154604080517f9dc29fac000000000000000000000000000000000000000000000000000000008152600160a060020a0386811660048301526024820188905291519190921691639dc29fac9160448083019260209291908290030181600087803b15801561076557600080fd5b600160a060020a0381161515610a5757600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820593861c28b5353ae5766ffca3bb28cafec0f29dd521ee91b04b272cae1452f920029", "deployedBytecode": "0x6080604052600436106100e55763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630905c9f981146100ea578063245d775e1461012f5780636b8eb4031461015357806370a5374814610177578063715018a6146101a357806372f702f3146101ba5780638da5cb5b146101eb5780639588378e146102005780639d4c162d14610224578063abcc9cb91461023f578063b551c37314610266578063bea75f281461027e578063c52164c6146102ab578063d29b5d2f146102c0578063f2fde38b146102e7578063f81f8bf614610308575b600080fd5b3480156100f657600080fd5b5061011d600435602435600160a060020a036044358116906064358116906084351661032f565b60408051918252519081900360200190f35b34801561013b57600080fd5b5061011d6004600160a060020a036101c43516610445565b34801561015f57600080fd5b5061011d600160a060020a03600435166024356104ff565b34801561018357600080fd5b5061018f600435610563565b604080519115158252519081900360200190f35b3480156101af57600080fd5b506101b8610577565b005b3480156101c657600080fd5b506101cf6105e3565b60408051600160a060020a039092168252519081900360200190f35b3480156101f757600080fd5b506101cf6105f2565b34801561020c57600080fd5b5061011d600160a060020a0360043516602435610601565b34801561023057600080fd5b5061018f600435602435610681565b34801561024b57600080fd5b5061018f600435600160a060020a03602435166044356106f3565b34801561027257600080fd5b5061011d600435610799565b34801561028a57600080fd5b5061018f600160a060020a0360043581169060243516604435606435610839565b3480156102b757600080fd5b506101cf610902565b3480156102cc57600080fd5b5061018f600435600160a060020a0360243516604435610911565b3480156102f357600080fd5b506101b8600160a060020a0360043516610998565b34801561031457600080fd5b5061018f600435600160a060020a03602435166044356109bb565b600354604080517f88737b5e0000000000000000000000000000000000000000000000000000000081526004810188905260248101879052600160a060020a03858116604483015284811660648301529151600093849316916388737b5e91608480830192602092919082900301818787803b1580156103ae57600080fd5b505af11580156103c2573d6000803e3d6000fd5b505050506040513d60208110156103d857600080fd5b505160408051898152600160a060020a03871660208201528082018990529051919250309183917f75b4ff136cc5de5957574c797de3334eb1c141271922b825eb071e0487ba2c5c919081900360600190a360008181526004602052604090204390559695505050505050565b6003546040517f245d775e000000000000000000000000000000000000000000000000000000008152600091600160a060020a03169063245d775e908590859060040180836101c080828437820191505082600160a060020a0316600160a060020a0316815260200192505050602060405180830381600087803b1580156104cc57600080fd5b505af11580156104e0573d6000803e3d6000fd5b505050506040513d60208110156104f657600080fd5b50519392505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038516916370a082319160248082019260209290919082900301818787803b1580156104cc57600080fd5b600090815260046020526040812043905590565b600054600160a060020a0316331461058e57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600254600160a060020a031681565b600054600160a060020a031681565b60015460008281526004602081815260408084205481517f4ee2cd7e000000000000000000000000000000000000000000000000000000008152600160a060020a03898116958201959095526024810191909152905193949290921692634ee2cd7e92604480820193929182900301818787803b1580156104cc57600080fd5b6040805183815290516000917e9fd52f05c0ded31d6fb0ee580b923f85e99cf1a5a1da342f25e73c45829c83919081900360200190a16040805183815290517f1aa4309bfd99af8afa7454590e1bdaa5a9b3b63e5baa109ae9afa3ecd0c67f399181900360200190a150600192915050565b600154604080517f9dc29fac000000000000000000000000000000000000000000000000000000008152600160a060020a0385811660048301526024820187905291516000939290921691639dc29fac9160448082019260209290919082900301818787803b15801561076557600080fd5b505af1158015610779573d6000803e3d6000fd5b505050506040513d602081101561078f57600080fd5b5051949350505050565b60015460008281526004602081815260408084205481517f981b24d000000000000000000000000000000000000000000000000000000000815293840152519293600160a060020a03169263981b24d092602480820193929182900301818787803b15801561080757600080fd5b505af115801561081b573d6000803e3d6000fd5b505050506040513d602081101561083157600080fd5b505192915050565b60008054600160a060020a0316331461085157600080fd5b84600160a060020a031663a9059cbb85856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156108cd57600080fd5b505af11580156108e1573d6000803e3d6000fd5b505050506040513d60208110156108f757600080fd5b505195945050505050565b600154600160a060020a031681565b60008054600160a060020a0316331461092957600080fd5b600154604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a03868116600483015260248201889052915191909216916340c10f199160448083019260209291908290030181600087803b15801561076557600080fd5b600054600160a060020a031633146109af57600080fd5b6109b881610a42565b50565b60008054600160a060020a031633146109d357600080fd5b600154604080517f9dc29fac000000000000000000000000000000000000000000000000000000008152600160a060020a0386811660048301526024820188905291519190921691639dc29fac9160448083019260209291908290030181600087803b15801561076557600080fd5b600160a060020a0381161515610a5757600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820593861c28b5353ae5766ffca3bb28cafec0f29dd521ee91b04b272cae1452f920029", "sourceMap": "311:3079:45:-;;;813:275;8:9:-1;5:2;;;30:1;27;20:12;5:2;813:275:45;;;;;;;;;;;;;;;;;;;;;;;;;567:5:55;:18;;575:10;-1:-1:-1;;;;;;567:18:55;;;;;;;-1:-1:-1;931:24:45;;;;-1:-1:-1;;;;;931:24:45;;;;;;;;;;965:12;:28;;;;;;;;;;1003:15;:34;;;;;;;;;;;;;1047;;1065:15;1047:17;;;;:34;:::i;:::-;813:275;;;311:3079;;1274:103:55;719:5;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;1343:29;1362:9;1343:18;;;;:29;:::i;:::-;1274:103;:::o;1512:171::-;-1:-1:-1;;;;;1582:23:55;;;;1574:32;;;;;;1638:5;;;1617:38;;-1:-1:-1;;;;;1617:38:55;;;;1638:5;;;1617:38;;;1661:5;:17;;-1:-1:-1;;;;;;1661:17:55;-1:-1:-1;;;;;1661:17:55;;;;;;;;;;1512:171::o;311:3079:45:-;;;;;;;", "deployedSourceMap": "311:3079:45:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2570:432;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2570:432:45;;;;;-1:-1:-1;;;;;2570:432:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2212:165;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2212:165:45;;-1:-1:-1;;;;;2212:165:45;;;;;2041;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2041:165:45;-1:-1:-1;;;;;2041:165:45;;;;;;;3256:131;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3256:131:45;;;;;;;;;;;;;;;;;;;;;;;1001:111:55;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1001:111:55;;;;;;464:33:45;;8:9:-1;5:2;;;30:1;27;20:12;5:2;464:33:45;;;;;;;;-1:-1:-1;;;;;464:33:45;;;;;;;;;;;;;;238:20:55;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:55;;;;1636:175:45;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1636:175:45;-1:-1:-1;;;;;1636:175:45;;;;;;;2383:181;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2383:181:45;;;;;;;3083:167;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3083:167:45;;;-1:-1:-1;;;;;3083:167:45;;;;;;;1094:170;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1094:170:45;;;;;1817:218;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1817:218:45;-1:-1:-1;;;;;1817:218:45;;;;;;;;;;;;;;430:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;430:28:45;;;;1270:177;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1270:177:45;;;-1:-1:-1;;;;;1270:177:45;;;;;;;1274:103:55;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1274:103:55;-1:-1:-1;;;;;1274:103:55;;;;;1453:177:45;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1453:177:45;;;-1:-1:-1;;;;;1453:177:45;;;;;;;2570:432;2752:15;;:74;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2752:74:45;;;;;;;;;;;;;;;;2708:7;;;;2752:15;;:23;;:74;;;;;;;;;;;;;;2708:7;2752:15;:74;;;5:2:-1;;;;30:1;27;20:12;5:2;2752:74:45;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2752:74:45;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2752:74:45;2841:68;;;;;;-1:-1:-1;;;;;2841:68:45;;2752:74;2841:68;;;;;;;;;;;2752:74;;-1:-1:-1;2865:4:45;;2752:74;;2841:68;;;;;;;;;;2919:33;;;;:21;:33;;;;;2955:12;2919:48;;:33;2570:432;-1:-1:-1;;;;;;2570:432:45:o;2212:165::-;2318:15;;:52;;;;;2292:7;;-1:-1:-1;;;;;2318:15:45;;:29;;2348:7;;2356:13;;2318:52;;;2348:7;2318:52;;2348:7;2318:52;;;;;;;;-1:-1:-1;;;;;2318:52:45;-1:-1:-1;;;;;2318:52:45;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2318:52:45;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2318:52:45;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2318:52:45;;2212:165;-1:-1:-1;;;2212:165:45:o;2041:::-;2170:29;;;;;;2194:4;2170:29;;;;;;2143:4;;-1:-1:-1;;;;;2170:23:45;;;;;:29;;;;;;;;;;;;;;;2143:4;2170:23;:29;;;5:2:-1;;;;30:1;27;20:12;3256:131:45;3315:4;3331:34;;;:21;:34;;;;;3368:12;3331:49;;3315:4;3256:131::o;1001:111:55:-;719:5;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;1077:5;;;1058:25;;-1:-1:-1;;;;;1077:5:55;;;;1058:25;;;1105:1;1089:18;;-1:-1:-1;;1089:18:55;;;1001:111::o;464:33:45:-;;;-1:-1:-1;;;;;464:33:45;;:::o;238:20:55:-;;;-1:-1:-1;;;;;238:20:55;;:::o;1636:175:45:-;1739:10;;1716:4;1769:34;;;:21;:34;;;;;;;;;1739:65;;;;;-1:-1:-1;;;;;1739:65:45;;;;;;;;;;;;;;;;;;;1716:4;;1739:10;;;;;:22;;:65;;;;;1769:34;1739:65;;;;;;1716:4;1739:10;:65;;;5:2:-1;;;;30:1;27;20:12;2383:181:45;2481:23;;;;;;;;2460:4;;2481:23;;;;;;;;;;2519:17;;;;;;;;;;;;;;;;;-1:-1:-1;2553:4:45;2383:181;;;;:::o;3083:167::-;3206:10;;:37;;;;;;-1:-1:-1;;;;;3206:37:45;;;;;;;;;;;;;;;3179:4;;3206:10;;;;;:15;;:37;;;;;;;;;;;;;;;3179:4;3206:10;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;3206:37:45;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3206:37:45;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3206:37:45;;3083:167;-1:-1:-1;;;;3083:167:45:o;1094:170::-;1197:10;;1171:7;1222:34;;;:21;:34;;;;;;;;;1197:60;;;;;;;;;;1171:7;;-1:-1:-1;;;;;1197:10:45;;:24;;:60;;;;;1222:34;1197:60;;;;;;1171:7;1197:10;:60;;;5:2:-1;;;;30:1;27;20:12;5:2;1197:60:45;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1197:60:45;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1197:60:45;;1094:170;-1:-1:-1;;1094:170:45:o;1817:218::-;1957:4;719:5:55;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;1984:13:45;-1:-1:-1;;;;;1984:22:45;;2007:12;2020:7;1984:44;;;;;;;;;;;;;-1:-1:-1;;;;;1984:44:45;-1:-1:-1;;;;;1984:44:45;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1984:44:45;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1984:44:45;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1984:44:45;;1817:218;-1:-1:-1;;;;;1817:218:45:o;430:28::-;;;-1:-1:-1;;;;;430:28:45;;:::o;1270:177::-;1376:4;719:5:55;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;1403:10:45;;:37;;;;;;-1:-1:-1;;;;;1403:37:45;;;;;;;;;;;;;;;:10;;;;;:15;;:37;;;;;;;;;;;;;;:10;;:37;;;5:2:-1;;;;30:1;27;20:12;1274:103:55;719:5;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;1343:29;1362:9;1343:18;:29::i;:::-;1274:103;:::o;1453:177:45:-;1559:4;719:5:55;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;1586:10:45;;:37;;;;;;-1:-1:-1;;;;;1586:37:45;;;;;;;;;;;;;;;:10;;;;;:15;;:37;;;;;;;;;;;;;;:10;;:37;;;5:2:-1;;;;30:1;27;20:12;1512:171:55;-1:-1:-1;;;;;1582:23:55;;;;1574:32;;;;;;1638:5;;;1617:38;;-1:-1:-1;;;;;1617:38:55;;;;1638:5;;;1617:38;;;1661:5;:17;;-1:-1:-1;;1661:17:55;-1:-1:-1;;;;;1661:17:55;;;;;;;;;;1512:171::o", "source": "pragma solidity ^0.4.25;\n\nimport \"../votingMachines/VotingMachineCallbacksInterface.sol\";\nimport \"../votingMachines/ProposalExecuteInterface.sol\";\nimport \"../votingMachines/GenesisProtocol.sol\";\nimport \"../Reputation.sol\";\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\nimport \"./Debug.sol\";\n\n\ncontract GenesisProtocolCallbacksMock is Debug,VotingMachineCallbacksInterface,ProposalExecuteInterface,Ownable {\n\n Reputation public reputation;\n StandardToken public stakingToken;\n GenesisProtocol genesisProtocol;\n mapping (bytes32=>uint) proposalsBlockNumbers;\n\n\n event NewProposal(\n bytes32 indexed _proposalId,\n address indexed _organization,\n uint _numOfChoices,\n address _proposer,\n bytes32 _paramsHash\n );\n\n /**\n * @dev Constructor\n */\n constructor(Reputation _reputation,StandardToken _stakingToken,GenesisProtocol _genesisProtocol) public\n {\n reputation = _reputation;\n stakingToken = _stakingToken;\n genesisProtocol = _genesisProtocol;\n transferOwnership(genesisProtocol);\n }\n\n function getTotalReputationSupply(bytes32 _proposalId) external view returns(uint256) {\n return reputation.totalSupplyAt(proposalsBlockNumbers[_proposalId]);\n }\n\n function mintReputation(uint _amount,address _beneficiary,bytes32)\n external\n onlyOwner\n returns(bool)\n {\n return reputation.mint(_beneficiary,_amount);\n }\n\n function burnReputation(uint _amount,address _beneficiary,bytes32)\n external\n onlyOwner\n returns(bool)\n {\n return reputation.burn(_beneficiary,_amount);\n }\n\n function reputationOf(address _owner,bytes32 _proposalId) external view returns(uint) {\n return reputation.balanceOfAt(_owner,proposalsBlockNumbers[_proposalId]);\n }\n\n function stakingTokenTransfer(StandardToken _stakingToken,address _beneficiary,uint _amount,bytes32)\n external\n onlyOwner\n returns(bool)\n {\n return _stakingToken.transfer(_beneficiary,_amount);\n }\n\n function balanceOfStakingToken(StandardToken _stakingToken,bytes32)\n external\n view\n returns(uint)\n {\n return _stakingToken.balanceOf(this);\n }\n\n function setParameters(uint[14] _params,address _voteOnBehalf) external returns(bytes32) {\n return genesisProtocol.setParameters(_params,_voteOnBehalf);\n }\n\n function executeProposal(bytes32 _proposalId,int _decision) external returns(bool) {\n emit LogBytes32(_proposalId);\n emit LogInt(_decision);\n return true;\n }\n\n function propose(uint _numOfChoices, bytes32 _paramsHash, address ,address _proposer,address _organization)\n external\n returns\n (bytes32)\n {\n bytes32 proposalId = genesisProtocol.propose(_numOfChoices,_paramsHash,_proposer,_organization);\n emit NewProposal(proposalId, this, _numOfChoices, _proposer, _paramsHash);\n proposalsBlockNumbers[proposalId] = block.number;\n\n return proposalId;\n }\n\n //this function is used only for testing purpose on this mock contract\n function burnReputationTest(uint _amount,address _beneficiary,bytes32)\n external\n returns(bool)\n {\n return reputation.burn(_beneficiary,_amount);\n }\n\n function setProposal(bytes32 _proposalId) external returns(bool) {\n proposalsBlockNumbers[_proposalId] = block.number;\n }\n\n}\n", "sourcePath": "@daostack/infra/contracts/test/GenesisProtocolCallbacksMock.sol", "ast": { "absolutePath": "@daostack/infra/contracts/test/GenesisProtocolCallbacksMock.sol", "exportedSymbols": { "GenesisProtocolCallbacksMock": [ 16379 ] }, "id": 16380, "nodeType": "SourceUnit", "nodes": [ { "id": 16092, "literals": [ "solidity", "^", "0.4", ".25" ], "nodeType": "PragmaDirective", "src": "0:24:45" }, { "absolutePath": "@daostack/infra/contracts/votingMachines/VotingMachineCallbacksInterface.sol", "file": "../votingMachines/VotingMachineCallbacksInterface.sol", "id": 16093, "nodeType": "ImportDirective", "scope": 16380, "sourceUnit": 20589, "src": "26:63:45", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@daostack/infra/contracts/votingMachines/ProposalExecuteInterface.sol", "file": "../votingMachines/ProposalExecuteInterface.sol", "id": 16094, "nodeType": "ImportDirective", "scope": 16380, "sourceUnit": 20387, "src": "90:56:45", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@daostack/infra/contracts/votingMachines/GenesisProtocol.sol", "file": "../votingMachines/GenesisProtocol.sol", "id": 16095, "nodeType": "ImportDirective", "scope": 16380, "sourceUnit": 20209, "src": "147:47:45", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@daostack/infra/contracts/Reputation.sol", "file": "../Reputation.sol", "id": 16096, "nodeType": "ImportDirective", "scope": 16380, "sourceUnit": 13408, "src": "195:27:45", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", "id": 16097, "nodeType": "ImportDirective", "scope": 16380, "sourceUnit": 20878, "src": "223:63:45", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@daostack/infra/contracts/test/Debug.sol", "file": "./Debug.sol", "id": 16098, "nodeType": "ImportDirective", "scope": 16380, "sourceUnit": 16091, "src": "287:21:45", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 16099, "name": "Debug", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 16090, "src": "352:5:45", "typeDescriptions": { "typeIdentifier": "t_contract$_Debug_$16090", "typeString": "contract Debug" } }, "id": 16100, "nodeType": "InheritanceSpecifier", "src": "352:5:45" }, { "arguments": null, "baseName": { "contractScope": null, "id": 16101, "name": "VotingMachineCallbacksInterface", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 20588, "src": "358:31:45", "typeDescriptions": { "typeIdentifier": "t_contract$_VotingMachineCallbacksInterface_$20588", "typeString": "contract VotingMachineCallbacksInterface" } }, "id": 16102, "nodeType": "InheritanceSpecifier", "src": "358:31:45" }, { "arguments": null, "baseName": { "contractScope": null, "id": 16103, "name": "ProposalExecuteInterface", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 20386, "src": "390:24:45", "typeDescriptions": { "typeIdentifier": "t_contract$_ProposalExecuteInterface_$20386", "typeString": "contract ProposalExecuteInterface" } }, "id": 16104, "nodeType": "InheritanceSpecifier", "src": "390:24:45" }, { "arguments": null, "baseName": { "contractScope": null, "id": 16105, "name": "Ownable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 20877, "src": "415:7:45", "typeDescriptions": { "typeIdentifier": "t_contract$_Ownable_$20877", "typeString": "contract Ownable" } }, "id": 16106, "nodeType": "InheritanceSpecifier", "src": "415:7:45" } ], "contractDependencies": [ 16090, 20386, 20588, 20877 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 16379, "linearizedBaseContracts": [ 16379, 20877, 20386, 20588, 16090 ], "name": "GenesisProtocolCallbacksMock", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 16108, "name": "reputation", "nodeType": "VariableDeclaration", "scope": 16379, "src": "430:28:45", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Reputation_$13407", "typeString": "contract Reputation" }, "typeName": { "contractScope": null, "id": 16107, "name": "Reputation", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 13407, "src": "430:10:45", "typeDescriptions": { "typeIdentifier": "t_contract$_Reputation_$13407", "typeString": "contract Reputation" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 16110, "name": "stakingToken", "nodeType": "VariableDeclaration", "scope": 16379, "src": "464:33:45", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardToken_$21534", "typeString": "contract StandardToken" }, "typeName": { "contractScope": null, "id": 16109, "name": "StandardToken", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 21534, "src": "464:13:45", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardToken_$21534", "typeString": "contract StandardToken" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 16112, "name": "genesisProtocol", "nodeType": "VariableDeclaration", "scope": 16379, "src": "503:31:45", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_GenesisProtocol_$20208", "typeString": "contract GenesisProtocol" }, "typeName": { "contractScope": null, "id": 16111, "name": "GenesisProtocol", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 20208, "src": "503:15:45", "typeDescriptions": { "typeIdentifier": "t_contract$_GenesisProtocol_$20208", "typeString": "contract GenesisProtocol" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 16116, "name": "proposalsBlockNumbers", "nodeType": "VariableDeclaration", "scope": 16379, "src": "540:45:45", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", "typeString": "mapping(bytes32 => uint256)" }, "typeName": { "id": 16115, "keyType": { "id": 16113, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "549:7:45", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", "src": "540:23:45", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", "typeString": "mapping(bytes32 => uint256)" }, "valueType": { "id": 16114, "name": "uint", "nodeType": "ElementaryTypeName", "src": "558:4:45", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "internal" }, { "anonymous": false, "documentation": null, "id": 16128, "name": "NewProposal", "nodeType": "EventDefinition", "parameters": { "id": 16127, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 16118, "indexed": true, "name": "_proposalId", "nodeType": "VariableDeclaration", "scope": 16128, "src": "618:27:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 16117, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "618:7:45", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 16120, "indexed": true, "name": "_organization", "nodeType": "VariableDeclaration", "scope": 16128, "src": "653:29:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 16119, "name": "address", "nodeType": "ElementaryTypeName", "src": "653:7:45", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 16122, "indexed": false, "name": "_numOfChoices", "nodeType": "VariableDeclaration", "scope": 16128, "src": "690:18:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 16121, "name": "uint", "nodeType": "ElementaryTypeName", "src": "690:4:45", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 16124, "indexed": false, "name": "_proposer", "nodeType": "VariableDeclaration", "scope": 16128, "src": "716:17:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 16123, "name": "address", "nodeType": "ElementaryTypeName", "src": "716:7:45", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 16126, "indexed": false, "name": "_paramsHash", "nodeType": "VariableDeclaration", "scope": 16128, "src": "741:19:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 16125, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "741:7:45", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "610:156:45" }, "src": "593:174:45" }, { "body": { "id": 16153, "nodeType": "Block", "src": "921:167:45", "statements": [ { "expression": { "argumentTypes": null, "id": 16139, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 16137, "name": "reputation", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16108, "src": "931:10:45", "typeDescriptions": { "typeIdentifier": "t_contract$_Reputation_$13407", "typeString": "contract Reputation" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 16138, "name": "_reputation", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16130, "src": "944:11:45", "typeDescriptions": { "typeIdentifier": "t_contract$_Reputation_$13407", "typeString": "contract Reputation" } }, "src": "931:24:45", "typeDescriptions": { "typeIdentifier": "t_contract$_Reputation_$13407", "typeString": "contract Reputation" } }, "id": 16140, "nodeType": "ExpressionStatement", "src": "931:24:45" }, { "expression": { "argumentTypes": null, "id": 16143, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 16141, "name": "stakingToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16110, "src": "965:12:45", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardToken_$21534", "typeString": "contract StandardToken" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 16142, "name": "_stakingToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16132, "src": "980:13:45", "typeDescriptions": { "typeIde