More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x14aA063C...9c59bF976 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
CLFeesVault
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 1 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.8.13;import "@openzeppelin/contracts/utils/math/SafeMath.sol";import "@openzeppelin/contracts/security/ReentrancyGuard.sol";import "@openzeppelin/contracts/access/Ownable.sol";import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";import "@openzeppelin/contracts/token/ERC20/IERC20.sol";import "./interfaces/IPairInfo.sol";import "./interfaces/IBribe.sol";import "./interfaces/IVoter.sol";import "./interfaces/IPermissionsRegistry.sol";import "./libraries/Math.sol";contract CLFeesVault {using SafeERC20 for IERC20;/* -----------------------------------------------------------------------------DATA----------------------------------------------------------------------------- */IVoter public voter;address public pool;IPermissionsRegistry public permissionsRegsitry;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)pragma solidity ^0.8.0;import "../utils/Context.sol";/*** @dev Contract module which provides a basic access control mechanism, where* there is an account (an owner) that can be granted exclusive access to* specific functions.** By default, the owner account will be the one that deploys the contract. This* can later be changed with {transferOwnership}.** This module is used through inheritance. It will make available the modifier* `onlyOwner`, which can be applied to your functions to restrict their use to* the owner.*/abstract contract Ownable is Context {address private _owner;event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);/*** @dev Initializes the contract setting the deployer as the initial owner.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)pragma solidity ^0.8.0;/*** @dev Contract module that helps prevent reentrant calls to a function.** Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier* available, which can be applied to functions to make sure there are no nested* (reentrant) calls to them.** Note that because there is a single `nonReentrant` guard, functions marked as* `nonReentrant` may not call one another. This can be worked around by making* those functions `private`, and then adding `external` `nonReentrant` entry* points to them.** TIP: If you would like to learn more about reentrancy and alternative ways* to protect against it, check out our blog post* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].*/abstract contract ReentrancyGuard {// Booleans are more expensive than uint256 or any type that takes up a full// word because each write operation emits an extra SLOAD to first read the// slot's contents, replace the bits taken up by the boolean, and then write// back. This is the compiler's defense against contract upgrades and
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)pragma solidity ^0.8.0;/*** @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].** Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't* need to send a transaction, and thus is not required to hold Ether at all.*/interface IERC20Permit {/*** @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,* given ``owner``'s signed approval.** IMPORTANT: The same issues {IERC20-approve} has related to transaction* ordering also apply here.** Emits an {Approval} event.** Requirements:** - `spender` cannot be the zero address.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)pragma solidity ^0.8.0;/*** @dev Interface of the ERC20 standard as defined in the EIP.*/interface IERC20 {/*** @dev Emitted when `value` tokens are moved from one account (`from`) to* another (`to`).** Note that `value` may be zero.*/event Transfer(address indexed from, address indexed to, uint256 value);/*** @dev Emitted when the allowance of a `spender` for an `owner` is set by* a call to {approve}. `value` is the new allowance.*/event Approval(address indexed owner, address indexed spender, uint256 value);/*** @dev Returns the amount of tokens in existence.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)pragma solidity ^0.8.0;import "../IERC20.sol";import "../extensions/draft-IERC20Permit.sol";import "../../../utils/Address.sol";/*** @title SafeERC20* @dev Wrappers around ERC20 operations that throw on failure (when the token* contract returns false). Tokens that return no value (and instead revert or* throw on failure) are also supported, non-reverting calls are assumed to be* successful.* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.*/library SafeERC20 {using Address for address;function safeTransfer(IERC20 token,address to,uint256 value) internal {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)pragma solidity ^0.8.1;/*** @dev Collection of functions related to the address type*/library Address {/*** @dev Returns true if `account` is a contract.** [IMPORTANT]* ====* It is unsafe to assume that an address for which this function returns* false is an externally-owned account (EOA) and not a contract.** Among others, `isContract` will return false for the following* types of addresses:** - an externally-owned account* - a contract in construction* - an address where a contract will be created* - an address where a contract lived, but was destroyed* ====*
123456789101112131415161718192021222324// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)pragma solidity ^0.8.0;/*** @dev Provides information about the current execution context, including the* sender of the transaction and its data. While these are generally available* via msg.sender and msg.data, they should not be accessed in such a direct* manner, since when dealing with meta-transactions the account sending and* paying for execution may not be the actual sender (as far as an application* is concerned).** This contract is only required for intermediate, library-like contracts.*/abstract contract Context {function _msgSender() internal view virtual returns (address) {return msg.sender;}function _msgData() internal view virtual returns (bytes calldata) {return msg.data;}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)pragma solidity ^0.8.0;// CAUTION// This version of SafeMath should only be used with Solidity 0.8 or later,// because it relies on the compiler's built in overflow checks./*** @dev Wrappers over Solidity's arithmetic operations.** NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler* now has built in overflow checking.*/library SafeMath {/*** @dev Returns the addition of two unsigned integers, with an overflow flag.** _Available since v3.4._*/function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {unchecked {uint256 c = a + b;if (c < a) return (false, 0);return (true, c);
1234567891011// SPDX-License-Identifier: MITpragma solidity 0.8.13;interface IBribe {function _deposit(uint amount, uint tokenId) external;function _withdraw(uint amount, uint tokenId) external;function getRewardForOwner(uint tokenId, address[] memory tokens) external;function getRewardForAddress(address _owner, address[] memory tokens) external;function notifyRewardAmount(address token, uint amount) external;function left(address token) external view returns (uint);}
12345678910111213// SPDX-License-Identifier: MITpragma solidity 0.8.13;interface IPairInfo {function token0() external view returns(address);function reserve0() external view returns(uint);function decimals0() external view returns(uint);function token1() external view returns(address);function reserve1() external view returns(uint);function decimals1() external view returns(uint);function isPair(address _pair) external view returns(bool);}
12345678// SPDX-License-Identifier: MITpragma solidity 0.8.13;interface IPermissionsRegistry {function emergencyCouncil() external view returns(address);function swpxTeamMultisig() external view returns(address);function hasRole(bytes memory role, address caller) external view returns(bool);}
12345678910111213141516171819202122232425// SPDX-License-Identifier: MITpragma solidity 0.8.13;interface IVoter {function _ve() external view returns (address);function gauges(address _pair) external view returns (address);function isGauge(address _gauge) external view returns (bool);function poolForGauge(address _gauge) external view returns (address);function factory() external view returns (address);function minter() external view returns(address);function isWhitelisted(address token) external view returns (bool);function notifyRewardAmount(uint amount) external;function distributeAll() external;function distributeFees(address[] memory _gauges) external;function internal_bribes(address _gauge) external view returns (address);function external_bribes(address _gauge) external view returns (address);function usedWeights(uint id) external view returns(uint);function lastVoted(uint id) external view returns(uint);function poolVote(uint id, uint _index) external view returns(address _pair);function votes(uint id, address _pool) external view returns(uint votes);function poolVoteLength(uint tokenId) external view returns(uint);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.8.13;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;}function sqrt(uint y) internal pure returns (uint z) {if (y > 3) {z = y;uint x = y / 2 + 1;while (x < z) {z = x;x = (y / x + x) / 2;}} else if (y != 0) {z = 1;}}function cbrt(uint256 n) internal pure returns (uint256) { unchecked {uint256 x = 0;for (uint256 y = 1 << 255; y > 0; y >>= 3) {x <<= 1;
12345678910111213141516171819{"optimizer": {"enabled": true,"runs": 1},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"]}},"libraries": {}}
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_pool","type":"address"},{"internalType":"address","name":"_permissionRegistry","type":"address"},{"internalType":"address","name":"_voter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"totAmount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totAmount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":true,"internalType":"address","name":"token1","type":"address"},{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Fees","type":"event"},{"inputs":[],"name":"claimFees","outputs":[{"internalType":"uint256","name":"gauge0","type":"uint256"},{"internalType":"uint256","name":"gauge1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"emergencyRecoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"permissionsRegsitry","outputs":[{"internalType":"contract IPermissionsRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_pr","type":"address"}],"name":"setPermissionRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pool","type":"address"}],"name":"setPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vt","type":"address"}],"name":"setVoter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"voter","outputs":[{"internalType":"contract IVoter","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100785760003560e01c80630125bb321461007d57806316f0115b146100925780633995ed16146100bb5780634437152a146100ce57806346c96aac146100e15780634bc2a657146100f4578063b837583c14610107578063d294f0931461011a575b600080fd5b61009061008b366004610b71565b610137565b005b6001546100a5906001600160a01b031681565b6040516100b29190610b9d565b60405180910390f35b6100906100c9366004610bb1565b6102ca565b6100906100dc366004610bb1565b61038c565b6000546100a5906001600160a01b031681565b610090610102366004610bb1565b61044e565b6002546100a5906001600160a01b031681565b610122610510565b604080519283526020830191909152016100b2565b600254604051634448e1eb60e01b81526001600160a01b0390911690634448e1eb90610167903390600401610bd5565b602060405180830381865afa158015610184573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a89190610c13565b6101cd5760405162461bcd60e51b81526004016101c490610c35565b60405180910390fd5b6040516370a0823160e01b81526001600160a01b038316906370a08231906101f9903090600401610b9d565b602060405180830381865afa158015610216573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023a9190610c5f565b81111561024657600080fd5b60025460408051636755d7b160e01b815290516102c6926001600160a01b031691636755d7b19160048083019260209291908290030181865afa158015610291573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b59190610c78565b6001600160a01b03841690836108a0565b5050565b600254604051634448e1eb60e01b81526001600160a01b0390911690634448e1eb906102fa903390600401610bd5565b602060405180830381865afa158015610317573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033b9190610c13565b6103575760405162461bcd60e51b81526004016101c490610c35565b6001600160a01b03811661036a57600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600254604051634448e1eb60e01b81526001600160a01b0390911690634448e1eb906103bc903390600401610bd5565b602060405180830381865afa1580156103d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fd9190610c13565b6104195760405162461bcd60e51b81526004016101c490610c35565b6001600160a01b03811661042c57600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600254604051634448e1eb60e01b81526001600160a01b0390911690634448e1eb9061047e903390600401610bd5565b602060405180830381865afa15801561049b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bf9190610c13565b6104db5760405162461bcd60e51b81526004016101c490610c35565b6001600160a01b0381166104ee57600080fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000805460405163aa79979b60e01b815282916001600160a01b03169063aa79979b90610541903390600401610b9d565b602060405180830381865afa15801561055e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105829190610c13565b6105c05760405162461bcd60e51b815260206004820152600f60248201526e0859d85d59d94818dbdb9d1c9858dd608a1b60448201526064016101c4565b6000805460405163036b50d960e11b81526001600160a01b03909116906306d6a1b2906105f1903390600401610b9d565b602060405180830381865afa15801561060e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106329190610c78565b6001549091506001600160a01b0380831691161461064f57600080fd5b60015460408051630dfe168160e01b815290516000926001600160a01b031691630dfe16819160048083019260209291908290030181865afa158015610699573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106bd9190610c78565b6040516370a0823160e01b81529091506001600160a01b038216906370a08231906106ec903090600401610b9d565b602060405180830381865afa158015610709573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072d9190610c5f565b93508315610749576107496001600160a01b03821633866108a0565b6001546040805163d21220a760e01b815290516000926001600160a01b03169163d21220a79160048083019260209291908290030181865afa158015610793573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b79190610c78565b6040516370a0823160e01b81529091506001600160a01b038216906370a08231906107e6903090600401610b9d565b602060405180830381865afa158015610803573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108279190610c5f565b93508315610843576108436001600160a01b03821633866108a0565b6001546040805187815260208101879052428183015290516001600160a01b039283169284811692908616917fe7f1bf9380001803eb5d02af2865a0d8b216ccc7938fa7b3fa5f17948b09b0c19181900360600190a45050509091565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526108f29084906108f7565b505050565b600061094c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166109c99092919063ffffffff16565b8051909150156108f2578080602001905181019061096a9190610c13565b6108f25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016101c4565b60606109d884846000856109e0565b949350505050565b606082471015610a415760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016101c4565b600080866001600160a01b03168587604051610a5d9190610cc5565b60006040518083038185875af1925050503d8060008114610a9a576040519150601f19603f3d011682016040523d82523d6000602084013e610a9f565b606091505b5091509150610ab087838387610abb565b979650505050505050565b60608315610b2a578251600003610b23576001600160a01b0385163b610b235760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101c4565b50816109d8565b6109d88383815115610b3f5781518083602001fd5b8060405162461bcd60e51b81526004016101c49190610ce1565b6001600160a01b0381168114610b6e57600080fd5b50565b60008060408385031215610b8457600080fd5b8235610b8f81610b59565b946020939093013593505050565b6001600160a01b0391909116815260200190565b600060208284031215610bc357600080fd5b8135610bce81610b59565b9392505050565b60408082526013908201527221a62fa322a2a9afab20aaa62a2fa0a226a4a760691b60608201526001600160a01b0391909116602082015260800190565b600060208284031215610c2557600080fd5b81518015158114610bce57600080fd5b60208082526010908201526f22a9291d1023a0aaa3a2afa0a226a4a760811b604082015260600190565b600060208284031215610c7157600080fd5b5051919050565b600060208284031215610c8a57600080fd5b8151610bce81610b59565b60005b83811015610cb0578181015183820152602001610c98565b83811115610cbf576000848401525b50505050565b60008251610cd7818460208701610c95565b9190910192915050565b6020815260008251806020840152610d00816040850160208701610c95565b601f01601f1916919091016040019291505056fea2646970667358221220cc02f2e42afe9a712bb10da6976d10e207323cc3ced8f5cea93d8011212f43ad64736f6c634300080d0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.