Overview
S Balance
0 S
S Value
-More Info
Private Name Tags
ContractCreator
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
StrategyFactory
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.20; import "@openzeppelin-5/contracts/proxy/beacon/BeaconProxy.sol"; import "@openzeppelin-5/contracts/proxy/beacon/UpgradeableBeacon.sol"; import "@openzeppelin-5/contracts/access/Ownable.sol"; // Minimal proxy pattern for creating new Beefy strategies contract StrategyFactory is Ownable { /// @notice instance mapping to strategy name with version. mapping (string => UpgradeableBeacon) public instances; /// @notice approved rebalancer mapping mapping (address => bool) public rebalancers; /// @notice Pause state by strategyName mapping (string => bool) public strategyPause; /// @notice deployed strategy types string[] public strategyTypes; /// @notice The address of the native token address public native; /// @notice The address of the keeper address public keeper; /// @notice The beefy fee recipient address public beefyFeeRecipient; /// @notice The beefy fee config address public beefyFeeConfig; /// @notice Global pause state for all strategies that use this bool public globalPause; // Events event ProxyCreated(string strategyName, address proxy); event InstanceUpgraded(string strategyName, address newImplementation); event NewStrategyAdded(string strategyName, address implementation); event SetBeefyFeeRecipient(address beefyFeeRecipient); event SetBeefyFeeConfig(address beefyFeeConfig); event SetKeeper(address keeper); event GlobalPause(bool paused); event StratPause(string strategyName, bool paused); event RebalancerChanged(address rebalancer, bool isRebalancer); // Errors error NotManager(); error StratVersionExists(); /// @notice Throws if called by any account other than the owner or the keeper/ modifier onlyManager() { if (msg.sender != owner() && msg.sender != address(keeper)) revert NotManager(); _; } /// @notice Constructor initializes the keeper address constructor( address _native, address _keeper, address _beefyFeeRecipient, address _beefyFeeConfig ) Ownable(msg.sender) { native = _native; keeper = _keeper; beefyFeeRecipient = _beefyFeeRecipient; beefyFeeConfig = _beefyFeeConfig; } /** @notice Creates a new Beefy Strategy as a proxy of the template instance * @param _strategyName The name of the strategy * @return A reference to the new proxied Beefy Strategy */ function createStrategy(string calldata _strategyName) external returns (address) { // Create a new Beefy Strategy as a proxy of the template instance UpgradeableBeacon instance = instances[_strategyName]; BeaconProxy proxy = new BeaconProxy(address(instance), ""); emit ProxyCreated(_strategyName, address(proxy)); return address(proxy); } /** * @notice Upgrades the implementation of a strategy * @param _strategyName The name of the strategy * @param _newImplementation The new implementation address */ function upgradeTo(string calldata _strategyName, address _newImplementation) external onlyOwner { UpgradeableBeacon instance = instances[_strategyName]; instance.upgradeTo(_newImplementation); emit InstanceUpgraded(_strategyName, _newImplementation); } /** * @notice Adds a new strategy to the factory * @param _strategyName The name of the strategy * @param _implementation The implementation address */ function addStrategy(string calldata _strategyName, address _implementation) external onlyManager { if (address(instances[_strategyName]) != address(0)) revert StratVersionExists(); instances[_strategyName] = new UpgradeableBeacon(_implementation, address(this)); // Store in our deployed strategy type array strategyTypes.push(_strategyName); emit NewStrategyAdded(_strategyName, _implementation); } /** * @notice Pauses all strategies */ function pauseAllStrats() external onlyManager { globalPause = true; emit GlobalPause(true); } /** * @notice Unpauses all strategies */ function unpauseAllStrats() external onlyOwner { globalPause = false; emit GlobalPause(false); } function pauseStrategy(string calldata _strategyName) external onlyManager { strategyPause[_strategyName] = true; emit StratPause(_strategyName, true); } function unpauseStrategy(string calldata _strategyName) external onlyOwner { strategyPause[_strategyName] = false; emit StratPause(_strategyName, false); } /** * @notice Adds a rebalancer callable by the owner * @param _rebalancer The rebalancer address */ function addRebalancer(address _rebalancer) external onlyOwner { rebalancers[_rebalancer] = true; emit RebalancerChanged(_rebalancer, true); } /** * @notice Removes a rebalancer callable by a manager * @param _rebalancer The rebalancer address */ function removeRebalancer(address _rebalancer) external onlyManager { rebalancers[_rebalancer] = false; emit RebalancerChanged(_rebalancer, false); } /** * @notice set the beefy fee recipient address * @param _beefyFeeRecipient The new beefy fee recipient address */ function setBeefyFeeRecipient(address _beefyFeeRecipient) external onlyOwner { beefyFeeRecipient = _beefyFeeRecipient; emit SetBeefyFeeRecipient(_beefyFeeRecipient); } /** * @notice set the beefy fee config address * @param _beefyFeeConfig The new beefy fee config address */ function setBeefyFeeConfig(address _beefyFeeConfig) external onlyOwner { beefyFeeConfig = _beefyFeeConfig; emit SetBeefyFeeConfig(_beefyFeeConfig); } /** * @notice set the keeper address * @param _keeper The new keeper address */ function setKeeper(address _keeper) external onlyOwner { keeper = _keeper; emit SetKeeper(_keeper); } /** * @notice Gets the implementation of a strategy * @param _strategyName The name of the strategy * @return The implementation address */ function getImplementation(string calldata _strategyName) external view returns (address) { return instances[_strategyName].implementation(); } /** * @notice Gets the array of deployed strategies * @return The array of deployed strategies */ function getStrategyTypes() external view returns (string[] memory) { return strategyTypes; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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 { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/BeaconProxy.sol) pragma solidity ^0.8.20; import {IBeacon} from "./IBeacon.sol"; import {Proxy} from "../Proxy.sol"; import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol"; /** * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}. * * The beacon address can only be set once during construction, and cannot be changed afterwards. It is stored in an * immutable variable to avoid unnecessary storage reads, and also in the beacon storage slot specified by * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] so that it can be accessed externally. * * CAUTION: Since the beacon address can never be changed, you must ensure that you either control the beacon, or trust * the beacon to not upgrade the implementation maliciously. * * IMPORTANT: Do not use the implementation logic to modify the beacon storage slot. Doing so would leave the proxy in * an inconsistent state where the beacon storage slot does not match the beacon address. */ contract BeaconProxy is Proxy { // An immutable address for the beacon to avoid unnecessary SLOADs before each delegate call. address private immutable _beacon; /** * @dev Initializes the proxy with `beacon`. * * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This * will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity * constructor. * * Requirements: * * - `beacon` must be a contract with the interface {IBeacon}. * - If `data` is empty, `msg.value` must be zero. */ constructor(address beacon, bytes memory data) payable { ERC1967Utils.upgradeBeaconToAndCall(beacon, data); _beacon = beacon; } /** * @dev Returns the current implementation address of the associated beacon. */ function _implementation() internal view virtual override returns (address) { return IBeacon(_getBeacon()).implementation(); } /** * @dev Returns the beacon. */ function _getBeacon() internal view virtual returns (address) { return _beacon; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.20; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {UpgradeableBeacon} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/UpgradeableBeacon.sol) pragma solidity ^0.8.20; import {IBeacon} from "./IBeacon.sol"; import {Ownable} from "../../access/Ownable.sol"; /** * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their * implementation contract, which is where they will delegate all function calls. * * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon. */ contract UpgradeableBeacon is IBeacon, Ownable { address private _implementation; /** * @dev The `implementation` of the beacon is invalid. */ error BeaconInvalidImplementation(address implementation); /** * @dev Emitted when the implementation returned by the beacon is changed. */ event Upgraded(address indexed implementation); /** * @dev Sets the address of the initial implementation, and the initial owner who can upgrade the beacon. */ constructor(address implementation_, address initialOwner) Ownable(initialOwner) { _setImplementation(implementation_); } /** * @dev Returns the current implementation address. */ function implementation() public view virtual returns (address) { return _implementation; } /** * @dev Upgrades the beacon to a new implementation. * * Emits an {Upgraded} event. * * Requirements: * * - msg.sender must be the owner of the contract. * - `newImplementation` must be a contract. */ function upgradeTo(address newImplementation) public virtual onlyOwner { _setImplementation(newImplementation); } /** * @dev Sets the implementation contract address for this beacon * * Requirements: * * - `newImplementation` must be a contract. */ function _setImplementation(address newImplementation) private { if (newImplementation.code.length == 0) { revert BeaconInvalidImplementation(newImplementation); } _implementation = newImplementation; emit Upgraded(newImplementation); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol) pragma solidity ^0.8.20; import {IBeacon} from "../beacon/IBeacon.sol"; import {Address} from "../../utils/Address.sol"; import {StorageSlot} from "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. */ library ERC1967Utils { // We re-declare ERC-1967 events here because they can't be used directly from IERC1967. // This will be fixed in Solidity 0.8.21. At that point we should remove these events. /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Emitted when the beacon is changed. */ event BeaconUpgraded(address indexed beacon); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev The `implementation` of the proxy is invalid. */ error ERC1967InvalidImplementation(address implementation); /** * @dev The `admin` of the proxy is invalid. */ error ERC1967InvalidAdmin(address admin); /** * @dev The `beacon` of the proxy is invalid. */ error ERC1967InvalidBeacon(address beacon); /** * @dev An upgrade function sees `msg.value > 0` that may be lost. */ error ERC1967NonPayable(); /** * @dev Returns the current implementation address. */ function getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { if (newImplementation.code.length == 0) { revert ERC1967InvalidImplementation(newImplementation); } StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Performs implementation upgrade with additional setup call if data is nonempty. * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected * to avoid stuck value in the contract. * * Emits an {IERC1967-Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); if (data.length > 0) { Address.functionDelegateCall(newImplementation, data); } else { _checkNonPayable(); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Returns the current admin. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` */ function getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { if (newAdmin == address(0)) { revert ERC1967InvalidAdmin(address(0)); } StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {IERC1967-AdminChanged} event. */ function changeAdmin(address newAdmin) internal { emit AdminChanged(getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Returns the current beacon. */ function getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { if (newBeacon.code.length == 0) { revert ERC1967InvalidBeacon(newBeacon); } StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon; address beaconImplementation = IBeacon(newBeacon).implementation(); if (beaconImplementation.code.length == 0) { revert ERC1967InvalidImplementation(beaconImplementation); } } /** * @dev Change the beacon and trigger a setup call if data is nonempty. * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected * to avoid stuck value in the contract. * * Emits an {IERC1967-BeaconUpgraded} event. * * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for * efficiency. */ function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } else { _checkNonPayable(); } } /** * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract * if an upgrade doesn't perform an initialization call. */ function _checkNonPayable() private { if (msg.value > 0) { revert ERC1967NonPayable(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol) pragma solidity ^0.8.20; /** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a * different contract through the {_delegate} function. * * The success and return data of the delegated call will be returned back to the caller of the proxy. */ abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev This is a virtual function that should be overridden so it returns the address to which the fallback * function and {_fallback} should delegate. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _fallback() internal virtual { _delegate(_implementation()); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */ fallback() external payable virtual { _fallback(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @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 or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * 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. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @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`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) 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 FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
{ "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
[{"inputs":[{"internalType":"address","name":"_native","type":"address"},{"internalType":"address","name":"_keeper","type":"address"},{"internalType":"address","name":"_beefyFeeRecipient","type":"address"},{"internalType":"address","name":"_beefyFeeConfig","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NotManager","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"StratVersionExists","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"paused","type":"bool"}],"name":"GlobalPause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"strategyName","type":"string"},{"indexed":false,"internalType":"address","name":"newImplementation","type":"address"}],"name":"InstanceUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"strategyName","type":"string"},{"indexed":false,"internalType":"address","name":"implementation","type":"address"}],"name":"NewStrategyAdded","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":false,"internalType":"string","name":"strategyName","type":"string"},{"indexed":false,"internalType":"address","name":"proxy","type":"address"}],"name":"ProxyCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rebalancer","type":"address"},{"indexed":false,"internalType":"bool","name":"isRebalancer","type":"bool"}],"name":"RebalancerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"beefyFeeConfig","type":"address"}],"name":"SetBeefyFeeConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"beefyFeeRecipient","type":"address"}],"name":"SetBeefyFeeRecipient","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"keeper","type":"address"}],"name":"SetKeeper","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"strategyName","type":"string"},{"indexed":false,"internalType":"bool","name":"paused","type":"bool"}],"name":"StratPause","type":"event"},{"inputs":[{"internalType":"address","name":"_rebalancer","type":"address"}],"name":"addRebalancer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_strategyName","type":"string"},{"internalType":"address","name":"_implementation","type":"address"}],"name":"addStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"beefyFeeConfig","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beefyFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_strategyName","type":"string"}],"name":"createStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_strategyName","type":"string"}],"name":"getImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStrategyTypes","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"globalPause","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"instances","outputs":[{"internalType":"contract UpgradeableBeacon","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keeper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"native","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseAllStrats","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_strategyName","type":"string"}],"name":"pauseStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rebalancers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rebalancer","type":"address"}],"name":"removeRebalancer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beefyFeeConfig","type":"address"}],"name":"setBeefyFeeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beefyFeeRecipient","type":"address"}],"name":"setBeefyFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"}],"name":"setKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"strategyPause","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"strategyTypes","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseAllStrats","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_strategyName","type":"string"}],"name":"unpauseStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_strategyName","type":"string"},{"internalType":"address","name":"_newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162001f8138038062001f81833981016040819052620000349162000128565b33806200005b57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006681620000bb565b50600580546001600160a01b039586166001600160a01b031991821617909155600680549486169482169490941790935560078054928516928416929092179091556008805491909316911617905562000185565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200012357600080fd5b919050565b600080600080608085870312156200013f57600080fd5b6200014a856200010b565b93506200015a602086016200010b565b92506200016a604086016200010b565b91506200017a606086016200010b565b905092959194509250565b611dec80620001956000396000f3fe60806040523480156200001157600080fd5b5060043610620001af5760003560e01c80638da5cb5b11620000f0578063c93d771511620000a3578063de73a594116200007a578063de73a59414620003e4578063ed8ea6001462000415578063f12d54d8146200042e578063f2fde38b146200044357600080fd5b8063c93d771514620003ac578063cdd5d9dd14620003b6578063ce903bcc14620003cd57600080fd5b80638da5cb5b146200031a5780638e145459146200032c578063940a9fa11462000340578063a44d57a0146200034a578063a68833e51462000381578063aced1661146200039857600080fd5b806343bc4b9a11620001665780635a8b1a9f116200013d5780635a8b1a9f14620002cb5780636b68389614620002e2578063715018a614620002f9578063748747e6146200030357600080fd5b806343bc4b9a146200027a5780634746fb551462000291578063517137ee14620002a557600080fd5b80630c97991914620001b4578063106fdbd014620001cd578063116fd50114620001e457806311b0b42d1462000218578063194a4108146200022c57806341a1914e1462000243575b600080fd5b620001cb620001c536600462000ef2565b6200045a565b005b620001cb620001de36600462000ef2565b620004c6565b620001fb620001f536600462000f5e565b6200051f565b6040516001600160a01b0390911681526020015b60405180910390f35b600554620001fb906001600160a01b031681565b620001cb6200023d36600462000f5e565b620005e5565b620001fb6200025436600462000fba565b80516020818301810180516001825292820191909301209152546001600160a01b031681565b620001cb6200028b36600462000ef2565b620006a2565b600854620001fb906001600160a01b031681565b620002bc620002b636600462001075565b62000740565b6040516200020f9190620010d7565b620001cb620002dc366004620010ec565b620007f5565b620001fb620002f336600462000f5e565b620008c4565b620001cb62000957565b620001cb6200031436600462000ef2565b6200096f565b6000546001600160a01b0316620001fb565b600754620001fb906001600160a01b031681565b620001cb620009c8565b620003706200035b36600462000ef2565b60026020526000908152604090205460ff1681565b60405190151581526020016200020f565b620001cb6200039236600462000ef2565b62000a16565b600654620001fb906001600160a01b031681565b620001cb62000a6f565b620001cb620003c7366004620010ec565b62000afa565b620001cb620003de36600462000f5e565b62000ca1565b62000370620003f536600462000fba565b805160208183018101805160038252928201919093012091525460ff1681565b6200041f62000d16565b6040516200020f919062001149565b6008546200037090600160a01b900460ff1681565b620001cb6200045436600462000ef2565b62000df9565b6200046462000e41565b6001600160a01b038116600081815260026020908152604091829020805460ff191660019081179091558251938452908301527fad7caca61f64c5976fc697122c9ff26acc30fc936092716798ff3b43cc54f80091015b60405180910390a150565b620004d062000e41565b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f91e28ce4210d103c13c5174847e463b836900f8dc63e9d9b42a4255169d1952990602001620004bb565b6000806001848460405162000536929190620011b1565b908152604051908190036020018120546001600160a01b031691506000908290620005619062000ec0565b6001600160a01b039091168152604060208201819052600090820152606001604051809103906000f0801580156200059d573d6000803e3d6000fd5b5090507f3699b7de9b98bb64c45028ff3593b0d6159da8016d0f85b6af11d765320c87bb858583604051620005d593929190620011ea565b60405180910390a1949350505050565b6000546001600160a01b031633148015906200060c57506006546001600160a01b03163314155b156200062b5760405163607e454560e11b815260040160405180910390fd5b60016003838360405162000641929190620011b1565b908152604051908190036020018120805492151560ff19909316929092179091557f32b2ef738db0485a8739f39e50322bb2c617e6a3d2539b4ecf26f199021057a69062000696908490849060019062001218565b60405180910390a15050565b6000546001600160a01b03163314801590620006c957506006546001600160a01b03163314155b15620006e85760405163607e454560e11b815260040160405180910390fd5b6001600160a01b0381166000818152600260209081526040808320805460ff191690558051938452908301919091527fad7caca61f64c5976fc697122c9ff26acc30fc936092716798ff3b43cc54f8009101620004bb565b600481815481106200075157600080fd5b9060005260206000200160009150905080546200076e9062001240565b80601f01602080910402602001604051908101604052809291908181526020018280546200079c9062001240565b8015620007ed5780601f10620007c157610100808354040283529160200191620007ed565b820191906000526020600020905b815481529060010190602001808311620007cf57829003601f168201915b505050505081565b620007ff62000e41565b60006001848460405162000815929190620011b1565b90815260405190819003602001812054631b2ce7f360e11b82526001600160a01b0384811660048401521691508190633659cfe690602401600060405180830381600087803b1580156200086857600080fd5b505af11580156200087d573d6000803e3d6000fd5b505050507f52a6e00a16a485598386bd39b6aac98ed50e4fbde10ef9b5c18374faecb55010848484604051620008b693929190620011ea565b60405180910390a150505050565b600060018383604051620008da929190620011b1565b908152604080516020928190038301812054635c60da1b60e01b825291516001600160a01b0390921692635c60da1b926004808401938290030181865afa1580156200092a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200095091906200127c565b9392505050565b6200096162000e41565b6200096d600062000e70565b565b6200097962000e41565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527fefb5cfa1a8690c124332ab93324539c5c9c4be03f28aeb8be86f2d8a0c9fb99b90602001620004bb565b620009d262000e41565b6008805460ff60a01b19169055604051600081527fa5fea31b6dbd7aec6098ca4653b1d51af1ef786fcb19031c4c4e55b675535f1e906020015b60405180910390a1565b62000a2062000e41565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527f8041329bf7057543a2c2ff4e4071d1d488a31f82ed44e169b5cd2f04f5e3ac8590602001620004bb565b6000546001600160a01b0316331480159062000a9657506006546001600160a01b03163314155b1562000ab55760405163607e454560e11b815260040160405180910390fd5b6008805460ff60a01b1916600160a01b179055604051600181527fa5fea31b6dbd7aec6098ca4653b1d51af1ef786fcb19031c4c4e55b675535f1e9060200162000a0c565b6000546001600160a01b0316331480159062000b2157506006546001600160a01b03163314155b1562000b405760405163607e454560e11b815260040160405180910390fd5b60006001600160a01b03166001848460405162000b5f929190620011b1565b908152604051908190036020019020546001600160a01b03161462000b9757604051631f93a2cd60e01b815260040160405180910390fd5b803060405162000ba79062000ece565b6001600160a01b03928316815291166020820152604001604051809103906000f08015801562000bdb573d6000803e3d6000fd5b506001848460405162000bf0929190620011b1565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b0319909216919091179055600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0162000c5e838583620012f1565b507fa065c3b00cde146f5df407afa0661cfa2c0ed2efd62ac00b3241aaae02ff5d2e83838360405162000c9493929190620011ea565b60405180910390a1505050565b62000cab62000e41565b60006003838360405162000cc1929190620011b1565b908152604051908190036020018120805492151560ff19909316929092179091557f32b2ef738db0485a8739f39e50322bb2c617e6a3d2539b4ecf26f199021057a69062000696908490849060009062001218565b60606004805480602002602001604051908101604052809291908181526020016000905b8282101562000df057838290600052602060002001805462000d5c9062001240565b80601f016020809104026020016040519081016040528092919081815260200182805462000d8a9062001240565b801562000ddb5780601f1062000daf5761010080835404028352916020019162000ddb565b820191906000526020600020905b81548152906001019060200180831162000dbd57829003601f168201915b50505050508152602001906001019062000d3a565b50505050905090565b62000e0362000e41565b6001600160a01b03811662000e3357604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b62000e3e8162000e70565b50565b6000546001600160a01b031633146200096d5760405163118cdaa760e01b815233600482015260240162000e2a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6105bf80620013c083390190565b610438806200197f83390190565b6001600160a01b038116811462000e3e57600080fd5b60006020828403121562000f0557600080fd5b8135620009508162000edc565b60008083601f84011262000f2557600080fd5b50813567ffffffffffffffff81111562000f3e57600080fd5b60208301915083602082850101111562000f5757600080fd5b9250929050565b6000806020838503121562000f7257600080fd5b823567ffffffffffffffff81111562000f8a57600080fd5b62000f988582860162000f12565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121562000fcd57600080fd5b813567ffffffffffffffff8082111562000fe657600080fd5b818401915084601f83011262000ffb57600080fd5b81358181111562001010576200101062000fa4565b604051601f8201601f19908116603f011681019083821181831017156200103b576200103b62000fa4565b816040528281528760208487010111156200105557600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000602082840312156200108857600080fd5b5035919050565b6000815180845260005b81811015620010b75760208185018101518683018201520162001099565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006200095060208301846200108f565b6000806000604084860312156200110257600080fd5b833567ffffffffffffffff8111156200111a57600080fd5b620011288682870162000f12565b90945092505060208401356200113e8162000edc565b809150509250925092565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015620011a457603f19888603018452620011918583516200108f565b9450928501929085019060010162001172565b5092979650505050505050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062001200604083018587620011c1565b905060018060a01b0383166020830152949350505050565b6040815260006200122e604083018587620011c1565b90508215156020830152949350505050565b600181811c908216806200125557607f821691505b6020821081036200127657634e487b7160e01b600052602260045260246000fd5b50919050565b6000602082840312156200128f57600080fd5b8151620009508162000edc565b601f821115620012ec576000816000526020600020601f850160051c81016020861015620012c75750805b601f850160051c820191505b81811015620012e857828155600101620012d3565b5050505b505050565b67ffffffffffffffff8311156200130c576200130c62000fa4565b62001324836200131d835462001240565b836200129c565b6000601f8411600181146200135b5760008515620013425750838201355b600019600387901b1c1916600186901b178355620013b8565b600083815260209020601f19861690835b828110156200138e57868501358255602094850194600190920191016200136c565b5086821015620013ac5760001960f88860031b161c19848701351681555b505060018560011b0183555b505050505056fe60a06040526040516105bf3803806105bf83398101604081905261002291610387565b61002c828261003e565b506001600160a01b031660805261047e565b610047826100fe565b6040516001600160a01b038316907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a28051156100f2576100ed826001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e79190610447565b82610211565b505050565b6100fa610288565b5050565b806001600160a01b03163b60000361013957604051631933b43b60e21b81526001600160a01b03821660048201526024015b60405180910390fd5b807fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080546001600160a01b0319166001600160a01b0392831617905560408051635c60da1b60e01b81529051600092841691635c60da1b9160048083019260209291908290030181865afa1580156101b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d99190610447565b9050806001600160a01b03163b6000036100fa57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610130565b6060600080846001600160a01b03168460405161022e9190610462565b600060405180830381855af49150503d8060008114610269576040519150601f19603f3d011682016040523d82523d6000602084013e61026e565b606091505b50909250905061027f8583836102a9565b95945050505050565b34156102a75760405163b398979f60e01b815260040160405180910390fd5b565b6060826102be576102b982610308565b610301565b81511580156102d557506001600160a01b0384163b155b156102fe57604051639996b31560e01b81526001600160a01b0385166004820152602401610130565b50805b9392505050565b8051156103185780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80516001600160a01b038116811461034857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561037e578181015183820152602001610366565b50506000910152565b6000806040838503121561039a57600080fd5b6103a383610331565b60208401519092506001600160401b03808211156103c057600080fd5b818501915085601f8301126103d457600080fd5b8151818111156103e6576103e661034d565b604051601f8201601f19908116603f0116810190838211818310171561040e5761040e61034d565b8160405282815288602084870101111561042757600080fd5b610438836020830160208801610363565b80955050505050509250929050565b60006020828403121561045957600080fd5b61030182610331565b60008251610474818460208701610363565b9190910192915050565b6080516101276104986000396000601e01526101276000f3fe6080604052600a600c565b005b60186014601a565b60a0565b565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156079573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190609b919060c3565b905090565b3660008037600080366000845af43d6000803e80801560be573d6000f35b3d6000fd5b60006020828403121560d457600080fd5b81516001600160a01b038116811460ea57600080fd5b939250505056fea26469706673582212209744c270c5ddc92069424719fedb229fe4bd06c9a0f56820bc3065c86ef8cf0664736f6c63430008170033608060405234801561001057600080fd5b5060405161043838038061043883398101604081905261002f91610165565b806001600160a01b03811661005f57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61006881610079565b50610072826100c9565b5050610198565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b806001600160a01b03163b6000036100ff5760405163211eb15960e21b81526001600160a01b0382166004820152602401610056565b600180546001600160a01b0319166001600160a01b0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b80516001600160a01b038116811461016057600080fd5b919050565b6000806040838503121561017857600080fd5b61018183610149565b915061018f60208401610149565b90509250929050565b610291806101a76000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80633659cfe61461005c5780635c60da1b14610071578063715018a61461009a5780638da5cb5b146100a2578063f2fde38b146100b3575b600080fd5b61006f61006a36600461022b565b6100c6565b005b6001546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b61006f6100da565b6000546001600160a01b031661007e565b61006f6100c136600461022b565b6100ee565b6100ce61012e565b6100d78161015b565b50565b6100e261012e565b6100ec60006101db565b565b6100f661012e565b6001600160a01b03811661012557604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6100d7816101db565b6000546001600160a01b031633146100ec5760405163118cdaa760e01b815233600482015260240161011c565b806001600160a01b03163b6000036101915760405163211eb15960e21b81526001600160a01b038216600482015260240161011c565b600180546001600160a01b0319166001600160a01b0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561023d57600080fd5b81356001600160a01b038116811461025457600080fd5b939250505056fea26469706673582212205a4f290ade5c73389c46224c7b49c41da43507b866d47978ff380c5772e3760164736f6c63430008170033a26469706673582212208ea9fb9d7a4294d362915a7b583686d891a96a89caa6ccd7d22b2f9266fb8cf264736f6c63430008170033000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad380000000000000000000000004fed5491693007f0cd49f4614ffc38ab6a04b61900000000000000000000000002ae4716b9d5d48db1445814b0ede39f5c28264b0000000000000000000000002b0c9702a4724f2bfe7922db92c4082098533c62
Deployed Bytecode
0x60806040523480156200001157600080fd5b5060043610620001af5760003560e01c80638da5cb5b11620000f0578063c93d771511620000a3578063de73a594116200007a578063de73a59414620003e4578063ed8ea6001462000415578063f12d54d8146200042e578063f2fde38b146200044357600080fd5b8063c93d771514620003ac578063cdd5d9dd14620003b6578063ce903bcc14620003cd57600080fd5b80638da5cb5b146200031a5780638e145459146200032c578063940a9fa11462000340578063a44d57a0146200034a578063a68833e51462000381578063aced1661146200039857600080fd5b806343bc4b9a11620001665780635a8b1a9f116200013d5780635a8b1a9f14620002cb5780636b68389614620002e2578063715018a614620002f9578063748747e6146200030357600080fd5b806343bc4b9a146200027a5780634746fb551462000291578063517137ee14620002a557600080fd5b80630c97991914620001b4578063106fdbd014620001cd578063116fd50114620001e457806311b0b42d1462000218578063194a4108146200022c57806341a1914e1462000243575b600080fd5b620001cb620001c536600462000ef2565b6200045a565b005b620001cb620001de36600462000ef2565b620004c6565b620001fb620001f536600462000f5e565b6200051f565b6040516001600160a01b0390911681526020015b60405180910390f35b600554620001fb906001600160a01b031681565b620001cb6200023d36600462000f5e565b620005e5565b620001fb6200025436600462000fba565b80516020818301810180516001825292820191909301209152546001600160a01b031681565b620001cb6200028b36600462000ef2565b620006a2565b600854620001fb906001600160a01b031681565b620002bc620002b636600462001075565b62000740565b6040516200020f9190620010d7565b620001cb620002dc366004620010ec565b620007f5565b620001fb620002f336600462000f5e565b620008c4565b620001cb62000957565b620001cb6200031436600462000ef2565b6200096f565b6000546001600160a01b0316620001fb565b600754620001fb906001600160a01b031681565b620001cb620009c8565b620003706200035b36600462000ef2565b60026020526000908152604090205460ff1681565b60405190151581526020016200020f565b620001cb6200039236600462000ef2565b62000a16565b600654620001fb906001600160a01b031681565b620001cb62000a6f565b620001cb620003c7366004620010ec565b62000afa565b620001cb620003de36600462000f5e565b62000ca1565b62000370620003f536600462000fba565b805160208183018101805160038252928201919093012091525460ff1681565b6200041f62000d16565b6040516200020f919062001149565b6008546200037090600160a01b900460ff1681565b620001cb6200045436600462000ef2565b62000df9565b6200046462000e41565b6001600160a01b038116600081815260026020908152604091829020805460ff191660019081179091558251938452908301527fad7caca61f64c5976fc697122c9ff26acc30fc936092716798ff3b43cc54f80091015b60405180910390a150565b620004d062000e41565b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f91e28ce4210d103c13c5174847e463b836900f8dc63e9d9b42a4255169d1952990602001620004bb565b6000806001848460405162000536929190620011b1565b908152604051908190036020018120546001600160a01b031691506000908290620005619062000ec0565b6001600160a01b039091168152604060208201819052600090820152606001604051809103906000f0801580156200059d573d6000803e3d6000fd5b5090507f3699b7de9b98bb64c45028ff3593b0d6159da8016d0f85b6af11d765320c87bb858583604051620005d593929190620011ea565b60405180910390a1949350505050565b6000546001600160a01b031633148015906200060c57506006546001600160a01b03163314155b156200062b5760405163607e454560e11b815260040160405180910390fd5b60016003838360405162000641929190620011b1565b908152604051908190036020018120805492151560ff19909316929092179091557f32b2ef738db0485a8739f39e50322bb2c617e6a3d2539b4ecf26f199021057a69062000696908490849060019062001218565b60405180910390a15050565b6000546001600160a01b03163314801590620006c957506006546001600160a01b03163314155b15620006e85760405163607e454560e11b815260040160405180910390fd5b6001600160a01b0381166000818152600260209081526040808320805460ff191690558051938452908301919091527fad7caca61f64c5976fc697122c9ff26acc30fc936092716798ff3b43cc54f8009101620004bb565b600481815481106200075157600080fd5b9060005260206000200160009150905080546200076e9062001240565b80601f01602080910402602001604051908101604052809291908181526020018280546200079c9062001240565b8015620007ed5780601f10620007c157610100808354040283529160200191620007ed565b820191906000526020600020905b815481529060010190602001808311620007cf57829003601f168201915b505050505081565b620007ff62000e41565b60006001848460405162000815929190620011b1565b90815260405190819003602001812054631b2ce7f360e11b82526001600160a01b0384811660048401521691508190633659cfe690602401600060405180830381600087803b1580156200086857600080fd5b505af11580156200087d573d6000803e3d6000fd5b505050507f52a6e00a16a485598386bd39b6aac98ed50e4fbde10ef9b5c18374faecb55010848484604051620008b693929190620011ea565b60405180910390a150505050565b600060018383604051620008da929190620011b1565b908152604080516020928190038301812054635c60da1b60e01b825291516001600160a01b0390921692635c60da1b926004808401938290030181865afa1580156200092a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200095091906200127c565b9392505050565b6200096162000e41565b6200096d600062000e70565b565b6200097962000e41565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527fefb5cfa1a8690c124332ab93324539c5c9c4be03f28aeb8be86f2d8a0c9fb99b90602001620004bb565b620009d262000e41565b6008805460ff60a01b19169055604051600081527fa5fea31b6dbd7aec6098ca4653b1d51af1ef786fcb19031c4c4e55b675535f1e906020015b60405180910390a1565b62000a2062000e41565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527f8041329bf7057543a2c2ff4e4071d1d488a31f82ed44e169b5cd2f04f5e3ac8590602001620004bb565b6000546001600160a01b0316331480159062000a9657506006546001600160a01b03163314155b1562000ab55760405163607e454560e11b815260040160405180910390fd5b6008805460ff60a01b1916600160a01b179055604051600181527fa5fea31b6dbd7aec6098ca4653b1d51af1ef786fcb19031c4c4e55b675535f1e9060200162000a0c565b6000546001600160a01b0316331480159062000b2157506006546001600160a01b03163314155b1562000b405760405163607e454560e11b815260040160405180910390fd5b60006001600160a01b03166001848460405162000b5f929190620011b1565b908152604051908190036020019020546001600160a01b03161462000b9757604051631f93a2cd60e01b815260040160405180910390fd5b803060405162000ba79062000ece565b6001600160a01b03928316815291166020820152604001604051809103906000f08015801562000bdb573d6000803e3d6000fd5b506001848460405162000bf0929190620011b1565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b0319909216919091179055600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0162000c5e838583620012f1565b507fa065c3b00cde146f5df407afa0661cfa2c0ed2efd62ac00b3241aaae02ff5d2e83838360405162000c9493929190620011ea565b60405180910390a1505050565b62000cab62000e41565b60006003838360405162000cc1929190620011b1565b908152604051908190036020018120805492151560ff19909316929092179091557f32b2ef738db0485a8739f39e50322bb2c617e6a3d2539b4ecf26f199021057a69062000696908490849060009062001218565b60606004805480602002602001604051908101604052809291908181526020016000905b8282101562000df057838290600052602060002001805462000d5c9062001240565b80601f016020809104026020016040519081016040528092919081815260200182805462000d8a9062001240565b801562000ddb5780601f1062000daf5761010080835404028352916020019162000ddb565b820191906000526020600020905b81548152906001019060200180831162000dbd57829003601f168201915b50505050508152602001906001019062000d3a565b50505050905090565b62000e0362000e41565b6001600160a01b03811662000e3357604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b62000e3e8162000e70565b50565b6000546001600160a01b031633146200096d5760405163118cdaa760e01b815233600482015260240162000e2a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6105bf80620013c083390190565b610438806200197f83390190565b6001600160a01b038116811462000e3e57600080fd5b60006020828403121562000f0557600080fd5b8135620009508162000edc565b60008083601f84011262000f2557600080fd5b50813567ffffffffffffffff81111562000f3e57600080fd5b60208301915083602082850101111562000f5757600080fd5b9250929050565b6000806020838503121562000f7257600080fd5b823567ffffffffffffffff81111562000f8a57600080fd5b62000f988582860162000f12565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121562000fcd57600080fd5b813567ffffffffffffffff8082111562000fe657600080fd5b818401915084601f83011262000ffb57600080fd5b81358181111562001010576200101062000fa4565b604051601f8201601f19908116603f011681019083821181831017156200103b576200103b62000fa4565b816040528281528760208487010111156200105557600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000602082840312156200108857600080fd5b5035919050565b6000815180845260005b81811015620010b75760208185018101518683018201520162001099565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006200095060208301846200108f565b6000806000604084860312156200110257600080fd5b833567ffffffffffffffff8111156200111a57600080fd5b620011288682870162000f12565b90945092505060208401356200113e8162000edc565b809150509250925092565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015620011a457603f19888603018452620011918583516200108f565b9450928501929085019060010162001172565b5092979650505050505050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062001200604083018587620011c1565b905060018060a01b0383166020830152949350505050565b6040815260006200122e604083018587620011c1565b90508215156020830152949350505050565b600181811c908216806200125557607f821691505b6020821081036200127657634e487b7160e01b600052602260045260246000fd5b50919050565b6000602082840312156200128f57600080fd5b8151620009508162000edc565b601f821115620012ec576000816000526020600020601f850160051c81016020861015620012c75750805b601f850160051c820191505b81811015620012e857828155600101620012d3565b5050505b505050565b67ffffffffffffffff8311156200130c576200130c62000fa4565b62001324836200131d835462001240565b836200129c565b6000601f8411600181146200135b5760008515620013425750838201355b600019600387901b1c1916600186901b178355620013b8565b600083815260209020601f19861690835b828110156200138e57868501358255602094850194600190920191016200136c565b5086821015620013ac5760001960f88860031b161c19848701351681555b505060018560011b0183555b505050505056fe60a06040526040516105bf3803806105bf83398101604081905261002291610387565b61002c828261003e565b506001600160a01b031660805261047e565b610047826100fe565b6040516001600160a01b038316907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a28051156100f2576100ed826001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e79190610447565b82610211565b505050565b6100fa610288565b5050565b806001600160a01b03163b60000361013957604051631933b43b60e21b81526001600160a01b03821660048201526024015b60405180910390fd5b807fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080546001600160a01b0319166001600160a01b0392831617905560408051635c60da1b60e01b81529051600092841691635c60da1b9160048083019260209291908290030181865afa1580156101b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d99190610447565b9050806001600160a01b03163b6000036100fa57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610130565b6060600080846001600160a01b03168460405161022e9190610462565b600060405180830381855af49150503d8060008114610269576040519150601f19603f3d011682016040523d82523d6000602084013e61026e565b606091505b50909250905061027f8583836102a9565b95945050505050565b34156102a75760405163b398979f60e01b815260040160405180910390fd5b565b6060826102be576102b982610308565b610301565b81511580156102d557506001600160a01b0384163b155b156102fe57604051639996b31560e01b81526001600160a01b0385166004820152602401610130565b50805b9392505050565b8051156103185780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80516001600160a01b038116811461034857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561037e578181015183820152602001610366565b50506000910152565b6000806040838503121561039a57600080fd5b6103a383610331565b60208401519092506001600160401b03808211156103c057600080fd5b818501915085601f8301126103d457600080fd5b8151818111156103e6576103e661034d565b604051601f8201601f19908116603f0116810190838211818310171561040e5761040e61034d565b8160405282815288602084870101111561042757600080fd5b610438836020830160208801610363565b80955050505050509250929050565b60006020828403121561045957600080fd5b61030182610331565b60008251610474818460208701610363565b9190910192915050565b6080516101276104986000396000601e01526101276000f3fe6080604052600a600c565b005b60186014601a565b60a0565b565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156079573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190609b919060c3565b905090565b3660008037600080366000845af43d6000803e80801560be573d6000f35b3d6000fd5b60006020828403121560d457600080fd5b81516001600160a01b038116811460ea57600080fd5b939250505056fea26469706673582212209744c270c5ddc92069424719fedb229fe4bd06c9a0f56820bc3065c86ef8cf0664736f6c63430008170033608060405234801561001057600080fd5b5060405161043838038061043883398101604081905261002f91610165565b806001600160a01b03811661005f57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61006881610079565b50610072826100c9565b5050610198565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b806001600160a01b03163b6000036100ff5760405163211eb15960e21b81526001600160a01b0382166004820152602401610056565b600180546001600160a01b0319166001600160a01b0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b80516001600160a01b038116811461016057600080fd5b919050565b6000806040838503121561017857600080fd5b61018183610149565b915061018f60208401610149565b90509250929050565b610291806101a76000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80633659cfe61461005c5780635c60da1b14610071578063715018a61461009a5780638da5cb5b146100a2578063f2fde38b146100b3575b600080fd5b61006f61006a36600461022b565b6100c6565b005b6001546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b61006f6100da565b6000546001600160a01b031661007e565b61006f6100c136600461022b565b6100ee565b6100ce61012e565b6100d78161015b565b50565b6100e261012e565b6100ec60006101db565b565b6100f661012e565b6001600160a01b03811661012557604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6100d7816101db565b6000546001600160a01b031633146100ec5760405163118cdaa760e01b815233600482015260240161011c565b806001600160a01b03163b6000036101915760405163211eb15960e21b81526001600160a01b038216600482015260240161011c565b600180546001600160a01b0319166001600160a01b0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561023d57600080fd5b81356001600160a01b038116811461025457600080fd5b939250505056fea26469706673582212205a4f290ade5c73389c46224c7b49c41da43507b866d47978ff380c5772e3760164736f6c63430008170033a26469706673582212208ea9fb9d7a4294d362915a7b583686d891a96a89caa6ccd7d22b2f9266fb8cf264736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad380000000000000000000000004fed5491693007f0cd49f4614ffc38ab6a04b61900000000000000000000000002ae4716b9d5d48db1445814b0ede39f5c28264b0000000000000000000000002b0c9702a4724f2bfe7922db92c4082098533c62
-----Decoded View---------------
Arg [0] : _native (address): 0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38
Arg [1] : _keeper (address): 0x4fED5491693007f0CD49f4614FFC38Ab6A04B619
Arg [2] : _beefyFeeRecipient (address): 0x02Ae4716B9D5d48Db1445814b0eDE39f5c28264B
Arg [3] : _beefyFeeConfig (address): 0x2b0C9702A4724f2BFe7922DB92c4082098533c62
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38
Arg [1] : 0000000000000000000000004fed5491693007f0cd49f4614ffc38ab6a04b619
Arg [2] : 00000000000000000000000002ae4716b9d5d48db1445814b0ede39f5c28264b
Arg [3] : 0000000000000000000000002b0c9702a4724f2bfe7922db92c4082098533c62
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.