ETH Price: $2,986.98 (+5.63%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deploy Pool143914872022-03-15 13:42:431375 days ago1647351763IN
0x0B6A5F2E...901E5B843
0 ETH0.0532801345
Deploy Pool143914842022-03-15 13:42:131375 days ago1647351733IN
0x0B6A5F2E...901E5B843
0 ETH0.0488406645
Deploy Pool143914752022-03-15 13:39:561375 days ago1647351596IN
0x0B6A5F2E...901E5B843
0 ETH0.0486644440
Add Staker Vault...143914732022-03-15 13:39:311375 days ago1647351571IN
0x0B6A5F2E...901E5B843
0 ETH0.0020942440
Add Vault Implem...143914622022-03-15 13:36:061375 days ago1647351366IN
0x0B6A5F2E...901E5B843
0 ETH0.002094640
Add Lp Token Imp...143914552022-03-15 13:34:271375 days ago1647351267IN
0x0B6A5F2E...901E5B843
0 ETH0.0023528745
Add Vault Implem...143914482022-03-15 13:33:241375 days ago1647351204IN
0x0B6A5F2E...901E5B843
0 ETH0.0031426260
Add Pool Impleme...143913102022-03-15 12:58:331375 days ago1647349113IN
0x0B6A5F2E...901E5B843
0 ETH0.0010466220
Add Pool Impleme...143912782022-03-15 12:52:591375 days ago1647348779IN
0x0B6A5F2E...901E5B843
0 ETH0.0013088725

Latest 12 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
-143914872022-03-15 13:42:431375 days ago1647351763
0x0B6A5F2E...901E5B843
 Contract Creation0 ETH
-143914872022-03-15 13:42:431375 days ago1647351763
0x0B6A5F2E...901E5B843
 Contract Creation0 ETH
-143914872022-03-15 13:42:431375 days ago1647351763
0x0B6A5F2E...901E5B843
 Contract Creation0 ETH
-143914872022-03-15 13:42:431375 days ago1647351763
0x0B6A5F2E...901E5B843
 Contract Creation0 ETH
-143914842022-03-15 13:42:131375 days ago1647351733
0x0B6A5F2E...901E5B843
 Contract Creation0 ETH
-143914842022-03-15 13:42:131375 days ago1647351733
0x0B6A5F2E...901E5B843
 Contract Creation0 ETH
-143914842022-03-15 13:42:131375 days ago1647351733
0x0B6A5F2E...901E5B843
 Contract Creation0 ETH
-143914842022-03-15 13:42:131375 days ago1647351733
0x0B6A5F2E...901E5B843
 Contract Creation0 ETH
-143914752022-03-15 13:39:561375 days ago1647351596
0x0B6A5F2E...901E5B843
 Contract Creation0 ETH
-143914752022-03-15 13:39:561375 days ago1647351596
0x0B6A5F2E...901E5B843
 Contract Creation0 ETH
-143914752022-03-15 13:39:561375 days ago1647351596
0x0B6A5F2E...901E5B843
 Contract Creation0 ETH
-143914752022-03-15 13:39:561375 days ago1647351596
0x0B6A5F2E...901E5B843
 Contract Creation0 ETH
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PoolFactory

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license
/**
 *Submitted for verification at Etherscan.io on 2022-03-15
*/

// SPDX-License-Identifier: GPL-3.0-or-later
// Sources flattened with hardhat v2.6.1 https://hardhat.org

// File @openzeppelin/contracts/proxy/[email protected]

// OpenZeppelin Contracts (last updated v4.5.0) (proxy/Proxy.sol)

pragma solidity ^0.8.0;

/**
 * @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 overriden 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 internall call site, it will return directly to the external caller.
     */
    function _fallback() internal virtual {
        _beforeFallback();
        _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();
    }

    /**
     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data
     * is empty.
     */
    receive() external payable virtual {
        _fallback();
    }

    /**
     * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`
     * call, or as part of the Solidity `fallback` or `receive` functions.
     *
     * If overriden should call `super._beforeFallback()`.
     */
    function _beforeFallback() internal virtual {}
}


// File @openzeppelin/contracts/proxy/beacon/[email protected]

// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.0;

/**
 * @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.
     *
     * {BeaconProxy} will check that this address is a contract.
     */
    function implementation() external view returns (address);
}


// File @openzeppelin/contracts/interfaces/[email protected]

// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)

pragma solidity ^0.8.0;

/**
 * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
 * proxy whose upgrades are fully controlled by the current implementation.
 */
interface IERC1822Proxiable {
    /**
     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
     * address.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy.
     */
    function proxiableUUID() external view returns (bytes32);
}


// File @openzeppelin/contracts/utils/[email protected]

// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, "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");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason 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 {
            // 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}


// File @openzeppelin/contracts/utils/[email protected]

// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)

pragma solidity ^0.8.0;

/**
 * @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:
 * ```
 * 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(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        assembly {
            r.slot := slot
        }
    }
}


// File @openzeppelin/contracts/proxy/ERC1967/[email protected]

// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)

pragma solidity ^0.8.2;




/**
 * @dev This abstract contract provides getters and event emitting update functions for
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
 *
 * _Available since v4.1._
 *
 * @custom:oz-upgrades-unsafe-allow delegatecall
 */
abstract contract ERC1967Upgrade {
    // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @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 {
        require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
        StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
    }

    /**
     * @dev Perform implementation upgrade
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeTo(address newImplementation) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    /**
     * @dev Perform implementation upgrade with additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCall(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        _upgradeTo(newImplementation);
        if (data.length > 0 || forceCall) {
            Address.functionDelegateCall(newImplementation, data);
        }
    }

    /**
     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCallUUPS(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        // Upgrades from old implementations will perform a rollback test. This test requires the new
        // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
        // this special case will break upgrade paths from old UUPS implementation to new ones.
        if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {
            _setImplementation(newImplementation);
        } else {
            try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
                require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
            } catch {
                revert("ERC1967Upgrade: new implementation is not UUPS");
            }
            _upgradeToAndCall(newImplementation, data, forceCall);
        }
    }

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Returns the current admin.
     */
    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 {
        require(newAdmin != address(0), "ERC1967: new admin is the zero address");
        StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {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 bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
     */
    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

    /**
     * @dev Emitted when the beacon is upgraded.
     */
    event BeaconUpgraded(address indexed beacon);

    /**
     * @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 {
        require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract");
        require(
            Address.isContract(IBeacon(newBeacon).implementation()),
            "ERC1967: beacon implementation is not a contract"
        );
        StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;
    }

    /**
     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
     *
     * Emits a {BeaconUpgraded} event.
     */
    function _upgradeBeaconToAndCall(
        address newBeacon,
        bytes memory data,
        bool forceCall
    ) internal {
        _setBeacon(newBeacon);
        emit BeaconUpgraded(newBeacon);
        if (data.length > 0 || forceCall) {
            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
        }
    }
}


// File @openzeppelin/contracts/proxy/ERC1967/[email protected]

// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)

pragma solidity ^0.8.0;


/**
 * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an
 * implementation address that can be changed. This address is stored in storage in the location specified by
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the
 * implementation behind the proxy.
 */
contract ERC1967Proxy is Proxy, ERC1967Upgrade {
    /**
     * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.
     *
     * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded
     * function call, and allows initializating the storage of the proxy like a Solidity constructor.
     */
    constructor(address _logic, bytes memory _data) payable {
        assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1));
        _upgradeToAndCall(_logic, _data, false);
    }

    /**
     * @dev Returns the current implementation address.
     */
    function _implementation() internal view virtual override returns (address impl) {
        return ERC1967Upgrade._getImplementation();
    }
}


// File @openzeppelin/contracts/proxy/transparent/[email protected]

// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)

pragma solidity ^0.8.0;

/**
 * @dev This contract implements a proxy that is upgradeable by an admin.
 *
 * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector
 * clashing], which can potentially be used in an attack, this contract uses the
 * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two
 * things that go hand in hand:
 *
 * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if
 * that call matches one of the admin functions exposed by the proxy itself.
 * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the
 * implementation. If the admin tries to call a function on the implementation it will fail with an error that says
 * "admin cannot fallback to proxy target".
 *
 * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing
 * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due
 * to sudden errors when trying to call a function from the proxy implementation.
 *
 * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,
 * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.
 */
contract TransparentUpgradeableProxy is ERC1967Proxy {
    /**
     * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and
     * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.
     */
    constructor(
        address _logic,
        address admin_,
        bytes memory _data
    ) payable ERC1967Proxy(_logic, _data) {
        assert(_ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1));
        _changeAdmin(admin_);
    }

    /**
     * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.
     */
    modifier ifAdmin() {
        if (msg.sender == _getAdmin()) {
            _;
        } else {
            _fallback();
        }
    }

    /**
     * @dev Returns the current admin.
     *
     * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.
     *
     * 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 admin() external ifAdmin returns (address admin_) {
        admin_ = _getAdmin();
    }

    /**
     * @dev Returns the current implementation.
     *
     * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.
     *
     * 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.
     * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`
     */
    function implementation() external ifAdmin returns (address implementation_) {
        implementation_ = _implementation();
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {AdminChanged} event.
     *
     * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.
     */
    function changeAdmin(address newAdmin) external virtual ifAdmin {
        _changeAdmin(newAdmin);
    }

    /**
     * @dev Upgrade the implementation of the proxy.
     *
     * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.
     */
    function upgradeTo(address newImplementation) external ifAdmin {
        _upgradeToAndCall(newImplementation, bytes(""), false);
    }

    /**
     * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified
     * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the
     * proxied contract.
     *
     * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.
     */
    function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {
        _upgradeToAndCall(newImplementation, data, true);
    }

    /**
     * @dev Returns the current admin.
     */
    function _admin() internal view virtual returns (address) {
        return _getAdmin();
    }

    /**
     * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.
     */
    function _beforeFallback() internal virtual override {
        require(msg.sender != _getAdmin(), "TransparentUpgradeableProxy: admin cannot fallback to proxy target");
        super._beforeFallback();
    }
}


// File @openzeppelin/contracts/token/ERC20/[email protected]

// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}


// File @openzeppelin/contracts/token/ERC20/utils/[email protected]

// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;


/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}


// File @openzeppelin/contracts/proxy/[email protected]

// OpenZeppelin Contracts v4.4.1 (proxy/Clones.sol)

pragma solidity ^0.8.0;

/**
 * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
 * deploying minimal proxy contracts, also known as "clones".
 *
 * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
 * > a minimal bytecode implementation that delegates all calls to a known, fixed address.
 *
 * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
 * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
 * deterministic method.
 *
 * _Available since v3.4._
 */
library Clones {
    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create opcode, which should never revert.
     */
    function clone(address implementation) internal returns (address instance) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create(0, ptr, 0x37)
        }
        require(instance != address(0), "ERC1167: create failed");
    }

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create2 opcode and a `salt` to deterministically deploy
     * the clone. Using the same `implementation` and `salt` multiple time will revert, since
     * the clones cannot be deployed twice at the same address.
     */
    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create2(0, ptr, 0x37, salt)
        }
        require(instance != address(0), "ERC1167: create2 failed");
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt,
        address deployer
    ) internal pure returns (address predicted) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)
            mstore(add(ptr, 0x38), shl(0x60, deployer))
            mstore(add(ptr, 0x4c), salt)
            mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))
            predicted := keccak256(add(ptr, 0x37), 0x55)
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(address implementation, bytes32 salt)
        internal
        view
        returns (address predicted)
    {
        return predictDeterministicAddress(implementation, salt, address(this));
    }
}


// File interfaces/IStakerVault.sol

pragma solidity 0.8.9;

interface IStakerVault {
    event Staked(address indexed account, uint256 amount);
    event Unstaked(address indexed account, uint256 amount);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    function initialize(address _token) external;

    function initializeLpGauge(address _lpGauge) external returns (bool);

    function stake(uint256 amount) external returns (bool);

    function stakeFor(address account, uint256 amount) external returns (bool);

    function unstake(uint256 amount) external returns (bool);

    function unstakeFor(
        address src,
        address dst,
        uint256 amount
    ) external returns (bool);

    function approve(address spender, uint256 amount) external returns (bool);

    function transfer(address account, uint256 amount) external returns (bool);

    function transferFrom(
        address src,
        address dst,
        uint256 amount
    ) external returns (bool);

    function allowance(address owner, address spender) external view returns (uint256);

    function getToken() external view returns (address);

    function balanceOf(address account) external view returns (uint256);

    function stakedAndActionLockedBalanceOf(address account) external view returns (uint256);

    function actionLockedBalanceOf(address account) external view returns (uint256);

    function increaseActionLockedBalance(address account, uint256 amount) external returns (bool);

    function decreaseActionLockedBalance(address account, uint256 amount) external returns (bool);

    function getStakedByActions() external view returns (uint256);

    function addStrategy(address strategy) external returns (bool);

    function getPoolTotalStaked() external view returns (uint256);

    function prepareLpGauge(address _lpGauge) external returns (bool);

    function executeLpGauge() external returns (bool);

    function getLpGauge() external view returns (address);

    function poolCheckpoint() external returns (bool);

    function isStrategy(address user) external view returns (bool);
}


// File interfaces/IStrategy.sol

pragma solidity 0.8.9;

interface IStrategy {
    function name() external view returns (string memory);

    function deposit() external payable returns (bool);

    function balance() external view returns (uint256);

    function withdraw(uint256 amount) external returns (bool);

    function withdrawAll() external returns (uint256);

    function harvestable() external view returns (uint256);

    function harvest() external returns (uint256);

    function strategist() external view returns (address);

    function shutdown() external returns (bool);

    function hasPendingFunds() external view returns (bool);
}


// File interfaces/IPreparable.sol

pragma solidity 0.8.9;

interface IPreparable {
    event ConfigPreparedAddress(bytes32 indexed key, address value, uint256 delay);
    event ConfigPreparedNumber(bytes32 indexed key, uint256 value, uint256 delay);

    event ConfigUpdatedAddress(bytes32 indexed key, address oldValue, address newValue);
    event ConfigUpdatedNumber(bytes32 indexed key, uint256 oldValue, uint256 newValue);

    event ConfigReset(bytes32 indexed key);
}


// File interfaces/IVault.sol

pragma solidity 0.8.9;


/**
 * @title Interface for a Vault
 */

interface IVault is IPreparable {
    event StrategyActivated(address indexed strategy);

    event StrategyDeactivated(address indexed strategy);

    /**
     * @dev 'netProfit' is the profit after all fees have been deducted
     */
    event Harvest(uint256 indexed netProfit, uint256 indexed loss);

    function initialize(
        address _pool,
        uint256 _debtLimit,
        uint256 _targetAllocation,
        uint256 _bound
    ) external;

    function withdrawFromStrategyWaitingForRemoval(address strategy) external returns (uint256);

    function deposit() external payable;

    function withdraw(uint256 amount) external returns (bool);

    function initializeStrategy(address strategy_) external returns (bool);

    function withdrawAll() external;

    function withdrawFromReserve(uint256 amount) external;

    function getStrategy() external view returns (IStrategy);

    function getStrategiesWaitingForRemoval() external view returns (address[] memory);

    function getAllocatedToStrategyWaitingForRemoval(address strategy)
        external
        view
        returns (uint256);

    function getTotalUnderlying() external view returns (uint256);

    function getUnderlying() external view returns (address);
}


// File @openzeppelin/contracts-upgradeable/token/ERC20/[email protected]

// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}


// File interfaces/ILpToken.sol

pragma solidity 0.8.9;

interface ILpToken is IERC20Upgradeable {
    function mint(address account, uint256 lpTokens) external;

    function burn(address account, uint256 burnAmount) external returns (uint256);

    function burn(uint256 burnAmount) external;

    function minter() external view returns (address);

    function initialize(
        string memory name_,
        string memory symbol_,
        uint8 _decimals,
        address _minter
    ) external returns (bool);
}


// File interfaces/IAdmin.sol

pragma solidity 0.8.9;

interface IAdmin {
    event NewAdminAdded(address newAdmin);
    event AdminRenounced(address oldAdmin);

    function admins() external view returns (address[] memory);

    function addAdmin(address newAdmin) external returns (bool);

    function renounceAdmin() external returns (bool);

    function isAdmin(address account) external view returns (bool);
}


// File interfaces/pool/ILiquidityPool.sol

pragma solidity 0.8.9;


interface ILiquidityPool is IPreparable {
    event Deposit(address indexed minter, uint256 depositAmount, uint256 mintedLpTokens);

    event DepositFor(
        address indexed minter,
        address indexed mintee,
        uint256 depositAmount,
        uint256 mintedLpTokens
    );

    event Redeem(address indexed redeemer, uint256 redeemAmount, uint256 redeemTokens);

    event LpTokenSet(address indexed lpToken);

    event StakerVaultSet(address indexed stakerVault);

    function redeem(uint256 redeemTokens) external returns (uint256);

    function redeem(uint256 redeemTokens, uint256 minRedeemAmount) external returns (uint256);

    function calcRedeem(address account, uint256 underlyingAmount) external returns (uint256);

    function deposit(uint256 mintAmount) external payable returns (uint256);

    function deposit(uint256 mintAmount, uint256 minTokenAmount) external payable returns (uint256);

    function depositAndStake(uint256 depositAmount, uint256 minTokenAmount)
        external
        payable
        returns (uint256);

    function depositFor(address account, uint256 depositAmount) external payable returns (uint256);

    function depositFor(
        address account,
        uint256 depositAmount,
        uint256 minTokenAmount
    ) external payable returns (uint256);

    function unstakeAndRedeem(uint256 redeemLpTokens, uint256 minRedeemAmount)
        external
        returns (uint256);

    function handleLpTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) external;

    function executeNewVault() external returns (address);

    function executeNewMaxWithdrawalFee() external returns (uint256);

    function executeNewRequiredReserves() external returns (uint256);

    function executeNewReserveDeviation() external returns (uint256);

    function setLpToken(address _lpToken) external returns (bool);

    function setStaker() external returns (bool);

    function isCapped() external returns (bool);

    function uncap() external returns (bool);

    function updateDepositCap(uint256 _depositCap) external returns (bool);

    function getUnderlying() external view returns (address);

    function getLpToken() external view returns (address);

    function getWithdrawalFee(address account, uint256 amount) external view returns (uint256);

    function getVault() external view returns (IVault);

    function exchangeRate() external view returns (uint256);
}


// File interfaces/IGasBank.sol

pragma solidity 0.8.9;

interface IGasBank {
    event Deposit(address indexed account, uint256 value);
    event Withdraw(address indexed account, address indexed receiver, uint256 value);

    function depositFor(address account) external payable;

    function withdrawUnused(address account) external;

    function withdrawFrom(address account, uint256 amount) external;

    function withdrawFrom(
        address account,
        address payable to,
        uint256 amount
    ) external;

    function balanceOf(address account) external view returns (uint256);
}


// File interfaces/oracles/IOracleProvider.sol

pragma solidity 0.8.9;

interface IOracleProvider {
    /// @notice Quotes the USD price of `baseAsset`
    /// @param baseAsset the asset of which the price is to be quoted
    /// @return the USD price of the asset
    function getPriceUSD(address baseAsset) external view returns (uint256);

    /// @notice Quotes the ETH price of `baseAsset`
    /// @param baseAsset the asset of which the price is to be quoted
    /// @return the ETH price of the asset
    function getPriceETH(address baseAsset) external view returns (uint256);
}


// File libraries/AddressProviderMeta.sol

pragma solidity 0.8.9;

library AddressProviderMeta {
    struct Meta {
        bool freezable;
        bool frozen;
    }

    function fromUInt(uint256 value) internal pure returns (Meta memory) {
        Meta memory meta;
        meta.freezable = (value & 1) == 1;
        meta.frozen = ((value >> 1) & 1) == 1;
        return meta;
    }

    function toUInt(Meta memory meta) internal pure returns (uint256) {
        uint256 value;
        value |= meta.freezable ? 1 : 0;
        value |= meta.frozen ? 1 << 1 : 0;
        return value;
    }
}


// File interfaces/IAddressProvider.sol

pragma solidity 0.8.9;





// solhint-disable ordering

interface IAddressProvider is IPreparable {
    event KnownAddressKeyAdded(bytes32 indexed key);
    event StakerVaultListed(address indexed stakerVault);
    event StakerVaultDelisted(address indexed stakerVault);
    event ActionListed(address indexed action);
    event PoolListed(address indexed pool);
    event PoolDelisted(address indexed pool);
    event VaultUpdated(address indexed previousVault, address indexed newVault);

    /** Key functions */
    function getKnownAddressKeys() external view returns (bytes32[] memory);

    function freezeAddress(bytes32 key) external;

    /** Pool functions */

    function allPools() external view returns (address[] memory);

    function addPool(address pool) external;

    function poolsCount() external view returns (uint256);

    function getPoolAtIndex(uint256 index) external view returns (address);

    function isPool(address pool) external view returns (bool);

    function removePool(address pool) external returns (bool);

    function getPoolForToken(address token) external view returns (ILiquidityPool);

    function safeGetPoolForToken(address token) external view returns (address);

    /** Vault functions  */

    function updateVault(address previousVault, address newVault) external;

    function allVaults() external view returns (address[] memory);

    function vaultsCount() external view returns (uint256);

    function getVaultAtIndex(uint256 index) external view returns (address);

    function isVault(address vault) external view returns (bool);

    /** Action functions */

    function allActions() external view returns (address[] memory);

    function addAction(address action) external returns (bool);

    function isAction(address action) external view returns (bool);

    /** Address functions */
    function initializeAddress(
        bytes32 key,
        address initialAddress,
        bool frezable
    ) external;

    function initializeAndFreezeAddress(bytes32 key, address initialAddress) external;

    function getAddress(bytes32 key) external view returns (address);

    function getAddress(bytes32 key, bool checkExists) external view returns (address);

    function getAddressMeta(bytes32 key) external view returns (AddressProviderMeta.Meta memory);

    function prepareAddress(bytes32 key, address newAddress) external returns (bool);

    function executeAddress(bytes32 key) external returns (address);

    function resetAddress(bytes32 key) external returns (bool);

    /** Staker vault functions */
    function allStakerVaults() external view returns (address[] memory);

    function tryGetStakerVault(address token) external view returns (bool, address);

    function getStakerVault(address token) external view returns (address);

    function addStakerVault(address stakerVault) external returns (bool);

    function isStakerVault(address stakerVault, address token) external view returns (bool);

    function isStakerVaultRegistered(address stakerVault) external view returns (bool);

    function isWhiteListedFeeHandler(address feeHandler) external view returns (bool);
}


// File interfaces/tokenomics/IInflationManager.sol

pragma solidity 0.8.9;

interface IInflationManager {
    event KeeperGaugeListed(address indexed pool, address indexed keeperGauge);
    event AmmGaugeListed(address indexed token, address indexed ammGauge);
    event KeeperGaugeDelisted(address indexed pool, address indexed keeperGauge);
    event AmmGaugeDelisted(address indexed token, address indexed ammGauge);

    /** Pool functions */

    function setKeeperGauge(address pool, address _keeperGauge) external returns (bool);

    function setAmmGauge(address token, address _ammGauge) external returns (bool);

    function getAllAmmGauges() external view returns (address[] memory);

    function getLpRateForStakerVault(address stakerVault) external view returns (uint256);

    function getKeeperRateForPool(address pool) external view returns (uint256);

    function getAmmRateForToken(address token) external view returns (uint256);

    function getKeeperWeightForPool(address pool) external view returns (uint256);

    function getAmmWeightForToken(address pool) external view returns (uint256);

    function getLpPoolWeight(address pool) external view returns (uint256);

    function getKeeperGaugeForPool(address pool) external view returns (address);

    function getAmmGaugeForToken(address token) external view returns (address);

    function isInflationWeightManager(address account) external view returns (bool);

    function removeStakerVaultFromInflation(address stakerVault, address lpToken) external;

    function addGaugeForVault(address lpToken) external returns (bool);

    function whitelistGauge(address gauge) external;

    function checkpointAllGauges() external returns (bool);

    function mintRewards(address beneficiary, uint256 amount) external;

    function addStrategyToDepositStakerVault(address depositStakerVault, address strategyPool)
        external
        returns (bool);

    /** Weight setter functions **/

    function prepareLpPoolWeight(address lpToken, uint256 newPoolWeight) external returns (bool);

    function prepareAmmTokenWeight(address token, uint256 newTokenWeight) external returns (bool);

    function prepareKeeperPoolWeight(address pool, uint256 newPoolWeight) external returns (bool);

    function executeLpPoolWeight(address lpToken) external returns (uint256);

    function executeAmmTokenWeight(address token) external returns (uint256);

    function executeKeeperPoolWeight(address pool) external returns (uint256);

    function batchPrepareLpPoolWeights(address[] calldata lpTokens, uint256[] calldata weights)
        external
        returns (bool);

    function batchPrepareAmmTokenWeights(address[] calldata tokens, uint256[] calldata weights)
        external
        returns (bool);

    function batchPrepareKeeperPoolWeights(address[] calldata pools, uint256[] calldata weights)
        external
        returns (bool);

    function batchExecuteLpPoolWeights(address[] calldata lpTokens) external returns (bool);

    function batchExecuteAmmTokenWeights(address[] calldata tokens) external returns (bool);

    function batchExecuteKeeperPoolWeights(address[] calldata pools) external returns (bool);
}


// File interfaces/IController.sol

pragma solidity 0.8.9;





// solhint-disable ordering

interface IController is IPreparable {
    function addressProvider() external view returns (IAddressProvider);

    function inflationManager() external view returns (IInflationManager);

    function addStakerVault(address stakerVault) external returns (bool);

    function removePool(address pool) external returns (bool);

    /** Keeper functions */
    function prepareKeeperRequiredStakedBKD(uint256 amount) external;

    function executeKeeperRequiredStakedBKD() external;

    function getKeeperRequiredStakedBKD() external view returns (uint256);

    function canKeeperExecuteAction(address keeper) external view returns (bool);

    /** Miscellaneous functions */

    function getTotalEthRequiredForGas(address payer) external view returns (uint256);
}


// File interfaces/pool/IErc20Pool.sol

pragma solidity 0.8.9;

interface IErc20Pool {
    function initialize(
        string memory name_,
        address underlying_,
        uint256 depositCap_,
        address vault_
    ) external returns (bool);
}


// File interfaces/pool/IEthPool.sol

pragma solidity 0.8.9;

interface IEthPool {
    function initialize(
        string memory name_,
        uint256 depositCap_,
        address vault_
    ) external returns (bool);
}


// File libraries/ScaledMath.sol

pragma solidity 0.8.9;

/*
 * @dev To use functions of this contract, at least one of the numbers must
 * be scaled to `DECIMAL_SCALE`. The result will scaled to `DECIMAL_SCALE`
 * if both numbers are scaled to `DECIMAL_SCALE`, otherwise to the scale
 * of the number not scaled by `DECIMAL_SCALE`
 */
library ScaledMath {
    // solhint-disable-next-line private-vars-leading-underscore
    uint256 internal constant DECIMAL_SCALE = 1e18;
    // solhint-disable-next-line private-vars-leading-underscore
    uint256 internal constant ONE = 1e18;

    /**
     * @notice Performs a multiplication between two scaled numbers
     */
    function scaledMul(uint256 a, uint256 b) internal pure returns (uint256) {
        return (a * b) / DECIMAL_SCALE;
    }

    /**
     * @notice Performs a division between two scaled numbers
     */
    function scaledDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        return (a * DECIMAL_SCALE) / b;
    }

    /**
     * @notice Performs a division between two numbers, rounding up the result
     */
    function scaledDivRoundUp(uint256 a, uint256 b) internal pure returns (uint256) {
        return (a * DECIMAL_SCALE + b - 1) / b;
    }

    /**
     * @notice Performs a division between two numbers, ignoring any scaling and rounding up the result
     */
    function divRoundUp(uint256 a, uint256 b) internal pure returns (uint256) {
        return (a + b - 1) / b;
    }
}


// File interfaces/IVaultReserve.sol

pragma solidity 0.8.9;

interface IVaultReserve {
    event Deposit(address indexed vault, address indexed token, uint256 amount);
    event Withdraw(address indexed vault, address indexed token, uint256 amount);
    event VaultListed(address indexed vault);

    function deposit(address token, uint256 amount) external payable returns (bool);

    function withdraw(address token, uint256 amount) external returns (bool);

    function getBalance(address vault, address token) external view returns (uint256);

    function canWithdraw(address vault) external view returns (bool);
}


// File interfaces/IRoleManager.sol

pragma solidity 0.8.9;

interface IRoleManager {
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    function grantRole(bytes32 role, address account) external;

    function revokeRole(bytes32 role, address account) external;

    function hasRole(bytes32 role, address account) external view returns (bool);

    function hasAnyRole(bytes32[] memory roles, address account) external view returns (bool);

    function hasAnyRole(
        bytes32 role1,
        bytes32 role2,
        address account
    ) external view returns (bool);

    function hasAnyRole(
        bytes32 role1,
        bytes32 role2,
        bytes32 role3,
        address account
    ) external view returns (bool);

    function getRoleMemberCount(bytes32 role) external view returns (uint256);

    function getRoleMember(bytes32 role, uint256 index) external view returns (address);
}


// File interfaces/tokenomics/IBkdToken.sol

pragma solidity 0.8.9;

interface IBkdToken is IERC20 {
    function mint(address account, uint256 amount) external;
}


// File libraries/AddressProviderKeys.sol

pragma solidity 0.8.9;

library AddressProviderKeys {
    bytes32 internal constant _TREASURY_KEY = "treasury";
    bytes32 internal constant _GAS_BANK_KEY = "gasBank";
    bytes32 internal constant _VAULT_RESERVE_KEY = "vaultReserve";
    bytes32 internal constant _SWAPPER_REGISTRY_KEY = "swapperRegistry";
    bytes32 internal constant _ORACLE_PROVIDER_KEY = "oracleProvider";
    bytes32 internal constant _POOL_FACTORY_KEY = "poolFactory";
    bytes32 internal constant _CONTROLLER_KEY = "controller";
    bytes32 internal constant _BKD_LOCKER_KEY = "bkdLocker";
    bytes32 internal constant _ROLE_MANAGER_KEY = "roleManager";
}


// File libraries/AddressProviderHelpers.sol

pragma solidity 0.8.9;







library AddressProviderHelpers {
    /**
     * @return The address of the treasury.
     */
    function getTreasury(IAddressProvider provider) internal view returns (address) {
        return provider.getAddress(AddressProviderKeys._TREASURY_KEY);
    }

    /**
     * @return The gas bank.
     */
    function getGasBank(IAddressProvider provider) internal view returns (IGasBank) {
        return IGasBank(provider.getAddress(AddressProviderKeys._GAS_BANK_KEY));
    }

    /**
     * @return The address of the vault reserve.
     */
    function getVaultReserve(IAddressProvider provider) internal view returns (IVaultReserve) {
        return IVaultReserve(provider.getAddress(AddressProviderKeys._VAULT_RESERVE_KEY));
    }

    /**
     * @return The address of the swapperRegistry.
     */
    function getSwapperRegistry(IAddressProvider provider) internal view returns (address) {
        return provider.getAddress(AddressProviderKeys._SWAPPER_REGISTRY_KEY);
    }

    /**
     * @return The oracleProvider.
     */
    function getOracleProvider(IAddressProvider provider) internal view returns (IOracleProvider) {
        return IOracleProvider(provider.getAddress(AddressProviderKeys._ORACLE_PROVIDER_KEY));
    }

    /**
     * @return the address of the BKD locker
     */
    function getBKDLocker(IAddressProvider provider) internal view returns (address) {
        return provider.getAddress(AddressProviderKeys._BKD_LOCKER_KEY);
    }

    /**
     * @return the address of the BKD locker
     */
    function getRoleManager(IAddressProvider provider) internal view returns (IRoleManager) {
        return IRoleManager(provider.getAddress(AddressProviderKeys._ROLE_MANAGER_KEY));
    }

    /**
     * @return the controller
     */
    function getController(IAddressProvider provider) internal view returns (IController) {
        return IController(provider.getAddress(AddressProviderKeys._CONTROLLER_KEY));
    }
}


// File libraries/Errors.sol

pragma solidity 0.8.9;

// solhint-disable private-vars-leading-underscore

library Error {
    string internal constant ADDRESS_WHITELISTED = "address already whitelisted";
    string internal constant ADMIN_ALREADY_SET = "admin has already been set once";
    string internal constant ADDRESS_NOT_WHITELISTED = "address not whitelisted";
    string internal constant ADDRESS_NOT_FOUND = "address not found";
    string internal constant CONTRACT_INITIALIZED = "contract can only be initialized once";
    string internal constant CONTRACT_PAUSED = "contract is paused";
    string internal constant INVALID_AMOUNT = "invalid amount";
    string internal constant INVALID_INDEX = "invalid index";
    string internal constant INVALID_VALUE = "invalid msg.value";
    string internal constant INVALID_SENDER = "invalid msg.sender";
    string internal constant INVALID_TOKEN = "token address does not match pool's LP token address";
    string internal constant INVALID_DECIMALS = "incorrect number of decimals";
    string internal constant INVALID_ARGUMENT = "invalid argument";
    string internal constant INVALID_PARAMETER_VALUE = "invalid parameter value attempted";
    string internal constant INVALID_IMPLEMENTATION = "invalid pool implementation for given coin";
    string internal constant INVALID_POOL_IMPLEMENTATION =
        "invalid pool implementation for given coin";
    string internal constant INVALID_LP_TOKEN_IMPLEMENTATION =
        "invalid LP Token implementation for given coin";
    string internal constant INVALID_VAULT_IMPLEMENTATION =
        "invalid vault implementation for given coin";
    string internal constant INVALID_STAKER_VAULT_IMPLEMENTATION =
        "invalid stakerVault implementation for given coin";
    string internal constant INSUFFICIENT_BALANCE = "insufficient balance";
    string internal constant ADDRESS_ALREADY_SET = "Address is already set";
    string internal constant INSUFFICIENT_STRATEGY_BALANCE = "insufficient strategy balance";
    string internal constant INSUFFICIENT_FUNDS_RECEIVED = "insufficient funds received";
    string internal constant ADDRESS_DOES_NOT_EXIST = "address does not exist";
    string internal constant ADDRESS_FROZEN = "address is frozen";
    string internal constant ROLE_EXISTS = "role already exists";
    string internal constant CANNOT_REVOKE_ROLE = "cannot revoke role";
    string internal constant UNAUTHORIZED_ACCESS = "unauthorized access";
    string internal constant SAME_ADDRESS_NOT_ALLOWED = "same address not allowed";
    string internal constant SELF_TRANSFER_NOT_ALLOWED = "self-transfer not allowed";
    string internal constant ZERO_ADDRESS_NOT_ALLOWED = "zero address not allowed";
    string internal constant ZERO_TRANSFER_NOT_ALLOWED = "zero transfer not allowed";
    string internal constant THRESHOLD_TOO_HIGH = "threshold is too high, must be under 10";
    string internal constant INSUFFICIENT_THRESHOLD = "insufficient threshold";
    string internal constant NO_POSITION_EXISTS = "no position exists";
    string internal constant POSITION_ALREADY_EXISTS = "position already exists";
    string internal constant PROTOCOL_NOT_FOUND = "protocol not found";
    string internal constant TOP_UP_FAILED = "top up failed";
    string internal constant SWAP_PATH_NOT_FOUND = "swap path not found";
    string internal constant UNDERLYING_NOT_SUPPORTED = "underlying token not supported";
    string internal constant NOT_ENOUGH_FUNDS_WITHDRAWN =
        "not enough funds were withdrawn from the pool";
    string internal constant FAILED_TRANSFER = "transfer failed";
    string internal constant FAILED_MINT = "mint failed";
    string internal constant FAILED_REPAY_BORROW = "repay borrow failed";
    string internal constant FAILED_METHOD_CALL = "method call failed";
    string internal constant NOTHING_TO_CLAIM = "there is no claimable balance";
    string internal constant ERC20_BALANCE_EXCEEDED = "ERC20: transfer amount exceeds balance";
    string internal constant INVALID_MINTER =
        "the minter address of the LP token and the pool address do not match";
    string internal constant STAKER_VAULT_EXISTS = "a staker vault already exists for the token";
    string internal constant DEADLINE_NOT_ZERO = "deadline must be 0";
    string internal constant DEADLINE_NOT_SET = "deadline is 0";
    string internal constant DEADLINE_NOT_REACHED = "deadline has not been reached yet";
    string internal constant DELAY_TOO_SHORT = "delay be at least 3 days";
    string internal constant INSUFFICIENT_UPDATE_BALANCE =
        "insufficient funds for updating the position";
    string internal constant SAME_AS_CURRENT = "value must be different to existing value";
    string internal constant NOT_CAPPED = "the pool is not currently capped";
    string internal constant ALREADY_CAPPED = "the pool is already capped";
    string internal constant EXCEEDS_DEPOSIT_CAP = "deposit exceeds deposit cap";
    string internal constant VALUE_TOO_LOW_FOR_GAS = "value too low to cover gas";
    string internal constant NOT_ENOUGH_FUNDS = "not enough funds to withdraw";
    string internal constant ESTIMATED_GAS_TOO_HIGH = "too much ETH will be used for gas";
    string internal constant DEPOSIT_FAILED = "deposit failed";
    string internal constant GAS_TOO_HIGH = "too much ETH used for gas";
    string internal constant GAS_BANK_BALANCE_TOO_LOW = "not enough ETH in gas bank to cover gas";
    string internal constant INVALID_TOKEN_TO_ADD = "Invalid token to add";
    string internal constant INVALID_TOKEN_TO_REMOVE = "token can not be removed";
    string internal constant TIME_DELAY_NOT_EXPIRED = "time delay not expired yet";
    string internal constant UNDERLYING_NOT_WITHDRAWABLE =
        "pool does not support additional underlying coins to be withdrawn";
    string internal constant STRATEGY_SHUT_DOWN = "Strategy is shut down";
    string internal constant STRATEGY_DOES_NOT_EXIST = "Strategy does not exist";
    string internal constant UNSUPPORTED_UNDERLYING = "Underlying not supported";
    string internal constant NO_DEX_SET = "no dex has been set for token";
    string internal constant INVALID_TOKEN_PAIR = "invalid token pair";
    string internal constant TOKEN_NOT_USABLE = "token not usable for the specific action";
    string internal constant ADDRESS_NOT_ACTION = "address is not registered action";
    string internal constant INVALID_SLIPPAGE_TOLERANCE = "Invalid slippage tolerance";
    string internal constant POOL_NOT_PAUSED = "Pool must be paused to withdraw from reserve";
    string internal constant INTERACTION_LIMIT = "Max of one deposit and withdraw per block";
    string internal constant GAUGE_EXISTS = "Gauge already exists";
    string internal constant GAUGE_DOES_NOT_EXIST = "Gauge does not exist";
    string internal constant EXCEEDS_MAX_BOOST = "Not allowed to exceed maximum boost on Convex";
    string internal constant PREPARED_WITHDRAWAL =
        "Cannot relock funds when withdrawal is being prepared";
    string internal constant ASSET_NOT_SUPPORTED = "Asset not supported";
    string internal constant STALE_PRICE = "Price is stale";
    string internal constant NEGATIVE_PRICE = "Price is negative";
    string internal constant NOT_ENOUGH_BKD_STAKED = "Not enough BKD tokens staked";
    string internal constant RESERVE_ACCESS_EXCEEDED = "Reserve access exceeded";
}


// File libraries/Roles.sol

pragma solidity 0.8.9;

// solhint-disable private-vars-leading-underscore

library Roles {
    bytes32 internal constant GOVERNANCE = "governance";
    bytes32 internal constant ADDRESS_PROVIDER = "address_provider";
    bytes32 internal constant POOL_FACTORY = "pool_factory";
    bytes32 internal constant CONTROLLER = "controller";
    bytes32 internal constant GAUGE_ZAP = "gauge_zap";
    bytes32 internal constant MAINTENANCE = "maintenance";
    bytes32 internal constant INFLATION_MANAGER = "inflation_manager";
    bytes32 internal constant POOL = "pool";
    bytes32 internal constant VAULT = "vault";
}


// File contracts/access/AuthorizationBase.sol

pragma solidity 0.8.9;


/**
 * @notice Provides modifiers for authorization
 */
abstract contract AuthorizationBase {
    /**
     * @notice Only allows a sender with `role` to perform the given action
     */
    modifier onlyRole(bytes32 role) {
        require(_roleManager().hasRole(role, msg.sender), Error.UNAUTHORIZED_ACCESS);
        _;
    }

    /**
     * @notice Only allows a sender with GOVERNANCE role to perform the given action
     */
    modifier onlyGovernance() {
        require(_roleManager().hasRole(Roles.GOVERNANCE, msg.sender), Error.UNAUTHORIZED_ACCESS);
        _;
    }

    /**
     * @notice Only allows a sender with any of `roles` to perform the given action
     */
    modifier onlyRoles2(bytes32 role1, bytes32 role2) {
        require(_roleManager().hasAnyRole(role1, role2, msg.sender), Error.UNAUTHORIZED_ACCESS);
        _;
    }

    /**
     * @notice Only allows a sender with any of `roles` to perform the given action
     */
    modifier onlyRoles3(
        bytes32 role1,
        bytes32 role2,
        bytes32 role3
    ) {
        require(
            _roleManager().hasAnyRole(role1, role2, role3, msg.sender),
            Error.UNAUTHORIZED_ACCESS
        );
        _;
    }

    function roleManager() external view virtual returns (IRoleManager) {
        return _roleManager();
    }

    function _roleManager() internal view virtual returns (IRoleManager);
}


// File contracts/access/Authorization.sol

pragma solidity 0.8.9;

contract Authorization is AuthorizationBase {
    IRoleManager internal immutable __roleManager;

    constructor(IRoleManager roleManager) {
        __roleManager = roleManager;
    }

    function _roleManager() internal view override returns (IRoleManager) {
        return __roleManager;
    }
}


// File contracts/pool/PoolFactory.sol

pragma solidity 0.8.9;












contract PoolFactory is Authorization {
    using AddressProviderHelpers for IAddressProvider;

    struct Addresses {
        address pool;
        address vault;
        address lpToken;
        address stakerVault;
    }

    struct ImplementationNames {
        bytes32 pool;
        bytes32 vault;
        bytes32 lpToken;
        bytes32 stakerVault;
    }

    struct VaultArgs {
        uint256 debtLimit;
        uint256 targetAllocation;
        uint256 bound;
    }

    struct LpTokenArgs {
        string name;
        string symbol;
        uint8 decimals;
    }

    struct DeployPoolVars {
        address lpTokenImplementation;
        address poolImplementation;
        address stakerVaultImplementation;
        address vaultImplementation;
    }

    bytes32 internal constant _POOL_KEY = "pool";
    bytes32 internal constant _LP_TOKEN_KEY = "lp_token";
    bytes32 internal constant _STAKER_VAULT_KEY = "staker_vault";
    bytes32 internal constant _VAULT_KEY = "vault";

    IController public immutable controller;
    IAddressProvider public immutable addressProvider;

    /**
     * @dev maps a contract type (e.g. "pool" or "lp_token", as defined in constants above)
     * to a mapping from an implementation name to the actual implementation
     * The implementation name is decided when registering the implementation
     * and can be arbitrary (e.g. "ERC20PoolV1")
     */
    mapping(bytes32 => mapping(bytes32 => address)) public implementations;

    event NewPool(address pool, address vault, address lpToken, address stakerVault);
    event NewImplementation(bytes32 key, bytes32 name, address implementation);

    constructor(IController _controller)
        Authorization(_controller.addressProvider().getRoleManager())
    {
        controller = IController(_controller);
        addressProvider = IController(_controller).addressProvider();
    }

    /**
     * @notice Add a new pool implementation to the factory.
     * @param name of the pool implementation.
     * @param implementation of pool implementation to add.
     */
    function addPoolImplementation(bytes32 name, address implementation)
        external
        onlyGovernance
        returns (bool)
    {
        return _addImplementation(_POOL_KEY, name, implementation);
    }

    /**
     * @notice Add a new LP token implementation to the factory.
     * @param name of the LP token implementation.
     * @param implementation of lp token implementation to add.
     */
    function addLpTokenImplementation(bytes32 name, address implementation)
        external
        onlyGovernance
        returns (bool)
    {
        return _addImplementation(_LP_TOKEN_KEY, name, implementation);
    }

    /**
     * @notice Add a new vault implementation to the factory.
     * @param name of the vault implementation.
     * @param implementation of vault implementation to add.
     */
    function addVaultImplementation(bytes32 name, address implementation)
        external
        onlyGovernance
        returns (bool)
    {
        return _addImplementation(_VAULT_KEY, name, implementation);
    }

    /**
     * @notice Add a new staker vault implementation to the factory.
     * @param name of the staker vault implementation.
     * @param implementation of staker vault implementation to add.
     */
    function addStakerVaultImplementation(bytes32 name, address implementation)
        external
        onlyGovernance
        returns (bool)
    {
        return _addImplementation(_STAKER_VAULT_KEY, name, implementation);
    }

    /**
     * @notice Deploys a new pool and LP token.
     * @dev Decimals is an argument as not all ERC20 tokens implement the ERC20Detailed interface.
     *      An implementation where `getUnderlying()` returns the zero address is for ETH pools.
     * @param poolName Name of the pool.
     * @param underlying Address of the pool's underlying.
     * @param lpTokenArgs Arguments to create the LP token for the pool
     * @param vaultArgs Arguments to create the vault
     * @param implementationNames Name of the implementations to use
     * @return addrs Address of the deployed pool, address of the pool's deployed LP token.
     */
    function deployPool(
        string calldata poolName,
        uint256 depositCap,
        address underlying,
        LpTokenArgs calldata lpTokenArgs,
        VaultArgs calldata vaultArgs,
        ImplementationNames calldata implementationNames
    ) external onlyGovernance returns (Addresses memory addrs) {
        DeployPoolVars memory vars;

        vars.poolImplementation = implementations[_POOL_KEY][implementationNames.pool];
        require(vars.poolImplementation != address(0), Error.INVALID_POOL_IMPLEMENTATION);

        vars.lpTokenImplementation = implementations[_LP_TOKEN_KEY][implementationNames.lpToken];
        require(vars.lpTokenImplementation != address(0), Error.INVALID_LP_TOKEN_IMPLEMENTATION);

        vars.vaultImplementation = implementations[_VAULT_KEY][implementationNames.vault];
        require(vars.vaultImplementation != address(0), Error.INVALID_VAULT_IMPLEMENTATION);

        vars.stakerVaultImplementation = implementations[_STAKER_VAULT_KEY][
            implementationNames.stakerVault
        ];
        require(
            vars.stakerVaultImplementation != address(0),
            Error.INVALID_STAKER_VAULT_IMPLEMENTATION
        );

        addrs.pool = Clones.clone(vars.poolImplementation);
        addrs.vault = Clones.clone(vars.vaultImplementation);

        if (underlying == address(0)) {
            // ETH pool
            require(
                ILiquidityPool(vars.poolImplementation).getUnderlying() == address(0),
                Error.INVALID_POOL_IMPLEMENTATION
            );
            require(lpTokenArgs.decimals == 18, Error.INVALID_DECIMALS);
            IEthPool(addrs.pool).initialize(poolName, depositCap, addrs.vault);
        } else {
            IErc20Pool(addrs.pool).initialize(poolName, underlying, depositCap, addrs.vault);
        }

        addrs.lpToken = Clones.clone(vars.lpTokenImplementation);

        ILpToken(addrs.lpToken).initialize(
            lpTokenArgs.name,
            lpTokenArgs.symbol,
            lpTokenArgs.decimals,
            addrs.pool
        );

        addrs.stakerVault = Clones.clone(vars.stakerVaultImplementation);
        IStakerVault(addrs.stakerVault).initialize(addrs.lpToken);
        controller.addStakerVault(addrs.stakerVault);

        ILiquidityPool(addrs.pool).setLpToken(addrs.lpToken);
        ILiquidityPool(addrs.pool).setStaker();

        IVault(addrs.vault).initialize(
            addrs.pool,
            vaultArgs.debtLimit,
            vaultArgs.targetAllocation,
            vaultArgs.bound
        );

        addressProvider.addPool(addrs.pool);

        emit NewPool(addrs.pool, addrs.vault, addrs.lpToken, addrs.stakerVault);
        return addrs;
    }

    /**
     * @notice Add a new implementation of type `name` to the factory.
     * @param key of the implementation to add.
     * @param name of the implementation to add.
     * @param implementation of lp token implementation to add.
     */
    function _addImplementation(
        bytes32 key,
        bytes32 name,
        address implementation
    ) internal returns (bool) {
        mapping(bytes32 => address) storage currentImplementations = implementations[key];
        if (currentImplementations[name] != address(0)) {
            return false;
        }
        currentImplementations[name] = implementation;
        emit NewImplementation(key, name, implementation);
        return true;
    }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IController","name":"_controller","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"key","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"name","type":"bytes32"},{"indexed":false,"internalType":"address","name":"implementation","type":"address"}],"name":"NewImplementation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"address","name":"stakerVault","type":"address"}],"name":"NewPool","type":"event"},{"inputs":[{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"address","name":"implementation","type":"address"}],"name":"addLpTokenImplementation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"address","name":"implementation","type":"address"}],"name":"addPoolImplementation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"address","name":"implementation","type":"address"}],"name":"addStakerVaultImplementation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"address","name":"implementation","type":"address"}],"name":"addVaultImplementation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"addressProvider","outputs":[{"internalType":"contract IAddressProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"controller","outputs":[{"internalType":"contract IController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"poolName","type":"string"},{"internalType":"uint256","name":"depositCap","type":"uint256"},{"internalType":"address","name":"underlying","type":"address"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"}],"internalType":"struct PoolFactory.LpTokenArgs","name":"lpTokenArgs","type":"tuple"},{"components":[{"internalType":"uint256","name":"debtLimit","type":"uint256"},{"internalType":"uint256","name":"targetAllocation","type":"uint256"},{"internalType":"uint256","name":"bound","type":"uint256"}],"internalType":"struct PoolFactory.VaultArgs","name":"vaultArgs","type":"tuple"},{"components":[{"internalType":"bytes32","name":"pool","type":"bytes32"},{"internalType":"bytes32","name":"vault","type":"bytes32"},{"internalType":"bytes32","name":"lpToken","type":"bytes32"},{"internalType":"bytes32","name":"stakerVault","type":"bytes32"}],"internalType":"struct PoolFactory.ImplementationNames","name":"implementationNames","type":"tuple"}],"name":"deployPool","outputs":[{"components":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"lpToken","type":"address"},{"internalType":"address","name":"stakerVault","type":"address"}],"internalType":"struct PoolFactory.Addresses","name":"addrs","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"implementations","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"roleManager","outputs":[{"internalType":"contract IRoleManager","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60e06040523480156200001157600080fd5b50604051620018fe380380620018fe83398101604081905262000034916200020c565b620000c7816001600160a01b0316632954018c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200007257600080fd5b505afa15801562000087573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000ad91906200020c565b6001600160a01b03166200016160201b620010511760201c565b6001600160a01b03908116608052811660a081905260408051630a55006360e21b81529051632954018c91600480820192602092909190829003018186803b1580156200011357600080fd5b505afa15801562000128573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200014e91906200020c565b6001600160a01b031660c0525062000233565b6040516321f8a72160e01b81526a3937b632a6b0b730b3b2b960a91b60048201526000906001600160a01b038316906321f8a7219060240160206040518083038186803b158015620001b257600080fd5b505afa158015620001c7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ed91906200020c565b92915050565b6001600160a01b03811681146200020957600080fd5b50565b6000602082840312156200021f57600080fd5b81516200022c81620001f3565b9392505050565b60805160a05160c05161166c620002926000396000818160db0152610f750152600081816101e50152610d6101526000818160990152818161020b015281816103270152818161043401528181610544015261067a015261166c6000f3fe608060405234801561001057600080fd5b50600436106100925760003560e01c806393ade8e71161006657806393ade8e714610133578063bbbaf17214610146578063d74009b214610159578063f6b6af7d146101af578063f77c4791146101e057600080fd5b8062435da5146100975780632954018c146100d6578063327bea89146100fd57806334e6cbad14610120575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b6100b97f000000000000000000000000000000000000000000000000000000000000000081565b61011061010b366004611243565b610207565b60405190151581526020016100cd565b61011061012e366004611243565b610323565b610110610141366004611243565b610430565b610110610154366004611243565b610540565b61016c61016736600461129d565b610654565b6040516100cd919081516001600160a01b039081168252602080840151821690830152604080840151821690830152606092830151169181019190915260800190565b6100b96101bd366004611371565b60006020818152928152604080822090935290815220546001600160a01b031681565b6100b97f000000000000000000000000000000000000000000000000000000000000000081565b60007f0000000000000000000000000000000000000000000000000000000000000000604051632474521560e21b815269676f7665726e616e636560b01b60048201523360248201526001600160a01b0391909116906391d148549060440160206040518083038186803b15801561027e57600080fd5b505afa158015610292573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b69190611393565b60405180604001604052806013815260200172756e617574686f72697a65642061636365737360681b815250906103095760405162461bcd60e51b815260040161030091906113b5565b60405180910390fd5b5061031c631c1bdbdb60e21b84846110df565b9392505050565b60007f0000000000000000000000000000000000000000000000000000000000000000604051632474521560e21b815269676f7665726e616e636560b01b60048201523360248201526001600160a01b0391909116906391d148549060440160206040518083038186803b15801561039a57600080fd5b505afa1580156103ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d29190611393565b60405180604001604052806013815260200172756e617574686f72697a65642061636365737360681b8152509061041c5760405162461bcd60e51b815260040161030091906113b5565b5061031c641d985d5b1d60da1b84846110df565b60007f0000000000000000000000000000000000000000000000000000000000000000604051632474521560e21b815269676f7665726e616e636560b01b60048201523360248201526001600160a01b0391909116906391d148549060440160206040518083038186803b1580156104a757600080fd5b505afa1580156104bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104df9190611393565b60405180604001604052806013815260200172756e617574686f72697a65642061636365737360681b815250906105295760405162461bcd60e51b815260040161030091906113b5565b5061031c6736382fba37b5b2b760c11b84846110df565b60007f0000000000000000000000000000000000000000000000000000000000000000604051632474521560e21b815269676f7665726e616e636560b01b60048201523360248201526001600160a01b0391909116906391d148549060440160206040518083038186803b1580156105b757600080fd5b505afa1580156105cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ef9190611393565b60405180604001604052806013815260200172756e617574686f72697a65642061636365737360681b815250906106395760405162461bcd60e51b815260040161030091906113b5565b5061031c6b1cdd185ad95c97dd985d5b1d60a21b84846110df565b6040805160808101825260008082526020820181905291810182905260608101919091527f0000000000000000000000000000000000000000000000000000000000000000604051632474521560e21b815269676f7665726e616e636560b01b60048201523360248201526001600160a01b0391909116906391d148549060440160206040518083038186803b1580156106ed57600080fd5b505afa158015610701573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107259190611393565b60405180604001604052806013815260200172756e617574686f72697a65642061636365737360681b8152509061076f5760405162461bcd60e51b815260040161030091906113b5565b5060408051608081018252600080825260208083018281528385018390526060808501849052873584527f41c12a0618fd8c91e4bd4c2bad3960a11ca69ecb61096f2afe909d647d705506835292859020546001600160a01b0316908190528451928301909452602a8083529293151592906115ae90830139906108065760405162461bcd60e51b815260040161030091906113b5565b5060408381013560009081527f509576413f2a764e16fca6f55b1b0b59f0c7d685debdb649e7380f6e646f85ec602090815290829020546001600160a01b0316808452825160608101909352602e80845290151592916115d890830139906108815760405162461bcd60e51b815260040161030091906113b5565b5060208381013560009081527f5a91006bbd508b31448de1f8d6457185050e71de2fb28afff373542928e213b98252604090819020546001600160a01b031660608085018290528251908101909252602b8083529015159261158390830139906108fe5760405162461bcd60e51b815260040161030091906113b5565b5060608084013560009081527f2cf082650f22d678d13e32cb83a8e9eb2f601f6cb0dd457ecf139323a1bac1aa6020908152604091829020546001600160a01b031684830181905282519384019092526031808452911515929190611606908301399061097e5760405162461bcd60e51b815260040161030091906113b5565b5061098c8160200151611183565b6001600160a01b0316825260608101516109a590611183565b6001600160a01b0390811660208401528616610b795760006001600160a01b031681602001516001600160a01b0316639816f4736040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0357600080fd5b505afa158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b919061140a565b6001600160a01b0316146040518060600160405280602a81526020016115ae602a913990610a7c5760405162461bcd60e51b815260040161030091906113b5565b50610a8d6060860160408701611427565b60ff166012146040518060400160405280601c81526020017f696e636f7272656374206e756d626572206f6620646563696d616c730000000081525090610ae75760405162461bcd60e51b815260040161030091906113b5565b5081516020830151604051634f3bddeb60e01b81526001600160a01b0390921691634f3bddeb91610b21918d918d918d9190600401611473565b602060405180830381600087803b158015610b3b57600080fd5b505af1158015610b4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b739190611393565b50610c07565b81516020830151604051632ad84a2b60e11b81526001600160a01b03909216916355b0945691610bb3918d918d918c918e916004016114a8565b602060405180830381600087803b158015610bcd57600080fd5b505af1158015610be1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c059190611393565b505b8051610c1290611183565b6001600160a01b03166040830181905263de7ea79d610c3187806114e6565b610c3e60208a018a6114e6565b610c4e60608c0160408d01611427565b88516040516001600160e01b031960e089901b168152610c7696959493929190600401611534565b602060405180830381600087803b158015610c9057600080fd5b505af1158015610ca4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc89190611393565b50610cd68160400151611183565b6001600160a01b0390811660608401819052604080850151905163189acdbd60e31b8152921660048301529063c4d66de890602401600060405180830381600087803b158015610d2557600080fd5b505af1158015610d39573d6000803e3d6000fd5b50505050606082015160405163c1d84e0b60e01b81526001600160a01b0391821660048201527f00000000000000000000000000000000000000000000000000000000000000009091169063c1d84e0b90602401602060405180830381600087803b158015610da757600080fd5b505af1158015610dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddf9190611393565b5081516040808401519051639ee933b560e01b81526001600160a01b039182166004820152911690639ee933b590602401602060405180830381600087803b158015610e2a57600080fd5b505af1158015610e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e629190611393565b5081600001516001600160a01b03166366f07dd26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610ea257600080fd5b505af1158015610eb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eda9190611393565b50602082810151835160408051634ec81af160e01b81526001600160a01b0392831660048201528835602482015293880135604485015287013560648401521690634ec81af190608401600060405180830381600087803b158015610f3e57600080fd5b505af1158015610f52573d6000803e3d6000fd5b5050835160405163d914cd4b60e01b81526001600160a01b0391821660048201527f0000000000000000000000000000000000000000000000000000000000000000909116925063d914cd4b9150602401600060405180830381600087803b158015610fbd57600080fd5b505af1158015610fd1573d6000803e3d6000fd5b505083516020850151604080870151606088015191517f7485fd97aa22b8f3780a33f0f69ac8a5f0e479548977fe3fa7d9459698a2d8fe965061103d95509091906001600160a01b03948516815292841660208401529083166040830152909116606082015260800190565b60405180910390a150979650505050505050565b6040516321f8a72160e01b81526a3937b632a6b0b730b3b2b960a91b60048201526000906001600160a01b038316906321f8a7219060240160206040518083038186803b1580156110a157600080fd5b505afa1580156110b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d9919061140a565b92915050565b600083815260208181526040808320858452918290528220546001600160a01b03161561111057600091505061031c565b6000848152602082815260409182902080546001600160a01b0387166001600160a01b0319909116811790915582518881529182018790528183015290517fb6995687d7ca103560700935c62676d62918daf01877efebce4eeeeb6bedd5129181900360600190a1506001949350505050565b6000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528260601b60148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f09150506001600160a01b03811661121b5760405162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b6044820152606401610300565b919050565b6001600160a01b038116811461123557600080fd5b50565b803561121b81611220565b6000806040838503121561125657600080fd5b82359150602083013561126881611220565b809150509250929050565b60006060828403121561128557600080fd5b50919050565b60006080828403121561128557600080fd5b6000806000806000806000610160888a0312156112b957600080fd5b873567ffffffffffffffff808211156112d157600080fd5b818a0191508a601f8301126112e557600080fd5b8135818111156112f457600080fd5b8b602082850101111561130657600080fd5b60208381019a509098508a0135965061132160408b01611238565b955060608a013591508082111561133757600080fd5b506113448a828b01611273565b9350506113548960808a01611273565b91506113638960e08a0161128b565b905092959891949750929550565b6000806040838503121561138457600080fd5b50508035926020909101359150565b6000602082840312156113a557600080fd5b8151801515811461031c57600080fd5b600060208083528351808285015260005b818110156113e2578581018301518582016040015282016113c6565b818111156113f4576000604083870101525b50601f01601f1916929092016040019392505050565b60006020828403121561141c57600080fd5b815161031c81611220565b60006020828403121561143957600080fd5b813560ff8116811461031c57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60608152600061148760608301868861144a565b6020830194909452506001600160a01b039190911660409091015292915050565b6080815260006114bc60808301878961144a565b6001600160a01b039586166020840152604083019490945250921660609092019190915292915050565b6000808335601e198436030181126114fd57600080fd5b83018035915067ffffffffffffffff82111561151857600080fd5b60200191503681900382131561152d57600080fd5b9250929050565b60808152600061154860808301888a61144a565b828103602084015261155b81878961144a565b60ff95909516604084015250506001600160a01b039190911660609091015294935050505056fe696e76616c6964207661756c7420696d706c656d656e746174696f6e20666f7220676976656e20636f696e696e76616c696420706f6f6c20696d706c656d656e746174696f6e20666f7220676976656e20636f696e696e76616c6964204c5020546f6b656e20696d706c656d656e746174696f6e20666f7220676976656e20636f696e696e76616c6964207374616b65725661756c7420696d706c656d656e746174696f6e20666f7220676976656e20636f696ea264697066735822122073b0d58400804fe1579ba7112be400559e5fc52f6585009b9379b90bc0c59c1e64736f6c63430008090033000000000000000000000000f88864b5d747961eb1caf88d395d13aca8274c9f

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100925760003560e01c806393ade8e71161006657806393ade8e714610133578063bbbaf17214610146578063d74009b214610159578063f6b6af7d146101af578063f77c4791146101e057600080fd5b8062435da5146100975780632954018c146100d6578063327bea89146100fd57806334e6cbad14610120575b600080fd5b7f00000000000000000000000083174c049116271f64a661b8371658792f62e3635b6040516001600160a01b0390911681526020015b60405180910390f35b6100b97f000000000000000000000000139c15e21b0f6e43fc397face5de5b7d5ae6874a81565b61011061010b366004611243565b610207565b60405190151581526020016100cd565b61011061012e366004611243565b610323565b610110610141366004611243565b610430565b610110610154366004611243565b610540565b61016c61016736600461129d565b610654565b6040516100cd919081516001600160a01b039081168252602080840151821690830152604080840151821690830152606092830151169181019190915260800190565b6100b96101bd366004611371565b60006020818152928152604080822090935290815220546001600160a01b031681565b6100b97f000000000000000000000000f88864b5d747961eb1caf88d395d13aca8274c9f81565b60007f00000000000000000000000083174c049116271f64a661b8371658792f62e363604051632474521560e21b815269676f7665726e616e636560b01b60048201523360248201526001600160a01b0391909116906391d148549060440160206040518083038186803b15801561027e57600080fd5b505afa158015610292573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b69190611393565b60405180604001604052806013815260200172756e617574686f72697a65642061636365737360681b815250906103095760405162461bcd60e51b815260040161030091906113b5565b60405180910390fd5b5061031c631c1bdbdb60e21b84846110df565b9392505050565b60007f00000000000000000000000083174c049116271f64a661b8371658792f62e363604051632474521560e21b815269676f7665726e616e636560b01b60048201523360248201526001600160a01b0391909116906391d148549060440160206040518083038186803b15801561039a57600080fd5b505afa1580156103ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d29190611393565b60405180604001604052806013815260200172756e617574686f72697a65642061636365737360681b8152509061041c5760405162461bcd60e51b815260040161030091906113b5565b5061031c641d985d5b1d60da1b84846110df565b60007f00000000000000000000000083174c049116271f64a661b8371658792f62e363604051632474521560e21b815269676f7665726e616e636560b01b60048201523360248201526001600160a01b0391909116906391d148549060440160206040518083038186803b1580156104a757600080fd5b505afa1580156104bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104df9190611393565b60405180604001604052806013815260200172756e617574686f72697a65642061636365737360681b815250906105295760405162461bcd60e51b815260040161030091906113b5565b5061031c6736382fba37b5b2b760c11b84846110df565b60007f00000000000000000000000083174c049116271f64a661b8371658792f62e363604051632474521560e21b815269676f7665726e616e636560b01b60048201523360248201526001600160a01b0391909116906391d148549060440160206040518083038186803b1580156105b757600080fd5b505afa1580156105cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ef9190611393565b60405180604001604052806013815260200172756e617574686f72697a65642061636365737360681b815250906106395760405162461bcd60e51b815260040161030091906113b5565b5061031c6b1cdd185ad95c97dd985d5b1d60a21b84846110df565b6040805160808101825260008082526020820181905291810182905260608101919091527f00000000000000000000000083174c049116271f64a661b8371658792f62e363604051632474521560e21b815269676f7665726e616e636560b01b60048201523360248201526001600160a01b0391909116906391d148549060440160206040518083038186803b1580156106ed57600080fd5b505afa158015610701573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107259190611393565b60405180604001604052806013815260200172756e617574686f72697a65642061636365737360681b8152509061076f5760405162461bcd60e51b815260040161030091906113b5565b5060408051608081018252600080825260208083018281528385018390526060808501849052873584527f41c12a0618fd8c91e4bd4c2bad3960a11ca69ecb61096f2afe909d647d705506835292859020546001600160a01b0316908190528451928301909452602a8083529293151592906115ae90830139906108065760405162461bcd60e51b815260040161030091906113b5565b5060408381013560009081527f509576413f2a764e16fca6f55b1b0b59f0c7d685debdb649e7380f6e646f85ec602090815290829020546001600160a01b0316808452825160608101909352602e80845290151592916115d890830139906108815760405162461bcd60e51b815260040161030091906113b5565b5060208381013560009081527f5a91006bbd508b31448de1f8d6457185050e71de2fb28afff373542928e213b98252604090819020546001600160a01b031660608085018290528251908101909252602b8083529015159261158390830139906108fe5760405162461bcd60e51b815260040161030091906113b5565b5060608084013560009081527f2cf082650f22d678d13e32cb83a8e9eb2f601f6cb0dd457ecf139323a1bac1aa6020908152604091829020546001600160a01b031684830181905282519384019092526031808452911515929190611606908301399061097e5760405162461bcd60e51b815260040161030091906113b5565b5061098c8160200151611183565b6001600160a01b0316825260608101516109a590611183565b6001600160a01b0390811660208401528616610b795760006001600160a01b031681602001516001600160a01b0316639816f4736040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0357600080fd5b505afa158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b919061140a565b6001600160a01b0316146040518060600160405280602a81526020016115ae602a913990610a7c5760405162461bcd60e51b815260040161030091906113b5565b50610a8d6060860160408701611427565b60ff166012146040518060400160405280601c81526020017f696e636f7272656374206e756d626572206f6620646563696d616c730000000081525090610ae75760405162461bcd60e51b815260040161030091906113b5565b5081516020830151604051634f3bddeb60e01b81526001600160a01b0390921691634f3bddeb91610b21918d918d918d9190600401611473565b602060405180830381600087803b158015610b3b57600080fd5b505af1158015610b4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b739190611393565b50610c07565b81516020830151604051632ad84a2b60e11b81526001600160a01b03909216916355b0945691610bb3918d918d918c918e916004016114a8565b602060405180830381600087803b158015610bcd57600080fd5b505af1158015610be1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c059190611393565b505b8051610c1290611183565b6001600160a01b03166040830181905263de7ea79d610c3187806114e6565b610c3e60208a018a6114e6565b610c4e60608c0160408d01611427565b88516040516001600160e01b031960e089901b168152610c7696959493929190600401611534565b602060405180830381600087803b158015610c9057600080fd5b505af1158015610ca4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc89190611393565b50610cd68160400151611183565b6001600160a01b0390811660608401819052604080850151905163189acdbd60e31b8152921660048301529063c4d66de890602401600060405180830381600087803b158015610d2557600080fd5b505af1158015610d39573d6000803e3d6000fd5b50505050606082015160405163c1d84e0b60e01b81526001600160a01b0391821660048201527f000000000000000000000000f88864b5d747961eb1caf88d395d13aca8274c9f9091169063c1d84e0b90602401602060405180830381600087803b158015610da757600080fd5b505af1158015610dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddf9190611393565b5081516040808401519051639ee933b560e01b81526001600160a01b039182166004820152911690639ee933b590602401602060405180830381600087803b158015610e2a57600080fd5b505af1158015610e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e629190611393565b5081600001516001600160a01b03166366f07dd26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610ea257600080fd5b505af1158015610eb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eda9190611393565b50602082810151835160408051634ec81af160e01b81526001600160a01b0392831660048201528835602482015293880135604485015287013560648401521690634ec81af190608401600060405180830381600087803b158015610f3e57600080fd5b505af1158015610f52573d6000803e3d6000fd5b5050835160405163d914cd4b60e01b81526001600160a01b0391821660048201527f000000000000000000000000139c15e21b0f6e43fc397face5de5b7d5ae6874a909116925063d914cd4b9150602401600060405180830381600087803b158015610fbd57600080fd5b505af1158015610fd1573d6000803e3d6000fd5b505083516020850151604080870151606088015191517f7485fd97aa22b8f3780a33f0f69ac8a5f0e479548977fe3fa7d9459698a2d8fe965061103d95509091906001600160a01b03948516815292841660208401529083166040830152909116606082015260800190565b60405180910390a150979650505050505050565b6040516321f8a72160e01b81526a3937b632a6b0b730b3b2b960a91b60048201526000906001600160a01b038316906321f8a7219060240160206040518083038186803b1580156110a157600080fd5b505afa1580156110b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d9919061140a565b92915050565b600083815260208181526040808320858452918290528220546001600160a01b03161561111057600091505061031c565b6000848152602082815260409182902080546001600160a01b0387166001600160a01b0319909116811790915582518881529182018790528183015290517fb6995687d7ca103560700935c62676d62918daf01877efebce4eeeeb6bedd5129181900360600190a1506001949350505050565b6000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528260601b60148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f09150506001600160a01b03811661121b5760405162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b6044820152606401610300565b919050565b6001600160a01b038116811461123557600080fd5b50565b803561121b81611220565b6000806040838503121561125657600080fd5b82359150602083013561126881611220565b809150509250929050565b60006060828403121561128557600080fd5b50919050565b60006080828403121561128557600080fd5b6000806000806000806000610160888a0312156112b957600080fd5b873567ffffffffffffffff808211156112d157600080fd5b818a0191508a601f8301126112e557600080fd5b8135818111156112f457600080fd5b8b602082850101111561130657600080fd5b60208381019a509098508a0135965061132160408b01611238565b955060608a013591508082111561133757600080fd5b506113448a828b01611273565b9350506113548960808a01611273565b91506113638960e08a0161128b565b905092959891949750929550565b6000806040838503121561138457600080fd5b50508035926020909101359150565b6000602082840312156113a557600080fd5b8151801515811461031c57600080fd5b600060208083528351808285015260005b818110156113e2578581018301518582016040015282016113c6565b818111156113f4576000604083870101525b50601f01601f1916929092016040019392505050565b60006020828403121561141c57600080fd5b815161031c81611220565b60006020828403121561143957600080fd5b813560ff8116811461031c57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60608152600061148760608301868861144a565b6020830194909452506001600160a01b039190911660409091015292915050565b6080815260006114bc60808301878961144a565b6001600160a01b039586166020840152604083019490945250921660609092019190915292915050565b6000808335601e198436030181126114fd57600080fd5b83018035915067ffffffffffffffff82111561151857600080fd5b60200191503681900382131561152d57600080fd5b9250929050565b60808152600061154860808301888a61144a565b828103602084015261155b81878961144a565b60ff95909516604084015250506001600160a01b039190911660609091015294935050505056fe696e76616c6964207661756c7420696d706c656d656e746174696f6e20666f7220676976656e20636f696e696e76616c696420706f6f6c20696d706c656d656e746174696f6e20666f7220676976656e20636f696e696e76616c6964204c5020546f6b656e20696d706c656d656e746174696f6e20666f7220676976656e20636f696e696e76616c6964207374616b65725661756c7420696d706c656d656e746174696f6e20666f7220676976656e20636f696ea264697066735822122073b0d58400804fe1579ba7112be400559e5fc52f6585009b9379b90bc0c59c1e64736f6c63430008090033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000f88864b5d747961eb1caf88d395d13aca8274c9f

-----Decoded View---------------
Arg [0] : _controller (address): 0xf88864B5D747961EB1CAf88d395D13aCa8274C9F

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000f88864b5d747961eb1caf88d395d13aca8274c9f


Deployed Bytecode Sourcemap

77588:7842:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;76917:108;77468:13;76917:108;;;-1:-1:-1;;;;;199:32:1;;;181:51;;169:2;154:18;76917:108:0;;;;;;;;78674:49;;;;;79736:217;;;;;;:::i;:::-;;:::i;:::-;;;1236:14:1;;1229:22;1211:41;;1199:2;1184:18;79736:217:0;1071:187:1;80586:219:0;;;;;;:::i;:::-;;:::i;80162:224::-;;;;;;:::i;:::-;;:::i;81026:232::-;;;;;;:::i;:::-;;:::i;81924:2769::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;3133:13:1;;-1:-1:-1;;;;;3129:22:1;;;3111:41;;3212:4;3200:17;;;3194:24;3190:33;;3168:20;;;3161:63;3284:4;3272:17;;;3266:24;3262:33;;3240:20;;;3233:63;3356:4;3344:17;;;3338:24;3334:33;3312:20;;;3305:63;;;;3060:3;3045:19;;2872:502;79050:70:0;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;79050:70:0;;;78628:39;;;;;79736:217;79865:4;77468:13;76158:52;;-1:-1:-1;;;76158:52:0;;-1:-1:-1;;;76158:52:0;;;4242:25:1;76199:10:0;4283:18:1;;;4276:60;-1:-1:-1;;;;;76158:22:0;;;;;;;4215:18:1;;76158:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;76212:25;;;;;;;;;;;;;-1:-1:-1;;;76212:25:0;;;76150:88;;;;;-1:-1:-1;;;76150:88:0;;;;;;;;:::i;:::-;;;;;;;;;;79894:51:::1;-1:-1:-1::0;;;79924:4:0::1;79930:14;79894:18;:51::i;:::-;79887:58:::0;79736:217;-1:-1:-1;;;79736:217:0:o;80586:219::-;80716:4;77468:13;76158:52;;-1:-1:-1;;;76158:52:0;;-1:-1:-1;;;76158:52:0;;;4242:25:1;76199:10:0;4283:18:1;;;4276:60;-1:-1:-1;;;;;76158:22:0;;;;;;;4215:18:1;;76158:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;76212:25;;;;;;;;;;;;;-1:-1:-1;;;76212:25:0;;;76150:88;;;;;-1:-1:-1;;;76150:88:0;;;;;;;;:::i;:::-;;80745:52:::1;-1:-1:-1::0;;;80776:4:0::1;80782:14;80745:18;:52::i;80162:224::-:0;80294:4;77468:13;76158:52;;-1:-1:-1;;;76158:52:0;;-1:-1:-1;;;76158:52:0;;;4242:25:1;76199:10:0;4283:18:1;;;4276:60;-1:-1:-1;;;;;76158:22:0;;;;;;;4215:18:1;;76158:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;76212:25;;;;;;;;;;;;;-1:-1:-1;;;76212:25:0;;;76150:88;;;;;-1:-1:-1;;;76150:88:0;;;;;;;;:::i;:::-;;80323:55:::1;-1:-1:-1::0;;;80357:4:0::1;80363:14;80323:18;:55::i;81026:232::-:0;81162:4;77468:13;76158:52;;-1:-1:-1;;;76158:52:0;;-1:-1:-1;;;76158:52:0;;;4242:25:1;76199:10:0;4283:18:1;;;4276:60;-1:-1:-1;;;;;76158:22:0;;;;;;;4215:18:1;;76158:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;76212:25;;;;;;;;;;;;;-1:-1:-1;;;76212:25:0;;;76150:88;;;;;-1:-1:-1;;;76150:88:0;;;;;;;;:::i;:::-;;81191:59:::1;-1:-1:-1::0;;;81229:4:0::1;81235:14;81191:18;:59::i;81924:2769::-:0;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;77468:13:0;76158:52;;-1:-1:-1;;;76158:52:0;;-1:-1:-1;;;76158:52:0;;;4242:25:1;76199:10:0;4283:18:1;;;4276:60;-1:-1:-1;;;;;76158:22:0;;;;;;;4215:18:1;;76158:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;76212:25;;;;;;;;;;;;;-1:-1:-1;;;76212:25:0;;;76150:88;;;;;-1:-1:-1;;;76150:88:0;;;;;;;;:::i;:::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;82345:24:0;::::1;82318:52:::0;;:26;:52;;;;;;;-1:-1:-1;;;;;82318:52:0::1;82292:78:::0;;;;82428:33;;;;::::1;::::0;;;::::1;::::0;;;-1:-1:-1;;82389:37:0;::::1;::::0;82428:33;::::1;::::0;;::::1;;82381:81;;;;;-1:-1:-1::0;;;82381:81:0::1;;;;;;;;:::i;:::-;-1:-1:-1::0;82504:30:0;82535:27;;::::1;;82504:15;:59:::0;;;:30;::::1;:59:::0;;;;;;;;-1:-1:-1;;;;;82504:59:0::1;82475:88:::0;;;82624:37;;::::1;::::0;::::1;::::0;;;::::1;::::0;;;82582:40;;::::1;::::0;82624:37;::::1;::::0;;::::1;;82574:88;;;;;-1:-1:-1::0;;;82574:88:0::1;;;;;;;;:::i;:::-;-1:-1:-1::0;82702:27:0::1;82730:25:::0;;::::1;;82702:15;:54:::0;;;:27;:54;;:27;:54;;;;;-1:-1:-1;;;;;82702:54:0::1;82675:24;::::0;;::::1;:81:::0;;;82815:34;;;;::::1;::::0;;;::::1;::::0;;;82775:38;;::::1;::::0;82815:34:::1;::::0;;::::1;;82767:83;;;;;-1:-1:-1::0;;;82767:83:0::1;;;;;;;;:::i;:::-;-1:-1:-1::0;82945:31:0::1;::::0;;::::1;;82896:15;:91:::0;;;:34;::::1;:91:::0;;;:34;:91;;;;;-1:-1:-1;;;;;82896:91:0::1;82863:30:::0;;::::1;:124:::0;;;83079:41;;;;::::1;::::0;;;::::1;::::0;;;83020:44;;::::1;::::0;83079:41;;::::1;::::0;;::::1;;82998:133;;;;;-1:-1:-1::0;;;82998:133:0::1;;;;;;;;:::i;:::-;;83157:37;83170:4;:23;;;83157:12;:37::i;:::-;-1:-1:-1::0;;;;;83144:50:0::1;::::0;;83232:24:::1;::::0;::::1;::::0;83219:38:::1;::::0;:12:::1;:38::i;:::-;-1:-1:-1::0;;;;;83205:52:0;;::::1;:11;::::0;::::1;:52:::0;83274:24;::::1;83270:512;;83433:1;-1:-1:-1::0;;;;;83366:69:0::1;83381:4;:23;;;-1:-1:-1::0;;;;;83366:53:0::1;;:55;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;83366:69:0::1;;83454:33;;;;;;;;;;;;;;;;;83340:162;;;;;-1:-1:-1::0;;;83340:162:0::1;;;;;;;;:::i;:::-;-1:-1:-1::0;83525:20:0::1;::::0;;;::::1;::::0;::::1;;:::i;:::-;:26;;83549:2;83525:26;83553:22;;;;;;;;;;;;;;;;::::0;83517:59:::1;;;;;-1:-1:-1::0;;;83517:59:0::1;;;;;;;;:::i;:::-;-1:-1:-1::0;83600:10:0;;83645:11:::1;::::0;::::1;::::0;83591:66:::1;::::0;-1:-1:-1;;;83591:66:0;;-1:-1:-1;;;;;83591:31:0;;::::1;::::0;::::1;::::0;:66:::1;::::0;83623:8;;;;83633:10;;83645:11;83591:66:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;83270:512;;;83701:10:::0;;83758:11:::1;::::0;::::1;::::0;83690:80:::1;::::0;-1:-1:-1;;;83690:80:0;;-1:-1:-1;;;;;83690:33:0;;::::1;::::0;::::1;::::0;:80:::1;::::0;83724:8;;;;83734:10;;83746;;83690:80:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;83270:512;83823:26:::0;;83810:40:::1;::::0;:12:::1;:40::i;:::-;-1:-1:-1::0;;;;;83794:56:0::1;:13;::::0;::::1;:56:::0;;;83863:34:::1;83912:16;:11:::0;;:16:::1;:::i;:::-;83943:18;;::::0;::::1;:11:::0;:18:::1;:::i;:::-;83976:20;::::0;;;::::1;::::0;::::1;;:::i;:::-;84011:10:::0;;83863:169:::1;::::0;-1:-1:-1;;;;;;83863:169:0::1;::::0;;;;;;::::1;::::0;;;;;;84011:10;83863:169:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;84065:44;84078:4;:30;;;84065:12;:44::i;:::-;-1:-1:-1::0;;;;;84045:64:0;;::::1;:17;::::0;::::1;:64:::0;;;84163:13:::1;::::0;;::::1;::::0;84120:57;;-1:-1:-1;;;84120:57:0;;199:32:1;;84120:57:0::1;::::0;::::1;181:51:1::0;84045:64:0;84120:42:::1;::::0;154:18:1;;84120:57:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;;;84214:17:0::1;::::0;::::1;::::0;84188:44:::1;::::0;-1:-1:-1;;;84188:44:0;;-1:-1:-1;;;;;199:32:1;;;84188:44:0::1;::::0;::::1;181:51:1::0;84188:10:0::1;:25:::0;;::::1;::::0;::::1;::::0;154:18:1;;84188:44:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;84260:10:0;;84283:13:::1;::::0;;::::1;::::0;84245:52;;-1:-1:-1;;;84245:52:0;;-1:-1:-1;;;;;199:32:1;;;84245:52:0::1;::::0;::::1;181:51:1::0;84245:37:0;::::1;::::0;::::1;::::0;154:18:1;;84245:52:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;84323:5;:10;;;-1:-1:-1::0;;;;;84308:36:0::1;;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;84366:11:0::1;::::0;;::::1;::::0;84404:10;;84504:15:::1;84359:171:::0;;-1:-1:-1;;;84359:171:0;;-1:-1:-1;;;;;8371:32:1;;;84359:171:0::1;::::0;::::1;8353:51:1::0;84429:19:0;::::1;8420:18:1::0;;;8413:34;84463:26:0;;::::1;;8463:18:1::0;;;8456:34;84504:15:0;::::1;;8506:18:1::0;;;8499:34;84359:30:0::1;::::0;::::1;::::0;8325:19:1;;84359:171:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;84567:10:0;;84543:35:::1;::::0;-1:-1:-1;;;84543:35:0;;-1:-1:-1;;;;;199:32:1;;;84543:35:0::1;::::0;::::1;181:51:1::0;84543:15:0::1;:23:::0;;::::1;::::0;-1:-1:-1;84543:23:0::1;::::0;-1:-1:-1;154:18:1;;84543:35:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;84604:10:0;;84616:11:::1;::::0;::::1;::::0;84629:13:::1;::::0;;::::1;::::0;84644:17:::1;::::0;::::1;::::0;84596:66;;::::1;::::0;-1:-1:-1;84596:66:0::1;::::0;-1:-1:-1;84629:13:0;;84644:17;-1:-1:-1;;;;;8831:15:1;;;8813:34;;8883:15;;;8878:2;8863:18;;8856:43;8935:15;;;8930:2;8915:18;;8908:43;8987:15;;;8982:2;8967:18;;8960:43;8762:3;8747:19;;8544:465;84596:66:0::1;;;;;;;;84673:12;81924:2769:::0;;;;;;;;;:::o;66972:186::-;67091:58;;-1:-1:-1;;;67091:58:0;;-1:-1:-1;;;67091:58:0;;;9160:25:1;67046:12:0;;-1:-1:-1;;;;;67091:19:0;;;;;9133:18:1;;67091:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;67071:79;66972:186;-1:-1:-1;;66972:186:0:o;84955:472::-;85086:4;85164:20;;;;;;;;;;;85199:28;;;;;;;;;;-1:-1:-1;;;;;85199:28:0;:42;85195:87;;85265:5;85258:12;;;;;85195:87;85292:28;;;;;;;;;;;;;:45;;-1:-1:-1;;;;;85292:45:0;;-1:-1:-1;;;;;;85292:45:0;;;;;;;;85353:44;;9398:25:1;;;9439:18;;;9432:34;;;9482:18;;;9475:60;85353:44:0;;;;;;;9386:2:1;85353:44:0;;;-1:-1:-1;85415:4:0;;84955:472;-1:-1:-1;;;;84955:472:0:o;37256:524::-;37313:16;37383:4;37377:11;-1:-1:-1;;;37409:3:0;37402:79;37528:14;37522:4;37518:25;37511:4;37506:3;37502:14;37495:49;-1:-1:-1;;;37574:4:0;37569:3;37565:14;37558:90;37689:4;37684:3;37681:1;37674:20;37662:32;-1:-1:-1;;;;;;;37723:22:0;;37715:57;;;;-1:-1:-1;;;37715:57:0;;9748:2:1;37715:57:0;;;9730:21:1;9787:2;9767:18;;;9760:30;-1:-1:-1;;;9806:18:1;;;9799:52;9868:18;;37715:57:0;9546:346:1;37715:57:0;37256:524;;;:::o;476:131:1:-;-1:-1:-1;;;;;551:31:1;;541:42;;531:70;;597:1;594;587:12;531:70;476:131;:::o;612:134::-;680:20;;709:31;680:20;709:31;:::i;751:315::-;819:6;827;880:2;868:9;859:7;855:23;851:32;848:52;;;896:1;893;886:12;848:52;932:9;919:23;909:33;;992:2;981:9;977:18;964:32;1005:31;1030:5;1005:31;:::i;:::-;1055:5;1045:15;;;751:315;;;;;:::o;1263:159::-;1327:5;1372:2;1363:6;1358:3;1354:16;1350:25;1347:45;;;1388:1;1385;1378:12;1347:45;-1:-1:-1;1410:6:1;1263:159;-1:-1:-1;1263:159:1:o;1427:168::-;1499:5;1544:3;1535:6;1530:3;1526:16;1522:26;1519:46;;;1561:1;1558;1551:12;1600:1267;1815:6;1823;1831;1839;1847;1855;1863;1916:3;1904:9;1895:7;1891:23;1887:33;1884:53;;;1933:1;1930;1923:12;1884:53;1973:9;1960:23;2002:18;2043:2;2035:6;2032:14;2029:34;;;2059:1;2056;2049:12;2029:34;2097:6;2086:9;2082:22;2072:32;;2142:7;2135:4;2131:2;2127:13;2123:27;2113:55;;2164:1;2161;2154:12;2113:55;2204:2;2191:16;2230:2;2222:6;2219:14;2216:34;;;2246:1;2243;2236:12;2216:34;2293:7;2286:4;2277:6;2273:2;2269:15;2265:26;2262:39;2259:59;;;2314:1;2311;2304:12;2259:59;2345:4;2337:13;;;;-1:-1:-1;2369:6:1;;-1:-1:-1;2407:20:1;;2394:34;;-1:-1:-1;2447:38:1;2481:2;2466:18;;2447:38;:::i;:::-;2437:48;;2538:2;2527:9;2523:18;2510:32;2494:48;;2567:2;2557:8;2554:16;2551:36;;;2583:1;2580;2573:12;2551:36;;2606:73;2671:7;2660:8;2649:9;2645:24;2606:73;:::i;:::-;2596:83;;;2698:68;2758:7;2752:3;2741:9;2737:19;2698:68;:::i;:::-;2688:78;;2785:76;2853:7;2847:3;2836:9;2832:19;2785:76;:::i;:::-;2775:86;;1600:1267;;;;;;;;;;:::o;3379:248::-;3447:6;3455;3508:2;3496:9;3487:7;3483:23;3479:32;3476:52;;;3524:1;3521;3514:12;3476:52;-1:-1:-1;;3547:23:1;;;3617:2;3602:18;;;3589:32;;-1:-1:-1;3379:248:1:o;4347:277::-;4414:6;4467:2;4455:9;4446:7;4442:23;4438:32;4435:52;;;4483:1;4480;4473:12;4435:52;4515:9;4509:16;4568:5;4561:13;4554:21;4547:5;4544:32;4534:60;;4590:1;4587;4580:12;4629:597;4741:4;4770:2;4799;4788:9;4781:21;4831:6;4825:13;4874:6;4869:2;4858:9;4854:18;4847:34;4899:1;4909:140;4923:6;4920:1;4917:13;4909:140;;;5018:14;;;5014:23;;5008:30;4984:17;;;5003:2;4980:26;4973:66;4938:10;;4909:140;;;5067:6;5064:1;5061:13;5058:91;;;5137:1;5132:2;5123:6;5112:9;5108:22;5104:31;5097:42;5058:91;-1:-1:-1;5210:2:1;5189:15;-1:-1:-1;;5185:29:1;5170:45;;;;5217:2;5166:54;;4629:597;-1:-1:-1;;;4629:597:1:o;5231:251::-;5301:6;5354:2;5342:9;5333:7;5329:23;5325:32;5322:52;;;5370:1;5367;5360:12;5322:52;5402:9;5396:16;5421:31;5446:5;5421:31;:::i;5487:269::-;5544:6;5597:2;5585:9;5576:7;5572:23;5568:32;5565:52;;;5613:1;5610;5603:12;5565:52;5652:9;5639:23;5702:4;5695:5;5691:16;5684:5;5681:27;5671:55;;5722:1;5719;5712:12;5761:267;5850:6;5845:3;5838:19;5902:6;5895:5;5888:4;5883:3;5879:14;5866:43;-1:-1:-1;5954:1:1;5929:16;;;5947:4;5925:27;;;5918:38;;;;6010:2;5989:15;;;-1:-1:-1;;5985:29:1;5976:39;;;5972:50;;5761:267::o;6033:415::-;6248:2;6237:9;6230:21;6211:4;6268:62;6326:2;6315:9;6311:18;6303:6;6295;6268:62;:::i;:::-;6361:2;6346:18;;6339:34;;;;-1:-1:-1;;;;;;6409:32:1;;;;6404:2;6389:18;;;6382:60;6260:70;6033:415;-1:-1:-1;;6033:415:1:o;6453:518::-;6696:3;6685:9;6678:22;6659:4;6717:63;6775:3;6764:9;6760:19;6752:6;6744;6717:63;:::i;:::-;-1:-1:-1;;;;;6854:15:1;;;6849:2;6834:18;;6827:43;6901:2;6886:18;;6879:34;;;;-1:-1:-1;6949:15:1;;6944:2;6929:18;;;6922:43;;;;6709:71;6453:518;-1:-1:-1;;6453:518:1:o;6976:522::-;7054:4;7060:6;7120:11;7107:25;7214:2;7210:7;7199:8;7183:14;7179:29;7175:43;7155:18;7151:68;7141:96;;7233:1;7230;7223:12;7141:96;7260:33;;7312:20;;;-1:-1:-1;7355:18:1;7344:30;;7341:50;;;7387:1;7384;7377:12;7341:50;7420:4;7408:17;;-1:-1:-1;7451:14:1;7447:27;;;7437:38;;7434:58;;;7488:1;7485;7478:12;7434:58;6976:522;;;;;:::o;7503:614::-;7772:3;7761:9;7754:22;7735:4;7799:63;7857:3;7846:9;7842:19;7834:6;7826;7799:63;:::i;:::-;7910:9;7902:6;7898:22;7893:2;7882:9;7878:18;7871:50;7938;7981:6;7973;7965;7938:50;:::i;:::-;8036:4;8024:17;;;;8019:2;8004:18;;7997:45;-1:-1:-1;;;;;;;8078:32:1;;;;8073:2;8058:18;;;8051:60;7930:58;7503:614;-1:-1:-1;;;;7503:614:1:o

Swarm Source

ipfs://73b0d58400804fe1579ba7112be400559e5fc52f6585009b9379b90bc0c59c1e

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.