[ { "inputs": [ { "internalType": "address", "name": "_voter", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "Bribe__InvalidZeroInput", "type": "error" }, { "inputs": [], "name": "Bribe__NotAuthorizedVoter", "type": "error" }, { "inputs": [], "name": "Bribe__NotRewardToken", "type": "error" }, { "inputs": [], "name": "Bribe__RewardSmallerThanDuration", "type": "error" }, { "inputs": [], "name": "Bribe__RewardTokenAlreadyAdded", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Bribe__Deposited", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "rewardToken", "type": "address" } ], "name": "Bribe__RewardAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "rewardToken", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "Bribe__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": "Bribe__RewardPaid", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Bribe__Withdrawn", "type": "event" }, { "inputs": [], "name": "DURATION", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "account", "type": "address" } ], "name": "_deposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "account", "type": "address" } ], "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": "_rewardsToken", "type": "address" } ], "name": "left", "outputs": [ { "internalType": "uint256", "name": "leftover", "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": [ { "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" } ]
60a060405234801561001057600080fd5b5060405161169338038061169383398101604081905261002f91610045565b60016000556001600160a01b0316608052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b6080516115ee6100a560003960008181610192015281816104260152818161061d01526108d001526115ee6000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80637bb7bed1116100ad578063bcd1101411610071578063bcd1101414610308578063c00007b01461031b578063c4f59f9b1461032e578063e70b9e2714610343578063f12297771461036e57600080fd5b80637bb7bed11461028957806399bcc0521461029c5780639c9b2e21146102af578063b5fd73f8146102c2578063b66503cf146102f557600080fd5b806346c96aac116100f457806346c96aac1461018d57806348e5d9f8146101cc578063638634ee146102225780637035ab981461023557806370a082311461026057600080fd5b806318160ddd146101315780631be0528914610148578063211dc32d14610152578063293311ab14610165578063463cd9701461017a575b600080fd5b6006545b6040519081526020015b60405180910390f35b61013562093a8081565b61013561016036600461137e565b610381565b6101786101733660046113b1565b61041b565b005b6101786101883660046113b1565b610612565b6101b47f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013f565b6102026101da3660046113d4565b6001602081905260009182526040909120805491810154600282015460039092015490919084565b60408051948552602085019390935291830152606082015260800161013f565b6101356102303660046113d4565b6107fb565b61013561024336600461137e565b600460209081526000928352604080842090915290825290205481565b61013561026e3660046113d4565b6001600160a01b031660009081526007602052604090205490565b6101b46102973660046113ef565b61081f565b6101356102aa3660046113d4565b610849565b6101786102bd3660046113d4565b6108c5565b6102e56102d03660046113d4565b60026020526000908152604090205460ff1681565b604051901515815260200161013f565b610178610303366004611408565b6109d4565b6101356103163660046113d4565b610cb3565b6101786103293660046113d4565b610cdd565b610336610ecf565b60405161013f9190611432565b61013561035136600461137e565b600560209081526000928352604080842090915290825290205481565b61013561037c3660046113d4565b610f31565b6001600160a01b038083166000818152600560209081526040808320948616808452948252808320549383526004825280832094835293905291822054670de0b6b3a7640000906103d185610f31565b6103db9190611495565b6001600160a01b0386166000908152600760205260409020546103fe91906114a8565b61040891906114bf565b61041291906114e1565b90505b92915050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104645760405163101f867360e01b815260040160405180910390fd5b818060000361048657604051632695f34d60e21b815260040160405180910390fd5b8160005b60035481101561057f576000600382815481106104a9576104a96114f4565b6000918252602090912001546001600160a01b031690506104c981610f31565b6001600160a01b0382166000908152600160205260409020600301556104ee816107fb565b6001600160a01b0380831660009081526001602052604090206002019190915583161561056c5761051f8382610381565b6001600160a01b0380851660008181526005602090815260408083209487168084529482528083209590955560018152848220600301549282526004815284822093825292909252919020555b50806105778161150a565b91505061048a565b508360065461058e9190611495565b6006556001600160a01b0383166000908152600760205260409020546105b5908590611495565b6001600160a01b038416600081815260076020526040908190209290925590517f7a0397ecfe866432a17af3db4a06ba591f48042ff678cee73b604fe2fb11ef40906106049087815260200190565b60405180910390a250505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461065b5760405163101f867360e01b815260040160405180910390fd5b818060000361067d57604051632695f34d60e21b815260040160405180910390fd5b8160005b600354811015610776576000600382815481106106a0576106a06114f4565b6000918252602090912001546001600160a01b031690506106c081610f31565b6001600160a01b0382166000908152600160205260409020600301556106e5816107fb565b6001600160a01b03808316600090815260016020526040902060020191909155831615610763576107168382610381565b6001600160a01b0380851660008181526005602090815260408083209487168084529482528083209590955560018152848220600301549282526004815284822093825292909252919020555b508061076e8161150a565b915050610681565b508360065461078591906114e1565b6006556001600160a01b0383166000908152600760205260409020546107ac9085906114e1565b6001600160a01b038416600081815260076020526040908190209290925590517f2ebcaad0aeb54db6f08c47b7d3643d4f62cd1bf924f385248954dd38a971395f906106049087815260200190565b6001600160a01b038116600090815260016020526040812054610415904290610fe3565b6003818154811061082f57600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b038116600090815260016020526040812054421061087057506000919050565b6001600160a01b038216600090815260016020526040812054610894904290611495565b6001600160a01b038416600090815260016020819052604090912001549091506108be90826114a8565b9392505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461090e5760405163101f867360e01b815260040160405180910390fd5b6001600160a01b03811660009081526002602052604090205460ff161561094857604051633241f4eb60e21b815260040160405180910390fd5b6001600160a01b038116600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b03191684179055517ffc007a4f7212c7361eb944439fd0085d31850dcdf8e6587d8d93b2e91e7922639190a250565b6109dc610ff9565b6000805b600354811015610ad5576000600382815481106109ff576109ff6114f4565b6000918252602090912001546001600160a01b03169050610a1f81610f31565b6001600160a01b038216600090815260016020526040902060030155610a44816107fb565b6001600160a01b03808316600090815260016020526040902060020191909155831615610ac257610a758382610381565b6001600160a01b0380851660008181526005602090815260408083209487168084529482528083209590955560018152848220600301549282526004815284822093825292909252919020555b5080610acd8161150a565b9150506109e0565b5062093a80821015610afa57604051636f65e03760e01b815260040160405180910390fd5b6001600160a01b03831660009081526002602052604090205460ff16610b3357604051633429b68b60e11b815260040160405180910390fd5b610b486001600160a01b038416333085611057565b6001600160a01b0383166000908152600160205260409020544210610b9657610b7462093a80836114bf565b6001600160a01b03841660009081526001602081905260409091200155610c1e565b6001600160a01b038316600090815260016020526040812054610bba904290611495565b6001600160a01b03851660009081526001602081905260408220015491925090610be490836114a8565b905062093a80610bf482866114e1565b610bfe91906114bf565b6001600160a01b0386166000908152600160208190526040909120015550505b6001600160a01b0383166000908152600160205260409020426002909101819055610c4d9062093a80906114e1565b6001600160a01b038416600081815260016020526040908190209290925590517ff2adff238dbae5b26d77229769dcbfcb78b94a095cc14cde8d2edc62636e207990610c9c9085815260200190565b60405180910390a250610caf6001600055565b5050565b6001600160a01b0381166000908152600160208190526040822001546104159062093a80906114a8565b610ce5610ff9565b8060005b600354811015610dde57600060038281548110610d0857610d086114f4565b6000918252602090912001546001600160a01b03169050610d2881610f31565b6001600160a01b038216600090815260016020526040902060030155610d4d816107fb565b6001600160a01b03808316600090815260016020526040902060020191909155831615610dcb57610d7e8382610381565b6001600160a01b0380851660008181526005602090815260408083209487168084529482528083209590955560018152848220600301549282526004815284822093825292909252919020555b5080610dd68161150a565b915050610ce9565b5060005b600354811015610ec057600060038281548110610e0157610e016114f4565b60009182526020808320909101546001600160a01b038781168452600583526040808520919092168085529252909120549091508015610eab576001600160a01b0385811660008181526005602090815260408083209487168084529482528083209290925590518481527fdbf1859b6253a78673ce7b23bcf2f95b11b495ad33a786f2dc67993747c75519910160405180910390a3610eab6001600160a01b03831686836110c8565b50508080610eb89061150a565b915050610de2565b5050610ecc6001600055565b50565b60606003805480602002602001604051908101604052809291908181526020018280548015610f2757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610f09575b5050505050905090565b6000600654600003610f5c57506001600160a01b031660009081526001602052604090206003015490565b6006546001600160a01b038316600090815260016020819052604090912090810154600290910154610f8d856107fb565b610f979190611495565b610fa191906114a8565b610fb390670de0b6b3a76400006114a8565b610fbd91906114bf565b6001600160a01b03831660009081526001602052604090206003015461041591906114e1565b6000818310610ff25781610412565b5090919050565b6002600054036110505760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600055565b6040516001600160a01b03808516602483015283166044820152606481018290526110c29085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526110fd565b50505050565b6040516001600160a01b0383166024820152604481018290526110f890849063a9059cbb60e01b9060640161108b565b505050565b6000611152826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111d29092919063ffffffff16565b90508051600014806111735750808060200190518101906111739190611523565b6110f85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611047565b60606111e184846000856111e9565b949350505050565b60608247101561124a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611047565b600080866001600160a01b031685876040516112669190611569565b60006040518083038185875af1925050503d80600081146112a3576040519150601f19603f3d011682016040523d82523d6000602084013e6112a8565b606091505b50915091506112b9878383876112c4565b979650505050505050565b6060831561133357825160000361132c576001600160a01b0385163b61132c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611047565b50816111e1565b6111e183838151156113485781518083602001fd5b8060405162461bcd60e51b81526004016110479190611585565b80356001600160a01b038116811461137957600080fd5b919050565b6000806040838503121561139157600080fd5b61139a83611362565b91506113a860208401611362565b90509250929050565b600080604083850312156113c457600080fd5b823591506113a860208401611362565b6000602082840312156113e657600080fd5b61041282611362565b60006020828403121561140157600080fd5b5035919050565b6000806040838503121561141b57600080fd5b61142483611362565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b818110156114735783516001600160a01b03168352928401929184019160010161144e565b50909695505050505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104155761041561147f565b80820281158282048414176104155761041561147f565b6000826114dc57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156104155761041561147f565b634e487b7160e01b600052603260045260246000fd5b60006001820161151c5761151c61147f565b5060010190565b60006020828403121561153557600080fd5b815180151581146108be57600080fd5b60005b83811015611560578181015183820152602001611548565b50506000910152565b6000825161157b818460208701611545565b9190910192915050565b60208152600082518060208401526115a4816040850160208701611545565b601f01601f1916919091016040019291505056fea264697066735822122025b822d9acc588f3628f678b5dcb87531d190dad230dcf93239250a65c7d06db64736f6c634300081300330000000000000000000000001f9505ae18755915dcd2a95f38c7560cab149d9c