[ { "inputs": [ { "internalType": "address", "name": "deposit_", "type": "address" }, { "internalType": "address", "name": "reward_", "type": "address" }, { "internalType": "address", "name": "op_", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "RewardAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "RewardPaid", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Staked", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Withdrawn", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "currentRewards", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "deposits", "outputs": [ { "internalType": "contract IDeposit", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "donate", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "duration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "earned", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getReward", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_account", "type": "address" } ], "name": "getReward", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "historicalRewards", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastTimeRewardApplicable", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastUpdateTime", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "newRewardRatio", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "operator", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "periodFinish", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_rewards", "type": "uint256" } ], "name": "queueNewRewards", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "queuedRewards", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "rewardPerToken", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "rewardPerTokenStored", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "rewardRate", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "rewardToken", "outputs": [ { "internalType": "contract IERC20", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "rewards", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_account", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "stake", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "userRewardPerTokenPaid", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_account", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]
60806040526000600355600060045560006007556000600855600060095561033e600a5534801561002f57600080fd5b5060405161113a38038061113a8339818101604052606081101561005257600080fd5b5080516020820151604090920151600080546001600160a01b039384166001600160a01b031991821617909155600180549484169482169490941790935560028054929091169190921617905561108c806100ae6000396000f3fe608060405234801561001057600080fd5b50600436106101725760003560e01c80637b0a47ee116100de578063c8f33c9111610097578063ebe2b12b11610071578063ebe2b12b1461031e578063f14faf6f14610326578063f3fef3a314610357578063f7c618c11461038357610172565b8063c8f33c9114610306578063cd3daf9d1461030e578063df136d651461031657610172565b80637b0a47ee1461027657806380faa57d1461027e5780638b87634714610286578063901a7d53146102ac578063adc9772e146102b4578063c00007b0146102e057610172565b80633d18b912116101305780633d18b91214610211578063570ca7351461021b578063590a41f51461022357806363d38c3b146102405780636c8bcee81461024857806370a082311461025057610172565b80628cc262146101775780630700037d146101af5780630fb5a6b4146101d557806318160ddd146101dd578063262d3d6d146101e5578063323a5e0b146101ed575b600080fd5b61019d6004803603602081101561018d57600080fd5b50356001600160a01b031661038b565b60408051918252519081900360200190f35b61019d600480360360208110156101c557600080fd5b50356001600160a01b03166103f9565b61019d61040b565b61019d610412565b61019d610493565b6101f5610499565b604080516001600160a01b039092168252519081900360200190f35b6102196104a8565b005b6101f56104b3565b6102196004803603602081101561023957600080fd5b50356104c2565b61019d6105a5565b61019d6105ab565b61019d6004803603602081101561026657600080fd5b50356001600160a01b03166105b1565b61019d610631565b61019d610637565b61019d6004803603602081101561029c57600080fd5b50356001600160a01b031661064a565b61019d61065c565b610219600480360360408110156102ca57600080fd5b506001600160a01b038135169060200135610662565b610219600480360360208110156102f657600080fd5b50356001600160a01b031661074e565b61019d61082a565b61019d610830565b61019d61087e565b61019d610884565b6103436004803603602081101561033c57600080fd5b503561088a565b604080519115158252519081900360200190f35b6102196004803603604081101561036d57600080fd5b506001600160a01b0381351690602001356108ba565b6101f56109a6565b6001600160a01b0381166000908152600c6020908152604080832054600b9092528220546103f391906103ed90670de0b6b3a7640000906103e7906103d8906103d2610830565b906109b5565b6103e1886105b1565b90610a12565b90610a72565b90610ad9565b92915050565b600c6020526000908152604090205481565b62093a8081565b60008060009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561046157600080fd5b505afa158015610475573d6000803e3d6000fd5b505050506040513d602081101561048b57600080fd5b505190505b90565b60095481565b6000546001600160a01b031681565b6104b13361074e565b565b6002546001600160a01b031681565b6002546001600160a01b0316331461050f576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b60075461051d908290610ad9565b9050600354421061053b5761053181610b33565b60006007556105a2565b600061055f61055862093a806003546109b590919063ffffffff16565b42906109b5565b60045490915081026000610579846103e7846103e8610a12565b9050600a548110156105985761058e84610b33565b600060075561059e565b60078490555b5050505b50565b60075481565b600a5481565b60008054604080516370a0823160e01b81526001600160a01b038581166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156105ff57600080fd5b505afa158015610613573d6000803e3d6000fd5b505050506040513d602081101561062957600080fd5b505192915050565b60045481565b600061064542600354610c59565b905090565b600b6020526000908152604090205481565b60085481565b8161066b610830565b600655610676610637565b6005556001600160a01b038116156106bd576106918161038b565b6001600160a01b0382166000908152600c6020908152604080832093909355600654600b909152919020555b6000546001600160a01b0316331461070a576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b6040805183815290516001600160a01b038516917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2505050565b80610757610830565b600655610762610637565b6005556001600160a01b038116156107a95761077d8161038b565b6001600160a01b0382166000908152600c6020908152604080832093909355600654600b909152919020555b60006107b48361038b565b90508015610825576001600160a01b038084166000908152600c60205260408120556001546107e591168483610c6f565b6040805182815290516001600160a01b038516917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505050565b60055481565b600061083a610412565b6108475750600654610490565b610645610875610855610412565b6103e7670de0b6b3a76400006103e16004546103e16005546103d2610637565b60065490610ad9565b60065481565b60035481565b6001546000906108a5906001600160a01b0316333085610cc1565b6007546108b29083610ad9565b600755919050565b816108c3610830565b6006556108ce610637565b6005556001600160a01b03811615610915576108e98161038b565b6001600160a01b0382166000908152600c6020908152604080832093909355600654600b909152919020555b6000546001600160a01b03163314610962576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b6040805183815290516001600160a01b038516917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2505050565b6001546001600160a01b031681565b600082821115610a0c576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082610a21575060006103f3565b82820282848281610a2e57fe5b0414610a6b5760405162461bcd60e51b815260040180806020018281038252602181526020018061100c6021913960400191505060405180910390fd5b9392505050565b6000808211610ac8576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381610ad157fe5b049392505050565b600082820183811015610a6b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000610b3d610830565b600655610b48610637565b6005556001600160a01b03811615610b8f57610b638161038b565b6001600160a01b0382166000908152600c6020908152604080832093909355600654600b909152919020555b600954610b9c9083610ad9565b6009556003544210610bbd57610bb58262093a80610a72565b600455610c07565b600354600090610bcd90426109b5565b90506000610be660045483610a1290919063ffffffff16565b9050610bf28482610ad9565b9350610c018462093a80610a72565b60045550505b6008829055426005819055610c1f9062093a80610ad9565b6003556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b6000818310610c685781610a6b565b5090919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610825908490610d17565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261059e9085905b6060610d6c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610dc89092919063ffffffff16565b80519091501561082557808060200190516020811015610d8b57600080fd5b50516108255760405162461bcd60e51b815260040180806020018281038252602a81526020018061102d602a913960400191505060405180910390fd5b6060610dd78484600085610ddf565b949350505050565b606082471015610e205760405162461bcd60e51b8152600401808060200182810382526026815260200180610fe66026913960400191505060405180910390fd5b610e2985610f3b565b610e7a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310610eb95780518252601f199092019160209182019101610e9a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610f1b576040519150601f19603f3d011682016040523d82523d6000602084013e610f20565b606091505b5091509150610f30828286610f41565b979650505050505050565b3b151590565b60608315610f50575081610a6b565b825115610f605782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610faa578181015183820152602001610f92565b50505050905090810190601f168015610fd75780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220b1846f38f03004027517b5b4eb8715888a9f20b003182accc0cf65bce3d2999264736f6c634300060c00330000000000000000000000003fe65692bfcd0e6cf84cb1e7d24108e434a7587e000000000000000000000000f939e0a03fb07f59a73314e73794be0e57ac1b4e000000000000000000000000f403c135812408bfbe8713b5a23a04b3d48aae31