Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
BeefyFeeConfigurator
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; contract BeefyFeeConfigurator is OwnableUpgradeable { struct FeeCategory { uint256 total; // total fee charged on each harvest uint256 beefy; // split of total fee going to beefy fee batcher uint256 call; // split of total fee going to harvest caller uint256 strategist; // split of total fee going to developer of the strategy string label; // description of the type of fee category bool active; // on/off switch for fee category } address public keeper; uint256 public totalLimit; uint256 constant DIVISOR = 1 ether; mapping(address => uint256) public stratFeeId; mapping(uint256 => FeeCategory) internal feeCategory; event SetStratFeeId(address indexed strategy, uint256 indexed id); event SetFeeCategory( uint256 indexed id, uint256 total, uint256 beefy, uint256 call, uint256 strategist, string label, bool active ); event Pause(uint256 indexed id); event Unpause(uint256 indexed id); event SetKeeper(address indexed keeper); function initialize( address _keeper, uint256 _totalLimit ) public initializer { __Ownable_init(); keeper = _keeper; totalLimit = _totalLimit; } // checks that caller is either owner or keeper modifier onlyManager() { require(msg.sender == owner() || msg.sender == keeper, "!manager"); _; } // fetch fees for a strategy function getFees(address _strategy) external view returns (FeeCategory memory) { return getFeeCategory(stratFeeId[_strategy], false); } // fetch fees for a strategy, _adjust option to view fees as % of total harvest instead of % of total fee function getFees(address _strategy, bool _adjust) external view returns (FeeCategory memory) { return getFeeCategory(stratFeeId[_strategy], _adjust); } // fetch fee category for an id if active, otherwise return default category // _adjust == true: view fees as % of total harvest instead of % of total fee function getFeeCategory(uint256 _id, bool _adjust) public view returns (FeeCategory memory fees) { uint256 id = feeCategory[_id].active ? _id : 0; fees = feeCategory[id]; if (_adjust) { uint256 _totalFee = fees.total; fees.beefy = fees.beefy * _totalFee / DIVISOR; fees.call = fees.call * _totalFee / DIVISOR; fees.strategist = fees.strategist * _totalFee / DIVISOR; } } // set a fee category id for a strategy that calls this function directly function setStratFeeId(uint256 _feeId) external { _setStratFeeId(msg.sender, _feeId); } // set a fee category id for a strategy by a manager function setStratFeeId(address _strategy, uint256 _feeId) external onlyManager { _setStratFeeId(_strategy, _feeId); } // set fee category ids for multiple strategies at once by a manager function setStratFeeId(address[] memory _strategies, uint256[] memory _feeIds) external onlyManager { uint256 stratLength = _strategies.length; for (uint256 i = 0; i < stratLength; i++) { _setStratFeeId(_strategies[i], _feeIds[i]); } } // internally set a fee category id for a strategy function _setStratFeeId(address _strategy, uint256 _feeId) internal { stratFeeId[_strategy] = _feeId; emit SetStratFeeId(_strategy, _feeId); } // set values for a fee category using the relative split for call and strategist // i.e. call = 0.01 ether == 1% of total fee // _adjust == true: input call and strat fee as % of total harvest function setFeeCategory( uint256 _id, uint256 _total, uint256 _call, uint256 _strategist, string memory _label, bool _active, bool _adjust ) external onlyOwner { require(_total <= totalLimit, ">totalLimit"); if (_adjust) { _call = _call * DIVISOR / _total; _strategist = _strategist * DIVISOR / _total; } uint256 beefy = DIVISOR - _call - _strategist; FeeCategory memory category = FeeCategory(_total, beefy, _call, _strategist, _label, _active); feeCategory[_id] = category; emit SetFeeCategory(_id, _total, beefy, _call, _strategist, _label, _active); } // deactivate a fee category making all strategies with this fee id revert to default fees function pause(uint256 _id) external onlyManager { feeCategory[_id].active = false; emit Pause(_id); } // reactivate a fee category function unpause(uint256 _id) external onlyManager { feeCategory[_id].active = true; emit Unpause(_id); } // change keeper function setKeeper(address _keeper) external onlyManager { keeper = _keeper; emit SetKeeper(_keeper); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized != type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"beefy","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"call","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"strategist","type":"uint256"},{"indexed":false,"internalType":"string","name":"label","type":"string"},{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"SetFeeCategory","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"keeper","type":"address"}],"name":"SetKeeper","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"strategy","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"SetStratFeeId","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Unpause","type":"event"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"bool","name":"_adjust","type":"bool"}],"name":"getFeeCategory","outputs":[{"components":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"beefy","type":"uint256"},{"internalType":"uint256","name":"call","type":"uint256"},{"internalType":"uint256","name":"strategist","type":"uint256"},{"internalType":"string","name":"label","type":"string"},{"internalType":"bool","name":"active","type":"bool"}],"internalType":"struct BeefyFeeConfigurator.FeeCategory","name":"fees","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"bool","name":"_adjust","type":"bool"}],"name":"getFees","outputs":[{"components":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"beefy","type":"uint256"},{"internalType":"uint256","name":"call","type":"uint256"},{"internalType":"uint256","name":"strategist","type":"uint256"},{"internalType":"string","name":"label","type":"string"},{"internalType":"bool","name":"active","type":"bool"}],"internalType":"struct BeefyFeeConfigurator.FeeCategory","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"getFees","outputs":[{"components":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"beefy","type":"uint256"},{"internalType":"uint256","name":"call","type":"uint256"},{"internalType":"uint256","name":"strategist","type":"uint256"},{"internalType":"string","name":"label","type":"string"},{"internalType":"bool","name":"active","type":"bool"}],"internalType":"struct BeefyFeeConfigurator.FeeCategory","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"},{"internalType":"uint256","name":"_totalLimit","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"keeper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_total","type":"uint256"},{"internalType":"uint256","name":"_call","type":"uint256"},{"internalType":"uint256","name":"_strategist","type":"uint256"},{"internalType":"string","name":"_label","type":"string"},{"internalType":"bool","name":"_active","type":"bool"},{"internalType":"bool","name":"_adjust","type":"bool"}],"name":"setFeeCategory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"}],"name":"setKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_strategies","type":"address[]"},{"internalType":"uint256[]","name":"_feeIds","type":"uint256[]"}],"name":"setStratFeeId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeId","type":"uint256"}],"name":"setStratFeeId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"uint256","name":"_feeId","type":"uint256"}],"name":"setStratFeeId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stratFeeId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50611286806100206000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80639af608c9116100a2578063cd6dc68711610071578063cd6dc68714610217578063cf1046221461022a578063e1bcdad91461024a578063f2fde38b1461025d578063fabc1cbc1461027057600080fd5b80639af608c9146101c7578063a36298c7146101da578063a537633c146101f1578063aced16611461020457600080fd5b80634d7c76e5116100de5780634d7c76e514610174578063715018a614610187578063748747e61461018f5780638da5cb5b146101a257600080fd5b806306fced9a146101105780630fbc399414610139578063136439dd1461014e5780633e55f93214610161575b600080fd5b61012361011e366004610c14565b610283565b6040516101309190610c8d565b60405180910390f35b61014c610147366004610dc3565b6102b7565b005b61014c61015c366004610e83565b610356565b61014c61016f366004610e83565b6103d8565b61014c610182366004610e9c565b6103e5565b61014c610582565b61014c61019d366004610f79565b610596565b6033546001600160a01b03165b6040516001600160a01b039091168152602001610130565b6101236101d5366004610f79565b61061f565b6101e360665481565b604051908152602001610130565b6101236101ff366004610f94565b610645565b6065546101af906001600160a01b031681565b61014c610225366004610fb7565b6107e8565b6101e3610238366004610f79565b60676020526000908152604090205481565b61014c610258366004610fb7565b61091b565b61014c61026b366004610f79565b610968565b61014c61027e366004610e83565b6109de565b61028b610bb0565b6001600160a01b0383166000908152606760205260409020546102ae9083610645565b90505b92915050565b6033546001600160a01b03163314806102da57506065546001600160a01b031633145b6102ff5760405162461bcd60e51b81526004016102f690610fe1565b60405180910390fd5b815160005b818110156103505761034884828151811061032157610321611003565b602002602001015184838151811061033b5761033b611003565b6020026020010151610a63565b600101610304565b50505050565b6033546001600160a01b031633148061037957506065546001600160a01b031633145b6103955760405162461bcd60e51b81526004016102f690610fe1565b600081815260686020526040808220600501805460ff191690555182917f68b095021b1f40fe513109f513c66692f0b3219aee674a69f4efc57badb8201d91a250565b6103e23382610a63565b50565b6103ed610aaa565b60665486111561042d5760405162461bcd60e51b815260206004820152600b60248201526a0f9d1bdd185b131a5b5a5d60aa1b60448201526064016102f6565b80156104725785610446670de0b6b3a76400008761102f565b6104509190611046565b945085610465670de0b6b3a76400008661102f565b61046f9190611046565b93505b60008461048787670de0b6b3a7640000611068565b6104919190611068565b905060006040518060c00160405280898152602001838152602001888152602001878152602001868152602001851515815250905080606860008b81526020019081526020016000206000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040190816105179190611105565b5060a091909101516005909101805460ff191691151591909117905560405189907f8bd32089ef8cf666951ba8557b00491743a2b2cb9697111f360a4f19390fe7e19061056f908b9086908c908c908c908c906111c5565b60405180910390a2505050505050505050565b61058a610aaa565b6105946000610b04565b565b6033546001600160a01b03163314806105b957506065546001600160a01b031633145b6105d55760405162461bcd60e51b81526004016102f690610fe1565b606580546001600160a01b0319166001600160a01b0383169081179091556040517fefb5cfa1a8690c124332ab93324539c5c9c4be03f28aeb8be86f2d8a0c9fb99b90600090a250565b610627610bb0565b6001600160a01b0382166000908152606760205260408120546102b1915b61064d610bb0565b60008381526068602052604081206005015460ff1661066d57600061066f565b835b9050606860008281526020019081526020016000206040518060c0016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820180546106c79061107b565b80601f01602080910402602001604051908101604052809291908181526020018280546106f39061107b565b80156107405780601f1061071557610100808354040283529160200191610740565b820191906000526020600020905b81548152906001019060200180831161072357829003601f168201915b50505091835250506005919091015460ff161515602090910152915082156107e15781516020830151670de0b6b3a76400009061077e90839061102f565b6107889190611046565b60208401526040830151670de0b6b3a7640000906107a790839061102f565b6107b19190611046565b60408401526060830151670de0b6b3a7640000906107d090839061102f565b6107da9190611046565b6060840152505b5092915050565b600054610100900460ff16158080156108085750600054600160ff909116105b806108225750303b158015610822575060005460ff166001145b6108855760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102f6565b6000805460ff1916600117905580156108a8576000805461ff0019166101001790555b6108b0610b56565b606580546001600160a01b0319166001600160a01b03851617905560668290558015610916576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6033546001600160a01b031633148061093e57506065546001600160a01b031633145b61095a5760405162461bcd60e51b81526004016102f690610fe1565b6109648282610a63565b5050565b610970610aaa565b6001600160a01b0381166109d55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f6565b6103e281610b04565b6033546001600160a01b0316331480610a0157506065546001600160a01b031633145b610a1d5760405162461bcd60e51b81526004016102f690610fe1565b600081815260686020526040808220600501805460ff191660011790555182917faaa520fdd7d2c83061d632fa017b0432407e798818af63ea908589fceda39ab791a250565b6001600160a01b038216600081815260676020526040808220849055518392917f055b48a7f28272213f8d2dea6936149129fe08c4874c4a8e434d82e4f272e84891a35050565b6033546001600160a01b031633146105945760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102f6565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b7d5760405162461bcd60e51b81526004016102f690611205565b610594600054610100900460ff16610ba75760405162461bcd60e51b81526004016102f690611205565b61059433610b04565b6040518060c0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581525090565b80356001600160a01b0381168114610bff57600080fd5b919050565b80358015158114610bff57600080fd5b60008060408385031215610c2757600080fd5b610c3083610be8565b9150610c3e60208401610c04565b90509250929050565b6000815180845260005b81811015610c6d57602081850181015186830182015201610c51565b506000602082860101526020601f19601f83011685010191505092915050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526000608083015160c060a0840152610cd160e0840182610c47565b905060a0840151151560c08401528091505092915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610d2857610d28610ce9565b604052919050565b600067ffffffffffffffff821115610d4a57610d4a610ce9565b5060051b60200190565b600082601f830112610d6557600080fd5b81356020610d7a610d7583610d30565b610cff565b8083825260208201915060208460051b870101935086841115610d9c57600080fd5b602086015b84811015610db85780358352918301918301610da1565b509695505050505050565b60008060408385031215610dd657600080fd5b823567ffffffffffffffff80821115610dee57600080fd5b818501915085601f830112610e0257600080fd5b81356020610e12610d7583610d30565b82815260059290921b84018101918181019089841115610e3157600080fd5b948201945b83861015610e5657610e4786610be8565b82529482019490820190610e36565b96505086013592505080821115610e6c57600080fd5b50610e7985828601610d54565b9150509250929050565b600060208284031215610e9557600080fd5b5035919050565b600080600080600080600060e0888a031215610eb757600080fd5b8735965060208089013596506040890135955060608901359450608089013567ffffffffffffffff80821115610eec57600080fd5b818b0191508b601f830112610f0057600080fd5b813581811115610f1257610f12610ce9565b610f24601f8201601f19168501610cff565b91508082528c84828501011115610f3a57600080fd5b8084840185840137600084828401015250809550505050610f5d60a08901610c04565b9150610f6b60c08901610c04565b905092959891949750929550565b600060208284031215610f8b57600080fd5b6102ae82610be8565b60008060408385031215610fa757600080fd5b82359150610c3e60208401610c04565b60008060408385031215610fca57600080fd5b610fd383610be8565b946020939093013593505050565b60208082526008908201526710b6b0b730b3b2b960c11b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102b1576102b1611019565b60008261106357634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156102b1576102b1611019565b600181811c9082168061108f57607f821691505b6020821081036110af57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610916576000816000526020600020601f850160051c810160208610156110de5750805b601f850160051c820191505b818110156110fd578281556001016110ea565b505050505050565b815167ffffffffffffffff81111561111f5761111f610ce9565b6111338161112d845461107b565b846110b5565b602080601f83116001811461116857600084156111505750858301515b600019600386901b1c1916600185901b1785556110fd565b600085815260208120601f198616915b8281101561119757888601518255948401946001909101908401611178565b50858210156111b55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b86815285602082015284604082015283606082015260c0608082015260006111f060c0830185610c47565b905082151560a0830152979650505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212201de7bcfb0de78cb43dfe5e4134a4efdb0767cf33a80d41daa58ed7af7dbc8bea64736f6c63430008170033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061010b5760003560e01c80639af608c9116100a2578063cd6dc68711610071578063cd6dc68714610217578063cf1046221461022a578063e1bcdad91461024a578063f2fde38b1461025d578063fabc1cbc1461027057600080fd5b80639af608c9146101c7578063a36298c7146101da578063a537633c146101f1578063aced16611461020457600080fd5b80634d7c76e5116100de5780634d7c76e514610174578063715018a614610187578063748747e61461018f5780638da5cb5b146101a257600080fd5b806306fced9a146101105780630fbc399414610139578063136439dd1461014e5780633e55f93214610161575b600080fd5b61012361011e366004610c14565b610283565b6040516101309190610c8d565b60405180910390f35b61014c610147366004610dc3565b6102b7565b005b61014c61015c366004610e83565b610356565b61014c61016f366004610e83565b6103d8565b61014c610182366004610e9c565b6103e5565b61014c610582565b61014c61019d366004610f79565b610596565b6033546001600160a01b03165b6040516001600160a01b039091168152602001610130565b6101236101d5366004610f79565b61061f565b6101e360665481565b604051908152602001610130565b6101236101ff366004610f94565b610645565b6065546101af906001600160a01b031681565b61014c610225366004610fb7565b6107e8565b6101e3610238366004610f79565b60676020526000908152604090205481565b61014c610258366004610fb7565b61091b565b61014c61026b366004610f79565b610968565b61014c61027e366004610e83565b6109de565b61028b610bb0565b6001600160a01b0383166000908152606760205260409020546102ae9083610645565b90505b92915050565b6033546001600160a01b03163314806102da57506065546001600160a01b031633145b6102ff5760405162461bcd60e51b81526004016102f690610fe1565b60405180910390fd5b815160005b818110156103505761034884828151811061032157610321611003565b602002602001015184838151811061033b5761033b611003565b6020026020010151610a63565b600101610304565b50505050565b6033546001600160a01b031633148061037957506065546001600160a01b031633145b6103955760405162461bcd60e51b81526004016102f690610fe1565b600081815260686020526040808220600501805460ff191690555182917f68b095021b1f40fe513109f513c66692f0b3219aee674a69f4efc57badb8201d91a250565b6103e23382610a63565b50565b6103ed610aaa565b60665486111561042d5760405162461bcd60e51b815260206004820152600b60248201526a0f9d1bdd185b131a5b5a5d60aa1b60448201526064016102f6565b80156104725785610446670de0b6b3a76400008761102f565b6104509190611046565b945085610465670de0b6b3a76400008661102f565b61046f9190611046565b93505b60008461048787670de0b6b3a7640000611068565b6104919190611068565b905060006040518060c00160405280898152602001838152602001888152602001878152602001868152602001851515815250905080606860008b81526020019081526020016000206000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040190816105179190611105565b5060a091909101516005909101805460ff191691151591909117905560405189907f8bd32089ef8cf666951ba8557b00491743a2b2cb9697111f360a4f19390fe7e19061056f908b9086908c908c908c908c906111c5565b60405180910390a2505050505050505050565b61058a610aaa565b6105946000610b04565b565b6033546001600160a01b03163314806105b957506065546001600160a01b031633145b6105d55760405162461bcd60e51b81526004016102f690610fe1565b606580546001600160a01b0319166001600160a01b0383169081179091556040517fefb5cfa1a8690c124332ab93324539c5c9c4be03f28aeb8be86f2d8a0c9fb99b90600090a250565b610627610bb0565b6001600160a01b0382166000908152606760205260408120546102b1915b61064d610bb0565b60008381526068602052604081206005015460ff1661066d57600061066f565b835b9050606860008281526020019081526020016000206040518060c0016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820180546106c79061107b565b80601f01602080910402602001604051908101604052809291908181526020018280546106f39061107b565b80156107405780601f1061071557610100808354040283529160200191610740565b820191906000526020600020905b81548152906001019060200180831161072357829003601f168201915b50505091835250506005919091015460ff161515602090910152915082156107e15781516020830151670de0b6b3a76400009061077e90839061102f565b6107889190611046565b60208401526040830151670de0b6b3a7640000906107a790839061102f565b6107b19190611046565b60408401526060830151670de0b6b3a7640000906107d090839061102f565b6107da9190611046565b6060840152505b5092915050565b600054610100900460ff16158080156108085750600054600160ff909116105b806108225750303b158015610822575060005460ff166001145b6108855760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102f6565b6000805460ff1916600117905580156108a8576000805461ff0019166101001790555b6108b0610b56565b606580546001600160a01b0319166001600160a01b03851617905560668290558015610916576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6033546001600160a01b031633148061093e57506065546001600160a01b031633145b61095a5760405162461bcd60e51b81526004016102f690610fe1565b6109648282610a63565b5050565b610970610aaa565b6001600160a01b0381166109d55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f6565b6103e281610b04565b6033546001600160a01b0316331480610a0157506065546001600160a01b031633145b610a1d5760405162461bcd60e51b81526004016102f690610fe1565b600081815260686020526040808220600501805460ff191660011790555182917faaa520fdd7d2c83061d632fa017b0432407e798818af63ea908589fceda39ab791a250565b6001600160a01b038216600081815260676020526040808220849055518392917f055b48a7f28272213f8d2dea6936149129fe08c4874c4a8e434d82e4f272e84891a35050565b6033546001600160a01b031633146105945760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102f6565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b7d5760405162461bcd60e51b81526004016102f690611205565b610594600054610100900460ff16610ba75760405162461bcd60e51b81526004016102f690611205565b61059433610b04565b6040518060c0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581525090565b80356001600160a01b0381168114610bff57600080fd5b919050565b80358015158114610bff57600080fd5b60008060408385031215610c2757600080fd5b610c3083610be8565b9150610c3e60208401610c04565b90509250929050565b6000815180845260005b81811015610c6d57602081850181015186830182015201610c51565b506000602082860101526020601f19601f83011685010191505092915050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526000608083015160c060a0840152610cd160e0840182610c47565b905060a0840151151560c08401528091505092915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610d2857610d28610ce9565b604052919050565b600067ffffffffffffffff821115610d4a57610d4a610ce9565b5060051b60200190565b600082601f830112610d6557600080fd5b81356020610d7a610d7583610d30565b610cff565b8083825260208201915060208460051b870101935086841115610d9c57600080fd5b602086015b84811015610db85780358352918301918301610da1565b509695505050505050565b60008060408385031215610dd657600080fd5b823567ffffffffffffffff80821115610dee57600080fd5b818501915085601f830112610e0257600080fd5b81356020610e12610d7583610d30565b82815260059290921b84018101918181019089841115610e3157600080fd5b948201945b83861015610e5657610e4786610be8565b82529482019490820190610e36565b96505086013592505080821115610e6c57600080fd5b50610e7985828601610d54565b9150509250929050565b600060208284031215610e9557600080fd5b5035919050565b600080600080600080600060e0888a031215610eb757600080fd5b8735965060208089013596506040890135955060608901359450608089013567ffffffffffffffff80821115610eec57600080fd5b818b0191508b601f830112610f0057600080fd5b813581811115610f1257610f12610ce9565b610f24601f8201601f19168501610cff565b91508082528c84828501011115610f3a57600080fd5b8084840185840137600084828401015250809550505050610f5d60a08901610c04565b9150610f6b60c08901610c04565b905092959891949750929550565b600060208284031215610f8b57600080fd5b6102ae82610be8565b60008060408385031215610fa757600080fd5b82359150610c3e60208401610c04565b60008060408385031215610fca57600080fd5b610fd383610be8565b946020939093013593505050565b60208082526008908201526710b6b0b730b3b2b960c11b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102b1576102b1611019565b60008261106357634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156102b1576102b1611019565b600181811c9082168061108f57607f821691505b6020821081036110af57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610916576000816000526020600020601f850160051c810160208610156110de5750805b601f850160051c820191505b818110156110fd578281556001016110ea565b505050505050565b815167ffffffffffffffff81111561111f5761111f610ce9565b6111338161112d845461107b565b846110b5565b602080601f83116001811461116857600084156111505750858301515b600019600386901b1c1916600185901b1785556110fd565b600085815260208120601f198616915b8281101561119757888601518255948401946001909101908401611178565b50858210156111b55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b86815285602082015284604082015283606082015260c0608082015260006111f060c0830185610c47565b905082151560a0830152979650505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212201de7bcfb0de78cb43dfe5e4134a4efdb0767cf33a80d41daa58ed7af7dbc8bea64736f6c63430008170033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.