[ { "inputs": [ { "internalType": "contract IERC20", "name": "rewardToken_", "type": "address" }, { "internalType": "address", "name": "pool_", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "InvalidAddress", "type": "error" }, { "inputs": [], "name": "Unauthorized", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address[]", "name": "accounts", "type": "address[]" }, { "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" } ], "name": "BatchDeposited", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" } ], "name": "Deposited", "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" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "RewardAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "RewardPaid", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "duration", "type": "uint256" } ], "name": "RewardsDurationUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" } ], "name": "Withdrawn", "type": "event" }, { "inputs": [ { "internalType": "address[]", "name": "accounts", "type": "address[]" } ], "name": "addDeposits", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "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": "finishAt", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address payable", "name": "_user", "type": "address" } ], "name": "getRewardsFor", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "lastTimeRewardApplicable", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "notifyRewardAmount", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pool", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "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": "uint256", "name": "_duration", "type": "uint256" } ], "name": "setRewardsDuration", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "account", "type": "address" } ], "name": "stakeFor", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "totalSupply", "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": [], "name": "updatedAt", "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": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "account", "type": "address" } ], "name": "withdrawFor", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" } ]
60c06040523480156200001157600080fd5b506040516200157338038062001573833981016040819052620000349162000116565b806200004033620000ad565b600180556001600160a01b0381166200006c5760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b0390811660805282166200009a5760405163e6c4247b60e01b815260040160405180910390fd5b506001600160a01b031660a05262000155565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200011357600080fd5b50565b600080604083850312156200012a57600080fd5b82516200013781620000fd565b60208401519092506200014a81620000fd565b809150509250929050565b60805160a0516113d56200019e600039600081816102bd015281816103fe01526107180152600081816101750152818161048c015281816108450152610a2401526113d56000f3fe608060405234801561001057600080fd5b506004361061011c5760003560e01c80628cc262146101215780630700037d146101475780630fb5a6b41461016757806316f0115b1461017057806318160ddd146101a45780632260b83e146101ad5780633576f6cc146101c25780633c6b16ab146101d557806351746bb2146101e857806367d3b488146101fb57806370a0823114610204578063715018a6146102245780637519ab501461022c5780637b0a47ee1461023557806380faa57d1461023e5780638b876347146102465780638da5cb5b14610266578063a9b2885e1461026e578063cc1a378f14610281578063cd3daf9d14610294578063df136d651461029c578063f2fde38b146102a5578063f7c618c1146102b8575b600080fd5b61013461012f3660046110a8565b6102df565b6040519081526020015b60405180910390f35b6101346101553660046110a8565b60086020526000908152604090205481565b61013460025481565b6101977f000000000000000000000000000000000000000000000000000000000000000081565b60405161013e91906110c5565b61013460095481565b6101c06101bb3660046110a8565b61035c565b005b6101346101d03660046110d9565b610477565b6101c06101e3366004611109565b6105fa565b6101c06101f63660046110d9565b610832565b61013460035481565b6101346102123660046110a8565b600a6020526000908152604090205481565b6101c0610971565b61013460045481565b61013460055481565b610134610985565b6101346102543660046110a8565b60076020526000908152604090205481565b610197610998565b6101c061027c366004611138565b6109a7565b6101c061028f366004611109565b610b3c565b610134610bcf565b61013460065481565b6101c06102b33660046110a8565b610c30565b6101977f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b0381166000908152600860209081526040808320546007909252822054670de0b6b3a764000090610315610bcf565b61031f9190611212565b6001600160a01b0385166000908152600a60205260409020546103429190611225565b61034c919061123c565b610356919061125e565b92915050565b610364610ca6565b8061036d610bcf565b600655610378610985565b6004556001600160a01b038116156103bf57610393816102df565b6001600160a01b0382166000908152600860209081526040808320939093556006546007909152919020555b6001600160a01b0382166000908152600860205260409020548015610469576001600160a01b03808416600090815260086020526040812055610425907f0000000000000000000000000000000000000000000000000000000000000000168483610cff565b826001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04868260405161046091815260200190565b60405180910390a25b505061047460018055565b50565b6000610481610ca6565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104c9576040516282b42960e81b815260040160405180910390fd5b816104d2610bcf565b6006556104dd610985565b6004556001600160a01b03811615610524576104f8816102df565b6001600160a01b0382166000908152600860209081526040808320939093556006546007909152919020555b6001600160a01b0383166000908152600a602052604090205484116105495783610563565b6001600160a01b0383166000908152600a60205260409020545b6001600160a01b0384166000908152600a6020526040812080549296508692909190610590908490611212565b9250508190555083600960008282546105a99190611212565b909155505060405142815284906001600160a01b038516907f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc69060200160405180910390a350506001805581610356565b610602610d56565b600061060c610bcf565b600655610617610985565b6004556001600160a01b0381161561065e57610632816102df565b6001600160a01b0382166000908152600860209081526040808320939093556006546007909152919020555b600354421061067c57600254610674908361123c565b6005556106b8565b60006005544260035461068f9190611212565b6106999190611225565b6002549091506106a9828561125e565b6106b3919061123c565b600555505b6000600554116107015760405162461bcd60e51b815260206004820152600f60248201526e07265776172642072617465203d203608c1b60448201526064015b60405180910390fd5b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319061074d9030906004016110c5565b602060405180830381865afa15801561076a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078e9190611271565b60025460055461079e9190611225565b11156107e65760405162461bcd60e51b815260206004820152601760248201527672657761726420616d6f756e74203e2062616c616e636560481b60448201526064016106f8565b6002546107f3904261125e565b600355426004556040518281527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d906020015b60405180910390a15050565b61083a610ca6565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610882576040516282b42960e81b815260040160405180910390fd5b8061088b610bcf565b600655610896610985565b6004556001600160a01b038116156108dd576108b1816102df565b6001600160a01b0382166000908152600860209081526040808320939093556006546007909152919020555b6001600160a01b0382166000908152600a60205260408120805485929061090590849061125e565b92505081905550826009600082825461091e919061125e565b909155505060405142815283906001600160a01b038416907f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca9060200160405180910390a35061096d60018055565b5050565b610979610d56565b6109836000610db5565b565b600061099360035442610e05565b905090565b6000546001600160a01b031690565b6109af610d56565b6109b7610bcf565b6006556109c2610985565b600455805160005b818114610b0a5760008382815181106109e5576109e561128a565b602002602001015190506109f8816102df565b6001600160a01b038083166000908152600860205260408082209390935591516370a0823160e01b81527f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190610a5b9085906004016110c5565b602060405180830381865afa158015610a78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9c9190611271565b6001600160a01b0383166000908152600a60205260409020805490829055600954919250908190610ace90849061125e565b610ad89190611212565b60095550506006546001600160a01b03909116600090815260076020526040902055610b03816112a0565b90506109ca565b507fadd305b988eae1d23a6cd76b1b23848646076794417bfcc1289e14b62b415dec82426040516108269291906112b9565b610b44610d56565b4260035410610b945760405162461bcd60e51b815260206004820152601c60248201527b1c995dd85c9908191d5c985d1a5bdb881b9bdd08199a5b9a5cda195960221b60448201526064016106f8565b60028190556040518181527ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d39060200160405180910390a150565b6000600954600003610be2575060065490565b600954600454610bf0610985565b610bfa9190611212565b600554610c079190611225565b610c1990670de0b6b3a7640000611225565b610c23919061123c565b600654610993919061125e565b610c38610d56565b6001600160a01b038116610c9d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106f8565b61047481610db5565b600260015403610cf85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106f8565b6002600155565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d51908490610e1e565b505050565b33610d5f610998565b6001600160a01b0316146109835760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081831115610e155781610e17565b825b9392505050565b6000610e73826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610ef39092919063ffffffff16565b9050805160001480610e94575080806020019051810190610e94919061130a565b610d515760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106f8565b6060610f028484600085610f0a565b949350505050565b606082471015610f6b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106f8565b600080866001600160a01b03168587604051610f879190611350565b60006040518083038185875af1925050503d8060008114610fc4576040519150601f19603f3d011682016040523d82523d6000602084013e610fc9565b606091505b5091509150610fda87838387610fe5565b979650505050505050565b6060831561105457825160000361104d576001600160a01b0385163b61104d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106f8565b5081610f02565b610f0283838151156110695781518083602001fd5b8060405162461bcd60e51b81526004016106f8919061136c565b6001600160a01b038116811461047457600080fd5b80356110a381611083565b919050565b6000602082840312156110ba57600080fd5b8135610e1781611083565b6001600160a01b0391909116815260200190565b600080604083850312156110ec57600080fd5b8235915060208301356110fe81611083565b809150509250929050565b60006020828403121561111b57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561114b57600080fd5b82356001600160401b038082111561116257600080fd5b818501915085601f83011261117657600080fd5b81358181111561118857611188611122565b8060051b604051601f19603f830116810181811085821117156111ad576111ad611122565b6040529182528482019250838101850191888311156111cb57600080fd5b938501935b828510156111f0576111e185611098565b845293850193928501926111d0565b98975050505050505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610356576103566111fc565b8082028115828204841417610356576103566111fc565b60008261125957634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610356576103566111fc565b60006020828403121561128357600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000600182016112b2576112b26111fc565b5060010190565b604080825283519082018190526000906020906060840190828701845b828110156112fb5781516001600160a01b0316845292840192908401906001016112d6565b50505092019290925292915050565b60006020828403121561131c57600080fd5b81518015158114610e1757600080fd5b60005b8381101561134757818101518382015260200161132f565b50506000910152565b6000825161136281846020870161132c565b9190910192915050565b602081526000825180602084015261138b81604085016020870161132c565b601f01601f1916919091016040019291505056fea264697066735822122016d4407e2885b0e15d369a85e9dc57baebb75f4acb038c4ae30d4deb7aa9a29364736f6c63430008110033000000000000000000000000a25eaf2906fa1a3a13edac9b9657108af7b703e3000000000000000000000000475589b0ed87591a893df42ec6076d2499bb63d0