From 2e86860bce97342ff7bdabc7541ee65cc1447b8a Mon Sep 17 00:00:00 2001 From: wei3erHase Date: Wed, 18 May 2022 11:50:58 +0200 Subject: [PATCH] chore: retrieve old GaugeProxy --- .solhintignore | 1 + contracts/GaugeProxy.sol | 355 ++++++++++++ deployments/ethereum/GaugeProxyV2.json | 760 +++++++++++++++++++++++++ 3 files changed, 1116 insertions(+) create mode 100644 contracts/GaugeProxy.sol create mode 100644 deployments/ethereum/GaugeProxyV2.json diff --git a/.solhintignore b/.solhintignore index 6456d30..da82b3f 100644 --- a/.solhintignore +++ b/.solhintignore @@ -2,6 +2,7 @@ node_modules contracts/mock contracts/for-test +contracts/GaugeProxy.sol contracts/claim.sol contracts/distribution.sol contracts/faucet.sol diff --git a/contracts/GaugeProxy.sol b/contracts/GaugeProxy.sol new file mode 100644 index 0000000..22abc4d --- /dev/null +++ b/contracts/GaugeProxy.sol @@ -0,0 +1,355 @@ +/** + *Submitted for verification at Etherscan.io on 2021-08-07 +*/ + +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.6; + +library Math { + function max(uint a, uint b) internal pure returns (uint) { + return a >= b ? a : b; + } + function min(uint a, uint b) internal pure returns (uint) { + return a < b ? a : b; + } +} + +interface erc20 { + function totalSupply() external view returns (uint256); + function transfer(address recipient, uint amount) external returns (bool); + function decimals() external view returns (uint8); + function balanceOf(address) external view returns (uint); + function transferFrom(address sender, address recipient, uint amount) external returns (bool); + function approve(address spender, uint value) external returns (bool); +} + +interface ve { + function locked__end(address) external view returns (uint); + function deposit_for(address, uint) external; +} + +interface delegate { + function get_adjusted_ve_balance(address, address) external view returns (uint); +} + +contract Gauge { + address constant _ibff = 0xb347132eFf18a3f63426f4988ef626d2CbE274F5; + address constant _veibff = 0x4D0518C9136025903751209dDDdf6C67067357b1; + address constant _delegate = 0x0ea89fb2E5b8FA8F14b741ffe1A4617A32611DfC; + address constant _vedist = 0x15E61581AFa2707bca42Bae529387eEa11f68E6e; + + uint constant DURATION = 7 days; + uint constant PRECISION = 10 ** 18; + uint constant MAXTIME = 4 * 365 * 86400; + + address public immutable stake; + address immutable distribution; + + uint public rewardRate; + uint public periodFinish; + uint public lastUpdateTime; + uint public rewardPerTokenStored; + + modifier onlyDistribution() { + require(msg.sender == distribution); + _; + } + + mapping(address => uint) public userRewardPerTokenPaid; + mapping(address => uint) public rewards; + + uint public totalSupply; + uint public derivedSupply; + mapping(address => uint) public balanceOf; + mapping(address => uint) public derivedBalances; + + constructor(address _stake) { + stake = _stake; + distribution = msg.sender; + } + + function lastTimeRewardApplicable() public view returns (uint) { + return Math.min(block.timestamp, periodFinish); + } + + function rewardPerToken() public view returns (uint) { + if (totalSupply == 0) { + return rewardPerTokenStored; + } + return rewardPerTokenStored + ((lastTimeRewardApplicable() - lastUpdateTime) * rewardRate * PRECISION / derivedSupply); + } + + function derivedBalance(address account) public view returns (uint) { + uint _balance = balanceOf[account]; + uint _derived = _balance * 40 / 100; + uint _adjusted = (totalSupply * delegate(_delegate).get_adjusted_ve_balance(account, address(this)) / erc20(_veibff).totalSupply()) * 60 / 100; + return Math.min(_derived + _adjusted, _balance); + } + + function kick(address account) public { + uint _derivedBalance = derivedBalances[account]; + derivedSupply -= _derivedBalance; + _derivedBalance = derivedBalance(account); + derivedBalances[account] = _derivedBalance; + derivedSupply += _derivedBalance; + } + + function earned(address account) public view returns (uint) { + return (derivedBalances[account] * (rewardPerToken() - userRewardPerTokenPaid[account]) / PRECISION) + rewards[account]; + } + + function getRewardForDuration() external view returns (uint) { + return rewardRate * DURATION; + } + + function deposit() external { + _deposit(erc20(stake).balanceOf(msg.sender), msg.sender); + } + + function deposit(uint amount) external { + _deposit(amount, msg.sender); + } + + function deposit(uint amount, address account) external { + _deposit(amount, account); + } + + function _deposit(uint amount, address account) internal updateReward(account) { + totalSupply += amount; + balanceOf[account] += amount; + _safeTransferFrom(stake, account, address(this), amount); + } + + function withdraw() external { + _withdraw(balanceOf[msg.sender]); + } + + function withdraw(uint amount) external { + _withdraw(amount); + } + + function _withdraw(uint amount) internal updateReward(msg.sender) { + totalSupply -= amount; + balanceOf[msg.sender] -= amount; + _safeTransfer(stake, msg.sender, amount); + } + + function getReward() public updateReward(msg.sender) { + uint _reward = rewards[msg.sender]; + uint _user_lock = ve(_veibff).locked__end(msg.sender); + uint _adj = Math.min(_reward * (_user_lock - block.timestamp) / MAXTIME, _reward); + if (_adj > 0) { + rewards[msg.sender] = 0; + _safeTransfer(_ibff, msg.sender, _adj); + ve(_veibff).deposit_for(msg.sender, _adj); + _safeTransfer(_ibff, _vedist, _reward - _adj); + } + } + + function exit() external { + _withdraw(balanceOf[msg.sender]); + getReward(); + } + + function notifyRewardAmount(uint amount) external onlyDistribution updateReward(address(0)) { + if (block.timestamp >= periodFinish) { + rewardRate = amount / DURATION; + } else { + uint _remaining = periodFinish - block.timestamp; + uint _left = _remaining * rewardRate; + rewardRate = (amount + _left) / DURATION; + } + + lastUpdateTime = block.timestamp; + periodFinish = block.timestamp + DURATION; + } + + modifier updateReward(address account) { + rewardPerTokenStored = rewardPerToken(); + lastUpdateTime = lastTimeRewardApplicable(); + if (account != address(0)) { + rewards[account] = earned(account); + userRewardPerTokenPaid[account] = rewardPerTokenStored; + } + _; + if (account != address(0)) { + kick(account); + } + } + + function _safeTransfer(address token, address to, uint256 value) internal { + (bool success, bytes memory data) = + token.call(abi.encodeWithSelector(erc20.transfer.selector, to, value)); + require(success && (data.length == 0 || abi.decode(data, (bool)))); + } + + function _safeTransferFrom(address token, address from, address to, uint256 value) internal { + (bool success, bytes memory data) = + token.call(abi.encodeWithSelector(erc20.transferFrom.selector, from, to, value)); + require(success && (data.length == 0 || abi.decode(data, (bool)))); + } +} + +contract GaugeProxy { + address constant _ibff = 0xb347132eFf18a3f63426f4988ef626d2CbE274F5; + address constant _delegate = 0x0ea89fb2E5b8FA8F14b741ffe1A4617A32611DfC; + address constant ZERO_ADDRESS = 0x0000000000000000000000000000000000000000; + + uint public totalWeight; + + address public gov; + address public nextgov; + uint public commitgov; + uint public constant delay = 1 days; + + address[] internal _tokens; + mapping(address => address) public gauges; // token => gauge + mapping(address => uint) public weights; // token => weight + mapping(address => mapping(address => uint)) public votes; // msg.sender => votes + mapping(address => address[]) public tokenVote;// msg.sender => token + mapping(address => uint) public usedWeights; // msg.sender => total voting weight of user + mapping(address => bool) public enabled; + + function tokens() external view returns (address[] memory) { + return _tokens; + } + + constructor() { + gov = msg.sender; + } + + modifier g() { + require(msg.sender == gov); + _; + } + + function setGov(address _gov) external g { + nextgov = _gov; + commitgov = block.timestamp + delay; + } + + function acceptGov() external { + require(msg.sender == nextgov && commitgov < block.timestamp); + gov = nextgov; + } + + function reset() external { + _reset(msg.sender); + } + + function _reset(address _owner) internal { + address[] storage _tokenVote = tokenVote[_owner]; + uint _tokenVoteCnt = _tokenVote.length; + + for (uint i = 0; i < _tokenVoteCnt; i ++) { + address _token = _tokenVote[i]; + uint _votes = votes[_owner][_token]; + + if (_votes > 0) { + totalWeight -= _votes; + weights[_token] -= _votes; + votes[_owner][_token] = 0; + } + } + + delete tokenVote[_owner]; + } + + function poke(address _owner) public { + address[] memory _tokenVote = tokenVote[_owner]; + uint _tokenCnt = _tokenVote.length; + uint[] memory _weights = new uint[](_tokenCnt); + + uint _prevUsedWeight = usedWeights[_owner]; + uint _weight = delegate(_delegate).get_adjusted_ve_balance(_owner, ZERO_ADDRESS); + + for (uint i = 0; i < _tokenCnt; i ++) { + uint _prevWeight = votes[_owner][_tokenVote[i]]; + _weights[i] = _prevWeight * _weight / _prevUsedWeight; + } + + _vote(_owner, _tokenVote, _weights); + } + + function _vote(address _owner, address[] memory _tokenVote, uint[] memory _weights) internal { + // _weights[i] = percentage * 100 + _reset(_owner); + uint _tokenCnt = _tokenVote.length; + uint _weight = delegate(_delegate).get_adjusted_ve_balance(_owner, ZERO_ADDRESS); + uint _totalVoteWeight = 0; + uint _usedWeight = 0; + + for (uint i = 0; i < _tokenCnt; i ++) { + _totalVoteWeight += _weights[i]; + } + + for (uint i = 0; i < _tokenCnt; i ++) { + address _token = _tokenVote[i]; + address _gauge = gauges[_token]; + uint _tokenWeight = _weights[i] * _weight / _totalVoteWeight; + + if (_gauge != address(0x0)) { + _usedWeight += _tokenWeight; + totalWeight += _tokenWeight; + weights[_token] += _tokenWeight; + tokenVote[_owner].push(_token); + votes[_owner][_token] = _tokenWeight; + } + } + + usedWeights[_owner] = _usedWeight; + } + + function vote(address[] calldata _tokenVote, uint[] calldata _weights) external { + require(_tokenVote.length == _weights.length); + _vote(msg.sender, _tokenVote, _weights); + } + + function addGauge(address _token) external g { + require(gauges[_token] == address(0x0), "exists"); + address _gauge = address(new Gauge(_token)); + gauges[_token] = _gauge; + enabled[_token] = true; + _tokens.push(_token); + } + + function disable(address _token) external g { + enabled[_token] = false; + } + + function enable(address _token) external g { + enabled[_token] = true; + } + + function length() external view returns (uint) { + return _tokens.length; + } + + function distribute() external { + uint _balance = erc20(_ibff).balanceOf(address(this)); + if (_balance > 0 && totalWeight > 0) { + uint _totalWeight = totalWeight; + for (uint i = 0; i < _tokens.length; i++) { + if (!enabled[_tokens[i]]) { + _totalWeight -= weights[_tokens[i]]; + } + } + for (uint x = 0; x < _tokens.length; x++) { + if (enabled[_tokens[x]]) { + uint _reward = _balance * weights[_tokens[x]] / _totalWeight; + if (_reward > 0) { + address _gauge = gauges[_tokens[x]]; + _safeTransfer(_ibff, _gauge, _reward); + Gauge(_gauge).notifyRewardAmount(_reward); + } + } + } + } + } + + function _safeTransfer(address token, address to, uint256 value) internal { + (bool success, bytes memory data) = + token.call(abi.encodeWithSelector(erc20.transfer.selector, to, value)); + require(success && (data.length == 0 || abi.decode(data, (bool)))); + } +} diff --git a/deployments/ethereum/GaugeProxyV2.json b/deployments/ethereum/GaugeProxyV2.json new file mode 100644 index 0000000..4df366c --- /dev/null +++ b/deployments/ethereum/GaugeProxyV2.json @@ -0,0 +1,760 @@ +{ + "address": "0xEdA0b82211Bb7e6E7F0415713580ce91A3C41767", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_gov", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "acceptGov", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_gauge", + "type": "address" + } + ], + "name": "addGauge", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "commitgov", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "delay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "disable", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "distribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "enable", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "enabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "forceDistribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "gauges", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gov", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "keeper", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "length", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nextgov", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "poke", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "reset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_gov", + "type": "address" + } + ], + "name": "setGov", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_keeper", + "type": "address" + } + ], + "name": "setKeeper", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokenVote", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "usedWeights", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_tokenVote", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_weights", + "type": "uint256[]" + } + ], + "name": "vote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "votes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "weights", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xf67129f0303f698228d6ba5e0eb081edbc573537089fc1bb91ec7756336f8001", + "receipt": { + "to": null, + "from": "0x54054EA2db6eDC336cB87966815FD66Cc337f224", + "contractAddress": "0xEdA0b82211Bb7e6E7F0415713580ce91A3C41767", + "transactionIndex": 206, + "gasUsed": "1211196", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000200000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000010000000000000000000000000000000000000000000000000000100000000000000000000020000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000400000000000000000000000000000000000000000000000020000000", + "blockHash": "0x63c0cbf3454e60103eba9d88ece0a5cfbb1faaca96fe38f28564eb4d8d50c177", + "transactionHash": "0xf67129f0303f698228d6ba5e0eb081edbc573537089fc1bb91ec7756336f8001", + "logs": [ + { + "transactionIndex": 206, + "blockNumber": 14798138, + "transactionHash": "0xf67129f0303f698228d6ba5e0eb081edbc573537089fc1bb91ec7756336f8001", + "address": "0x1cEB5cB57C4D4E2b2433641b95Dd330A33185A44", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000eda0b82211bb7e6e7f0415713580ce91a3c41767", + "0x000000000000000000000000edb67ee1b171c4ec66e6c10ec43edbba20fae8e9" + ], + "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "logIndex": 467, + "blockHash": "0x63c0cbf3454e60103eba9d88ece0a5cfbb1faaca96fe38f28564eb4d8d50c177" + } + ], + "blockNumber": 14798138, + "cumulativeGasUsed": "20502412", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0D5Dc686d0a2ABBfDaFDFb4D0533E886517d4E83" + ], + "numDeployments": 1, + "solcInputHash": "e4368c44e67725d071da227a27a32e55", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gov\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"acceptGov\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gauge\",\"type\":\"address\"}],\"name\":\"addGauge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"commitgov\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"disable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"distribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"enable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"enabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"forceDistribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"gauges\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"keeper\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextgov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"poke\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gov\",\"type\":\"address\"}],\"name\":\"setGov\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_keeper\",\"type\":\"address\"}],\"name\":\"setKeeper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenVote\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"usedWeights\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokenVote\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_weights\",\"type\":\"uint256[]\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"votes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"weights\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"acceptGov()\":{\"details\":\"Requires a delay time between the proposal and the execution\"},\"addGauge(address,address)\":{\"params\":{\"_gauge\":\"Address of the gauge to reward the pool\",\"_pool\":\"Address of the pool to reward\"}},\"disable(address)\":{\"details\":\"Vote weight deposited on disabled tokens is taken out of the total weight\",\"params\":{\"_pool\":\"Address of the pool being disabled\"}},\"enable(address)\":{\"params\":{\"_pool\":\"Address of the pool being enabled\"}},\"poke(address)\":{\"details\":\"Vote weight decays with time and this function allows to refresh it\",\"params\":{\"_voter\":\"Address of the voter veing poked\"}},\"setKeeper(address)\":{\"params\":{\"_keeper\":\"Address of the new keeper being set\"}},\"tokens()\":{\"returns\":{\"_0\":\"Array of pools added to the contract\"}},\"vote(address[],uint256[])\":{\"details\":\"Voter is always using its full weight, inputed weights get ponderated\",\"params\":{\"_poolVote\":\"Array of addresses being voted\",\"_weights\":\"Distribution of vote weight to use on addresses\"}}},\"stateVariables\":{\"commitgov\":{\"return\":\"Datetime when next governance can execute transition\",\"returns\":{\"_0\":\"Datetime when next governance can execute transition\"}},\"delay\":{\"return\":\"Time in seconds to pass between a next governance proposal and it's execution\",\"returns\":{\"_0\":\"Time in seconds to pass between a next governance proposal and it's execution\"}},\"enabled\":{\"params\":{\"_pool\":\"Address of the pool being checked\"},\"return\":\"Whether the pool is enabled\",\"returns\":{\"_0\":\"Whether the pool is enabled\"}},\"gauges\":{\"params\":{\"_pool\":\"Address of the pool being checked\"},\"return\":\"Address of the gauge related to the input pool\",\"returns\":{\"_0\":\"Address of the gauge related to the input pool\"}},\"gov\":{\"return\":\"Address of Governance\",\"returns\":{\"_0\":\"Address of Governance\"}},\"keeper\":{\"return\":\"Address with access permission to call distribute function\",\"returns\":{\"_0\":\"Address with access permission to call distribute function\"}},\"nextgov\":{\"return\":\"Address of the proposed next governance\",\"returns\":{\"_0\":\"Address of the proposed next governance\"}},\"tokenVote\":{\"params\":{\"_i\":\"Index of the pool being checked\",\"_voter\":\"Address of the voter being checked\"},\"return\":\"Addresses of the voted pools of a voter\",\"returns\":{\"_0\":\"Addresses of the voted pools of a voter\"}},\"totalWeight\":{\"details\":\"Vote weight used on disabled pools is computed in totalWeight but not reflected in the actual distribution\",\"return\":\"Sum of total weight used on all the pools\",\"returns\":{\"_0\":\"Sum of total weight used on all the pools\"}},\"usedWeights\":{\"params\":{\"_voter\":\"Address of the voter being checked\"},\"return\":\"Total amount of used weight of a voter\",\"returns\":{\"_0\":\"Total amount of used weight of a voter\"}},\"votes\":{\"details\":\"The vote weight decays with time and this function does not reflect that\",\"params\":{\"_pool\":\"Address of the pool being checked\",\"_voter\":\"Address of the voter being checked\"},\"return\":\"Amount of vote weight from the voter, on the pool\",\"returns\":{\"_0\":\"Amount of vote weight from the voter, on the pool\"}},\"weights\":{\"params\":{\"_pool\":\"Address of the pool being checked\"},\"return\":\"Amount of weight vote on the pool\",\"returns\":{\"_0\":\"Amount of weight vote on the pool\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"acceptGov()\":{\"notice\":\"Allows new governance to execute the transition\"},\"addGauge(address,address)\":{\"notice\":\"Allows governance to register a new gauge\"},\"disable(address)\":{\"notice\":\"Allows governance to disable a pool reward\"},\"distribute()\":{\"notice\":\"Function to be upkeep responsible for executing rKP3Rs reward distribution\"},\"enable(address)\":{\"notice\":\"Allows governance to reenable a pool reward\"},\"forceDistribute()\":{\"notice\":\"Allows governance to execute a reward distribution\"},\"gov()\":{\"notice\":\"Governance has permission to manage gauges, and force the distribution\"},\"length()\":{\"notice\":\"returns _lenght Total amount of rewarded pools\"},\"poke(address)\":{\"notice\":\"Refresh a voter weight distributio to current state\"},\"reset()\":{\"notice\":\"Resets function caller vote distribution\"},\"setGov(address)\":{\"notice\":\"Allows governance to propose a new governance\"},\"setKeeper(address)\":{\"notice\":\"Allows governance to modify the keeper address\"},\"vote(address[],uint256[])\":{\"notice\":\"Allows a voter to submit a vote distribution\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/GaugeProxyV2.sol\":\"GaugeProxyV2\"},\"evmVersion\":\"london\",\"libraries\":{\":__CACHE_BREAKER__\":\"0x00000000d41867734bbee4c6863d9255b2b06ac1\"},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"contracts/GaugeProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport './interfaces/external/IKeep3rV1Proxy.sol';\\nimport './interfaces/external/IvKP3R.sol';\\nimport './interfaces/external/IrKP3R.sol';\\nimport './interfaces/external/IGauge.sol';\\nimport './interfaces/IGaugeProxy.sol';\\n\\ncontract GaugeProxyV2 is IGaugeProxy {\\n address constant _rkp3r = 0xEdB67Ee1B171c4eC66E6c10EC43EDBbA20FaE8e9;\\n address constant _vkp3r = 0x2FC52C61fB0C03489649311989CE2689D93dC1a2;\\n address constant _kp3rV1 = 0x1cEB5cB57C4D4E2b2433641b95Dd330A33185A44;\\n address constant _kp3rV1Proxy = 0x976b01c02c636Dd5901444B941442FD70b86dcd5;\\n address constant ZERO_ADDRESS = 0x0000000000000000000000000000000000000000;\\n\\n /// @inheritdoc IGaugeProxy\\n uint256 public totalWeight;\\n\\n /// @inheritdoc IGaugeProxy\\n address public keeper;\\n /// @inheritdoc IGaugeProxy\\n address public gov;\\n /// @inheritdoc IGaugeProxy\\n address public nextgov;\\n /// @inheritdoc IGaugeProxy\\n uint256 public commitgov;\\n /// @inheritdoc IGaugeProxy\\n uint256 public constant delay = 1 days;\\n\\n address[] internal _tokens;\\n /// @inheritdoc IGaugeProxy\\n mapping(address => address) public gauges; // token => gauge\\n /// @inheritdoc IGaugeProxy\\n mapping(address => uint256) public weights; // token => weight\\n /// @inheritdoc IGaugeProxy\\n mapping(address => mapping(address => uint256)) public votes; // msg.sender => votes\\n /// @inheritdoc IGaugeProxy\\n mapping(address => address[]) public tokenVote; // msg.sender => token\\n /// @inheritdoc IGaugeProxy\\n mapping(address => uint256) public usedWeights; // msg.sender => total voting weight of user\\n /// @inheritdoc IGaugeProxy\\n mapping(address => bool) public enabled;\\n\\n /// @inheritdoc IGaugeProxy\\n function tokens() external view returns (address[] memory) {\\n return _tokens;\\n }\\n\\n constructor(address _gov) {\\n gov = _gov;\\n _safeApprove(_kp3rV1, _rkp3r, type(uint256).max);\\n }\\n\\n modifier g() {\\n require(msg.sender == gov);\\n _;\\n }\\n\\n modifier k() {\\n require(msg.sender == keeper);\\n _;\\n }\\n\\n /// @inheritdoc IGaugeProxy\\n function setKeeper(address _keeper) external g {\\n keeper = _keeper;\\n }\\n\\n /// @inheritdoc IGaugeProxy\\n function setGov(address _gov) external g {\\n nextgov = _gov;\\n commitgov = block.timestamp + delay;\\n }\\n\\n /// @inheritdoc IGaugeProxy\\n function acceptGov() external {\\n require(msg.sender == nextgov && commitgov < block.timestamp);\\n gov = nextgov;\\n }\\n\\n /// @inheritdoc IGaugeProxy\\n function reset() external {\\n _reset(msg.sender);\\n }\\n\\n function _reset(address _owner) internal {\\n address[] storage _tokenVote = tokenVote[_owner];\\n uint256 _tokenVoteCnt = _tokenVote.length;\\n\\n for (uint256 i = 0; i < _tokenVoteCnt; i++) {\\n address _token = _tokenVote[i];\\n uint256 _votes = votes[_owner][_token];\\n\\n if (_votes > 0) {\\n totalWeight -= _votes;\\n weights[_token] -= _votes;\\n votes[_owner][_token] = 0;\\n }\\n }\\n\\n delete tokenVote[_owner];\\n }\\n\\n /// @inheritdoc IGaugeProxy\\n function poke(address _owner) public {\\n address[] memory _tokenVote = tokenVote[_owner];\\n uint256 _tokenCnt = _tokenVote.length;\\n uint256[] memory _weights = new uint256[](_tokenCnt);\\n\\n uint256 _prevUsedWeight = usedWeights[_owner];\\n uint256 _weight = IvKP3R(_vkp3r).get_adjusted_ve_balance(_owner, ZERO_ADDRESS);\\n\\n for (uint256 i = 0; i < _tokenCnt; i++) {\\n uint256 _prevWeight = votes[_owner][_tokenVote[i]];\\n _weights[i] = (_prevWeight * _weight) / _prevUsedWeight;\\n }\\n\\n _vote(_owner, _tokenVote, _weights);\\n }\\n\\n function _vote(\\n address _owner,\\n address[] memory _tokenVote,\\n uint256[] memory _weights\\n ) internal {\\n // _weights[i] = percentage * 100\\n _reset(_owner);\\n uint256 _tokenCnt = _tokenVote.length;\\n uint256 _weight = IvKP3R(_vkp3r).get_adjusted_ve_balance(_owner, ZERO_ADDRESS);\\n uint256 _totalVoteWeight = 0;\\n uint256 _usedWeight = 0;\\n\\n for (uint256 i = 0; i < _tokenCnt; i++) {\\n _totalVoteWeight += _weights[i];\\n }\\n\\n for (uint256 i = 0; i < _tokenCnt; i++) {\\n address _token = _tokenVote[i];\\n address _gauge = gauges[_token];\\n uint256 _tokenWeight = (_weights[i] * _weight) / _totalVoteWeight;\\n\\n if (_gauge != address(0x0)) {\\n _usedWeight += _tokenWeight;\\n totalWeight += _tokenWeight;\\n weights[_token] += _tokenWeight;\\n tokenVote[_owner].push(_token);\\n votes[_owner][_token] = _tokenWeight;\\n }\\n }\\n\\n usedWeights[_owner] = _usedWeight;\\n }\\n\\n /// @inheritdoc IGaugeProxy\\n function vote(address[] calldata _tokenVote, uint256[] calldata _weights) external {\\n require(_tokenVote.length == _weights.length);\\n _vote(msg.sender, _tokenVote, _weights);\\n }\\n\\n /// @inheritdoc IGaugeProxy\\n function addGauge(address _token, address _gauge) external g {\\n require(gauges[_token] == address(0x0), 'exists');\\n _safeApprove(_rkp3r, _gauge, type(uint256).max);\\n gauges[_token] = _gauge;\\n enabled[_token] = true;\\n _tokens.push(_token);\\n }\\n\\n /// @inheritdoc IGaugeProxy\\n function disable(address _token) external g {\\n enabled[_token] = false;\\n }\\n\\n /// @inheritdoc IGaugeProxy\\n function enable(address _token) external g {\\n enabled[_token] = true;\\n }\\n\\n /// @inheritdoc IGaugeProxy\\n function length() external view returns (uint256) {\\n return _tokens.length;\\n }\\n\\n /// @inheritdoc IGaugeProxy\\n function forceDistribute() external g {\\n _distribute();\\n }\\n\\n /// @inheritdoc IGaugeProxy\\n function distribute() external k {\\n _distribute();\\n }\\n\\n function _distribute() internal {\\n uint256 _balance = IKeep3rV1Proxy(_kp3rV1Proxy).draw();\\n IrKP3R(_rkp3r).deposit(_balance);\\n\\n if (_balance > 0 && totalWeight > 0) {\\n uint256 _totalWeight = totalWeight;\\n for (uint256 i = 0; i < _tokens.length; i++) {\\n if (!enabled[_tokens[i]]) {\\n _totalWeight -= weights[_tokens[i]];\\n }\\n }\\n for (uint256 x = 0; x < _tokens.length; x++) {\\n if (enabled[_tokens[x]]) {\\n uint256 _reward = (_balance * weights[_tokens[x]]) / _totalWeight;\\n if (_reward > 0) {\\n address _gauge = gauges[_tokens[x]];\\n IGauge(_gauge).deposit_reward_token(_rkp3r, _reward);\\n }\\n }\\n }\\n }\\n }\\n\\n function _safeApprove(\\n address token,\\n address spender,\\n uint256 value\\n ) internal {\\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, spender, value));\\n require(success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x540634d323a48c7a06cdf9a53b95dffac226987114da3faa5c210da7b972ced1\",\"license\":\"MIT\"},\"contracts/interfaces/IGaugeProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n/// @title GaugeProxy contract\\n/// @notice Handles Curve gauges reward voting and distribution\\ninterface IGaugeProxy {\\n /// @dev Vote weight used on disabled pools is computed in totalWeight but not reflected in the actual distribution\\n /// @return _totalWeight Sum of total weight used on all the pools\\n function totalWeight() external returns (uint256 _totalWeight);\\n\\n /// @return _keeper Address with access permission to call distribute function\\n function keeper() external returns (address _keeper);\\n\\n /// @notice Governance has permission to manage gauges, and force the distribution\\n /// @return _gov Address of Governance\\n function gov() external returns (address _gov);\\n\\n /// @return _nextGov Address of the proposed next governance\\n function nextgov() external returns (address _nextGov);\\n\\n /// @return _commitGov Datetime when next governance can execute transition\\n function commitgov() external returns (uint256 _commitGov);\\n\\n /// @return _delay Time in seconds to pass between a next governance proposal and it's execution\\n function delay() external returns (uint256 _delay);\\n\\n /// @param _pool Address of the pool being checked\\n /// @return _gauge Address of the gauge related to the input pool\\n function gauges(address _pool) external view returns (address _gauge);\\n\\n /// @param _pool Address of the pool being checked\\n /// @return _weight Amount of weight vote on the pool\\n function weights(address _pool) external view returns (uint256 _weight);\\n\\n /// @dev The vote weight decays with time and this function does not reflect that\\n /// @param _voter Address of the voter being checked\\n /// @param _pool Address of the pool being checked\\n /// @return _votes Amount of vote weight from the voter, on the pool\\n function votes(address _voter, address _pool) external view returns (uint256 _votes);\\n\\n /// @param _voter Address of the voter being checked\\n /// @param _i Index of the pool being checked\\n /// @return _pool Addresses of the voted pools of a voter\\n function tokenVote(address _voter, uint256 _i) external view returns (address _pool);\\n\\n /// @param _voter Address of the voter being checked\\n /// @return _usedWeights Total amount of used weight of a voter\\n function usedWeights(address _voter) external view returns (uint256 _usedWeights);\\n\\n /// @param _pool Address of the pool being checked\\n /// @return _enabled Whether the pool is enabled\\n function enabled(address _pool) external view returns (bool _enabled);\\n\\n /// @return _pools Array of pools added to the contract\\n function tokens() external view returns (address[] memory _pools);\\n\\n /// @notice Allows governance to modify the keeper address\\n /// @param _keeper Address of the new keeper being set\\n function setKeeper(address _keeper) external;\\n\\n /// @notice Allows governance to propose a new governance\\n function setGov(address _gov) external;\\n\\n /// @notice Allows new governance to execute the transition\\n /// @dev Requires a delay time between the proposal and the execution\\n function acceptGov() external;\\n\\n /// @notice Resets function caller vote distribution\\n function reset() external;\\n\\n /// @notice Refresh a voter weight distributio to current state\\n /// @dev Vote weight decays with time and this function allows to refresh it\\n /// @param _voter Address of the voter veing poked\\n function poke(address _voter) external;\\n\\n /// @notice Allows a voter to submit a vote distribution\\n /// @dev Voter is always using its full weight, inputed weights get ponderated\\n /// @param _poolVote Array of addresses being voted\\n /// @param _weights Distribution of vote weight to use on addresses\\n function vote(address[] calldata _poolVote, uint256[] calldata _weights) external;\\n\\n /// @notice Allows governance to register a new gauge\\n /// @param _pool Address of the pool to reward\\n /// @param _gauge Address of the gauge to reward the pool\\n function addGauge(address _pool, address _gauge) external;\\n\\n /// @notice Allows governance to disable a pool reward\\n /// @dev Vote weight deposited on disabled tokens is taken out of the total weight\\n /// @param _pool Address of the pool being disabled\\n function disable(address _pool) external;\\n\\n /// @notice Allows governance to reenable a pool reward\\n /// @param _pool Address of the pool being enabled\\n function enable(address _pool) external;\\n\\n /// returns _lenght Total amount of rewarded pools\\n function length() external view returns (uint256 _lenght);\\n\\n /// @notice Allows governance to execute a reward distribution\\n function forceDistribute() external;\\n\\n /// @notice Function to be upkeep responsible for executing rKP3Rs reward distribution\\n function distribute() external;\\n}\\n\",\"keccak256\":\"0x583c40d42aa1f16f66f7e096324d99e89289a329a9becd15791735d6ec75933e\",\"license\":\"MIT\"},\"contracts/interfaces/external/IGauge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4 <0.9.0;\\n\\ninterface IGauge {\\n // solhint-disable-next-line func-name-mixedcase\\n function deposit_reward_token(address, uint256) external;\\n}\\n\",\"keccak256\":\"0xd35095b04ef76d90ebc4d02feebd0fe53737d2879dee767d4a84ad4496c830ae\",\"license\":\"MIT\"},\"contracts/interfaces/external/IKeep3rV1Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4 <0.9.0;\\n\\ninterface IKeep3rV1Proxy {\\n // Structs\\n struct Recipient {\\n address recipient;\\n uint256 caps;\\n }\\n\\n // Variables\\n function keep3rV1() external view returns (address);\\n\\n function minter() external view returns (address);\\n\\n function next(address) external view returns (uint256);\\n\\n function caps(address) external view returns (uint256);\\n\\n function recipients() external view returns (address[] memory);\\n\\n function recipientsCaps() external view returns (Recipient[] memory);\\n\\n // Errors\\n error Cooldown();\\n error NoDrawableAmount();\\n error ZeroAddress();\\n error OnlyMinter();\\n\\n // Methods\\n function addRecipient(address _recipient, uint256 _amount) external;\\n\\n function removeRecipient(address _recipient) external;\\n\\n function draw() external returns (uint256 _amount);\\n\\n function setKeep3rV1(address _keep3rV1) external;\\n\\n function setMinter(address _minter) external;\\n\\n function mint(uint256 _amount) external;\\n\\n function mint(address _account, uint256 _amount) external;\\n\\n function setKeep3rV1Governance(address _governance) external;\\n\\n function acceptKeep3rV1Governance() external;\\n\\n function dispute(address _keeper) external;\\n\\n function slash(\\n address _bonded,\\n address _keeper,\\n uint256 _amount\\n ) external;\\n\\n function revoke(address _keeper) external;\\n\\n function resolve(address _keeper) external;\\n\\n function addJob(address _job) external;\\n\\n function removeJob(address _job) external;\\n\\n function addKPRCredit(address _job, uint256 _amount) external;\\n\\n function approveLiquidity(address _liquidity) external;\\n\\n function revokeLiquidity(address _liquidity) external;\\n\\n function setKeep3rHelper(address _keep3rHelper) external;\\n\\n function addVotes(address _voter, uint256 _amount) external;\\n\\n function removeVotes(address _voter, uint256 _amount) external;\\n}\\n\",\"keccak256\":\"0x13c69346b6597f6a7f6d02fd8afed85f2cf47cdc2eb81af065978eb8b9a826a9\",\"license\":\"MIT\"},\"contracts/interfaces/external/IrKP3R.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4 <0.9.0;\\n\\ninterface IrKP3R {\\n function deposit(uint256 _amount) external;\\n}\\n\",\"keccak256\":\"0xed7eceb01c4da8412036c6e4b176aab73a60442bc75967bb4945bde072892ace\",\"license\":\"MIT\"},\"contracts/interfaces/external/IvKP3R.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4 <0.9.0;\\n\\ninterface IvKP3R {\\n // solhint-disable-next-line func-name-mixedcase\\n function get_adjusted_ve_balance(address, address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf244209166b1bdb7d82b01e26f0a55ce8164b3e3d04d3b3458122a8b90ead763\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620015f8380380620015f883398101604081905262000034916200016e565b600280546001600160a01b0319166001600160a01b03831617905562000086731ceb5cb57c4d4e2b2433641b95dd330a33185a4473edb67ee1b171c4ec66e6c10ec43edbba20fae8e96000196200008d565b5062000202565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b1790529151600092839290871691620000eb9190620001a0565b6000604051808303816000865af19150503d80600081146200012a576040519150601f19603f3d011682016040523d82523d6000602084013e6200012f565b606091505b50915091508180156200015d5750805115806200015d5750808060200190518101906200015d9190620001de565b6200016757600080fd5b5050505050565b6000602082840312156200018157600080fd5b81516001600160a01b03811681146200019957600080fd5b9392505050565b6000825160005b81811015620001c35760208186018101518583015201620001a7565b81811115620001d3576000828501525b509190910192915050565b600060208284031215620001f157600080fd5b815180151581146200019957600080fd5b6113e680620002126000396000f3fe608060405234801561001057600080fd5b50600436106101725760003560e01c806398afdfe3116100de578063cad1b90611610097578063e4fc6b6d11610071578063e4fc6b6d14610354578063e6c09edf1461035c578063f2a1a8ed1461036f578063f94e4e801461038257600080fd5b8063cad1b9061461030e578063cfad57a214610339578063d826f88f1461034c57600080fd5b806398afdfe3146102575780639d63848a1461028a578063a7cac8461461029f578063aced1661146102bf578063b1a997ac146102d2578063b9a09fd5146102e557600080fd5b80635c390465116101305780635c3904651461020e5780636a42b8f8146102165780636f816a2014610220578063748747e6146102335780637bc6729b1461024657806396c82e571461024e57600080fd5b80622f8de41461017757806312d43a51146101aa57806316209165146101d55780631f7b6d32146101ea5780632196bcd7146101f25780635bfa1b68146101fb575b600080fd5b6101976101853660046110eb565b600a6020526000908152604090205481565b6040519081526020015b60405180910390f35b6002546101bd906001600160a01b031681565b6040516001600160a01b0390911681526020016101a1565b6101e86101e336600461110d565b610395565b005b600554610197565b61019760045481565b6101e86102093660046110eb565b6104a3565b6101e86104de565b6101976201518081565b6101e861022e36600461118c565b6104ff565b6101e86102413660046110eb565b61057f565b6101e86105b8565b61019760005481565b61027a6102653660046110eb565b600b6020526000908152604090205460ff1681565b60405190151581526020016101a1565b610292610600565b6040516101a191906111f8565b6101976102ad3660046110eb565b60076020526000908152604090205481565b6001546101bd906001600160a01b031681565b6101e86102e03660046110eb565b610662565b6101bd6102f33660046110eb565b6006602052600090815260409020546001600160a01b031681565b61019761031c36600461110d565b600860209081526000928352604080842090915290825290205481565b6101e86103473660046110eb565b610878565b6101e86108bd565b6101e86108c6565b6101e861036a3660046110eb565b6108dd565b6101bd61037d366004611245565b610915565b6003546101bd906001600160a01b031681565b6002546001600160a01b031633146103ac57600080fd5b6001600160a01b0382811660009081526006602052604090205416156104015760405162461bcd60e51b815260206004820152600660248201526565786973747360d01b604482015260640160405180910390fd5b61042273edb67ee1b171c4ec66e6c10ec43edbba20fae8e98260001961094d565b6001600160a01b0391821660008181526006602090815260408083208054969095166001600160a01b031996871617909455600b9052918220805460ff191660019081179091556005805491820181559092527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db09091018054909216179055565b6002546001600160a01b031633146104ba57600080fd5b6001600160a01b03166000908152600b60205260409020805460ff19166001179055565b6002546001600160a01b031633146104f557600080fd5b6104fd610a25565b565b82811461050b57600080fd5b6105793385858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610d4692505050565b50505050565b6002546001600160a01b0316331461059657600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b0316331480156105d3575042600454105b6105dc57600080fd5b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6060600580548060200260200160405190810160405280929190818152602001828054801561065857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161063a575b5050505050905090565b6001600160a01b0381166000908152600960209081526040808320805482518185028101850190935280835291929091908301828280156106cc57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116106ae575b5050505050905060008151905060008167ffffffffffffffff8111156106f4576106f461126f565b60405190808252806020026020018201604052801561071d578160200160208202803683370190505b506001600160a01b0385166000818152600a602052604080822054905163057e116160e41b815260048101939093526024830182905292935090732fc52c61fb0c03489649311989ce2689d93dc1a2906357e1161090604401602060405180830381865afa158015610793573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b79190611285565b905060005b84811015610864576001600160a01b0387166000908152600860205260408120875182908990859081106107f2576107f261129e565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054905083838261082a91906112ca565b61083491906112e9565b8583815181106108465761084661129e565b6020908102919091010152508061085c8161130b565b9150506107bc565b50610870868685610d46565b505050505050565b6002546001600160a01b0316331461088f57600080fd5b600380546001600160a01b0319166001600160a01b0383161790556108b76201518042611324565b60045550565b6104fd33610f91565b6001546001600160a01b031633146104f557600080fd5b6002546001600160a01b031633146108f457600080fd5b6001600160a01b03166000908152600b60205260409020805460ff19169055565b6009602052816000526040600020818154811061093157600080fd5b6000918252602090912001546001600160a01b03169150829050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916109a9919061133c565b6000604051808303816000865af19150503d80600081146109e6576040519150601f19603f3d011682016040523d82523d6000602084013e6109eb565b606091505b5091509150818015610a15575080511580610a15575080806020019051810190610a159190611377565b610a1e57600080fd5b5050505050565b600073976b01c02c636dd5901444b941442fd70b86dcd56001600160a01b0316630eecae216040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610a7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9f9190611285565b60405163b6b55f2560e01b81526004810182905290915073edb67ee1b171c4ec66e6c10ec43edbba20fae8e99063b6b55f2590602401600060405180830381600087803b158015610aef57600080fd5b505af1158015610b03573d6000803e3d6000fd5b50505050600081118015610b18575060008054115b15610d435760008054905b600554811015610bcb57600b600060058381548110610b4457610b4461129e565b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff16610bb9576007600060058381548110610b8757610b8761129e565b60009182526020808320909101546001600160a01b03168352820192909252604001902054610bb69083611399565b91505b80610bc38161130b565b915050610b23565b5060005b600554811015610d4057600b600060058381548110610bf057610bf061129e565b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff1615610d2e576000826007600060058581548110610c3757610c3761129e565b60009182526020808320909101546001600160a01b03168352820192909252604001902054610c6690866112ca565b610c7091906112e9565b90508015610d2c5760006006600060058581548110610c9157610c9161129e565b6000918252602080832091909101546001600160a01b03908116845290830193909352604091820190205490516393f7aa6760e01b815273edb67ee1b171c4ec66e6c10ec43edbba20fae8e96004820152602481018590529116915081906393f7aa6790604401600060405180830381600087803b158015610d1257600080fd5b505af1158015610d26573d6000803e3d6000fd5b50505050505b505b80610d388161130b565b915050610bcf565b50505b50565b610d4f83610f91565b815160405163057e116160e41b81526001600160a01b038516600482015260006024820181905290732fc52c61fb0c03489649311989ce2689d93dc1a2906357e1161090604401602060405180830381865afa158015610db3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd79190611285565b905060008060005b84811015610e2057858181518110610df957610df961129e565b602002602001015183610e0c9190611324565b925080610e188161130b565b915050610ddf565b5060005b84811015610f6c576000878281518110610e4057610e4061129e565b6020908102919091018101516001600160a01b038082166000908152600690935260408320548a51929450169190869088908b9087908110610e8457610e8461129e565b6020026020010151610e9691906112ca565b610ea091906112e9565b90506001600160a01b03821615610f5657610ebb8186611324565b945080600080828254610ece9190611324565b90915550506001600160a01b03831660009081526007602052604081208054839290610efb908490611324565b90915550506001600160a01b038b8116600081815260096020908152604080832080546001810182559084528284200180546001600160a01b0319169589169586179055928252600881528282209382529290925290208190555b5050508080610f649061130b565b915050610e24565b506001600160a01b039096166000908152600a60205260409020959095555050505050565b6001600160a01b0381166000908152600960205260408120805490915b81811015611085576000838281548110610fca57610fca61129e565b60009182526020808320909101546001600160a01b03888116845260088352604080852091909216808552925290912054909150801561107057806000808282546110159190611399565b90915550506001600160a01b03821660009081526007602052604081208054839290611042908490611399565b90915550506001600160a01b0380871660009081526008602090815260408083209386168352929052908120555b5050808061107d9061130b565b915050610fae565b506001600160a01b0383166000908152600960209081526040822080548382559083529120610d4091610d4391908101905b808211156110cb57600081556001016110b7565b5090565b80356001600160a01b03811681146110e657600080fd5b919050565b6000602082840312156110fd57600080fd5b611106826110cf565b9392505050565b6000806040838503121561112057600080fd5b611129836110cf565b9150611137602084016110cf565b90509250929050565b60008083601f84011261115257600080fd5b50813567ffffffffffffffff81111561116a57600080fd5b6020830191508360208260051b850101111561118557600080fd5b9250929050565b600080600080604085870312156111a257600080fd5b843567ffffffffffffffff808211156111ba57600080fd5b6111c688838901611140565b909650945060208701359150808211156111df57600080fd5b506111ec87828801611140565b95989497509550505050565b6020808252825182820181905260009190848201906040850190845b818110156112395783516001600160a01b031683529284019291840191600101611214565b50909695505050505050565b6000806040838503121561125857600080fd5b611261836110cf565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561129757600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156112e4576112e46112b4565b500290565b60008261130657634e487b7160e01b600052601260045260246000fd5b500490565b60006001820161131d5761131d6112b4565b5060010190565b60008219821115611337576113376112b4565b500190565b6000825160005b8181101561135d5760208186018101518583015201611343565b8181111561136c576000828501525b509190910192915050565b60006020828403121561138957600080fd5b8151801515811461110657600080fd5b6000828210156113ab576113ab6112b4565b50039056fea2646970667358221220bca6c12a0945afd33b2d9a396e49993d35aa051f639fb80a863f0909969e6f4064736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101725760003560e01c806398afdfe3116100de578063cad1b90611610097578063e4fc6b6d11610071578063e4fc6b6d14610354578063e6c09edf1461035c578063f2a1a8ed1461036f578063f94e4e801461038257600080fd5b8063cad1b9061461030e578063cfad57a214610339578063d826f88f1461034c57600080fd5b806398afdfe3146102575780639d63848a1461028a578063a7cac8461461029f578063aced1661146102bf578063b1a997ac146102d2578063b9a09fd5146102e557600080fd5b80635c390465116101305780635c3904651461020e5780636a42b8f8146102165780636f816a2014610220578063748747e6146102335780637bc6729b1461024657806396c82e571461024e57600080fd5b80622f8de41461017757806312d43a51146101aa57806316209165146101d55780631f7b6d32146101ea5780632196bcd7146101f25780635bfa1b68146101fb575b600080fd5b6101976101853660046110eb565b600a6020526000908152604090205481565b6040519081526020015b60405180910390f35b6002546101bd906001600160a01b031681565b6040516001600160a01b0390911681526020016101a1565b6101e86101e336600461110d565b610395565b005b600554610197565b61019760045481565b6101e86102093660046110eb565b6104a3565b6101e86104de565b6101976201518081565b6101e861022e36600461118c565b6104ff565b6101e86102413660046110eb565b61057f565b6101e86105b8565b61019760005481565b61027a6102653660046110eb565b600b6020526000908152604090205460ff1681565b60405190151581526020016101a1565b610292610600565b6040516101a191906111f8565b6101976102ad3660046110eb565b60076020526000908152604090205481565b6001546101bd906001600160a01b031681565b6101e86102e03660046110eb565b610662565b6101bd6102f33660046110eb565b6006602052600090815260409020546001600160a01b031681565b61019761031c36600461110d565b600860209081526000928352604080842090915290825290205481565b6101e86103473660046110eb565b610878565b6101e86108bd565b6101e86108c6565b6101e861036a3660046110eb565b6108dd565b6101bd61037d366004611245565b610915565b6003546101bd906001600160a01b031681565b6002546001600160a01b031633146103ac57600080fd5b6001600160a01b0382811660009081526006602052604090205416156104015760405162461bcd60e51b815260206004820152600660248201526565786973747360d01b604482015260640160405180910390fd5b61042273edb67ee1b171c4ec66e6c10ec43edbba20fae8e98260001961094d565b6001600160a01b0391821660008181526006602090815260408083208054969095166001600160a01b031996871617909455600b9052918220805460ff191660019081179091556005805491820181559092527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db09091018054909216179055565b6002546001600160a01b031633146104ba57600080fd5b6001600160a01b03166000908152600b60205260409020805460ff19166001179055565b6002546001600160a01b031633146104f557600080fd5b6104fd610a25565b565b82811461050b57600080fd5b6105793385858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610d4692505050565b50505050565b6002546001600160a01b0316331461059657600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b0316331480156105d3575042600454105b6105dc57600080fd5b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6060600580548060200260200160405190810160405280929190818152602001828054801561065857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161063a575b5050505050905090565b6001600160a01b0381166000908152600960209081526040808320805482518185028101850190935280835291929091908301828280156106cc57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116106ae575b5050505050905060008151905060008167ffffffffffffffff8111156106f4576106f461126f565b60405190808252806020026020018201604052801561071d578160200160208202803683370190505b506001600160a01b0385166000818152600a602052604080822054905163057e116160e41b815260048101939093526024830182905292935090732fc52c61fb0c03489649311989ce2689d93dc1a2906357e1161090604401602060405180830381865afa158015610793573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b79190611285565b905060005b84811015610864576001600160a01b0387166000908152600860205260408120875182908990859081106107f2576107f261129e565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054905083838261082a91906112ca565b61083491906112e9565b8583815181106108465761084661129e565b6020908102919091010152508061085c8161130b565b9150506107bc565b50610870868685610d46565b505050505050565b6002546001600160a01b0316331461088f57600080fd5b600380546001600160a01b0319166001600160a01b0383161790556108b76201518042611324565b60045550565b6104fd33610f91565b6001546001600160a01b031633146104f557600080fd5b6002546001600160a01b031633146108f457600080fd5b6001600160a01b03166000908152600b60205260409020805460ff19169055565b6009602052816000526040600020818154811061093157600080fd5b6000918252602090912001546001600160a01b03169150829050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916109a9919061133c565b6000604051808303816000865af19150503d80600081146109e6576040519150601f19603f3d011682016040523d82523d6000602084013e6109eb565b606091505b5091509150818015610a15575080511580610a15575080806020019051810190610a159190611377565b610a1e57600080fd5b5050505050565b600073976b01c02c636dd5901444b941442fd70b86dcd56001600160a01b0316630eecae216040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610a7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9f9190611285565b60405163b6b55f2560e01b81526004810182905290915073edb67ee1b171c4ec66e6c10ec43edbba20fae8e99063b6b55f2590602401600060405180830381600087803b158015610aef57600080fd5b505af1158015610b03573d6000803e3d6000fd5b50505050600081118015610b18575060008054115b15610d435760008054905b600554811015610bcb57600b600060058381548110610b4457610b4461129e565b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff16610bb9576007600060058381548110610b8757610b8761129e565b60009182526020808320909101546001600160a01b03168352820192909252604001902054610bb69083611399565b91505b80610bc38161130b565b915050610b23565b5060005b600554811015610d4057600b600060058381548110610bf057610bf061129e565b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff1615610d2e576000826007600060058581548110610c3757610c3761129e565b60009182526020808320909101546001600160a01b03168352820192909252604001902054610c6690866112ca565b610c7091906112e9565b90508015610d2c5760006006600060058581548110610c9157610c9161129e565b6000918252602080832091909101546001600160a01b03908116845290830193909352604091820190205490516393f7aa6760e01b815273edb67ee1b171c4ec66e6c10ec43edbba20fae8e96004820152602481018590529116915081906393f7aa6790604401600060405180830381600087803b158015610d1257600080fd5b505af1158015610d26573d6000803e3d6000fd5b50505050505b505b80610d388161130b565b915050610bcf565b50505b50565b610d4f83610f91565b815160405163057e116160e41b81526001600160a01b038516600482015260006024820181905290732fc52c61fb0c03489649311989ce2689d93dc1a2906357e1161090604401602060405180830381865afa158015610db3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd79190611285565b905060008060005b84811015610e2057858181518110610df957610df961129e565b602002602001015183610e0c9190611324565b925080610e188161130b565b915050610ddf565b5060005b84811015610f6c576000878281518110610e4057610e4061129e565b6020908102919091018101516001600160a01b038082166000908152600690935260408320548a51929450169190869088908b9087908110610e8457610e8461129e565b6020026020010151610e9691906112ca565b610ea091906112e9565b90506001600160a01b03821615610f5657610ebb8186611324565b945080600080828254610ece9190611324565b90915550506001600160a01b03831660009081526007602052604081208054839290610efb908490611324565b90915550506001600160a01b038b8116600081815260096020908152604080832080546001810182559084528284200180546001600160a01b0319169589169586179055928252600881528282209382529290925290208190555b5050508080610f649061130b565b915050610e24565b506001600160a01b039096166000908152600a60205260409020959095555050505050565b6001600160a01b0381166000908152600960205260408120805490915b81811015611085576000838281548110610fca57610fca61129e565b60009182526020808320909101546001600160a01b03888116845260088352604080852091909216808552925290912054909150801561107057806000808282546110159190611399565b90915550506001600160a01b03821660009081526007602052604081208054839290611042908490611399565b90915550506001600160a01b0380871660009081526008602090815260408083209386168352929052908120555b5050808061107d9061130b565b915050610fae565b506001600160a01b0383166000908152600960209081526040822080548382559083529120610d4091610d4391908101905b808211156110cb57600081556001016110b7565b5090565b80356001600160a01b03811681146110e657600080fd5b919050565b6000602082840312156110fd57600080fd5b611106826110cf565b9392505050565b6000806040838503121561112057600080fd5b611129836110cf565b9150611137602084016110cf565b90509250929050565b60008083601f84011261115257600080fd5b50813567ffffffffffffffff81111561116a57600080fd5b6020830191508360208260051b850101111561118557600080fd5b9250929050565b600080600080604085870312156111a257600080fd5b843567ffffffffffffffff808211156111ba57600080fd5b6111c688838901611140565b909650945060208701359150808211156111df57600080fd5b506111ec87828801611140565b95989497509550505050565b6020808252825182820181905260009190848201906040850190845b818110156112395783516001600160a01b031683529284019291840191600101611214565b50909695505050505050565b6000806040838503121561125857600080fd5b611261836110cf565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561129757600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156112e4576112e46112b4565b500290565b60008261130657634e487b7160e01b600052601260045260246000fd5b500490565b60006001820161131d5761131d6112b4565b5060010190565b60008219821115611337576113376112b4565b500190565b6000825160005b8181101561135d5760208186018101518583015201611343565b8181111561136c576000828501525b509190910192915050565b60006020828403121561138957600080fd5b8151801515811461110657600080fd5b6000828210156113ab576113ab6112b4565b50039056fea2646970667358221220bca6c12a0945afd33b2d9a396e49993d35aa051f639fb80a863f0909969e6f4064736f6c634300080d0033", + "devdoc": { + "kind": "dev", + "methods": { + "acceptGov()": { + "details": "Requires a delay time between the proposal and the execution" + }, + "addGauge(address,address)": { + "params": { + "_gauge": "Address of the gauge to reward the pool", + "_pool": "Address of the pool to reward" + } + }, + "disable(address)": { + "details": "Vote weight deposited on disabled tokens is taken out of the total weight", + "params": { + "_pool": "Address of the pool being disabled" + } + }, + "enable(address)": { + "params": { + "_pool": "Address of the pool being enabled" + } + }, + "poke(address)": { + "details": "Vote weight decays with time and this function allows to refresh it", + "params": { + "_voter": "Address of the voter veing poked" + } + }, + "setKeeper(address)": { + "params": { + "_keeper": "Address of the new keeper being set" + } + }, + "tokens()": { + "returns": { + "_0": "Array of pools added to the contract" + } + }, + "vote(address[],uint256[])": { + "details": "Voter is always using its full weight, inputed weights get ponderated", + "params": { + "_poolVote": "Array of addresses being voted", + "_weights": "Distribution of vote weight to use on addresses" + } + } + }, + "stateVariables": { + "commitgov": { + "return": "Datetime when next governance can execute transition", + "returns": { + "_0": "Datetime when next governance can execute transition" + } + }, + "delay": { + "return": "Time in seconds to pass between a next governance proposal and it's execution", + "returns": { + "_0": "Time in seconds to pass between a next governance proposal and it's execution" + } + }, + "enabled": { + "params": { + "_pool": "Address of the pool being checked" + }, + "return": "Whether the pool is enabled", + "returns": { + "_0": "Whether the pool is enabled" + } + }, + "gauges": { + "params": { + "_pool": "Address of the pool being checked" + }, + "return": "Address of the gauge related to the input pool", + "returns": { + "_0": "Address of the gauge related to the input pool" + } + }, + "gov": { + "return": "Address of Governance", + "returns": { + "_0": "Address of Governance" + } + }, + "keeper": { + "return": "Address with access permission to call distribute function", + "returns": { + "_0": "Address with access permission to call distribute function" + } + }, + "nextgov": { + "return": "Address of the proposed next governance", + "returns": { + "_0": "Address of the proposed next governance" + } + }, + "tokenVote": { + "params": { + "_i": "Index of the pool being checked", + "_voter": "Address of the voter being checked" + }, + "return": "Addresses of the voted pools of a voter", + "returns": { + "_0": "Addresses of the voted pools of a voter" + } + }, + "totalWeight": { + "details": "Vote weight used on disabled pools is computed in totalWeight but not reflected in the actual distribution", + "return": "Sum of total weight used on all the pools", + "returns": { + "_0": "Sum of total weight used on all the pools" + } + }, + "usedWeights": { + "params": { + "_voter": "Address of the voter being checked" + }, + "return": "Total amount of used weight of a voter", + "returns": { + "_0": "Total amount of used weight of a voter" + } + }, + "votes": { + "details": "The vote weight decays with time and this function does not reflect that", + "params": { + "_pool": "Address of the pool being checked", + "_voter": "Address of the voter being checked" + }, + "return": "Amount of vote weight from the voter, on the pool", + "returns": { + "_0": "Amount of vote weight from the voter, on the pool" + } + }, + "weights": { + "params": { + "_pool": "Address of the pool being checked" + }, + "return": "Amount of weight vote on the pool", + "returns": { + "_0": "Amount of weight vote on the pool" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "acceptGov()": { + "notice": "Allows new governance to execute the transition" + }, + "addGauge(address,address)": { + "notice": "Allows governance to register a new gauge" + }, + "disable(address)": { + "notice": "Allows governance to disable a pool reward" + }, + "distribute()": { + "notice": "Function to be upkeep responsible for executing rKP3Rs reward distribution" + }, + "enable(address)": { + "notice": "Allows governance to reenable a pool reward" + }, + "forceDistribute()": { + "notice": "Allows governance to execute a reward distribution" + }, + "gov()": { + "notice": "Governance has permission to manage gauges, and force the distribution" + }, + "length()": { + "notice": "returns _lenght Total amount of rewarded pools" + }, + "poke(address)": { + "notice": "Refresh a voter weight distributio to current state" + }, + "reset()": { + "notice": "Resets function caller vote distribution" + }, + "setGov(address)": { + "notice": "Allows governance to propose a new governance" + }, + "setKeeper(address)": { + "notice": "Allows governance to modify the keeper address" + }, + "vote(address[],uint256[])": { + "notice": "Allows a voter to submit a vote distribution" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 624, + "contract": "contracts/GaugeProxyV2.sol:GaugeProxyV2", + "label": "totalWeight", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 627, + "contract": "contracts/GaugeProxyV2.sol:GaugeProxyV2", + "label": "keeper", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 630, + "contract": "contracts/GaugeProxyV2.sol:GaugeProxyV2", + "label": "gov", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 633, + "contract": "contracts/GaugeProxyV2.sol:GaugeProxyV2", + "label": "nextgov", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 636, + "contract": "contracts/GaugeProxyV2.sol:GaugeProxyV2", + "label": "commitgov", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 643, + "contract": "contracts/GaugeProxyV2.sol:GaugeProxyV2", + "label": "_tokens", + "offset": 0, + "slot": "5", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 648, + "contract": "contracts/GaugeProxyV2.sol:GaugeProxyV2", + "label": "gauges", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 653, + "contract": "contracts/GaugeProxyV2.sol:GaugeProxyV2", + "label": "weights", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 660, + "contract": "contracts/GaugeProxyV2.sol:GaugeProxyV2", + "label": "votes", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 666, + "contract": "contracts/GaugeProxyV2.sol:GaugeProxyV2", + "label": "tokenVote", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_address,t_array(t_address)dyn_storage)" + }, + { + "astId": 671, + "contract": "contracts/GaugeProxyV2.sol:GaugeProxyV2", + "label": "usedWeights", + "offset": 0, + "slot": "10", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 676, + "contract": "contracts/GaugeProxyV2.sol:GaugeProxyV2", + "label": "enabled", + "offset": 0, + "slot": "11", + "type": "t_mapping(t_address,t_bool)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_array(t_address)dyn_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address[])", + "numberOfBytes": "32", + "value": "t_array(t_address)dyn_storage" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file