[ { "inputs": [ { "internalType": "address", "name": "_voter", "type": "address" }, { "internalType": "address", "name": "_plugin", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "Gauge__InvalidZeroInput", "type": "error" }, { "inputs": [], "name": "Gauge__NotAuthorizedPlugin", "type": "error" }, { "inputs": [], "name": "Gauge__NotAuthorizedUser", "type": "error" }, { "inputs": [], "name": "Gauge__NotAuthorizedVoter", "type": "error" }, { "inputs": [], "name": "Gauge__NotRewardToken", "type": "error" }, { "inputs": [], "name": "Gauge__RewardTokenAlreadyAdded", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Gauge__Deposited", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "rewardToken", "type": "address" } ], "name": "Gauge__RewardAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "rewardToken", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "Gauge__RewardNotified", "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": "Gauge__RewardPaid", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Gauge__Withdrawn", "type": "event" }, { "inputs": [], "name": "DURATION", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "_deposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "_withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_rewardsToken", "type": "address" } ], "name": "addReward", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "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" }, { "internalType": "address", "name": "_rewardsToken", "type": "address" } ], "name": "earned", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "getReward", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_rewardsToken", "type": "address" } ], "name": "getRewardForDuration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getRewardTokens", "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": [ { "internalType": "address", "name": "_rewardsToken", "type": "address" } ], "name": "lastTimeRewardApplicable", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "rewardToken", "type": "address" } ], "name": "left", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_rewardsToken", "type": "address" }, { "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "notifyRewardAmount", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "plugin", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "rewardData", "outputs": [ { "internalType": "uint256", "name": "periodFinish", "type": "uint256" }, { "internalType": "uint256", "name": "rewardRate", "type": "uint256" }, { "internalType": "uint256", "name": "lastUpdateTime", "type": "uint256" }, { "internalType": "uint256", "name": "rewardPerTokenStored", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_rewardsToken", "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" }, { "internalType": "address", "name": "", "type": "address" } ], "name": "rewards", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "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": [], "name": "voter", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" } ]
60c06040523480156200001157600080fd5b506040516200192e3803806200192e83398101604081905262000034916200006e565b60016000556001600160a01b039081166080521660a052620000a6565b80516001600160a01b03811681146200006957600080fd5b919050565b600080604083850312156200008257600080fd5b6200008d8362000051565b91506200009d6020840162000051565b90509250929050565b60805160a05161182a6200010460003960008181610175015281816106880152818161079c015281816109a701528181610a4d01528181610e5e0152610fc601526000818161037e0152818161047c0152610c52015261182a6000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806399bcc052116100b8578063bcd110141161007c578063bcd1101414610313578063c00007b014610326578063c4f59f9b14610339578063e70b9e271461034e578063ef01df4f14610379578063f1229777146103a057600080fd5b806399bcc052146102945780639c9b2e21146102a7578063b5fd73f8146102ba578063b66503cf146102ed578063b790a77b1461030057600080fd5b8063638634ee116100ff578063638634ee146102055780636da1339c146102185780637035ab981461022d57806370a08231146102585780637bb7bed11461028157600080fd5b806318160ddd1461013c5780631be0528914610153578063211dc32d1461015d57806346c96aac1461017057806348e5d9f8146101af575b600080fd5b6006545b6040519081526020015b60405180910390f35b61014062093a8081565b61014061016b3660046115b6565b6103b3565b6101977f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161014a565b6101e56101bd3660046115ef565b6001602081905260009182526040909120805491810154600282015460039092015490919084565b60408051948552602085019390935291830152606082015260800161014a565b6101406102133660046115ef565b61044d565b61022b61022636600461160c565b610471565b005b61014061023b3660046115b6565b600460209081526000928352604080842090915290825290205481565b6101406102663660046115ef565b6001600160a01b031660009081526007602052604090205490565b61019761028f366004611638565b6106eb565b6101406102a23660046115ef565b610715565b61022b6102b53660046115ef565b610791565b6102dd6102c83660046115ef565b60026020526000908152604090205460ff1681565b604051901515815260200161014a565b61022b6102fb36600461160c565b6108a3565b61022b61030e36600461160c565b610c47565b6101406103213660046115ef565b610e8d565b61022b6103343660046115ef565b610eb7565b610341611110565b60405161014a9190611651565b61014061035c3660046115b6565b600560209081526000928352604080842090915290825290205481565b6101977f000000000000000000000000000000000000000000000000000000000000000081565b6101406103ae3660046115ef565b611172565b6001600160a01b038083166000818152600560209081526040808320948616808452948252808320549383526004825280832094835293905291822054670de0b6b3a76400009061040385611172565b61040d91906116b4565b6001600160a01b03861660009081526007602052604090205461043091906116c7565b61043a91906116de565b6104449190611700565b90505b92915050565b6001600160a01b038116600090815260016020526040812054610447904290611224565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ba57604051635077e0cd60e11b815260040160405180910390fd5b80806000036104dc5760405163577dc84160e01b815260040160405180910390fd5b8260005b6003548110156105d5576000600382815481106104ff576104ff611713565b6000918252602090912001546001600160a01b0316905061051f81611172565b6001600160a01b0382166000908152600160205260409020600301556105448161044d565b6001600160a01b038083166000908152600160205260409020600201919091558316156105c25761057583826103b3565b6001600160a01b0380851660008181526005602090815260408083209487168084529482528083209590955560018152848220600301549282526004815284822093825292909252919020555b50806105cd81611729565b9150506104e0565b50826006546105e49190611700565b6006556001600160a01b03841660009081526007602052604090205461060b908490611700565b6001600160a01b038516600081815260076020526040908190209290925590517f17582f67c04a2feb9dfe1d1c0ed8478dac3963e02816f730bb6fb88be27e80b39061065a9086815260200190565b60405180910390a260405163145d426560e11b81526001600160a01b038581166004830152602482018590527f000000000000000000000000000000000000000000000000000000000000000016906328ba84ca906044015b600060405180830381600087803b1580156106cd57600080fd5b505af11580156106e1573d6000803e3d6000fd5b5050505050505050565b600381815481106106fb57600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b038116600090815260016020526040812054421061073c57506000919050565b6001600160a01b0382166000908152600160205260408120546107609042906116b4565b6001600160a01b0384166000908152600160208190526040909120015490915061078a90826116c7565b9392505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107da576040516326f11a6360e21b815260040160405180910390fd5b6001600160a01b03811660009081526002602052604090205460ff1615610814576040516335a6e64760e11b815260040160405180910390fd5b6003805460018082019092557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b0319166001600160a01b038416908117909155600081815260026020526040808220805460ff1916909417909355915190917f162da511b579ed5b6110bf8e5d4cd6c0b3c1b38f1d828e038d1003a9c3098c0c91a250565b6108ab61123a565b6000805b6003548110156109a4576000600382815481106108ce576108ce611713565b6000918252602090912001546001600160a01b031690506108ee81611172565b6001600160a01b0382166000908152600160205260409020600301556109138161044d565b6001600160a01b038083166000908152600160205260409020600201919091558316156109915761094483826103b3565b6001600160a01b0380851660008181526005602090815260408083209487168084529482528083209590955560018152848220600301549282526004815284822093825292909252919020555b508061099c81611729565b9150506108af565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c544df0c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a279190611742565b6001600160a01b0316836001600160a01b0316148015610a705750336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614155b15610a8e576040516326f11a6360e21b815260040160405180910390fd5b6001600160a01b03831660009081526002602052604090205460ff16610ac75760405163079c823d60e11b815260040160405180910390fd5b610adc6001600160a01b038416333085611298565b6001600160a01b0383166000908152600160205260409020544210610b2a57610b0862093a80836116de565b6001600160a01b03841660009081526001602081905260409091200155610bb2565b6001600160a01b038316600090815260016020526040812054610b4e9042906116b4565b6001600160a01b03851660009081526001602081905260408220015491925090610b7890836116c7565b905062093a80610b888286611700565b610b9291906116de565b6001600160a01b0386166000908152600160208190526040909120015550505b6001600160a01b0383166000908152600160205260409020426002909101819055610be19062093a8090611700565b6001600160a01b038416600081815260016020526040908190209290925590517fef22e4f053df6047c62d3815f55a5db592f49879b5d6740f163c3c9998ffdd6d90610c309085815260200190565b60405180910390a250610c436001600055565b5050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c9057604051635077e0cd60e11b815260040160405180910390fd5b8080600003610cb25760405163577dc84160e01b815260040160405180910390fd5b8260005b600354811015610dab57600060038281548110610cd557610cd5611713565b6000918252602090912001546001600160a01b03169050610cf581611172565b6001600160a01b038216600090815260016020526040902060030155610d1a8161044d565b6001600160a01b03808316600090815260016020526040902060020191909155831615610d9857610d4b83826103b3565b6001600160a01b0380851660008181526005602090815260408083209487168084529482528083209590955560018152848220600301549282526004815284822093825292909252919020555b5080610da381611729565b915050610cb6565b5082600654610dba91906116b4565b6006556001600160a01b038416600090815260076020526040902054610de19084906116b4565b6001600160a01b038516600081815260076020526040908190209290925590517fffc0abbe8eadab32fc71e33af4b8cf4346371a8aa1d97b804ba2968e575dbc1a90610e309086815260200190565b60405180910390a260405163b014da2160e01b81526001600160a01b038581166004830152602482018590527f0000000000000000000000000000000000000000000000000000000000000000169063b014da21906044016106b3565b6001600160a01b0381166000908152600160208190526040822001546104479062093a80906116c7565b8060005b600354811015610fb057600060038281548110610eda57610eda611713565b6000918252602090912001546001600160a01b03169050610efa81611172565b6001600160a01b038216600090815260016020526040902060030155610f1f8161044d565b6001600160a01b03808316600090815260016020526040902060020191909155831615610f9d57610f5083826103b3565b6001600160a01b0380851660008181526005602090815260408083209487168084529482528083209590955560018152848220600301549282526004815284822093825292909252919020555b5080610fa881611729565b915050610ebb565b506040516363453ae160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906363453ae190602401600060405180830381600087803b15801561101257600080fd5b505af1158015611026573d6000803e3d6000fd5b5050505060005b60035481101561110b5760006003828154811061104c5761104c611713565b60009182526020808320909101546001600160a01b0387811684526005835260408085209190921680855292529091205490915080156110f6576001600160a01b0385811660008181526005602090815260408083209487168084529482528083209290925590518481527f773189df03a25c28916cd3a8c2609c1c3d8c0386d0fe0958aa3f62c888bac6aa910160405180910390a36110f66001600160a01b0383168683611309565b5050808061110390611729565b91505061102d565b505050565b6060600380548060200260200160405190810160405280929190818152602001828054801561116857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161114a575b5050505050905090565b600060065460000361119d57506001600160a01b031660009081526001602052604090206003015490565b6006546001600160a01b0383166000908152600160208190526040909120908101546002909101546111ce8561044d565b6111d891906116b4565b6111e291906116c7565b6111f490670de0b6b3a76400006116c7565b6111fe91906116de565b6001600160a01b0383166000908152600160205260409020600301546104479190611700565b60008183106112335781610444565b5090919050565b6002600054036112915760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600055565b6040516001600160a01b03808516602483015283166044820152606481018290526113039085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611339565b50505050565b6040516001600160a01b03831660248201526044810182905261110b90849063a9059cbb60e01b906064016112cc565b600061138e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661140e9092919063ffffffff16565b90508051600014806113af5750808060200190518101906113af919061175f565b61110b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611288565b606061141d8484600085611425565b949350505050565b6060824710156114865760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611288565b600080866001600160a01b031685876040516114a291906117a5565b60006040518083038185875af1925050503d80600081146114df576040519150601f19603f3d011682016040523d82523d6000602084013e6114e4565b606091505b50915091506114f587838387611500565b979650505050505050565b6060831561156f578251600003611568576001600160a01b0385163b6115685760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611288565b508161141d565b61141d83838151156115845781518083602001fd5b8060405162461bcd60e51b815260040161128891906117c1565b6001600160a01b03811681146115b357600080fd5b50565b600080604083850312156115c957600080fd5b82356115d48161159e565b915060208301356115e48161159e565b809150509250929050565b60006020828403121561160157600080fd5b813561078a8161159e565b6000806040838503121561161f57600080fd5b823561162a8161159e565b946020939093013593505050565b60006020828403121561164a57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156116925783516001600160a01b03168352928401929184019160010161166d565b50909695505050505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104475761044761169e565b80820281158282048414176104475761044761169e565b6000826116fb57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156104475761044761169e565b634e487b7160e01b600052603260045260246000fd5b60006001820161173b5761173b61169e565b5060010190565b60006020828403121561175457600080fd5b815161078a8161159e565b60006020828403121561177157600080fd5b8151801515811461078a57600080fd5b60005b8381101561179c578181015183820152602001611784565b50506000910152565b600082516117b7818460208701611781565b9190910192915050565b60208152600082518060208401526117e0816040850160208701611781565b601f01601f1916919091016040019291505056fea2646970667358221220425dee3b1a86337970045b90d40f4821d21d9417aad278d9e16931644a40940f64736f6c634300081300330000000000000000000000001f9505ae18755915dcd2a95f38c7560cab149d9c0000000000000000000000000d71cdcc3686535479f6b153848519efafa87105