[ { "inputs": [ { "internalType": "address", "name": "_stakingToken", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "ErrInvalidTokenAddress", "type": "error" }, { "inputs": [], "name": "ErrRewardAlreadyAdded", "type": "error" }, { "inputs": [], "name": "ErrRewardPeriodStillActive", "type": "error" }, { "inputs": [], "name": "ErrZeroAmount", "type": "error" }, { "inputs": [], "name": "ErrZeroDuration", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "LogRecovered", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "LogRewardAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": true, "internalType": "address", "name": "rewardsToken", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "LogRewardPaid", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "newDuration", "type": "uint256" } ], "name": "LogRewardsDurationUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "LogStaked", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "LogWithdrawn", "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": "address", "name": "account", "type": "address" } ], "name": "Paused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Unpaused", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "rewardToken", "type": "address" }, { "internalType": "uint256", "name": "_rewardsDuration", "type": "uint256" } ], "name": "addReward", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" }, { "internalType": "address", "name": "rewardToken", "type": "address" } ], "name": "earned", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "exit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "rewardToken", "type": "address" } ], "name": "getRewardForDuration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getRewardTokenLength", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getRewards", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "rewardToken", "type": "address" } ], "name": "isSupportedReward", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "rewardToken", "type": "address" } ], "name": "lastTimeRewardApplicable", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "rewardToken", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "notifyRewardAmount", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "paused", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "tokenAddress", "type": "address" }, { "internalType": "uint256", "name": "tokenAmount", "type": "uint256" } ], "name": "recover", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "name": "rewardData", "outputs": [ { "components": [ { "internalType": "uint256", "name": "rewardsDuration", "type": "uint256" }, { "internalType": "uint256", "name": "periodFinish", "type": "uint256" }, { "internalType": "uint256", "name": "rewardRate", "type": "uint256" }, { "internalType": "uint256", "name": "lastUpdateTime", "type": "uint256" }, { "internalType": "uint256", "name": "rewardPerTokenStored", "type": "uint256" } ], "internalType": "struct MultiRewards.Reward", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "rewardToken", "type": "address" } ], "name": "rewardPerToken", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "rewardTokens", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" } ], "name": "rewards", "outputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "rewardToken", "type": "address" }, { "internalType": "uint256", "name": "_rewardsDuration", "type": "uint256" } ], "name": "setRewardsDuration", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "stake", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "stakingToken", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "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": "unpause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" } ], "name": "userRewardPerTokenPaid", "outputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]
60a060405234801561001057600080fd5b5060405162001d1c38038062001d1c833981016040819052610031916100af565b600160005561003f3361005d565b6001805460ff60a01b191690556001600160a01b03166080526100df565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156100c157600080fd5b81516001600160a01b03811681146100d857600080fd5b9392505050565b608051611c0c6200011060003960008181610363015281816108170152818161092f0152610ce10152611c0c6000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c8063715018a6116100f9578063a694fc3a11610097578063e70b9e2711610071578063e70b9e2714610437578063e9fad8ee14610462578063f12297771461046a578063f2fde38b1461047d57600080fd5b8063a694fc3a146103fe578063b66503cf14610411578063bcd110141461042457600080fd5b80637bb7bed1116100d35780637bb7bed1146103b25780638456cb59146103c55780638da5cb5b146103cd5780639feb8f50146103eb57600080fd5b8063715018a61461035657806372f702f31461035e5780637abe18d2146103aa57600080fd5b806348e5d9f8116101665780635c975abb116101405780635c975abb146102d5578063638634ee146102f85780637035ab981461030b57806370a082311461033657600080fd5b806348e5d9f8146102255780635705ae431461027a578063597ed53e1461028d57600080fd5b80632378bea6116101975780632378bea6146101f75780632e1a7d4d1461020a5780633f4ba83a1461021d57600080fd5b80630572b0cc146101be57806318160ddd146101c8578063211dc32d146101e4575b600080fd5b6101c6610490565b005b6101d160075481565b6040519081526020015b60405180910390f35b6101d16101f23660046119bc565b6105ab565b6101c66102053660046119ef565b61066d565b6101c6610218366004611a19565b610776565b6101c6610881565b610238610233366004611a32565b610891565b6040516101db9190600060a082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015292915050565b6101c66102883660046119ef565b610925565b6102c561029b366004611a32565b73ffffffffffffffffffffffffffffffffffffffff16600090815260026020526040902054151590565b60405190151581526020016101db565b60015474010000000000000000000000000000000000000000900460ff166102c5565b6101d1610306366004611a32565b610a3e565b6101d16103193660046119bc565b600460209081526000928352604080842090915290825290205481565b6101d1610344366004611a32565b60036020526000908152604090205481565b6101c6610a72565b6103857f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101db565b6006546101d1565b6103856103c0366004611a19565b610a84565b6101c6610abb565b60015473ffffffffffffffffffffffffffffffffffffffff16610385565b6101c66103f93660046119ef565b610acb565b6101c661040c366004611a19565b610c38565b6101c661041f3660046119ef565b610d3b565b6101d1610432366004611a32565b610f1f565b6101d16104453660046119bc565b600560209081526000928352604080842090915290825290205481565b6101c6610f55565b6101d1610478366004611a32565b610f76565b6101c661048b366004611a32565b61107f565b610498611138565b6104a1336111ab565b60005b60065481101561059e576000600682815481106104c3576104c3611a4d565b600091825260208083209091015433835260058252604080842073ffffffffffffffffffffffffffffffffffffffff9092168085529190925291205490915080156105945733600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925282209190915561054691836112d1565b60405181815273ffffffffffffffffffffffffffffffffffffffff83169033907fdd58858d94d0be6876ebdfd817f0f8e9e1de4c7e88fffba2aae4e7b3a7e1cd599060200160405180910390a35b50506001016104a4565b506105a96001600055565b565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260046020908152604080832093851683529290529081205481906105eb84610f76565b6105f59190611aab565b73ffffffffffffffffffffffffffffffffffffffff808616600081815260056020908152604080832094891683529381528382205492825260039052919091205491925090670de0b6b3a76400009061064f908490611abe565b6106599190611ad5565b6106639190611b10565b9150505b92915050565b6106756113aa565b73ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090206001015442116106d6576040517fa65d0b8100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610710576040517fa759a37700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216600081815260026020908152604091829020849055815192835282018390527f5927c98f2ee42b123808e41a6024ca864f25892b8e97af3fe9ba0d8edcd987c491015b60405180910390a15050565b61077e611138565b806000036107b8576040517f608294ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107c1336111ab565b80600760008282546107d39190611aab565b909155505033600090815260036020526040812080548392906107f7908490611aab565b9091555061083e905073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633836112d1565b60405181815233907fe0535c2eb3e1755a11a8ee1dba6e7b72ea1487e87be0d02fca7c1038eaacbd5c906020015b60405180910390a261087e6001600055565b50565b6108896113aa565b6105a961142b565b6108c36040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b5073ffffffffffffffffffffffffffffffffffffffff16600090815260026020818152604092839020835160a0810185528154815260018201549281019290925291820154928101929092526003810154606083015260040154608082015290565b61092d6113aa565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036109b2576040517f36e175d700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109f26109d460015473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff841690836112d1565b6040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018390527f2ecbdc877534d6cf5048feb3873780484f0544dadb27fa1d7c7f85262164cb92910161076a565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600260205260408120600101546106679042906114a8565b610a7a6113aa565b6105a960006114c0565b60068181548110610a9457600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b610ac36113aa565b6105a9611537565b610ad36113aa565b73ffffffffffffffffffffffffffffffffffffffff8216610b20576040517f36e175d700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090205415610b7d576040517f406f616000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610bb7576040517fa759a37700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60068054600181019091557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01805473ffffffffffffffffffffffffffffffffffffffff9093167fffffffffffffffffffffffff00000000000000000000000000000000000000009093168317905560009182526002602052604090912055565b610c40611138565b610c486115a6565b80600003610c82576040517f608294ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c8b336111ab565b8060076000828254610c9d9190611b10565b90915550503360009081526003602052604081208054839290610cc1908490611b10565b90915550610d09905073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633308461162b565b60405181815233907f56b2fb41a9acac73203c4c159f5cca6ff3bfa8f53e8cd40d6c682404b0adde3d9060200161086c565b610d436113aa565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600260205260408120549003610da1576040517f36e175d700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610dab60006111ab565b610dcd73ffffffffffffffffffffffffffffffffffffffff831633308461162b565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902060010154421015610e515773ffffffffffffffffffffffffffffffffffffffff8216600090815260026020819052604090912090810154600190910154610e3a904290611aab565b610e449190611abe565b610e4e9082611b10565b90505b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902054610e819082611ad5565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602081905260409091209081019190915542600382018190559054610ec391611b10565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260409182902060010192909255518281527fc08e24329ac6ca989fa71d633536a170f3965594760cc27617606c8ce170d1d3910161076a565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600260208190526040822080549101546106679190611abe565b33600090815260036020526040902054610f6e90610776565b6105a9610490565b6000600754600003610fae575073ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090206004015490565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040812060030154610fe084610a3e565b610fea9190611aab565b60075473ffffffffffffffffffffffffffffffffffffffff8516600090815260026020819052604082200154929350916110249084611abe565b61103690670de0b6b3a7640000611abe565b6110409190611ad5565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260026020526040902060040154909150611077908290611b10565b949350505050565b6110876113aa565b73ffffffffffffffffffffffffffffffffffffffff811661112f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61087e816114c0565b6002600054036111a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611126565b6002600055565b60005b6006548110156112cd576000600682815481106111cd576111cd611a4d565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1690506111fa81610f76565b73ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090206004015561122c81610a3e565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600260205260409020600301919091558316156112c45761126a83826105ab565b73ffffffffffffffffffffffffffffffffffffffff80851660008181526005602090815260408083209487168084529482528083209590955560028152848220600490810154938352815284822093825292909252919020555b506001016111ae565b5050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526113a59084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261168f565b505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146105a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611126565b61143361179e565b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60008183106114b757816114b9565b825b9392505050565b6001805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61153f6115a6565b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861147e3390565b60015474010000000000000000000000000000000000000000900460ff16156105a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401611126565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526116899085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611323565b50505050565b60006116f1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166118229092919063ffffffff16565b90508051600014806117125750808060200190518101906117129190611b23565b6113a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401611126565b60015474010000000000000000000000000000000000000000900460ff166105a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401611126565b60606110778484600085856000808673ffffffffffffffffffffffffffffffffffffffff1685876040516118569190611b69565b60006040518083038185875af1925050503d8060008114611893576040519150601f19603f3d011682016040523d82523d6000602084013e611898565b606091505b50915091506118a9878383876118b4565b979650505050505050565b6060831561194a5782516000036119435773ffffffffffffffffffffffffffffffffffffffff85163b611943576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611126565b5081611077565b611077838381511561195f5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111269190611b85565b803573ffffffffffffffffffffffffffffffffffffffff811681146119b757600080fd5b919050565b600080604083850312156119cf57600080fd5b6119d883611993565b91506119e660208401611993565b90509250929050565b60008060408385031215611a0257600080fd5b611a0b83611993565b946020939093013593505050565b600060208284031215611a2b57600080fd5b5035919050565b600060208284031215611a4457600080fd5b6114b982611993565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561066757610667611a7c565b808202811582820484141761066757610667611a7c565b600082611b0b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8082018082111561066757610667611a7c565b600060208284031215611b3557600080fd5b815180151581146114b957600080fd5b60005b83811015611b60578181015183820152602001611b48565b50506000910152565b60008251611b7b818460208701611b45565b9190910192915050565b6020815260008251806020840152611ba4816040850160208701611b45565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212207501be8a8b0c130e10f5df88c3755c0ca1cf37691f5b098ea5a172952ab80eec64736f6c6343000813003300000000000000000000000061452f5b72879e6de2e31dcb22e92d20bc73468b