UNPKG

@gooddollar/goodcontracts

Version:
523 lines 638 kB
{ "contractName": "Reputation", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "_from", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "Burn", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "_to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "Mint", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "balances", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "totalSupplyHistory", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "mint", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "burn", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "balance", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" }, { "internalType": "uint256", "name": "_blockNumber", "type": "uint256" } ], "name": "balanceOfAt", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_blockNumber", "type": "uint256" } ], "name": "totalSupplyAt", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"balanceOfAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"balances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"totalSupplyAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"totalSupplyHistory\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A DAO has Reputation System which allows peers to rate other peers in order to build trust . A reputation is use to assign influence measure to a DAO'S peers. Reputation is similar to regular tokens but with one crucial difference: It is non-transferable. The Reputation contract maintain a map of address to reputation value. It provides an onlyOwner functions to mint and burn reputation _to (or _from) a specific address.\",\"kind\":\"dev\",\"methods\":{\"balanceOf(address)\":{\"details\":\"return the reputation amount of a given owner\",\"params\":{\"_owner\":\"an address of the owner which we want to get his reputation\"}},\"balanceOfAt(address,uint256)\":{\"details\":\"Queries the balance of `_owner` at a specific `_blockNumber`\",\"params\":{\"_blockNumber\":\"The block number when the balance is queried\",\"_owner\":\"The address from which the balance will be retrieved\"},\"returns\":{\"_0\":\"The balance at `_blockNumber`\"}},\"burn(address,uint256)\":{\"params\":{\"_amount\":\"The quantity of reputation to burn\",\"_user\":\"The address that will lose the reputation\"},\"returns\":{\"_0\":\"True if the reputation are burned correctly\"}},\"initialize(address)\":{\"details\":\"initialize\"},\"mint(address,uint256)\":{\"params\":{\"_amount\":\"The quantity of reputation generated\",\"_user\":\"The address that will be assigned the new reputation\"},\"returns\":{\"_0\":\"True if the reputation are generated correctly\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"totalSupply()\":{\"details\":\"This function makes it easy to get the total number of reputation\",\"returns\":{\"_0\":\"The total number of reputation\"}},\"totalSupplyAt(uint256)\":{\"params\":{\"_blockNumber\":\"The block number when the totalSupply is queried\"},\"returns\":{\"_0\":\"The total amount of reputation at `_blockNumber`\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"stateVariables\":{\"balances\":{\"details\":\"`Checkpoint` is the structure that attaches a block number to a given value, the block number attached is the one that last changed the value\"}},\"title\":\"Reputation system\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"burn(address,uint256)\":{\"notice\":\"Burns `_amount` reputation from `_owner`\"},\"mint(address,uint256)\":{\"notice\":\"Generates `_amount` reputation that are assigned to `_owner`\"},\"totalSupplyAt(uint256)\":{\"notice\":\"Total amount of reputation at a specific `_blockNumber`.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/upgradables/contracts/governance/Reputation.sol\":\"Reputation\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/upgradables/contracts/governance/Reputation.sol\":{\"keccak256\":\"0x88ff030c7d958aeeb17f1f140108becba92e4c9582193a2b778bf68d3a162486\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://1266112062d6447c1e24cbfefba471194ef1e177e1ca0b5e935ed96c45b568bf\",\"dweb:/ipfs/QmbJ5pNb3uXDvftUWZmCgBLi6id81BdjQCcso1kVqZ5nvP\"]},\"@openzeppelin/contracts-upgradeable/GSN/ContextUpgradeable.sol\":{\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://062688aac76e27ab50157a9d645700cf92e3c0d51d3d860be1d2e1a0c04a87d0\",\"dweb:/ipfs/QmfXxppWAiSTeH8YNn2EtMPDgzrLeJ5rjRq8knEbje88mX\"]},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"keccak256\":\"0xe422bf8bc61fe71acb27de4631400cdbb9b532df4de4f255eab093ac356f9745\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7c2e5ed663c9df8fd44b624cfef92a703803cc72cf356c96e69a6e88c5ce082d\",\"dweb:/ipfs/QmdtPLYhopn3L14o6TCJkwH28o91do8JriAxpFYt67NWGB\"]},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"keccak256\":\"0xae7044b7c89ed74327b0979ae6f317c65d87b8d17a42d0c62d698d77d5de5511\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d676c978d8ecee5c4510f045b747d94f3a1381e39feb870d2675d5b6d45a371b\",\"dweb:/ipfs/QmUAokuHWPVAf14QkhPtSdYFyNa8HVje9CBEzwCcxH3xkP\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50610cbd806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063715018a61161008c5780639dc29fac116100665780639dc29fac14610206578063c4d66de814610232578063cbf1304d14610258578063f2fde38b14610284576100cf565b8063715018a6146101bb5780638da5cb5b146101c5578063981b24d0146101e9576100cf565b806318160ddd146100d4578063313ce567146100ee57806340c10f191461010c5780634ee2cd7e1461014c5780636641d9a01461017857806370a0823114610195575b600080fd5b6100dc6102aa565b60408051918252519081900360200190f35b6100f66102ba565b6040805160ff9092168252519081900360200190f35b6101386004803603604081101561012257600080fd5b506001600160a01b0381351690602001356102c3565b604080519115158252519081900360200190f35b6100dc6004803603604081101561016257600080fd5b506001600160a01b038135169060200135610333565b6100dc6004803603602081101561018e57600080fd5b50356103c2565b6100dc600480360360208110156101ab57600080fd5b50356001600160a01b03166103e0565b6101c36103f4565b005b6101cd610496565b604080516001600160a01b039092168252519081900360200190f35b6100dc600480360360208110156101ff57600080fd5b50356104a5565b6101386004803603604081101561021c57600080fd5b506001600160a01b0381351690602001356104f6565b6101c36004803603602081101561024857600080fd5b50356001600160a01b031661055a565b6100dc6004803603604081101561026e57600080fd5b506001600160a01b038135169060200135610618565b6101c36004803603602081101561029a57600080fd5b50356001600160a01b0316610646565b60006102b5436104a5565b905090565b60655460ff1681565b60006102cd61073f565b6033546001600160a01b0390811691161461031d576040805162461bcd60e51b81526020600482018190526024820152600080516020610c68833981519152604482015290519081900360640190fd5b6103278383610743565b50600190505b92915050565b6001600160a01b038216600090815260666020526040812054158061038c57506001600160a01b0383166000908152606660205260408120805484929061037657fe5b90600052602060002001546001600160801b0316115b156103995750600061032d565b6001600160a01b03831660009081526066602052604090206103bb908361086f565b905061032d565b606781815481106103cf57fe5b600091825260209091200154905081565b60006103ec8243610333565b90505b919050565b6103fc61073f565b6033546001600160a01b0390811691161461044c576040805162461bcd60e51b81526020600482018190526024820152600080516020610c68833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b6033546001600160a01b031690565b60675460009015806104d757508160676000815481106104c157fe5b90600052602060002001546001600160801b0316115b156104e4575060006103ef565b6104ef60678361086f565b90506103ef565b600061050061073f565b6033546001600160a01b03908116911614610550576040805162461bcd60e51b81526020600482018190526024820152600080516020610c68833981519152604482015290519081900360640190fd5b610327838361096f565b600054610100900460ff16806105735750610573610a0f565b80610581575060005460ff16155b6105bc5760405162461bcd60e51b815260040180806020018281038252602e815260200180610c3a602e913960400191505060405180910390fd5b600054610100900460ff161580156105e7576000805460ff1961ff0019909116610100171660011790555b6065805460ff191690556105f9610a15565b61060282610646565b8015610614576000805461ff00191690555b5050565b6066602052816000526040600020818154811061063157fe5b90600052602060002001600091509150505481565b61064e61073f565b6033546001600160a01b0390811691161461069e576040805162461bcd60e51b81526020600482018190526024820152600080516020610c68833981519152604482015290519081900360640190fd5b6001600160a01b0381166106e35760405162461bcd60e51b8152600401808060200182810382526026815260200180610c146026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b60008061074e6102aa565b905080838201101561079f576040805162461bcd60e51b8152602060048201526015602482015274746f74616c20737570706c79206f766572666c6f7760581b604482015290519081900360640190fd5b60006107aa856103e0565b90508084820110156107f6576040805162461bcd60e51b815260206004820152601060248201526f62616c616e6365206f766572666c6f7760801b604482015290519081900360640190fd5b6108036067858401610b0f565b6001600160a01b038516600090815260666020526040902061082790828601610b0f565b6040805185815290516001600160a01b038716917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a250919392505050565b81546000908061088357600091505061032d565b600084600183038154811061089457fe5b90600052602060002001549050806001600160801b031684106108bd5760801c915061032d9050565b846000815481106108ca57fe5b90600052602060002001546001600160801b03168410156108f05760009250505061032d565b600060001983015b8181111561094857600060026001838501010490508688828154811061091a57fe5b90600052602060002001546001600160801b03161161093b57809250610942565b6001810391505b506108f8565b608087838154811061095657fe5b9060005260206000200154901c94505050505092915050565b60008061097a6102aa565b9050826000610988866103e0565b905081811015610996578091505b6109a36067838503610b0f565b6001600160a01b03861660009081526066602052604090206109c790838303610b0f565b6040805183815290516001600160a01b038816917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a250949350505050565b303b1590565b600054610100900460ff1680610a2e5750610a2e610a0f565b80610a3c575060005460ff16155b610a775760405162461bcd60e51b815260040180806020018281038252602e815260200180610c3a602e913960400191505060405180910390fd5b600054610100900460ff16158015610aa2576000805460ff1961ff0019909116610100171660011790555b6000610aac61073f565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015610b0c576000805461ff00191690555b50565b80816001600160801b031614610b62576040805162461bcd60e51b815260206004820152601360248201527272657075746174696f6e206f766572666c6f7760681b604482015290519081900360640190fd5b81541580610b9557508154439083906000198101908110610b7f57fe5b90600052602060002001546001600160801b0316105b15610bc35781546001810183556000838152602090206001600160801b034316608084901b17910155610614565b608081901b6001600160801b0383600185805490500381548110610be357fe5b9060005260206000200154161782600184805490500381548110610c0357fe5b600091825260209091200155505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220db337b7b1dd21f685a9203694691b231836631e65c10a0e8492c55a8df5c756064736f6c634300060c0033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063715018a61161008c5780639dc29fac116100665780639dc29fac14610206578063c4d66de814610232578063cbf1304d14610258578063f2fde38b14610284576100cf565b8063715018a6146101bb5780638da5cb5b146101c5578063981b24d0146101e9576100cf565b806318160ddd146100d4578063313ce567146100ee57806340c10f191461010c5780634ee2cd7e1461014c5780636641d9a01461017857806370a0823114610195575b600080fd5b6100dc6102aa565b60408051918252519081900360200190f35b6100f66102ba565b6040805160ff9092168252519081900360200190f35b6101386004803603604081101561012257600080fd5b506001600160a01b0381351690602001356102c3565b604080519115158252519081900360200190f35b6100dc6004803603604081101561016257600080fd5b506001600160a01b038135169060200135610333565b6100dc6004803603602081101561018e57600080fd5b50356103c2565b6100dc600480360360208110156101ab57600080fd5b50356001600160a01b03166103e0565b6101c36103f4565b005b6101cd610496565b604080516001600160a01b039092168252519081900360200190f35b6100dc600480360360208110156101ff57600080fd5b50356104a5565b6101386004803603604081101561021c57600080fd5b506001600160a01b0381351690602001356104f6565b6101c36004803603602081101561024857600080fd5b50356001600160a01b031661055a565b6100dc6004803603604081101561026e57600080fd5b506001600160a01b038135169060200135610618565b6101c36004803603602081101561029a57600080fd5b50356001600160a01b0316610646565b60006102b5436104a5565b905090565b60655460ff1681565b60006102cd61073f565b6033546001600160a01b0390811691161461031d576040805162461bcd60e51b81526020600482018190526024820152600080516020610c68833981519152604482015290519081900360640190fd5b6103278383610743565b50600190505b92915050565b6001600160a01b038216600090815260666020526040812054158061038c57506001600160a01b0383166000908152606660205260408120805484929061037657fe5b90600052602060002001546001600160801b0316115b156103995750600061032d565b6001600160a01b03831660009081526066602052604090206103bb908361086f565b905061032d565b606781815481106103cf57fe5b600091825260209091200154905081565b60006103ec8243610333565b90505b919050565b6103fc61073f565b6033546001600160a01b0390811691161461044c576040805162461bcd60e51b81526020600482018190526024820152600080516020610c68833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b6033546001600160a01b031690565b60675460009015806104d757508160676000815481106104c157fe5b90600052602060002001546001600160801b0316115b156104e4575060006103ef565b6104ef60678361086f565b90506103ef565b600061050061073f565b6033546001600160a01b03908116911614610550576040805162461bcd60e51b81526020600482018190526024820152600080516020610c68833981519152604482015290519081900360640190fd5b610327838361096f565b600054610100900460ff16806105735750610573610a0f565b80610581575060005460ff16155b6105bc5760405162461bcd60e51b815260040180806020018281038252602e815260200180610c3a602e913960400191505060405180910390fd5b600054610100900460ff161580156105e7576000805460ff1961ff0019909116610100171660011790555b6065805460ff191690556105f9610a15565b61060282610646565b8015610614576000805461ff00191690555b5050565b6066602052816000526040600020818154811061063157fe5b90600052602060002001600091509150505481565b61064e61073f565b6033546001600160a01b0390811691161461069e576040805162461bcd60e51b81526020600482018190526024820152600080516020610c68833981519152604482015290519081900360640190fd5b6001600160a01b0381166106e35760405162461bcd60e51b8152600401808060200182810382526026815260200180610c146026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b60008061074e6102aa565b905080838201101561079f576040805162461bcd60e51b8152602060048201526015602482015274746f74616c20737570706c79206f766572666c6f7760581b604482015290519081900360640190fd5b60006107aa856103e0565b90508084820110156107f6576040805162461bcd60e51b815260206004820152601060248201526f62616c616e6365206f766572666c6f7760801b604482015290519081900360640190fd5b6108036067858401610b0f565b6001600160a01b038516600090815260666020526040902061082790828601610b0f565b6040805185815290516001600160a01b038716917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a250919392505050565b81546000908061088357600091505061032d565b600084600183038154811061089457fe5b90600052602060002001549050806001600160801b031684106108bd5760801c915061032d9050565b846000815481106108ca57fe5b90600052602060002001546001600160801b03168410156108f05760009250505061032d565b600060001983015b8181111561094857600060026001838501010490508688828154811061091a57fe5b90600052602060002001546001600160801b03161161093b57809250610942565b6001810391505b506108f8565b608087838154811061095657fe5b9060005260206000200154901c94505050505092915050565b60008061097a6102aa565b9050826000610988866103e0565b905081811015610996578091505b6109a36067838503610b0f565b6001600160a01b03861660009081526066602052604090206109c790838303610b0f565b6040805183815290516001600160a01b038816917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a250949350505050565b303b1590565b600054610100900460ff1680610a2e5750610a2e610a0f565b80610a3c575060005460ff16155b610a775760405162461bcd60e51b815260040180806020018281038252602e815260200180610c3a602e913960400191505060405180910390fd5b600054610100900460ff16158015610aa2576000805460ff1961ff0019909116610100171660011790555b6000610aac61073f565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015610b0c576000805461ff00191690555b50565b80816001600160801b031614610b62576040805162461bcd60e51b815260206004820152601360248201527272657075746174696f6e206f766572666c6f7760681b604482015290519081900360640190fd5b81541580610b9557508154439083906000198101908110610b7f57fe5b90600052602060002001546001600160801b0316105b15610bc35781546001810183556000838152602090206001600160801b034316608084901b17910155610614565b608081901b6001600160801b0383600185805490500381548110610be357fe5b9060005260206000200154161782600184805490500381548110610c0357fe5b600091825260209091200155505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220db337b7b1dd21f685a9203694691b231836631e65c10a0e8492c55a8df5c756064736f6c634300060c0033", "immutableReferences": {}, "sourceMap": "621:6640:5:-:0;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "621:6640:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3863:95;;;:::i;:::-;;;;;;;;;;;;;;;;666:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1986:129;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1986:129:5;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;4565:360;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4565:360:5;;;;;;;;:::i;1685:35::-;;;;;;;;;;;;;;;;-1:-1:-1;1685:35:5;;:::i;4185:121::-;;;;;;;;;;;;;;;;-1:-1:-1;4185:121:5;-1:-1:-1;;;;;4185:121:5;;:::i;1956:145:13:-;;;:::i;:::-;;1333:77;;;:::i;:::-;;;;-1:-1:-1;;;;;1333:77:13;;;;;;;;;;;;;;5134:356:5;;;;;;;;;;;;;;;;-1:-1:-1;5134:356:5;;:::i;2934:129::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2934:129:5;;;;;;;;:::i;3606:134::-;;;;;;;;;;;;;;;;-1:-1:-1;3606:134:5;-1:-1:-1;;;;;3606:134:5;;:::i;1574:45::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1574:45:5;;;;;;;;:::i;2250:240:13:-;;;;;;;;;;;;;;;;-1:-1:-1;2250:240:13;-1:-1:-1;;;;;2250:240:13;;:::i;3863:95:5:-;3907:7;3927:27;3941:12;3927:13;:27::i;:::-;3920:34;;3863:95;:::o;666:21::-;;;;;;:::o;1986:129::-;2064:4;1547:12:13;:10;:12::i;:::-;1537:6;;-1:-1:-1;;;;;1537:6:13;;;:22;;;1529:67;;;;;-1:-1:-1;;;1529:67:13;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1529:67:13;;;;;;;;;;;;;;;2075:21:5::1;2081:5;2088:7;2075:5;:21::i;:::-;;2107:4;2100:11;;1606:1:13;1986:129:5::0;;;;:::o;4565:360::-;-1:-1:-1;;;;;4684:16:5;;4661:7;4684:16;;;:8;:16;;;;;:23;:28;;4683:82;;-1:-1:-1;;;;;;4729:16:5;;;;;;:8;:16;;;;;:19;;4752:12;;4729:16;:19;;;;;;;;;;;;-1:-1:-1;;;;;4721:43:5;;4683:82;4675:247;;;-1:-1:-1;4782:1:5;4775:8;;4675:247;-1:-1:-1;;;;;4886:16:5;;;;;;:8;:16;;;;;4875:42;;4904:12;4875:10;:42::i;:::-;4868:49;;;;1685:35;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1685:35:5;:::o;4185:121::-;4241:15;4269:33;4281:6;4289:12;4269:11;:33::i;:::-;4262:40;;4185:121;;;;:::o;1956:145:13:-;1547:12;:10;:12::i;:::-;1537:6;;-1:-1:-1;;;;;1537:6:13;;;:22;;;1529:67;;;;;-1:-1:-1;;;1529:67:13;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1529:67:13;;;;;;;;;;;;;;;2046:6:::1;::::0;2025:40:::1;::::0;2062:1:::1;::::0;-1:-1:-1;;;;;2046:6:13::1;::::0;2025:40:::1;::::0;2062:1;;2025:40:::1;2075:6;:19:::0;;-1:-1:-1;;;;;;2075:19:13::1;::::0;;1956:145::o;1333:77::-;1397:6;;-1:-1:-1;;;;;1397:6:13;1333:77;:::o;5134:356:5:-;5239:18;:25;5216:7;;5239:30;;5238:86;;;5311:12;5286:18;5305:1;5286:21;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5278:45:5;;5238:86;5230:257;;;-1:-1:-1;5341:1:5;5334:8;;5230:257;5438:44;5449:18;5469:12;5438:10;:44::i;:::-;5431:51;;;;2934:129;3012:4;1547:12:13;:10;:12::i;:::-;1537:6;;-1:-1:-1;;;;;1537:6:13;;;:22;;;1529:67;;;;;-1:-1:-1;;;1529:67:13;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1529:67:13;;;;;;;;;;;;;;;3023:21:5::1;3029:5;3036:7;3023:5;:21::i;3606:134::-:0;1472:13:16;;;;;;;;:33;;;1489:16;:14;:16::i;:::-;1472:50;;;-1:-1:-1;1510:12:16;;;;1509:13;1472:50;1464:109;;;;-1:-1:-1;;;1464:109:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1584:19;1607:13;;;;;;1606:14;1630:98;;;;1664:13;:20;;-1:-1:-1;;;;1664:20:16;;;;;1698:19;1680:4;1698:19;;;1630:98;3665:8:5::1;:12:::0;;-1:-1:-1;;3665:12:5::1;::::0;;3681:26:::1;:24;:26::i;:::-;3711:25;3729:6;3711:17;:25::i;:::-;1754:14:16::0;1750:66;;;1800:5;1784:21;;-1:-1:-1;;1784:21:16;;;1750:66;3606:134:5;;:::o;1574:45::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2250:240:13:-;1547:12;:10;:12::i;:::-;1537:6;;-1:-1:-1;;;;;1537:6:13;;;:22;;;1529:67;;;;;-1:-1:-1;;;1529:67:13;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1529:67:13;;;;;;;;;;;;;;;-1:-1:-1;;;;;2338:22:13;::::1;2330:73;;;;-1:-1:-1::0;;;2330:73:13::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2439:6;::::0;2418:38:::1;::::0;-1:-1:-1;;;;;2418:38:13;;::::1;::::0;2439:6:::1;::::0;2418:38:::1;::::0;2439:6:::1;::::0;2418:38:::1;2466:6;:17:::0;;-1:-1:-1;;;;;;2466:17:13::1;-1:-1:-1::0;;;;;2466:17:13;;;::::1;::::0;;;::::1;::::0;;2250:240::o;828:104:12:-;915:10;828:104;:::o;2118:587:5:-;2197:7;2211:22;2236:13;:11;:13::i;:::-;2211:38;;2293:14;2282:7;2265:14;:24;:42;;2253:86;;;;;-1:-1:-1;;;2253:86:5;;;;;;;;;;;;-1:-1:-1;;;2253:86:5;;;;;;;;;;;;;;;2365:25;2393:16;2403:5;2393:9;:16::i;:::-;2365:44;;2456:17;2445:7;2425:17;:27;:48;;2413:87;;;;;-1:-1:-1;;;2413:87:5;;;;;;;;;;;;-1:-1:-1;;;2413:87:5;;;;;;;;;;;;;;;2526:62;2543:18;2580:7;2563:14;:24;2526:16;:62::i;:::-;-1:-1:-1;;;;;2609:15:5;;;;;;:8;:15;;;;;2592:62;;2626:27;;;2592:16;:62::i;:::-;2663:20;;;;;;;;-1:-1:-1;;;;;2663:20:5;;;;;;;;;;;;;-1:-1:-1;2694:7:5;;2118:587;-1:-1:-1;;;2118:587:5:o;5859:657::-;5983:18;;5955:7;;6009:8;6005:32;;6031:1;6024:8;;;;;6005:32;6075:11;6089;6107:1;6101:3;:7;6089:20;;;;;;;;;;;;;;;;6075:34;;6135:3;-1:-1:-1;;;;;6117:22:5;:6;:22;6113:55;;6160:3;6153:10;;-1:-1:-1;6146:17:5;;-1:-1:-1;6146:17:5;6113:55;6193:11;6205:1;6193:14;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6176:32:5;:6;:32;6172:56;;;6222:1;6215:8;;;;;;6172:56;6277:11;-1:-1:-1;;6310:7:5;;6321:158;6334:3;6328;:9;6321:158;;;6344:11;6376:1;6371;6359:9;;;:13;6358:19;6344:33;;6415:6;6394:11;6406:3;6394:16;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6386:35:5;;6382:93;;6435:3;6429:9;;6382:93;;;6468:1;6462:3;:7;6456:13;;6382:93;6321:158;;;;6509:3;6489:11;6501:3;6489:16;;;;;;;;;;;;;;;;:23;;6482:30;;;;;;5859:657;;;;:::o;3066:507::-;3145:7;3159:22;3184:13;:11;:13::i;:::-;3159:38;-1:-1:-1;3224:7:5;3201:20;3265:16;3275:5;3265:9;:16::i;:::-;3235:46;;3311:12;3289:19;:34;3285:84;;;3345:19;3330:34;;3285:84;3372:67;3389:18;3426:12;3409:14;:29;3372:16;:67::i;:::-;-1:-1:-1;;;;;3460:15:5;;;;;;:8;:15;;;;;3443:69;;3477:34;;;3443:16;:69::i;:::-;3521:25;;;;;;;;-1:-1:-1;;;;;3521:25:5;;;;;;;;;;;;;-1:-1:-1;3557:12:5;3066:507;-1:-1:-1;;;;3066:507:5:o;1912:593:16:-;2348:4;2456:17;2491:7;1912:593;:::o;1065:192:13:-;1472:13:16;;;;;;;;:33;;;1489:16;:14;:16::i;:::-;1472:50;;;-1:-1:-1;1510:12:16;;;;1509:13;1472:50;1464:109;;;;-1:-1:-1;;;1464:109:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1584:19;1607:13;;;;;;1606:14;1630:98;;;;1664:13;:20;;-1:-1:-1;;;;1664:20:16;;;;;1698:19;1680:4;1698:19;;;1630:98;1132:17:13::1;1152:12;:10;:12::i;:::-;1174:6;:18:::0;;-1:-1:-1;;;;;;1174:18:13::1;-1:-1:-1::0;;;;;1174:18:13;::::1;::::0;;::::1;::::0;;;1207:43:::1;::::0;1174:18;;-1:-1:-1;1174:18:13;-1:-1:-1;;1207:43:13::1;::::0;-1:-1:-1;;1207:43:13::1;1738:1:16;1754:14:::0;1750:66;;;1800:5;1784:21;;-1:-1:-1;;1784:21:16;;;1750:66;1065:192:13;:::o;6723:536:5:-;6839:6;6828;-1:-1:-1;;;;;6820:25:5;;6812:57;;;;;-1:-1:-1;;;6812:57:5;;;;;;;;;;;;-1:-1:-1;;;6812:57:5;;;;;;;;;;;;;;;6926:18;;:23;;6925:93;;-1:-1:-1;6978:18:5;;7005:12;;6966:11;;-1:-1:-1;;6978:22:5;;;6966:35;;;;;;;;;;;;;;-1:-1:-1;;;;;6958:59:5;;6925:93;6917:339;;;7028:66;;;;;;;-1:-1:-1;7028:66:5;;;;;;-1:-1:-1;;;;;7061:12:5;7045:30;7089:3;7079:13;;;7045:48;7028:66;;;6917:339;;;7242:3;7232:6;:13;;-1:-1:-1;;;;;7162:11:5;7195:1;7174:11;:18;;;;:22;7162:35;;;;;;;;;;;;;;;;:60;7161:85;7110:11;7143:1;7122:11;:18;;;;:22;7110:35;;;;;;;;;;;;;;;;;:141;6723:536;;:::o", "source": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.6.12;\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * @title Reputation system\n * @dev A DAO has Reputation System which allows peers to rate other peers in order to build trust .\n * A reputation is use to assign influence measure to a DAO'S peers.\n * Reputation is similar to regular tokens but with one crucial difference: It is non-transferable.\n * The Reputation contract maintain a map of address to reputation value.\n * It provides an onlyOwner functions to mint and burn reputation _to (or _from) a specific address.\n */\ncontract Reputation is OwnableUpgradeable {\n\tuint8 public decimals; //Number of decimals of the smallest unit\n\t// Event indicating minting of reputation to an address.\n\tevent Mint(address indexed _to, uint256 _amount);\n\t// Event indicating burning of reputation for an address.\n\tevent Burn(address indexed _from, uint256 _amount);\n\tuint256 private constant ZERO_HALF_256 = 0xffffffffffffffffffffffffffffffff;\n\n\t/// @dev `Checkpoint` is the structure that attaches a block number to a\n\t/// given value, the block number attached is the one that last changed the\n\t/// value\n\t//Checkpoint is uint256 :\n\t// bits 0-127 `fromBlock` is the block number that the value was generated from\n\t// bits 128-255 `value` is the amount of reputation at a specific block number\n\n\t// `balances` is the map that tracks the balance of each address, in this\n\t// contract when the balance changes the block number that the change\n\t// occurred is also included in the map\n\tmapping(address => uint256[]) public balances;\n\n\t// Tracks the history of the `totalSupply` of the reputation\n\tuint256[] public totalSupplyHistory;\n\n\t/// @notice Generates `_amount` reputation that are assigned to `_owner`\n\t/// @param _user The address that will be assigned the new reputation\n\t/// @param _amount The quantity of reputation generated\n\t/// @return True if the reputation are generated correctly\n\tfunction mint(address _user, uint256 _amount)\n\t\tpublic\n\t\tonlyOwner\n\t\treturns (bool)\n\t{\n\t\t_mint(_user, _amount);\n\t\treturn true;\n\t}\n\n\tfunction _mint(address _user, uint256 _amount)\n\t\tinternal\n\t\tvirtual\n\t\treturns (uint256)\n\t{\n\t\tuint256 curTotalSupply = totalSupply();\n\t\trequire(\n\t\t\tcurTotalSupply + _amount >= curTotalSupply,\n\t\t\t\"total supply overflow\"\n\t\t); // Check for overflow\n\t\tuint256 previousBalanceTo = balanceOf(_user);\n\t\trequire(\n\t\t\tpreviousBalanceTo + _amount >= previousBalanceTo,\n\t\t\t\"balance overflow\"\n\t\t); // Check for overflow\n\t\tupdateValueAtNow(totalSupplyHistory, curTotalSupply + _amount);\n\t\tupdateValueAtNow(balances[_user], previousBalanceTo + _amount);\n\t\temit Mint(_user, _amount);\n\t\treturn _amount;\n\t}\n\n\t/// @notice Burns `_amount` reputation from `_owner`\n\t/// @param _user The address that will lose the reputation\n\t/// @param _amount The quantity of reputation to burn\n\t/// @return True if the reputation are burned correctly\n\tfunction burn(address _user, uint256 _amount)\n\t\tpublic\n\t\tonlyOwner\n\t\treturns (bool)\n\t{\n\t\t_burn(_user, _amount);\n\t\treturn true;\n\t}\n\n\tfunction _burn(address _user, uint256 _amount)\n\t\tinternal\n\t\tvirtual\n\t\treturns (uint256)\n\t{\n\t\tuint256 curTotalSupply = totalSupply();\n\t\tuint256 amountBurned = _amount;\n\t\tuint256 previousBalanceFrom = balanceOf(_user);\n\t\tif (previousBalanceFrom < amountBurned) {\n\t\t\tamountBurned = previousBalanceFrom;\n\t\t}\n\t\tupdateValueAtNow(totalSupplyHistory, curTotalSupply - amountBurned);\n\t\tupdateValueAtNow(balances[_user], previousBalanceFrom - amountBurned);\n\t\temit Burn(_user, amountBurned);\n\t\treturn amountBurned;\n\t}\n\n\t/**\n\t * @dev initialize\n\t */\n\tfunction initialize(address _owner) public initializer {\n\t\tdecimals = 0;\n\t\t__Ownable_init_unchained();\n\t\ttransferOwnership(_owner);\n\t}\n\n\t/// @dev This function makes it easy to get the total number of reputation\n\t/// @return The total number of reputation\n\tfunction totalSupply() public view returns (uint256) {\n\t\treturn totalSupplyAt(block.number);\n\t}\n\n\t////////////////\n\t// Query balance and totalSupply in History\n\t////////////////\n\t/**\n\t * @dev return the reputation amount of a given owner\n\t * @param _owner an address of the owner which we want to get his reputation\n\t */\n\tfunction balanceOf(address _owner) public view returns (uint256 balance) {\n\t\treturn balanceOfAt(_owner, block.number);\n\t}\n\n\t/// @dev Queries the balance of `_owner` at a specific `_blockNumber`\n\t/// @param _owner The address from which the balance will be retrieved\n\t/// @param _blockNumber The block number when the balance is queried\n\t/// @return The balance at `_blockNumber`\n\tfunction balanceOfAt(address _owner, uint256 _blockNumber)\n\t\tpublic\n\t\tview\n\t\tvirtual\n\t\treturns (uint256)\n\t{\n\t\tif (\n\t\t\t(balances[_owner].length == 0) ||\n\t\t\t(uint128(balances[_owner][0]) > _blockNumber)\n\t\t) {\n\t\t\treturn 0;\n\t\t\t// This will return the expected balance during normal situations\n\t\t} else {\n\t\t\treturn getValueAt(balances[_owner], _blockNumber);\n\t\t}\n\t}\n\n\t/// @notice Total amount of reputation at a specific `_blockNumber`.\n\t/// @param _blockNumber The block number when the totalSupply is queried\n\t/// @return The total amount of reputation at `_blockNumber`\n\tfunction totalSupplyAt(uint256 _blockNumber)\n\t\tpublic\n\t\tview\n\t\tvirtual\n\t\treturns (uint256)\n\t{\n\t\tif (\n\t\t\t(totalSupplyHistory.length == 0) ||\n\t\t\t(uint128(totalSupplyHistory[0]) > _blockNumber)\n\t\t) {\n\t\t\treturn 0;\n\t\t\t// This will return the expected totalSupply during normal situations\n\t\t} else {\n\t\t\treturn getValueAt(totalSupplyHistory, _blockNumber);\n\t\t}\n\t}\n\n\t////////////////\n\t// Internal helper functions to query and set a value in a snapshot array\n\t////////////////\n\t/// @dev `getValueAt` retrieves the number of reputation at a given block number\n\t/// @param checkpoints The history of values being queried\n\t/// @param _block The block number to retrieve the value at\n\t/// @return The number of reputation being queried\n\tfunction getValueAt(uint256[] storage checkpoints, uint256 _block)\n\t\tinternal\n\t\tview\n\t\treturns (uint256)\n\t{\n\t\tuint256 len = checkpoints.length;\n\t\tif (len == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\t// Shortcut for the actual value\n\t\tuint256 cur = checkpoints[len - 1];\n\t\tif (_block >= uint128(cur)) {\n\t\t\treturn cur >> 128;\n\t\t}\n\n\t\tif (_block < uint128(checkpoints[0])) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Binary search of the value in the array\n\t\tuint256 min = 0;\n\t\tuint256 max = len - 1;\n\t\twhile (max > min) {\n\t\t\tuint256 mid = (max + min + 1) / 2;\n\t\t\tif (uint128(checkpoints[mid]) <= _block) {\n\t\t\t\tmin = mid;\n\t\t\t} else {\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\treturn checkpoints[min] >> 128;\n\t}\n\n\t/// @dev `updateValueAtNow` used to update the `balances` map and the\n\t/// `totalSupplyHistory`\n\t/// @param checkpoints The history of data being updated\n\t/// @param _value The new number of reputation\n\tfunction updateValueAtNow(uint256[] storage checkpoints, uint256 _value)\n\t\tinternal\n\t{\n\t\trequire(uint128(_value) == _value, \"reputation overflow\"); //check value is in the 128 bits bounderies\n\t\tif (\n\t\t\t(checkpoints.length == 0) ||\n\t\t\t(uint128(checkpoints[checkpoints.length - 1]) < block.number)\n\t\t) {\n\t\t\tcheckpoints.push(uint256(uint128(block.number)) | (_value << 128));\n\t\t} else {\n\t\t\tcheckpoints[checkpoints.length - 1] = uint256(\n\t\t\t\t(checkpoints[checkpoints.length - 1] & uint256(ZERO_HALF_256)) |\n\t\t\t\t\t(_value << 128)\n\t\t\t);\n\t\t}\n\t}\n}\n", "sourcePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/upgradables/contracts/governance/Reputation.sol", "ast": { "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/upgradables/contracts/governance/Reputation.sol", "exportedSymbols": { "Reputation": [ 3859 ] }, "id": 3860, "license": "GPL-3.0", "nodeType": "SourceUnit", "nodes": [ { "id": 3349, "literals": [ "solidity", ">=", "0.6", ".12" ], "nodeType": "PragmaDirective", "src": "36:25:5" }, { "absolutePath": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol", "file": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol", "id": 3350, "nodeType": "ImportDirective", "scope": 3860, "sourceUnit": 7874, "src": "63:75:5", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 3352, "name": "OwnableUpgradeable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 7873, "src": "644:18:5", "typeDescriptions": { "typeIdentifier": "t_contract$_OwnableUpgradeable_$7873", "typeString": "contract OwnableUpgradeable" } }, "id": 3353, "nodeType": "InheritanceSpecifier", "src": "644:18:5" } ], "contractDependencies": [ 7743, 7873, 8211 ], "contractKind": "contract", "documentation": { "id": 3351, "nodeType": "StructuredDocumentation", "src": "140:480:5", "text": " @title Reputation system\n @dev A DAO has Reputation System which allows peers to rate other peers in order to build trust .\n A reputation is use to assign influence measure to a DAO'S peers.\n Reputation is similar to regular tokens but with one crucial difference: It is non-transferable.\n The Reputation contract maintain a map of address to reputation value.\n It provides an onlyOwner functions to mint and burn reputation _to (or _from) a specific address." }, "fullyImplemented": true, "id": 3859, "linearizedBaseContracts": [ 3859, 7873, 7743, 8211 ], "name": "Reputation", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "functionSelector": "313ce567", "id": 3355, "mutability": "mutable", "name": "decimals", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3859, "src": "666:21:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 3354, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "666:5:5", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "public" }, { "anonymous": false, "documentation": null, "id": 3361, "name": "Mint", "nodeType": "EventDefinition", "parameters": { "id": 3360, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3357, "indexed": true, "mutability": "mutable", "name": "_to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3361, "src": "801:19:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3356, "name": "address", "nodeType": "ElementaryTypeName", "src": "801:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3359, "indexed": false, "mutability": "mutable", "name": "_amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3361, "src": "822:15:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3358, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "822:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "800:38:5" }, "src": "790:49:5" }, { "anonymous": false, "documentation": null, "id": 3367, "name": "Burn", "nodeType": "EventDefinition", "parameters": { "id": 3366, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3363, "indexed": true, "mutability": "mutable", "name": "_from", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3367, "src": "911:21:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3362, "name": "address", "nodeType": "ElementaryTypeName", "src": "911:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3365, "indexed": false, "mutability": "mutable", "name": "_amount", "nodeType": "VariableDeclaration", "overrides"