[ { "inputs": [ { "internalType": "address", "name": "_rewardsDistribution", "type": "address" }, { "internalType": "address", "name": "_rewardsToken", "type": "address" }, { "internalType": "address", "name": "_stakingToken", "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": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "earned", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "exit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getReward", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getRewardForDuration", "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": [ { "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "notifyRewardAmount", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "periodFinish", "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": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "rewards", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "rewardsDistribution", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "rewardsDuration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "rewardsToken", "outputs": [ { "internalType": "contract IERC20", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "stake", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "internalType": "uint8", "name": "v", "type": "uint8" }, { "internalType": "bytes32", "name": "r", "type": "bytes32" }, { "internalType": "bytes32", "name": "s", "type": "bytes32" } ], "name": "stakeWithPermit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "stakingToken", "outputs": [ { "internalType": "contract IERC20", "name": "", "type": "address" } ], "stateMutability": "view", "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": "uint256", "name": "amount", "type": "uint256" } ], "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]
60806040526000600455600060055562b1fa8060065534801561002157600080fd5b5060405161186a38038061186a8339818101604052606081101561004457600080fd5b508051602082015160409092015160018055600280546001600160a01b039485166001600160a01b0319918216179091556003805492851692821692909217909155600080549390921692169190911790556117c5806100a56000396000f3fe608060405234801561001057600080fd5b50600436106101815760003560e01c80637b0a47ee116100d8578063cd3daf9d1161008c578063e9fad8ee11610066578063e9fad8ee14610346578063ebe2b12b1461034e578063ecd9ba821461035657610181565b8063cd3daf9d1461032e578063d1af0c7d14610336578063df136d651461033e57610181565b80638b876347116100bd5780638b876347146102d6578063a694fc3a14610309578063c8f33c911461032657610181565b80637b0a47ee146102c657806380faa57d146102ce57610181565b8063386a95251161013a5780633fc6df6e116101145780633fc6df6e1461025a57806370a082311461028b57806372f702f3146102be57610181565b8063386a95251461022d5780633c6b16ab146102355780633d18b9121461025257610181565b806318160ddd1161016b57806318160ddd146101fe5780631c1f78eb146102065780632e1a7d4d1461020e57610181565b80628cc262146101865780630700037d146101cb575b600080fd5b6101b96004803603602081101561019c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661038e565b60408051918252519081900360200190f35b6101b9600480360360208110156101e157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610426565b6101b9610438565b6101b961043f565b61022b6004803603602081101561022457600080fd5b503561045d565b005b6101b9610659565b61022b6004803603602081101561024b57600080fd5b503561065f565b61022b610913565b610262610a8a565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101b9600480360360208110156102a157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610aa6565b610262610ace565b6101b9610aea565b6101b9610af0565b6101b9600480360360208110156102ec57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610afe565b61022b6004803603602081101561031f57600080fd5b5035610b10565b6101b9610d0d565b6101b9610d13565b610262610d61565b6101b9610d7d565b61022b610d83565b6101b9610da6565b61022b600480360360a081101561036c57600080fd5b5080359060208101359060ff6040820135169060608101359060800135610dac565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a60209081526040808320546009909252822054610420919061041a90670de0b6b3a764000090610414906103e8906103e2610d13565b9061105e565b73ffffffffffffffffffffffffffffffffffffffff88166000908152600c6020526040902054906110d5565b9061114f565b906111d0565b92915050565b600a6020526000908152604090205481565b600b545b90565b60006104586006546005546110d590919063ffffffff16565b905090565b600260015414156104cf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155336104dd610d13565b6008556104e8610af0565b60075573ffffffffffffffffffffffffffffffffffffffff811615610549576105108161038e565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a60209081526040808320939093556008546009909152919020555b600082116105b857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b600b546105c5908361105e565b600b55336000908152600c60205260409020546105e2908361105e565b336000818152600c602052604090209190915560035461061b9173ffffffffffffffffffffffffffffffffffffffff9091169084611244565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2505060018055565b60065481565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061173c602a913960400191505060405180910390fd5b60006106d9610d13565b6008556106e4610af0565b60075573ffffffffffffffffffffffffffffffffffffffff8116156107455761070c8161038e565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a60209081526040808320939093556008546009909152919020555b60045442106107645760065461075c90839061114f565b6005556107a7565b600454600090610774904261105e565b9050600061078d600554836110d590919063ffffffff16565b6006549091506107a19061041486846111d0565b60055550505b600254604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561081857600080fd5b505afa15801561082c573d6000803e3d6000fd5b505050506040513d602081101561084257600080fd5b505160065490915061085590829061114f565b60055411156108c557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f50726f76696465642072657761726420746f6f20686967680000000000000000604482015290519081900360640190fd5b4260078190556006546108d891906111d0565b6004556040805184815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a1505050565b6002600154141561098557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260015533610993610d13565b60085561099e610af0565b60075573ffffffffffffffffffffffffffffffffffffffff8116156109ff576109c68161038e565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a60209081526040808320939093556008546009909152919020555b336000908152600a60205260409020548015610a8257336000818152600a6020526040812055600254610a4b9173ffffffffffffffffffffffffffffffffffffffff9091169083611244565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505060018055565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602052604090205490565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b6000610458426004546112d6565b60096020526000908152604090205481565b60026001541415610b8257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260015533610b90610d13565b600855610b9b610af0565b60075573ffffffffffffffffffffffffffffffffffffffff811615610bfc57610bc38161038e565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a60209081526040808320939093556008546009909152919020555b60008211610c6b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b600b54610c7890836111d0565b600b55336000908152600c6020526040902054610c9590836111d0565b336000818152600c6020526040902091909155600354610ccf9173ffffffffffffffffffffffffffffffffffffffff9091169030856112ec565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2505060018055565b60075481565b6000600b5460001415610d29575060085461043c565b610458610d58600b54610414670de0b6b3a7640000610d52600554610d526007546103e2610af0565b906110d5565b600854906111d0565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b336000908152600c6020526040902054610d9c9061045d565b610da4610913565b565b60045481565b60026001541415610e1e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260015533610e2c610d13565b600855610e37610af0565b60075573ffffffffffffffffffffffffffffffffffffffff811615610e9857610e5f8161038e565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a60209081526040808320939093556008546009909152919020555b60008611610f0757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b600b54610f1490876111d0565b600b55336000908152600c6020526040902054610f3190876111d0565b336000818152600c60205260408082209390935560035483517fd505accf0000000000000000000000000000000000000000000000000000000081526004810193909352306024840152604483018a90526064830189905260ff8816608484015260a4830187905260c48301869052925173ffffffffffffffffffffffffffffffffffffffff9093169263d505accf9260e480820193929182900301818387803b158015610fde57600080fd5b505af1158015610ff2573d6000803e3d6000fd5b505060035461101c925073ffffffffffffffffffffffffffffffffffffffff1690503330896112ec565b60408051878152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250506001805550505050565b6000828211156110cf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826110e457506000610420565b828202828482816110f157fe5b0414611148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061171b6021913960400191505060405180910390fd5b9392505050565b60008082116111bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816111c857fe5b049392505050565b60008282018381101561114857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526112d1908490611387565b505050565b60008183106112e55781611148565b5090919050565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611381908590611387565b50505050565b60006113e9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661145f9092919063ffffffff16565b8051909150156112d15780806020019051602081101561140857600080fd5b50516112d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611766602a913960400191505060405180910390fd5b606061146e8484600085611476565b949350505050565b6060824710156114d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116f56026913960400191505060405180910390fd5b6114da85611630565b61154557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106115ae57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611571565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611610576040519150601f19603f3d011682016040523d82523d6000602084013e611615565b606091505b5091509150611625828286611636565b979650505050505050565b3b151590565b60608315611645575081611148565b8251156116555782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156116b95781810151838201526020016116a1565b50505050905090810190601f1680156116e65780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a314afe1f697de36c890244e12d9faa5d3cec40f10bc7d4b2ba4ed70e5e11f3464736f6c634300070600330000000000000000000000007ff786dd10dfcb007fb94a02caa2aad5f2b9161c000000000000000000000000c770eefad204b5180df6a14ee197d99d808ee52d000000000000000000000000470e8de2ebaef52014a47cb5e6af86884947f08c