[ { "inputs": [ { "internalType": "address", "name": "_stakingToken", "type": "address" }, { "internalType": "address", "name": "_rewardToken", "type": "address" }, { "internalType": "address", "name": "_operator", "type": "address" }, { "internalType": "address", "name": "_rewardManager", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "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" }, { "indexed": true, "internalType": "address", "name": "token", "type": "address" } ], "name": "RewardAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "token", "type": "address" } ], "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": "uint256", "name": "_amountReward", "type": "uint256" }, { "internalType": "address", "name": "_rewardToken", "type": "address" } ], "name": "donateRewards", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_account", "type": "address" }, { "internalType": "address", "name": "_rewardToken", "type": "address" } ], "name": "earned", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_account", "type": "address" } ], "name": "getReward", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getRewardUser", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getStakingToken", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "isRewardToken", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "mainRewardToken", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "operator", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_amountReward", "type": "uint256" }, { "internalType": "address", "name": "_rewardToken", "type": "address" } ], "name": "queueNewRewards", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_rewardToken", "type": "address" } ], "name": "rewardDecimals", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "rewardManager", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "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": "", "type": "address" } ], "name": "rewards", "outputs": [ { "internalType": "address", "name": "rewardToken", "type": "address" }, { "internalType": "uint256", "name": "rewardPerTokenStored", "type": "uint256" }, { "internalType": "uint256", "name": "queuedRewards", "type": "uint256" }, { "internalType": "uint256", "name": "historicalRewards", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_for", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "stakeFor", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "stakingDecimals", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "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": [ { "internalType": "address", "name": "_account", "type": "address" } ], "name": "updateFor", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" } ], "name": "userRewardPerTokenPaid", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" } ], "name": "userRewards", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_for", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "bool", "name": "claim", "type": "bool" } ], "name": "withdrawFor", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" } ]
60e06040523480156200001157600080fd5b5060405162001c5938038062001c5983398101604081905262000034916200018e565b6200003f3362000121565b6001600160601b0319606094851b8116608090815292851b811660a0526040805193840181526001600160a01b0394851680855260006020808701828152878501838152888b018481528585526005845286852099518a549b166001600160a01b03199b8c16178a5591516001808b019190915590516002808b0191909155915160039099019890985580548089019091557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805490981683179097559081526008909552909320805460ff191690921790915590911b1660c052620001eb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200018957600080fd5b919050565b60008060008060808587031215620001a557600080fd5b620001b08562000171565b9350620001c06020860162000171565b9250620001d06040860162000171565b9150620001e06060860162000171565b905092959194509250565b60805160601c60a05160601c60c05160601c611a0b6200024e6000396000818161025e0152610d700152600081816102dd01528181610597015281816109d90152610fcb015260008181610373015281816103e1015261110e0152611a0b6000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c806372f702f3116100ee578063a980356a11610097578063c11f534411610071578063c11f534414610466578063f12297771461046e578063f2fde38b1461049a578063f3fc7c2b146104ad57600080fd5b8063a980356a14610405578063b5fd73f814610430578063c00007b01461045357600080fd5b80638fcf4822116100c85780638fcf4822146103b957806399da1729146103cc5780639f9106d1146103df57600080fd5b806372f702f31461036e5780637bb7bed1146103955780638da5cb5b146103a857600080fd5b8063211dc32d1161015b5780635bc59ce7116101355780635bc59ce7146102ff5780637035ab981461031257806370a082311461033d578063715018a61461036657600080fd5b8063211dc32d146102b25780632ee40908146102c5578063570ca735146102d857600080fd5b80630f4ef8a61161018c5780630f4ef8a61461025957806318160ddd1461029857806318838d33146102aa57600080fd5b80630700037d146101b35780630e0a5968146102215780630e19c69914610236575b600080fd5b6101f26101c1366004611676565b60056020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909184565b604080516001600160a01b03909516855260208501939093529183015260608201526080015b60405180910390f35b61023461022f366004611676565b6104c0565b005b6102496102443660046116ee565b61058a565b6040519015158152602001610218565b6102807f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610218565b6003545b604051908152602001610218565b61024961076a565b61029c6102c0366004611691565b610910565b6102496102d33660046116c4565b6109cc565b6102807f000000000000000000000000000000000000000000000000000000000000000081565b61024961030d366004611764565b610b95565b61029c610320366004611691565b600660209081526000928352604080842090915290825290205481565b61029c61034b366004611676565b6001600160a01b031660009081526004602052604090205490565b610234610cd3565b6102807f000000000000000000000000000000000000000000000000000000000000000081565b6102806103a336600461174b565b610d39565b6000546001600160a01b0316610280565b6102496103c7366004611764565b610d63565b61029c6103da366004611676565b610e7a565b7f0000000000000000000000000000000000000000000000000000000000000000610280565b61029c610413366004611691565b600760209081526000928352604080842090915290825290205481565b61024961043e366004611676565b60086020526000908152604090205460ff1681565b610249610461366004611676565b610ef6565b61029c61110a565b61029c61047c366004611676565b6001600160a01b031660009081526005602052604090206001015490565b6102346104a8366004611676565b6111a5565b600154610280906001600160a01b031681565b60025460005b81811015610585576000600282815481106104e3576104e36119b1565b6000918252602090912001546001600160a01b031690506105048482610910565b6001600160a01b0380831660009081526007602090815260408083209389168352929052205561054c816001600160a01b031660009081526005602052604090206001015490565b6001600160a01b0391821660009081526006602090815260408083209488168352939052919091205561057e81611980565b90506104c6565b505050565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105f95760405162461bcd60e51b815260206004820152600d60248201526c27b7363c9027b832b930ba37b960991b60448201526064015b60405180910390fd5b600254849060005b818110156106c05760006002828154811061061e5761061e6119b1565b6000918252602090912001546001600160a01b0316905061063f8482610910565b6001600160a01b03808316600090815260076020908152604080832093891683529290522055610687816001600160a01b031660009081526005602052604090206001015490565b6001600160a01b039182166000908152600660209081526040808320948816835293905291909120556106b981611980565b9050610601565b50846003546106cf919061193d565b6003556001600160a01b0386166000908152600460205260409020546106f690869061193d565b6001600160a01b038716600081815260046020526040908190209290925590517f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906107459088815260200190565b60405180910390a2831561075e5761075c86610ef6565b505b50600195945050505050565b6002546000903390825b8181101561083357600060028281548110610791576107916119b1565b6000918252602090912001546001600160a01b031690506107b28482610910565b6001600160a01b038083166000908152600760209081526040808320938916835292905220556107fa816001600160a01b031660009081526005602052604090206001015490565b6001600160a01b0391821660009081526006602090815260408083209488168352939052919091205561082c81611980565b9050610774565b5060025460005b8181101561090557600060028281548110610857576108576119b1565b60009182526020822001546001600160a01b031691506108773383610910565b905080156108f2576001600160a01b03821660008181526007602090815260408083203380855292528220919091556108b1919083611287565b6040518181526001600160a01b0383169033907f8e0d3fa908fd7ee819155b3ce71e292b601bbeb0cd00d7758b9d226a523cb8279060200160405180910390a35b5050806108fe90611980565b905061083a565b506001935050505090565b6001600160a01b03808216600090815260076020908152604080832093861683529290529081205461094061110a565b61094b90600a611876565b6001600160a01b038481166000818152600660209081526040808320948a1683529381528382205492825260059052919091206001015461098c919061193d565b6001600160a01b0386166000908152600460205260409020546109af919061191e565b6109b99190611811565b6109c391906117f9565b90505b92915050565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a365760405162461bcd60e51b815260206004820152600d60248201526c27b7363c9027b832b930ba37b960991b60448201526064016105f0565b600254839060005b81811015610afd57600060028281548110610a5b57610a5b6119b1565b6000918252602090912001546001600160a01b03169050610a7c8482610910565b6001600160a01b03808316600090815260076020908152604080832093891683529290522055610ac4816001600160a01b031660009081526005602052604090206001015490565b6001600160a01b03918216600090815260066020908152604080832094881683529390529190912055610af681611980565b9050610a3e565b5083600354610b0c91906117f9565b6003556001600160a01b038516600090815260046020526040902054610b339085906117f9565b6001600160a01b038616600081815260046020526040908190209290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90610b829087815260200190565b60405180910390a2506001949350505050565b6001600160a01b03811660009081526008602052604081205460ff16610bba57600080fd5b610bcf6001600160a01b038316333086611330565b6001600160a01b03821660009081526005602052604090206003810154610bf79085906117f9565b60038083019190915554610c245783816002016000828254610c1991906117f9565b90915550610c869050565b600281015415610c47576002810154610c3d90856117f9565b6000600283015593505b600354610c5261110a565b610c5d90600a611876565b610c67908661191e565b610c719190611811565b8160010154610c8091906117f9565b60018201555b826001600160a01b03167ffb5edb6eb340a01f6a67189edc978df97841c43752c212fc85995ea23001763585604051610cc191815260200190565b60405180910390a25060019392505050565b6000546001600160a01b03163314610d2d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105f0565b610d376000611387565b565b60028181548110610d4957600080fd5b6000918252602090912001546001600160a01b0316905081565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610ddd5760405162461bcd60e51b815260206004820152600c60248201527f4f6e6c79204d616e61676572000000000000000000000000000000000000000060448201526064016105f0565b6001600160a01b03821660009081526008602052604090205460ff16610bba576002805460018082019092557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385169081179091556000818152600860205260409020805460ff1916909217909155610bcf90333086611330565b6000816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610eb557600080fd5b505afa158015610ec9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eed9190611787565b60ff1692915050565b6002546000908290825b81811015610fbf57600060028281548110610f1d57610f1d6119b1565b6000918252602090912001546001600160a01b03169050610f3e8482610910565b6001600160a01b03808316600090815260076020908152604080832093891683529290522055610f86816001600160a01b031660009081526005602052604090206001015490565b6001600160a01b03918216600090815260066020908152604080832094881683529390529190912055610fb881611980565b9050610f00565b50336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146110285760405162461bcd60e51b815260206004820152600d60248201526c27b7363c9027b832b930ba37b960991b60448201526064016105f0565b60025460005b8181101561075e5760006002828154811061104b5761104b6119b1565b60009182526020822001546001600160a01b0316915061106b8883610910565b905080156110f7576001600160a01b038083166000818152600760209081526040808320948d168352939052918220919091556110a9908983611287565b816001600160a01b0316886001600160a01b03167f8e0d3fa908fd7ee819155b3ce71e292b601bbeb0cd00d7758b9d226a523cb827836040516110ee91815260200190565b60405180910390a35b50508061110390611980565b905061102e565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561116557600080fd5b505afa158015611179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119d9190611787565b60ff16905090565b6000546001600160a01b031633146111ff5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105f0565b6001600160a01b03811661127b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105f0565b61128481611387565b50565b6040516001600160a01b0383166024820152604481018290526105859084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526113e4565b6040516001600160a01b03808516602483015283166044820152606481018290526113819085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016112cc565b50505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611439826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114c99092919063ffffffff16565b8051909150156105855780806020019051810190611457919061172e565b6105855760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016105f0565b60606114d884846000856114e2565b90505b9392505050565b60608247101561155a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016105f0565b843b6115a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105f0565b600080866001600160a01b031685876040516115c491906117aa565b60006040518083038185875af1925050503d8060008114611601576040519150601f19603f3d011682016040523d82523d6000602084013e611606565b606091505b5091509150611616828286611621565b979650505050505050565b606083156116305750816114db565b8251156116405782518084602001fd5b8160405162461bcd60e51b81526004016105f091906117c6565b80356001600160a01b038116811461167157600080fd5b919050565b60006020828403121561168857600080fd5b6109c38261165a565b600080604083850312156116a457600080fd5b6116ad8361165a565b91506116bb6020840161165a565b90509250929050565b600080604083850312156116d757600080fd5b6116e08361165a565b946020939093013593505050565b60008060006060848603121561170357600080fd5b61170c8461165a565b9250602084013591506040840135611723816119c7565b809150509250925092565b60006020828403121561174057600080fd5b81516114db816119c7565b60006020828403121561175d57600080fd5b5035919050565b6000806040838503121561177757600080fd5b823591506116bb6020840161165a565b60006020828403121561179957600080fd5b815160ff811681146114db57600080fd5b600082516117bc818460208701611954565b9190910192915050565b60208152600082518060208401526117e5816040850160208701611954565b601f01601f19169190910160400192915050565b6000821982111561180c5761180c61199b565b500190565b60008261182e57634e487b7160e01b600052601260045260246000fd5b500490565b600181815b8085111561186e5781600019048211156118545761185461199b565b8085161561186157918102915b93841c9390800290611838565b509250929050565b60006109c3838360008261188c575060016109c6565b81611899575060006109c6565b81600181146118af57600281146118b9576118d5565b60019150506109c6565b60ff8411156118ca576118ca61199b565b50506001821b6109c6565b5060208310610133831016604e8410600b84101617156118f8575081810a6109c6565b6119028383611833565b80600019048211156119165761191661199b565b029392505050565b60008160001904831182151516156119385761193861199b565b500290565b60008282101561194f5761194f61199b565b500390565b60005b8381101561196f578181015183820152602001611957565b838111156113815750506000910152565b60006000198214156119945761199461199b565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b801515811461128457600080fdfea2646970667358221220e65dc1625bec4d4411b21a4201cb3c3f7b8f3104eb858f24a92e4a16aeffb95b64736f6c6343000807003300000000000000000000000048abadadce4bae4c47f9877d5c08705ad7131a0500000000000000000000000022d4002028f537599be9f666d1c4fa138522f9c8000000000000000000000000423d0fe33031aa4456a17b150804aa57fc157d970000000000000000000000008b3d9f0017fa369cd8c164d0cc078bf4ca588ae5