ETH Price: $2,564.72 (+0.73%)

Contract

0x29DB9C8420052A9B1C86A9F860b9c021bCbDc3a7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Add Asset199020682024-05-19 6:02:35125 days ago1716098555IN
0x29DB9C84...1bCbDc3a7
0 ETH0.000949476.17073189
Add Asset199019912024-05-19 5:46:47125 days ago1716097607IN
0x29DB9C84...1bCbDc3a7
0 ETH0.001285516.27781701
Transfer Ownersh...198418952024-05-10 20:02:23134 days ago1715371343IN
0x29DB9C84...1bCbDc3a7
0 ETH0.0006020411.23701155

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
198418222024-05-10 19:47:47134 days ago1715370467  Contract Creation0 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x44427aD6...9D05195dD
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
AeraVaultAssetRegistry

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 1000 runs

Other Settings:
shanghai EvmVersion, BSL 1.1 license
File 1 of 23 : AeraVaultAssetRegistry.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

import "@openzeppelin/ERC165.sol";
import "@openzeppelin/IERC4626.sol";
import "./Sweepable.sol";
import "./interfaces/IAssetRegistry.sol";
import "./interfaces/IVault.sol";
import {ONE} from "./Constants.sol";

/// @title AeraVaultAssetRegistry
/// @notice Maintains a list of registered assets and their oracles (when applicable).
contract AeraVaultAssetRegistry is IAssetRegistry, Sweepable, ERC165 {
    /// @notice Maximum number of assets.
    uint256 public constant MAX_ASSETS = 50;

    /// @notice Time to pass before accepting answers when sequencer comes back up.
    uint256 public constant GRACE_PERIOD_TIME = 3600;

    /// @notice Vault address.
    address public immutable vault;

    /// @notice Numeraire token.
    IERC20 public immutable numeraireToken;

    /// @notice Fee token.
    IERC20 public immutable feeToken;

    /// @notice Wrapped native token.
    IERC20 public immutable wrappedNativeToken;

    /// @notice Sequencer Uptime Feed address for L2.
    AggregatorV2V3Interface public immutable sequencer;

    /// STORAGE ///

    /// @notice List of currently registered assets.
    AssetInformation[] internal _assets;

    /// @notice Number of ERC4626 assets. Maintained for more efficient calculation of spotPrices.
    uint256 public numYieldAssets;

    /// EVENTS ///

    /// @notice Emitted when a new asset is added.
    /// @param asset New asset details.
    event AssetAdded(address indexed asset, AssetInformation assetInfo);

    /// @notice Emitted when an asset is removed.
    /// @param asset Address of removed asset.
    event AssetRemoved(address indexed asset);

    /// @notice Emitted in constructor.
    /// @param owner Owner address.
    /// @param vault Vault address.
    /// @param assets Initial list of registered assets.
    /// @param numeraireToken Numeraire token address.
    /// @param feeToken Fee token address.
    /// @param wrappedNativeToken Wrapped native token.
    /// @param sequencer Sequencer Uptime Feed address for L2.
    event Created(
        address indexed owner,
        address indexed vault,
        AssetInformation[] assets,
        address indexed numeraireToken,
        address feeToken,
        address wrappedNativeToken,
        address sequencer
    );

    /// ERRORS ///

    error Aera__NumberOfAssetsExceedsMaximum(uint256 max);
    error Aera__NumeraireTokenIsNotRegistered(address numeraireToken);
    error Aera__NumeraireTokenIsERC4626();
    error Aera__NumeraireOracleIsNotZeroAddress();
    error Aera__FeeTokenIsNotRegistered(address feeToken);
    error Aera__FeeTokenIsERC4626(address feeToken);
    error Aera__WrappedNativeTokenIsNotRegistered(address wrappedNativeToken);
    error Aera__WrappedNativeTokenIsERC4626(address wrappedNativeToken);
    error Aera__AssetOrderIsIncorrect(uint256 index);
    error Aera__AssetRegistryInitialOwnerIsZeroAddress();
    error Aera__AssetRegistryOwnerIsGuardian();
    error Aera__AssetRegistryOwnerIsVault();
    error Aera__ERC20OracleIsZeroAddress(address asset);
    error Aera__ERC4626OracleIsNotZeroAddress(address asset);
    error Aera__UnderlyingAssetIsNotRegistered(
        address asset, address underlyingAsset
    );
    error Aera__UnderlyingAssetIsItselfERC4626();
    error Aera__AssetIsUnderlyingAssetOfERC4626(address erc4626Asset);
    error Aera__AssetIsAlreadyRegistered(uint256 index);
    error Aera__AssetNotRegistered(address asset);
    error Aera__CannotRemoveNumeraireToken(address asset);
    error Aera__CannotRemoveFeeToken(address feeToken);
    error Aera__CannotRemoveWrappedNativeToken(address wrappedNativeToken);
    error Aera__VaultIsZeroAddress();
    error Aera__SequencerIsDown();
    error Aera__GracePeriodNotOver();
    error Aera__OraclePriceIsInvalid(AssetInformation asset, int256 actual);
    error Aera__OraclePriceIsTooOld(AssetInformation asset, uint256 updatedAt);

    /// FUNCTIONS ///

    /// @param owner_ Initial owner address.
    /// @param vault_ Vault address.
    /// @param assets_ Initial list of registered assets.
    /// @param numeraireToken_ Numeraire token address.
    /// @param feeToken_ Fee token address.
    /// @param wrappedNativeToken_ Wrapped native token address.
    /// @param sequencer_ Sequencer Uptime Feed address for L2.
    constructor(
        address owner_,
        address vault_,
        AssetInformation[] memory assets_,
        IERC20 numeraireToken_,
        IERC20 feeToken_,
        IERC20 wrappedNativeToken_,
        AggregatorV2V3Interface sequencer_
    ) Ownable() {
        // Requirements: confirm that owner is not zero address.
        if (owner_ == address(0)) {
            revert Aera__AssetRegistryInitialOwnerIsZeroAddress();
        }

        // Requirements: check that an address has been provided.
        if (vault_ == address(0)) {
            revert Aera__VaultIsZeroAddress();
        }

        // Requirements: check that asset registry initial owner is not the computed vault address.
        if (owner_ == vault_) {
            revert Aera__AssetRegistryOwnerIsVault();
        }

        uint256 numAssets = assets_.length;

        // Requirements: confirm that number of assets is within bounds.
        if (numAssets > MAX_ASSETS) {
            revert Aera__NumberOfAssetsExceedsMaximum(MAX_ASSETS);
        }

        // Calculate the Numeraire token index.
        uint256 numeraireIndex = 0;
        for (; numeraireIndex < numAssets;) {
            if (assets_[numeraireIndex].asset == numeraireToken_) {
                break;
            }
            unchecked {
                numeraireIndex++; // gas savings
            }
        }

        // Calculate the fee token index.
        uint256 feeTokenIndex = 0;
        for (; feeTokenIndex < numAssets;) {
            if (assets_[feeTokenIndex].asset == feeToken_) {
                break;
            }
            unchecked {
                feeTokenIndex++; // gas savings
            }
        }

        // Calculate the wrapped native token index.
        uint256 wrappedNativeTokenIndex = 0;
        for (; wrappedNativeTokenIndex < numAssets;) {
            if (assets_[wrappedNativeTokenIndex].asset == wrappedNativeToken_)
            {
                break;
            }
            unchecked {
                wrappedNativeTokenIndex++; // gas savings
            }
        }

        // Requirements: confirm that Numeraire token is present.
        if (numeraireIndex >= numAssets) {
            revert Aera__NumeraireTokenIsNotRegistered(
                address(numeraireToken_)
            );
        }

        // Requirements: confirm that numeraire is not an ERC4626 asset.
        if (assets_[numeraireIndex].isERC4626) {
            revert Aera__NumeraireTokenIsERC4626();
        }

        // Requirements: confirm that numeraire does not have a specified oracle.
        if (address(assets_[numeraireIndex].oracle) != address(0)) {
            revert Aera__NumeraireOracleIsNotZeroAddress();
        }

        // Requirements: confirm that fee token is present.
        if (feeTokenIndex >= numAssets) {
            revert Aera__FeeTokenIsNotRegistered(address(feeToken_));
        }

        // Requirements: check that fee token is not an ERC4626.
        if (assets_[feeTokenIndex].isERC4626) {
            revert Aera__FeeTokenIsERC4626(address(feeToken_));
        }

        // Requirements: confirm that wrapped native token is present.
        if (wrappedNativeTokenIndex >= numAssets) {
            revert Aera__WrappedNativeTokenIsNotRegistered(
                address(wrappedNativeToken_)
            );
        }

        // Requirements: check that wrapped native token is not an ERC4626.
        if (assets_[wrappedNativeTokenIndex].isERC4626) {
            revert Aera__WrappedNativeTokenIsERC4626(
                address(wrappedNativeToken_)
            );
        }

        // Requirements: confirm that assets are sorted by address.
        for (uint256 i = 1; i < numAssets;) {
            if (assets_[i - 1].asset >= assets_[i].asset) {
                revert Aera__AssetOrderIsIncorrect(i);
            }
            unchecked {
                i++; // gas savings
            }
        }

        for (uint256 i = 0; i < numAssets;) {
            if (i != numeraireIndex) {
                // Requirements: check asset oracle is correctly specified.
                _checkAssetOracle(assets_[i]);

                if (assets_[i].isERC4626) {
                    // Requirements: check that underlying asset is a registered ERC20.
                    _checkUnderlyingAsset(assets_[i], assets_);
                }
            }

            // Effects: add asset to array.
            _insertAsset(assets_[i], i);

            unchecked {
                i++; // gas savings
            }
        }

        // Effects: set vault, numeraire, fee token, wrapped native token
        //          and sequencer uptime feed.
        vault = vault_;
        numeraireToken = numeraireToken_;
        feeToken = feeToken_;
        wrappedNativeToken = wrappedNativeToken_;
        sequencer = sequencer_;

        // Effects: set new owner.
        _transferOwnership(owner_);

        // Log asset registry creation.
        emit Created(
            owner_,
            vault_,
            assets_,
            address(numeraireToken_),
            address(feeToken_),
            address(wrappedNativeToken_),
            address(sequencer)
        );
    }

    /// @notice Add a new asset.
    /// @param asset Asset information for new asset.
    /// @dev MUST revert if not called by owner.
    /// @dev MUST revert if asset with the same address exists.
    function addAsset(AssetInformation calldata asset) external onlyOwner {
        uint256 numAssets = _assets.length;

        // Requirements: validate number of assets doesn't exceed bound.
        if (numAssets >= MAX_ASSETS) {
            revert Aera__NumberOfAssetsExceedsMaximum(MAX_ASSETS);
        }

        // Requirements: validate oracle field for asset struct.
        _checkAssetOracle(asset);

        uint256 i = 0;

        // Find the index to insert the new asset.
        for (; i < numAssets;) {
            if (asset.asset < _assets[i].asset) {
                break;
            }

            // Requirements: check that asset is not already present.
            if (asset.asset == _assets[i].asset) {
                revert Aera__AssetIsAlreadyRegistered(i);
            }

            unchecked {
                i++; // gas savings
            }
        }

        // Requirements: check that underlying asset is a registered ERC20.
        if (asset.isERC4626) {
            _checkUnderlyingAsset(asset, _assets);
        }

        // Effects: insert asset at position i.
        _insertAsset(asset, i);
    }

    /// @notice Remove an asset.
    /// @param asset An asset to remove.
    /// @dev MUST revert if not called by owner.
    function removeAsset(address asset) external onlyOwner {
        // Requirements: confirm that asset to remove is not numeraire.
        if (asset == address(numeraireToken)) {
            revert Aera__CannotRemoveNumeraireToken(asset);
        }

        // Requirements: check that asset to remove is not fee token.
        if (asset == address(feeToken)) {
            revert Aera__CannotRemoveFeeToken(asset);
        }

        // Requirements: check that asset to remove is not wrapped native token.
        if (asset == address(wrappedNativeToken)) {
            revert Aera__CannotRemoveWrappedNativeToken(asset);
        }

        uint256 numAssets = _assets.length;
        uint256 oldAssetIndex = 0;
        // Find index of asset.
        for (
            ;
            oldAssetIndex < numAssets
                && address(_assets[oldAssetIndex].asset) != asset;
        ) {
            unchecked {
                oldAssetIndex++; // gas savings
            }
        }

        // Requirements: check that asset is registered.
        if (oldAssetIndex >= numAssets) {
            revert Aera__AssetNotRegistered(asset);
        }

        // Effects: adjust the number of ERC4626 assets.
        if (_assets[oldAssetIndex].isERC4626) {
            numYieldAssets--;
        } else {
            for (uint256 i = 0; i < numAssets;) {
                if (
                    i != oldAssetIndex && _assets[i].isERC4626
                        && IERC4626(address(_assets[i].asset)).asset() == asset
                ) {
                    revert Aera__AssetIsUnderlyingAssetOfERC4626(
                        address(_assets[i].asset)
                    );
                }
                unchecked {
                    i++; // gas savings
                }
            }
        }

        uint256 nextIndex;
        uint256 lastIndex = numAssets - 1;
        // Slide all elements after oldAssetIndex left.
        for (uint256 i = oldAssetIndex; i < lastIndex;) {
            nextIndex = i + 1;
            _assets[i] = _assets[nextIndex];

            unchecked {
                i++; // gas savings
            }
        }

        // Effects: remove asset from array.
        _assets.pop();

        // Log removal.
        emit AssetRemoved(asset);
    }

    /// @inheritdoc IAssetRegistry
    function assets()
        external
        view
        override
        returns (AssetInformation[] memory)
    {
        return _assets;
    }

    /// @inheritdoc IAssetRegistry
    function spotPrices()
        external
        view
        override
        returns (AssetPriceReading[] memory)
    {
        int256 answer;
        uint256 startedAt;

        // Requirements: check that sequencer is up.
        if (address(sequencer) != address(0)) {
            (, answer, startedAt,,) = sequencer.latestRoundData();

            // Answer == 0: Sequencer is up
            // Requirements: check that the sequencer is up.
            if (answer != 0) {
                revert Aera__SequencerIsDown();
            }

            // Requirements: check that the grace period has passed after the
            //               sequencer is back up.
            if (block.timestamp < startedAt + GRACE_PERIOD_TIME) {
                revert Aera__GracePeriodNotOver();
            }
        }

        // Prepare price array.
        uint256 numAssets = _assets.length;
        AssetPriceReading[] memory prices = new AssetPriceReading[](
            numAssets - numYieldAssets
        );

        uint256 oracleDecimals;
        uint256 price;
        uint256 index = 0;
        for (uint256 i = 0; i < numAssets;) {
            if (_assets[i].isERC4626) {
                unchecked {
                    i++; // gas savings
                }
                continue;
            }

            if (_assets[i].asset == numeraireToken) {
                // Numeraire has price 1 by definition.
                prices[index] = AssetPriceReading({
                    asset: _assets[i].asset,
                    spotPrice: ONE
                });
            } else {
                price = _checkOraclePrice(_assets[i]);
                oracleDecimals = _assets[i].oracle.decimals();

                if (oracleDecimals < 18) {
                    // slither-disable-next-line divide-before-multiply
                    price = price * (10 ** (18 - oracleDecimals));
                } else if (oracleDecimals > 18) {
                    // slither-disable-next-line divide-before-multiply
                    price = price / (10 ** (oracleDecimals - 18));
                }

                prices[index] = AssetPriceReading({
                    asset: _assets[i].asset,
                    spotPrice: price
                });
            }

            unchecked {
                // gas savings
                index++;
                i++;
            }
        }

        return prices;
    }

    /// @inheritdoc IERC165
    function supportsInterface(bytes4 interfaceId)
        public
        view
        override
        returns (bool)
    {
        return interfaceId == type(IAssetRegistry).interfaceId
            || super.supportsInterface(interfaceId);
    }

    /// INTERNAL FUNCTIONS ///

    /// @notice Ensure non-zero oracle address for ERC20
    ///         and zero oracle address for ERC4626.
    /// @param asset Asset details to check
    function _checkAssetOracle(AssetInformation memory asset) internal view {
        if (asset.isERC4626) {
            // ERC4626 asset should not have a specified oracle.
            if (address(asset.oracle) != address(0)) {
                revert Aera__ERC4626OracleIsNotZeroAddress(
                    address(asset.asset)
                );
            }
        } else {
            // ERC20 asset should have non-zero oracle address.
            if (address(asset.oracle) == address(0)) {
                revert Aera__ERC20OracleIsZeroAddress(address(asset.asset));
            }

            // Requirements: validate oracle price.
            _checkOraclePrice(asset);
        }
    }

    /// @notice Ensure oracle returns valid value and it's up to date.
    /// @param asset Asset details to check.
    /// @return price Valid oracle price.
    function _checkOraclePrice(AssetInformation memory asset)
        internal
        view
        returns (uint256 price)
    {
        (, int256 answer,, uint256 updatedAt,) = asset.oracle.latestRoundData();

        // Check price staleness
        if (answer <= 0) {
            revert Aera__OraclePriceIsInvalid(asset, answer);
        }
        if (
            asset.heartbeat > 0
                && updatedAt + asset.heartbeat + 1 hours < block.timestamp
        ) {
            revert Aera__OraclePriceIsTooOld(asset, updatedAt);
        }

        price = uint256(answer);
    }

    /// @notice Check whether the underlying asset is listed as an ERC20.
    /// @dev Will revert if underlying asset is an ERC4626.
    /// @param asset ERC4626 asset to check underlying asset.
    /// @param assetsToCheck Array of assets.
    function _checkUnderlyingAsset(
        AssetInformation memory asset,
        AssetInformation[] memory assetsToCheck
    ) internal view {
        uint256 numAssets = assetsToCheck.length;

        address underlyingAsset = IERC4626(address(asset.asset)).asset();
        uint256 underlyingIndex = 0;

        for (; underlyingIndex < numAssets;) {
            if (
                underlyingAsset
                    == address(assetsToCheck[underlyingIndex].asset)
            ) {
                break;
            }

            unchecked {
                underlyingIndex++; // gas savings
            }
        }

        if (underlyingIndex >= numAssets) {
            revert Aera__UnderlyingAssetIsNotRegistered(
                address(asset.asset), underlyingAsset
            );
        }

        if (assetsToCheck[underlyingIndex].isERC4626) {
            revert Aera__UnderlyingAssetIsItselfERC4626();
        }
    }

    /// @notice Insert asset at the given index in an array of assets.
    /// @param asset New asset details.
    /// @param index Index of the new asset in the asset array.
    function _insertAsset(
        AssetInformation memory asset,
        uint256 index
    ) internal {
        uint256 numAssets = _assets.length;

        if (index == numAssets) {
            // Effects: insert new asset at the end.
            _assets.push(asset);
        } else {
            // Effects: push last elements to the right and insert new asset.
            _assets.push(_assets[numAssets - 1]);

            uint256 prevIndex;
            for (uint256 i = numAssets - 1; i > index; i--) {
                prevIndex = i - 1;
                _assets[i] = _assets[prevIndex];
            }

            _assets[index] = asset;
        }

        // Effects: adjust the number of ERC4626 assets.
        if (asset.isERC4626) {
            numYieldAssets++;
        }

        // Log asset added.
        emit AssetAdded(address(asset.asset), asset);
    }

    /// @notice Check that owner is not the vault or the guardian.
    /// @param owner_ Asset registry owner address.
    /// @param vault_ Vault address.
    function _checkAssetRegistryOwner(
        address owner_,
        address vault_
    ) internal view {
        if (owner_ == vault_) {
            revert Aera__AssetRegistryOwnerIsVault();
        }

        address guardian = IVault(vault_).guardian();
        if (owner_ == guardian) {
            revert Aera__AssetRegistryOwnerIsGuardian();
        }
    }

    /// @inheritdoc Ownable2Step
    function transferOwnership(address newOwner) public override onlyOwner {
        // Requirements: check that new owner is disaffiliated from existing roles.
        _checkAssetRegistryOwner(newOwner, vault);

        // Effects: initiate ownership transfer.
        super.transferOwnership(newOwner);
    }
}

File 2 of 23 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 3 of 23 : IERC4626.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4626.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./IERC20Metadata.sol";

/**
 * @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in
 * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].
 *
 * _Available since v4.7._
 */
interface IERC4626 is IERC20, IERC20Metadata {
    event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);

    event Withdraw(
        address indexed sender,
        address indexed receiver,
        address indexed owner,
        uint256 assets,
        uint256 shares
    );

    /**
     * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
     *
     * - MUST be an ERC-20 token contract.
     * - MUST NOT revert.
     */
    function asset() external view returns (address assetTokenAddress);

    /**
     * @dev Returns the total amount of the underlying asset that is “managed” by Vault.
     *
     * - SHOULD include any compounding that occurs from yield.
     * - MUST be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT revert.
     */
    function totalAssets() external view returns (uint256 totalManagedAssets);

    /**
     * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
     * scenario where all the conditions are met.
     *
     * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT show any variations depending on the caller.
     * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
     * - MUST NOT revert.
     *
     * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
     * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
     * from.
     */
    function convertToShares(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
     * scenario where all the conditions are met.
     *
     * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT show any variations depending on the caller.
     * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
     * - MUST NOT revert.
     *
     * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
     * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
     * from.
     */
    function convertToAssets(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
     * through a deposit call.
     *
     * - MUST return a limited value if receiver is subject to some deposit limit.
     * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
     * - MUST NOT revert.
     */
    function maxDeposit(address receiver) external view returns (uint256 maxAssets);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
     * current on-chain conditions.
     *
     * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
     *   call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
     *   in the same transaction.
     * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
     *   deposit would be accepted, regardless if the user has enough tokens approved, etc.
     * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by depositing.
     */
    function previewDeposit(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.
     *
     * - MUST emit the Deposit event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   deposit execution, and are accounted for during deposit.
     * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
     *   approving enough underlying tokens to the Vault contract, etc).
     *
     * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
     */
    function deposit(uint256 assets, address receiver) external returns (uint256 shares);

    /**
     * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
     * - MUST return a limited value if receiver is subject to some mint limit.
     * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
     * - MUST NOT revert.
     */
    function maxMint(address receiver) external view returns (uint256 maxShares);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
     * current on-chain conditions.
     *
     * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
     *   in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
     *   same transaction.
     * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
     *   would be accepted, regardless if the user has enough tokens approved, etc.
     * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by minting.
     */
    function previewMint(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.
     *
     * - MUST emit the Deposit event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
     *   execution, and are accounted for during mint.
     * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
     *   approving enough underlying tokens to the Vault contract, etc).
     *
     * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
     */
    function mint(uint256 shares, address receiver) external returns (uint256 assets);

    /**
     * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
     * Vault, through a withdraw call.
     *
     * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
     * - MUST NOT revert.
     */
    function maxWithdraw(address owner) external view returns (uint256 maxAssets);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
     * given current on-chain conditions.
     *
     * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
     *   call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
     *   called
     *   in the same transaction.
     * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
     *   the withdrawal would be accepted, regardless if the user has enough shares, etc.
     * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by depositing.
     */
    function previewWithdraw(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.
     *
     * - MUST emit the Withdraw event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   withdraw execution, and are accounted for during withdraw.
     * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
     *   not having enough shares, etc).
     *
     * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
     * Those methods should be performed separately.
     */
    function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);

    /**
     * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
     * through a redeem call.
     *
     * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
     * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
     * - MUST NOT revert.
     */
    function maxRedeem(address owner) external view returns (uint256 maxShares);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,
     * given current on-chain conditions.
     *
     * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
     *   in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
     *   same transaction.
     * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
     *   redemption would be accepted, regardless if the user has enough shares, etc.
     * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by redeeming.
     */
    function previewRedeem(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.
     *
     * - MUST emit the Withdraw event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   redeem execution, and are accounted for during redeem.
     * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
     *   not having enough shares, etc).
     *
     * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
     * Those methods should be performed separately.
     */
    function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
}

File 4 of 23 : Sweepable.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

import "@openzeppelin/Ownable2Step.sol";
import "@openzeppelin/SafeERC20.sol";
import "./interfaces/ISweepable.sol";

/// @title Sweepable.
/// @notice Aera Sweepable contract.
/// @dev Allows owner of the contract to restore accidentally send tokens
//       and the chain's native token.
contract Sweepable is ISweepable, Ownable2Step {
    using SafeERC20 for IERC20;

    /// @inheritdoc ISweepable
    function sweep(address token, uint256 amount) external onlyOwner {
        if (token == address(0)) {
            msg.sender.call{value: amount}("");
        } else {
            IERC20(token).safeTransfer(msg.sender, amount);
        }

        emit Sweep(token, amount);
    }
}

File 5 of 23 : IAssetRegistry.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

import "@chainlink/interfaces/AggregatorV2V3Interface.sol";
import "@openzeppelin/IERC20.sol";

/// @title IAssetRegistry
/// @notice Asset registry interface.
/// @dev Any implementation MUST also implement Ownable2Step and ERC165.
interface IAssetRegistry {
    /// @param asset Asset address.
    /// @param heartbeat Frequency of oracle price updates.
    /// @param isERC4626 True if yield-bearing asset, false if just an ERC20 asset.
    /// @param oracle If applicable, oracle address for asset.
    struct AssetInformation {
        IERC20 asset;
        uint256 heartbeat;
        bool isERC4626;
        AggregatorV2V3Interface oracle;
    }

    /// @param asset Asset address.
    /// @param spotPrice Spot price of an asset in Numeraire token terms.
    struct AssetPriceReading {
        IERC20 asset;
        uint256 spotPrice;
    }

    /// @notice Get address of vault.
    /// @return vault Address of vault.
    function vault() external view returns (address vault);

    /// @notice Get a list of all registered assets.
    /// @return assets List of assets.
    /// @dev MUST return assets in an order sorted by address.
    function assets()
        external
        view
        returns (AssetInformation[] memory assets);

    /// @notice Get address of fee token.
    /// @return feeToken Address of fee token.
    /// @dev Represented as an address for efficiency reasons.
    /// @dev MUST be present in assets array.
    function feeToken() external view returns (IERC20 feeToken);

    /// @notice Get the index of the Numeraire token in the assets array.
    /// @return numeraireToken Numeraire token address.
    /// @dev Represented as an index for efficiency reasons.
    /// @dev MUST be a number between 0 (inclusive) and the length of assets array (exclusive).
    function numeraireToken() external view returns (IERC20 numeraireToken);

    /// @notice Calculate spot prices of non-ERC4626 assets.
    /// @return spotPrices Spot prices of non-ERC4626 assets in 18 decimals.
    /// @dev MUST return assets in the same order as in assets but with ERC4626 assets filtered out.
    /// @dev MUST also include Numeraire token (spot price = 1).
    /// @dev MAY revert if oracle prices for any asset are unreliable at the time.
    function spotPrices()
        external
        view
        returns (AssetPriceReading[] memory spotPrices);
}

File 6 of 23 : IVault.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

import "@openzeppelin/IERC20.sol";
import "./IAssetRegistry.sol";
import "./IVaultEvents.sol";
import "./IHooks.sol";

/// @title IVault
/// @notice Interface for the vault.
/// @dev Any implementation MUST also implement Ownable2Step.
interface IVault is IVaultEvents {
    /// ERRORS ///

    error Aera__AssetRegistryIsZeroAddress();
    error Aera__AssetRegistryIsNotValid(address assetRegistry);
    error Aera__AssetRegistryHasInvalidVault();
    error Aera__HooksIsZeroAddress();
    error Aera__HooksIsNotValid(address hooks);
    error Aera__HooksHasInvalidVault();
    error Aera__GuardianIsZeroAddress();
    error Aera__GuardianIsOwner();
    error Aera__InitialOwnerIsZeroAddress();
    error Aera__FeeRecipientIsZeroAddress();
    error Aera__ExecuteTargetIsHooksAddress();
    error Aera__ExecuteTargetIsVaultAddress();
    error Aera__SubmitTransfersAssetFromOwner();
    error Aera__SubmitRedeemERC4626AssetFromOwner();
    error Aera__SubmitTargetIsVaultAddress();
    error Aera__SubmitTargetIsHooksAddress(uint256 index);
    error Aera__FeeRecipientIsOwner();
    error Aera__FeeIsAboveMax(uint256 actual, uint256 max);
    error Aera__CallerIsNotOwnerAndGuardian();
    error Aera__CallerIsNotGuardian();
    error Aera__AssetIsNotRegistered(IERC20 asset);
    error Aera__AmountExceedsAvailable(
        IERC20 asset, uint256 amount, uint256 available
    );
    error Aera__ExecutionFailed(bytes result);
    error Aera__VaultIsFinalized();
    error Aera__SubmissionFailed(uint256 index, bytes result);
    error Aera__CannotUseReservedFees();
    error Aera__SpotPricesReverted();
    error Aera__AmountsOrderIsIncorrect(uint256 index);
    error Aera__NoAvailableFeesForCaller(address caller);
    error Aera__NoClaimableFeesForCaller(address caller);
    error Aera__NotWrappedNativeTokenContract();
    error Aera__CannotRenounceOwnership();

    /// FUNCTIONS ///

    /// @notice Deposit assets.
    /// @param amounts Assets and amounts to deposit.
    /// @dev MUST revert if not called by owner.
    function deposit(AssetValue[] memory amounts) external;

    /// @notice Withdraw assets.
    /// @param amounts Assets and amounts to withdraw.
    /// @dev MUST revert if not called by owner.
    function withdraw(AssetValue[] memory amounts) external;

    /// @notice Set current guardian and fee recipient.
    /// @param guardian New guardian address.
    /// @param feeRecipient New fee recipient address.
    /// @dev MUST revert if not called by owner.
    function setGuardianAndFeeRecipient(
        address guardian,
        address feeRecipient
    ) external;

    /// @notice Sets the current hooks module.
    /// @param hooks New hooks module address.
    /// @dev MUST revert if not called by owner.
    function setHooks(address hooks) external;

    /// @notice Execute a transaction via the vault.
    /// @dev Execution still should work when vault is finalized.
    /// @param operation Struct details for target and calldata to execute.
    /// @dev MUST revert if not called by owner.
    function execute(Operation memory operation) external;

    /// @notice Terminate the vault and return all funds to owner.
    /// @dev MUST revert if not called by owner.
    function finalize() external;

    /// @notice Stops the guardian from submission and halts fee accrual.
    /// @dev MUST revert if not called by owner or guardian.
    function pause() external;

    /// @notice Resume fee accrual and guardian submissions.
    /// @dev MUST revert if not called by owner.
    function resume() external;

    /// @notice Submit a series of transactions for execution via the vault.
    /// @param operations Sequence of operations to execute.
    /// @dev MUST revert if not called by guardian.
    function submit(Operation[] memory operations) external;

    /// @notice Claim fees on behalf of a current or previous fee recipient.
    function claim() external;

    /// @notice Get the current guardian.
    /// @return guardian Address of guardian.
    function guardian() external view returns (address guardian);

    /// @notice Get the current fee recipient.
    /// @return feeRecipient Address of fee recipient.
    function feeRecipient() external view returns (address feeRecipient);

    /// @notice Get the current asset registry.
    /// @return assetRegistry Address of asset registry.
    function assetRegistry()
        external
        view
        returns (IAssetRegistry assetRegistry);

    /// @notice Get the current hooks module address.
    /// @return hooks Address of hooks module.
    function hooks() external view returns (IHooks hooks);

    /// @notice Get fee per second.
    /// @return fee Fee per second in 18 decimal fixed point format.
    function fee() external view returns (uint256 fee);

    /// @notice Get current balances of all assets.
    /// @return assetAmounts Amounts of registered assets.
    function holdings()
        external
        view
        returns (AssetValue[] memory assetAmounts);

    /// @notice Get current total value of assets in vault.
    /// @return value Current total value.
    function value() external view returns (uint256 value);
}

File 7 of 23 : Constants.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

// Constants.sol
//
// This file defines the constants used across several contracts in V2.

/// @dev Fixed point multiplier.
uint256 constant ONE = 1e18;

File 8 of 23 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 9 of 23 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    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);
}

File 10 of 23 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 11 of 23 : Ownable2Step.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.0;

import "./Ownable.sol";

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

    event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Returns the address of the pending owner.
     */
    function pendingOwner() public view virtual returns (address) {
        return _pendingOwner;
    }

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
        _transferOwnership(sender);
    }
}

File 12 of 23 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./IERC20Permit.sol";
import "./Address.sol";

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

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    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));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    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");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to
     * 0 before setting it to a non-zero value.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

File 13 of 23 : ISweepable.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

/// @title Interface for sweepable module.
interface ISweepable {
    /// @notice Emitted when sweep is called.
    /// @param token Token address or zero address if recovering the chain's native token.
    /// @param amount Withdrawn amount of token.
    event Sweep(address token, uint256 amount);

    /// @notice Withdraw any tokens accidentally sent to contract.
    /// @param token Token address to withdraw or zero address for the chain's native token.
    /// @param amount Amount to withdraw.
    function sweep(address token, uint256 amount) external;
}

File 14 of 23 : AggregatorV2V3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./AggregatorInterface.sol";
import "./AggregatorV3Interface.sol";

interface AggregatorV2V3Interface is AggregatorInterface, AggregatorV3Interface {}

File 15 of 23 : IVaultEvents.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

import "@openzeppelin/IERC20.sol";

import {AssetValue, Operation} from "../Types.sol";

/// @title Interface for vault events.
interface IVaultEvents {
    /// @notice Emitted when deposit is called.
    /// @param owner Owner address.
    /// @param asset Deposited asset.
    /// @param amount Deposited asset amount.
    event Deposit(address indexed owner, IERC20 indexed asset, uint256 amount);

    /// @notice Emitted when withdraw is called.
    /// @param owner Owner address.
    /// @param asset Withdrawn asset.
    /// @param amount Withdrawn asset amount.
    event Withdraw(
        address indexed owner, IERC20 indexed asset, uint256 amount
    );

    /// @notice Emitted when guardian is set.
    /// @param guardian Address of new guardian.
    /// @param feeRecipient Address of new fee recipient.
    event SetGuardianAndFeeRecipient(
        address indexed guardian, address indexed feeRecipient
    );

    /// @notice Emitted when asset registry is set.
    /// @param assetRegistry Address of new asset registry.
    event SetAssetRegistry(address assetRegistry);

    /// @notice Emitted when hooks is set.
    /// @param hooks Address of new hooks.
    event SetHooks(address hooks);

    /// @notice Emitted when execute is called.
    /// @param owner Owner address.
    /// @param operation Struct details for target and calldata.
    event Executed(address indexed owner, Operation operation);

    /// @notice Emitted when vault is finalized.
    /// @param owner Owner address.
    /// @param withdrawnAmounts Struct details for withdrawn assets and amounts (sent to owner).
    event Finalized(address indexed owner, AssetValue[] withdrawnAmounts);

    /// @notice Emitted when submit is called.
    /// @param guardian Guardian address.
    /// @param operations Array of struct details for targets and calldatas.
    event Submitted(address indexed guardian, Operation[] operations);

    /// @notice Emitted when guardian fees are claimed.
    /// @param feeRecipient Fee recipient address.
    /// @param claimedFee Claimed amount of fee token.
    /// @param unclaimedFee Unclaimed amount of fee token (unclaimed because Vault does not have enough balance of feeToken).
    /// @param feeTotal New total reserved fee value.
    event Claimed(
        address indexed feeRecipient,
        uint256 claimedFee,
        uint256 unclaimedFee,
        uint256 feeTotal
    );

    /// @notice Emitted when new fees are reserved for recipient.
    /// @param feeRecipient Fee recipient address.
    /// @param newFee Fee amount reserved.
    /// @param lastFeeCheckpoint Updated fee checkpoint.
    /// @param lastValue Last registered vault value.
    /// @param lastFeeTokenPrice Last registered fee token price.
    /// @param feeTotal New total reserved fee value.
    event FeesReserved(
        address indexed feeRecipient,
        uint256 newFee,
        uint256 lastFeeCheckpoint,
        uint256 lastValue,
        uint256 lastFeeTokenPrice,
        uint256 feeTotal
    );

    /// @notice Emitted when no fees are reserved.
    /// @param lastFeeCheckpoint Updated fee checkpoint.
    /// @param lastValue Last registered vault value.
    /// @param feeTotal New total reserved fee value.
    event NoFeesReserved(
        uint256 lastFeeCheckpoint,
        uint256 lastValue,
        uint256 feeTotal
    );

    /// @notice Emitted when the call to get spot prices from the asset registry reverts.
    /// @param reason Revert reason.
    event SpotPricesReverted(bytes reason);
}

File 16 of 23 : IHooks.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

import {AssetValue, Operation} from "../Types.sol";

/// @title IHooks
/// @notice Interface for the hooks module.
interface IHooks {
    /// @notice Get address of vault.
    /// @return vault Vault address.
    function vault() external view returns (address vault);

    /// @notice Hook that runs before deposit.
    /// @param amounts Struct details for assets and amounts to deposit.
    /// @dev MUST revert if not called by vault.
    function beforeDeposit(AssetValue[] memory amounts) external;

    /// @notice Hook that runs after deposit.
    /// @param amounts Struct details for assets and amounts to deposit.
    /// @dev MUST revert if not called by vault.
    function afterDeposit(AssetValue[] memory amounts) external;

    /// @notice Hook that runs before withdraw.
    /// @param amounts Struct details for assets and amounts to withdraw.
    /// @dev MUST revert if not called by vault.
    function beforeWithdraw(AssetValue[] memory amounts) external;

    /// @notice Hook that runs after withdraw.
    /// @param amounts Struct details for assets and amounts to withdraw.
    /// @dev MUST revert if not called by vault.
    function afterWithdraw(AssetValue[] memory amounts) external;

    /// @notice Hook that runs before submit.
    /// @param operations Array of struct details for target and calldata to submit.
    /// @dev MUST revert if not called by vault.
    function beforeSubmit(Operation[] memory operations) external;

    /// @notice Hook that runs after submit.
    /// @param operations Array of struct details for target and calldata to submit.
    /// @dev MUST revert if not called by vault.
    function afterSubmit(Operation[] memory operations) external;

    /// @notice Hook that runs before finalize.
    /// @dev MUST revert if not called by vault.
    function beforeFinalize() external;

    /// @notice Hook that runs after finalize.
    /// @dev MUST revert if not called by vault.
    function afterFinalize() external;

    /// @notice Take hooks out of use.
    function decommission() external;
}

File 17 of 23 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "./Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 18 of 23 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 19 of 23 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library 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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 20 of 23 : AggregatorInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorInterface {
  function latestAnswer() external view returns (int256);

  function latestTimestamp() external view returns (uint256);

  function latestRound() external view returns (uint256);

  function getAnswer(uint256 roundId) external view returns (int256);

  function getTimestamp(uint256 roundId) external view returns (uint256);

  event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt);

  event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);
}

File 21 of 23 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

File 22 of 23 : Types.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

import "@openzeppelin/IERC20.sol";
import "./interfaces/IAssetRegistry.sol";

// Types.sol
//
// This file defines the types used in V2.

/// @notice Combination of contract address and sighash to be used in allowlist.
/// @dev It's packed as follows:
///      [target 160 bits] [selector 32 bits] [<empty> 64 bits]
type TargetSighash is bytes32;

/// @notice Struct encapulating an asset and an associated value.
/// @param asset Asset address.
/// @param value The associated value for this asset (e.g., amount or price).
struct AssetValue {
    IERC20 asset;
    uint256 value;
}

/// @notice Execution details for a vault operation.
/// @param target Target contract address.
/// @param value Native token amount.
/// @param data Calldata.
struct Operation {
    address target;
    uint256 value;
    bytes data;
}

/// @notice Contract address and sighash struct to be used in the public interface.
struct TargetSighashData {
    address target;
    bytes4 selector;
}

/// @notice Parameters for vault deployment.
/// @param owner Initial owner address.
/// @param assetRegistry Asset registry address.
/// @param hooks Hooks address.
/// @param guardian Guardian address.
/// @param feeRecipient Fee recipient address.
/// @param fee Fees accrued per second, denoted in 18 decimal fixed point format.
struct Parameters {
    address owner;
    address assetRegistry;
    address hooks;
    address guardian;
    address feeRecipient;
    uint256 fee;
}

/// @notice Vault parameters for vault deployment.
/// @param owner Initial owner address.
/// @param guardian Guardian address.
/// @param feeRecipient Fee recipient address.
/// @param fee Fees accrued per second, denoted in 18 decimal fixed point format.
struct VaultParameters {
    address owner;
    address guardian;
    address feeRecipient;
    uint256 fee;
}

/// @notice Asset registry parameters for asset registry deployment.
/// @param factory Asset registry factory address.
/// @param owner Initial owner address.
/// @param assets Initial list of registered assets.
/// @param numeraireToken Numeraire token address.
/// @param feeToken Fee token address.
/// @param sequencer Sequencer Uptime Feed address for L2.
struct AssetRegistryParameters {
    address factory;
    address owner;
    IAssetRegistry.AssetInformation[] assets;
    IERC20 numeraireToken;
    IERC20 feeToken;
    AggregatorV2V3Interface sequencer;
}

/// @notice Hooks parameters for hooks deployment.
/// @param factory Hooks factory address.
/// @param owner Initial owner address.
/// @param minDailyValue The fraction of value that the vault has to retain per day
///                      in the course of submissions.
/// @param targetSighashAllowlist Array of target contract and sighash combinations to allow.
struct HooksParameters {
    address factory;
    address owner;
    uint256 minDailyValue;
    TargetSighashData[] targetSighashAllowlist;
}

File 23 of 23 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

Settings
{
  "remappings": [
    "src/=src/",
    "test/=test/",
    "@chainlink/=src/v2/dependencies/chainlink/",
    "@openzeppelin/=src/v2/dependencies/openzeppelin/",
    "@uniswap/v3-periphery/=lib/v3-periphery/",
    "@uniswap/v3-core/=lib/v3-core/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "v3-core/=lib/v3-core/",
    "v3-periphery/=lib/v3-periphery/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "evmVersion": "shanghai",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"vault_","type":"address"},{"components":[{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"uint256","name":"heartbeat","type":"uint256"},{"internalType":"bool","name":"isERC4626","type":"bool"},{"internalType":"contract AggregatorV2V3Interface","name":"oracle","type":"address"}],"internalType":"struct IAssetRegistry.AssetInformation[]","name":"assets_","type":"tuple[]"},{"internalType":"contract IERC20","name":"numeraireToken_","type":"address"},{"internalType":"contract IERC20","name":"feeToken_","type":"address"},{"internalType":"contract IERC20","name":"wrappedNativeToken_","type":"address"},{"internalType":"contract AggregatorV2V3Interface","name":"sequencer_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"Aera__AssetIsAlreadyRegistered","type":"error"},{"inputs":[{"internalType":"address","name":"erc4626Asset","type":"address"}],"name":"Aera__AssetIsUnderlyingAssetOfERC4626","type":"error"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"Aera__AssetNotRegistered","type":"error"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"Aera__AssetOrderIsIncorrect","type":"error"},{"inputs":[],"name":"Aera__AssetRegistryInitialOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"Aera__AssetRegistryOwnerIsGuardian","type":"error"},{"inputs":[],"name":"Aera__AssetRegistryOwnerIsVault","type":"error"},{"inputs":[{"internalType":"address","name":"feeToken","type":"address"}],"name":"Aera__CannotRemoveFeeToken","type":"error"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"Aera__CannotRemoveNumeraireToken","type":"error"},{"inputs":[{"internalType":"address","name":"wrappedNativeToken","type":"address"}],"name":"Aera__CannotRemoveWrappedNativeToken","type":"error"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"Aera__ERC20OracleIsZeroAddress","type":"error"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"Aera__ERC4626OracleIsNotZeroAddress","type":"error"},{"inputs":[{"internalType":"address","name":"feeToken","type":"address"}],"name":"Aera__FeeTokenIsERC4626","type":"error"},{"inputs":[{"internalType":"address","name":"feeToken","type":"address"}],"name":"Aera__FeeTokenIsNotRegistered","type":"error"},{"inputs":[],"name":"Aera__GracePeriodNotOver","type":"error"},{"inputs":[{"internalType":"uint256","name":"max","type":"uint256"}],"name":"Aera__NumberOfAssetsExceedsMaximum","type":"error"},{"inputs":[],"name":"Aera__NumeraireOracleIsNotZeroAddress","type":"error"},{"inputs":[],"name":"Aera__NumeraireTokenIsERC4626","type":"error"},{"inputs":[{"internalType":"address","name":"numeraireToken","type":"address"}],"name":"Aera__NumeraireTokenIsNotRegistered","type":"error"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"uint256","name":"heartbeat","type":"uint256"},{"internalType":"bool","name":"isERC4626","type":"bool"},{"internalType":"contract AggregatorV2V3Interface","name":"oracle","type":"address"}],"internalType":"struct IAssetRegistry.AssetInformation","name":"asset","type":"tuple"},{"internalType":"int256","name":"actual","type":"int256"}],"name":"Aera__OraclePriceIsInvalid","type":"error"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"uint256","name":"heartbeat","type":"uint256"},{"internalType":"bool","name":"isERC4626","type":"bool"},{"internalType":"contract AggregatorV2V3Interface","name":"oracle","type":"address"}],"internalType":"struct IAssetRegistry.AssetInformation","name":"asset","type":"tuple"},{"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"Aera__OraclePriceIsTooOld","type":"error"},{"inputs":[],"name":"Aera__SequencerIsDown","type":"error"},{"inputs":[],"name":"Aera__UnderlyingAssetIsItselfERC4626","type":"error"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"underlyingAsset","type":"address"}],"name":"Aera__UnderlyingAssetIsNotRegistered","type":"error"},{"inputs":[],"name":"Aera__VaultIsZeroAddress","type":"error"},{"inputs":[{"internalType":"address","name":"wrappedNativeToken","type":"address"}],"name":"Aera__WrappedNativeTokenIsERC4626","type":"error"},{"inputs":[{"internalType":"address","name":"wrappedNativeToken","type":"address"}],"name":"Aera__WrappedNativeTokenIsNotRegistered","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"components":[{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"uint256","name":"heartbeat","type":"uint256"},{"internalType":"bool","name":"isERC4626","type":"bool"},{"internalType":"contract AggregatorV2V3Interface","name":"oracle","type":"address"}],"indexed":false,"internalType":"struct IAssetRegistry.AssetInformation","name":"assetInfo","type":"tuple"}],"name":"AssetAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"}],"name":"AssetRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"components":[{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"uint256","name":"heartbeat","type":"uint256"},{"internalType":"bool","name":"isERC4626","type":"bool"},{"internalType":"contract AggregatorV2V3Interface","name":"oracle","type":"address"}],"indexed":false,"internalType":"struct IAssetRegistry.AssetInformation[]","name":"assets","type":"tuple[]"},{"indexed":true,"internalType":"address","name":"numeraireToken","type":"address"},{"indexed":false,"internalType":"address","name":"feeToken","type":"address"},{"indexed":false,"internalType":"address","name":"wrappedNativeToken","type":"address"},{"indexed":false,"internalType":"address","name":"sequencer","type":"address"}],"name":"Created","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Sweep","type":"event"},{"inputs":[],"name":"GRACE_PERIOD_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_ASSETS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"uint256","name":"heartbeat","type":"uint256"},{"internalType":"bool","name":"isERC4626","type":"bool"},{"internalType":"contract AggregatorV2V3Interface","name":"oracle","type":"address"}],"internalType":"struct IAssetRegistry.AssetInformation","name":"asset","type":"tuple"}],"name":"addAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"assets","outputs":[{"components":[{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"uint256","name":"heartbeat","type":"uint256"},{"internalType":"bool","name":"isERC4626","type":"bool"},{"internalType":"contract AggregatorV2V3Interface","name":"oracle","type":"address"}],"internalType":"struct IAssetRegistry.AssetInformation[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numYieldAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numeraireToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"removeAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sequencer","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"spotPrices","outputs":[{"components":[{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"uint256","name":"spotPrice","type":"uint256"}],"internalType":"struct IAssetRegistry.AssetPriceReading[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sweep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wrappedNativeToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x6080604081815260049182361015610015575f80fd5b5f92833560e01c91826301ffc9a71461148c5750816317fcb39b146114485781631fb6c52d14611404578163210663d014610f955781634a5e42b114610bf35781634c478a5614610bd45781635c1bba3814610b90578163647846a514610b4c5781636ea056a91461094e578163715018a6146108ec57816371a973051461085a57816376b1d08f1461083e57816379ba5097146107675781638da5cb5b14610741578163e30c397814610719578163ed2f8603146106fc578163edf94acd146102ac578163f2fde38b14610139575063fbfa77cf146100f3575f80fd5b34610135578160031936011261013557602090516001600160a01b037f0000000000000000000000008624f61cc6e5a86790e173712afdd480fa8b73ba168152f35b5080fd5b919050346102a85760203660031901126102a85761015561152a565b9161015e611adc565b6001600160a01b039182807f0000000000000000000000008624f61cc6e5a86790e173712afdd480fa8b73ba1694169380851461028157602083918351928380927f452a93200000000000000000000000000000000000000000000000000000000082525afa908115610277579084918791610249575b501684146102235750506101e7611adc565b816001600160a01b031960015416176001558254167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227008380a380f35b517f54ae5328000000000000000000000000000000000000000000000000000000008152fd5b61026a915060203d8111610270575b6102628183611590565b810190611740565b5f6101d5565b503d610258565b82513d88823e3d90fd5b50517f687615e5000000000000000000000000000000000000000000000000000000008152fd5b8280fd5b839150346101355781600319360112610135576001600160a01b039281847f0000000000000000000000000000000000000000000000000000000000000000168061061b575b505060028054926003548403938085116106085761032b6103168697959497611670565b9561032385519788611590565b808752611670565b60209690601f1901855b8181106105e05750859390507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28916845b8486106103ba5750505050505080519380850191818652845180935281818701950193905b8382106103985786860387f35b845180518916875283015186840152948501949382019360019091019061038b565b8a846103c9889c999a9c611623565b50015460ff9081166105d45783826103e08a611623565b5054160361043b57506103f287611623565b50541688519061040182611544565b8152670de0b6b3a76400008882015261041a828b611889565b52610425818a611889565b505b60018091019501935b939498969598610366565b848961045761045261044c8c611623565b50611688565b61189d565b93886104628c611623565b50015460081c168c51928380927f313ce5670000000000000000000000000000000000000000000000000000000082525afa9081156105ca578d91610590575b506012911681811015610534578103908111610521576104c19061187b565b9081810291818304149015171561050e575b8b6104dd88611623565b505416908951916104ed83611544565b8252888201526104fd828b611889565b52610508818a611889565b50610427565b60248b601186634e487b7160e01b835252fd5b60248c601187634e487b7160e01b835252fd5b818193929311610547575b5090506104d3565b601119810190811161057d5761055c9061187b565b91821561056c575004808d61053f565b634e487b7160e01b8d52855260248cfd5b60248d601188634e487b7160e01b835252fd5b90508981813d83116105c3575b6105a78183611590565b810103126105bf575181811681036105bf578e6104a2565b8c80fd5b503d61059d565b8b513d8f823e3d90fd5b50509460010193610430565b978596988196516105f081611544565b8a81528a8382015282828b0101520197959497610335565b602486601184634e487b7160e01b835252fd5b60a090835192838092633fabe5a360e21b82525afa9081156106f257849085926106be575b5061069757610e10810180911161068457421061065e5781856102f2565b517fa4a7b2a4000000000000000000000000000000000000000000000000000000008152fd5b602484601185634e487b7160e01b835252fd5b50517f73460943000000000000000000000000000000000000000000000000000000008152fd5b90506106e1915060a03d81116106eb575b6106d98183611590565b810190611846565b5050915086610640565b503d6106cf565b82513d86823e3d90fd5b50503461013557816003193601126101355760209051610e108152f35b5050346101355781600319360112610135576020906001600160a01b03600154169051908152f35b5050346101355781600319360112610135576001600160a01b0360209254169051908152f35b919050346102a857826003193601126102a857600154916001600160a01b039133838516036107d55750506001600160a01b0319809216600155825491339083161783553391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e657200000000000000000000000000000000000000000000006064820152fd5b5050346101355781600319360112610135576020905160328152f35b8284346108e957806003193601126108e957906108756116ca565b81519160208080850192818652845180945285019301945b82811061089a5784840385f35b909192826080826108da6001948a51606090816001600160a01b039182815116855260208101516020860152604081015115156040860152015116910152565b0196019101949291909461088d565b80fd5b83346108e957806003193601126108e957610905611adc565b806001600160a01b036001600160a01b0319806001541660015582549081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b8391503461013557826003193601126101355761096961152a565b60243591610975611adc565b6001600160a01b038216806109e55750506109df83948480807fab2246061d7b0dd3631d037e3f6da75782ae489eeb9f6af878a4b25df9b07c779787335af1506109bd611a9d565b505b5192839283602090939291936001600160a01b0360408201951681520152565b0390a180f35b85517fa9059cbb0000000000000000000000000000000000000000000000000000000060208083019182523360248401526044808401889052835292610a7d929188908190610a35606486611590565b8b5194610a4186611544565b8786527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656488870152519082855af1610a77611a9d565b91611b33565b8051828115918215610b28575b5050905015610ac05750506109df7fab2246061d7b0dd3631d037e3f6da75782ae489eeb9f6af878a4b25df9b07c7793946109bf565b6084925085519162461bcd60e51b8352820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b8380929350010312610b48578101518015158103610b4857808289610a8a565b8580fd5b505034610135578160031936011261013557602090516001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168152f35b505034610135578160031936011261013557602090516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b5050346101355781600319360112610135576020906003549051908152f35b919050346102a85760209182600319360112610f9157610c1161152a565b91610c1a611adc565b6001600160a01b0380931692807f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168414610f6257807f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168414610f3357807f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168414610f0457600291825491875b83811080610eee575b15610cbf57600101610ca9565b9394959683851015610ebf5790859291610cd886611623565b5060ff9485910154165f14610ddb5750505050610cf660035461175f565b6003555b5f1991818301918211610dc8575b818110610d8757505081548015610d74570191610d2483611623565b919091610d6257508181868093558260018201550155557f37803e2125c48ee96c38ddf04e826daf335b0e1603579040fd275aba6d06b6fc8280a280f35b8580602492634e487b7160e01b825252fd5b602486603186634e487b7160e01b835252fd5b6001810190818111610db557610db090610daa610da384611623565b5091611623565b9061177f565b610d08565b602488601188634e487b7160e01b835252fd5b602487601187634e487b7160e01b835252fd5b895b858110610dee575050505050610cfa565b8681141580610eaa575b80610e46575b610e0a57600101610ddd565b888484610e18602494611623565b5054169051917f21d8a3aa000000000000000000000000000000000000000000000000000000008352820152fd5b50888284610e5384611623565b5054168651928380926338d52e0f60e01b82525afa908c8215610e9f578c92869290610e82575b501614610dfe565b610e999150853d8711610270576102628183611590565b5f610e7a565b8651903d90823e3d90fd5b508488610eb683611623565b50015416610df8565b602487898551917f5c753429000000000000000000000000000000000000000000000000000000008352820152fd5b508682610efa83611623565b5054161415610cb2565b509160249251917f999c5225000000000000000000000000000000000000000000000000000000008352820152fd5b509160249251917fb56dc787000000000000000000000000000000000000000000000000000000008352820152fd5b509160249251917fb83266ba000000000000000000000000000000000000000000000000000000008352820152fd5b8380fd5b9050346102a85760803660031901126102a857610fb0611adc565b6002549060328210156113d457610fc6366115b2565b808401511561137d576001600160a01b03908160608201511661134b5750505b835b8281106112ca575b6044358015158103610b48576111ac575b61100a366115b2565b928181036110f7575050600254680100000000000000008110156110e4578261103c8260016110429401600255611623565b90611a0e565b828201516110b7575b506080816110b36001600160a01b037f16d983bc025f9bf2de81704e1b56397e8bab39991b2e9db2b8714a60dcd022b794511694518092606090816001600160a01b039182815116855260208101516020860152604081015115156040860152015116910152565ba280f35b600354905f1982146110d15750600101600355608061104b565b846011602492634e487b7160e01b835252fd5b602485604184634e487b7160e01b835252fd5b5f1990808201908082116111865761110e82611623565b5090680100000000000000008110156111995786939291610daa8260016111389401600255611623565b83811161115257505061103c61114d92611623565b611042565b908092508101818111611186579061117961116f61117e93611623565b50610daa83611623565b61175f565b908491611138565b602488601187634e487b7160e01b835252fd5b602489604188634e487b7160e01b835252fd5b6111b5366115b2565b6111bd6116ca565b805191846001600160a01b03916020838251168a51938480926338d52e0f60e01b82525afa9182156112c0578a926112a0575b5089945b80861061127a575b85101561124157505050859161121191611889565b51015115611001575082517fdf22b1de000000000000000000000000000000000000000000000000000000008152fd5b5188517f02b8ed3f0000000000000000000000000000000000000000000000000000000081529083168188015291166024820152604490fd5b94836112868287611889565b5151168484161461129a57600101946111f4565b946111fc565b6112b991925060203d8111610270576102628183611590565b905f6111f0565b89513d8c823e3d90fd5b6112d261160d565b6112db82611623565b50906001600160a01b038080935416911610611345576112f961160d565b908061130484611623565b50541691161461131657600101610fe8565b602492508351917f3859e924000000000000000000000000000000000000000000000000000000008352820152fd5b50610ff0565b5193517f6e0ec65b00000000000000000000000000000000000000000000000000000000815293169083015250602490fd5b6001600160a01b0380606083015116156113a1575061139b9061189d565b50610fe6565b60249350849151169051917ffe8c11c5000000000000000000000000000000000000000000000000000000008352820152fd5b60249060328451917fa307ce42000000000000000000000000000000000000000000000000000000008352820152fd5b505034610135578160031936011261013557602090516001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168152f35b505034610135578160031936011261013557602090516001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168152f35b8491346102a85760203660031901126102a857357fffffffff0000000000000000000000000000000000000000000000000000000081168091036102a857602092507f1c64cd8f000000000000000000000000000000000000000000000000000000008114908115611500575b5015158152f35b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014836114f9565b600435906001600160a01b038216820361154057565b5f80fd5b6040810190811067ffffffffffffffff82111761156057604052565b634e487b7160e01b5f52604160045260245ffd5b6080810190811067ffffffffffffffff82111761156057604052565b90601f8019910116810190811067ffffffffffffffff82111761156057604052565b608090600319011261154057604051906115cb82611574565b6001600160a01b038260043582811681036115405781526024356020820152604435801515810361154057604082015260643591821682036115405760600152565b6004356001600160a01b03811681036115405790565b60025481101561165c5760039060025f52027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01905f90565b634e487b7160e01b5f52603260045260245ffd5b67ffffffffffffffff81116115605760051b60200190565b9060405161169581611574565b6060819360026001600160a01b039182815416855260018101546020860152015460ff81161515604085015260081c16910152565b600254906116d782611670565b916116e56040519384611590565b80835260025f90815260207f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8186015b848410611723575050505050565b60038360019261173285611688565b815201920193019290611715565b9081602091031261154057516001600160a01b03811681036115405790565b801561176b575f190190565b634e487b7160e01b5f52601160045260245ffd5b919061181c57808203611790575050565b61181a916002806001600160a01b0392838554166001600160a01b0319825416178155600185015460018201550192016117da60ff825416849060ff801983541691151516179055565b5460081c1674ffffffffffffffffffffffffffffffffffffffff001974ffffffffffffffffffffffffffffffffffffffff0083549260081b169116179055565b565b634e487b7160e01b5f525f60045260245ffd5b519069ffffffffffffffffffff8216820361154057565b908160a09103126115405761185a8161182f565b9160208201519160408101519161187860806060840151930161182f565b90565b604d811161176b57600a0a90565b805182101561165c5760209160051b010190565b60049060a06001600160a01b0360608301511660405193848092633fabe5a360e21b82525afa8015611a03575f9283916119dc575b505f831315611979576020820151801515908161195a575b506118f457505090565b604080517fbc29ff2b00000000000000000000000000000000000000000000000000000000815283516001600160a01b03908116600483015260208501516024830152918401511515604482015260609093015116606483015260a492505b6084820152fd5b9050810180821161176b57610e10810180911161176b5742115f6118ea565b50604080517f25c4b0b500000000000000000000000000000000000000000000000000000000815282516001600160a01b03908116600483015260208401516024830152918301511515604482015260609092015116606482015260a491611953565b90506119f791925060a03d81116106eb576106d98183611590565b5093925050915f6118d2565b6040513d5f823e3d90fd5b919061181c5761181a91606060026001600160a01b0392838551166001600160a01b0319825416178155602085015160018201550192611a6060408201511515859060ff801983541691151516179055565b0151825474ffffffffffffffffffffffffffffffffffffffff001916911660081b74ffffffffffffffffffffffffffffffffffffffff0016179055565b3d15611ad7573d9067ffffffffffffffff82116115605760405191611acc601f8201601f191660200184611590565b82523d5f602084013e565b606090565b6001600160a01b035f54163303611aef57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b91929015611b945750815115611b47575090565b3b15611b505790565b606460405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b825190915015611ba75750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401525f935b828510611beb575050604492505f838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611bc956fea2646970667358221220dcc00f8f3db01542a4c841c7d12c5b86e9fd0ea17ed2c8fbc951a314b8ffe05464736f6c63430008150033

Deployed Bytecode Sourcemap

395:20531:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;728:30:0;395:20531;;;;;;;;;;;;;;;;;-1:-1:-1;;395:20531:0;;;;;;:::i;:::-;1090:65:15;;;:::i;:::-;-1:-1:-1;;;;;20818:5:0;;;;395:20531;;;20334:16;;;;20330:87;;395:20531;;;;;20446:25;;;;395:20531;20446:25;;;;;;;;;;;;;;;;395:20531;;;20485:18;;20481:92;;1090:65:15;;;;:::i;:::-;395:20531:0;-1:-1:-1;;;;;;1228:24:16;395:20531:0;;;1228:24:16;395:20531:0;;;;1267:43:16;;;;395:20531:0;;20481:92;395:20531;20526:36;;;;20446:25;;;;395:20531;20446:25;;;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;395:20531;;;;;;;;;20330:87;395:20531;;20373:33;;;;395:20531;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;13745:9:0;;;;395:20531;13737:32;13733:577;;395:20531;14372:7;;;395:20531;;;14481:14;395:20531;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;-1:-1:-1;;395:20531:0;;;;;;;;-1:-1:-1;14571:17:0;;14603:13;-1:-1:-1;14839:14:0;395:20531;;14571:17;14618:13;;;;;;395:20531;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14603:13;14652:10;;;;;;;;;:::i;:::-;-1:-1:-1;14652:20:0;395:20531;;;;;14648:153;;14819:10;;;;;:::i;:::-;-1:-1:-1;395:20531:0;;14819:34;;;14992:10;;;;:::i;:::-;395:20531;;;;;;;;;:::i;:::-;;;211:4:1;14945:118:0;;;395:20531;14929:134;;;;:::i;:::-;;;;;;:::i;:::-;;14815:947;395:20531;;;;;;14603:13;;;;;;;;;;14815:947;15128:10;;15110:29;395:20531;15128:10;;;:::i;:::-;395:20531;;:::i;:::-;15110:29;:::i;:::-;15174:10;;;;;:::i;:::-;:17;;395:20531;;;;;;15174:28;;;;395:20531;15174:28;;;;;;;;;;;;;14815:947;-1:-1:-1;15242:2:0;;395:20531;15225:19;;;15242:2;;;395:20531;;;;;;;15357:27;;;:::i;:::-;395:20531;;;;;;;;;;;;;;;15221:372;15674:10;;;;:::i;:::-;395:20531;;;;;;;;;;:::i;:::-;;;15627:120;;;395:20531;15611:136;;;;:::i;:::-;;;;;;:::i;:::-;;14815:947;;395:20531;;;;;-1:-1:-1;;;395:20531:0;;;;;;;;;-1:-1:-1;;;395:20531:0;;;;15221:372;15414:19;;;;;;15410:183;;15221:372;;;;;;15410:183;-1:-1:-1;;395:20531:0;;;;;;;15546:27;;;:::i;:::-;395:20531;;;;;;;15410:183;;;;395:20531;-1:-1:-1;;;395:20531:0;;;;;;;;;;;;-1:-1:-1;;;395:20531:0;;;;15174:28;;;;;;;;;;;;;;;;:::i;:::-;;;395:20531;;;;;;;;;;;;15174:28;;;395:20531;;;;15174:28;;;;;;395:20531;;;;;;;;;14648:153;395:20531;;;;;14778:8;;;395:20531;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;395:20531:0;;;;13733:577;13811:27;395:20531;;;13811:27;;;;-1:-1:-1;;;13811:27:0;;;;;;;;;395:20531;;;13811:27;;;13733:577;13962:11;13958:80;;686:4;395:20531;;;;;;;14185:15;:47;14181:119;;13733:577;;;;14181:119;395:20531;14259:26;;;;395:20531;;;;;-1:-1:-1;;;395:20531:0;;;;13958:80;395:20531;;14000:23;;;;13811:27;;;;;;;;;;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;;;;;395:20531;;;;;;;;;;;;;;;;;;;;;;;;;;686:4;395:20531;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;926:13:16;395:20531:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;395:20531:0;;;;;;;;;;;;;;;;;;;;;;;;;926:13:16;395:20531:0;;-1:-1:-1;;;;;736:10:8;;395:20531:0;;;1833:24:16;395:20531:0;;;;-1:-1:-1;;;;;;395:20531:0;;;926:13:16;395:20531:0;;;736:10:8;;395:20531:0;;;;;;736:10:8;395:20531:0;;2639:40:15;;;;395:20531:0;;;;;;;;;-1:-1:-1;;;395:20531:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;549:2;395:20531;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;395:20531:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1090:65:15;;:::i;:::-;395:20531:0;-1:-1:-1;;;;;;;;;;;395:20531:0;1583:20:16;395:20531:0;;1583:20:16;395:20531:0;;;;;;;;;2639:40:15;;;;395:20531:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;1090:65:15;;;:::i;:::-;-1:-1:-1;;;;;395:20531:0;;548:19:2;395:20531:0;;583:10:2;;720:20;583:10;;;;;720:20;583:10;;;:34;;;;;:::i;:::-;;544:161;395:20531:0;720:20:2;;;;395:20531:0;;;;;;-1:-1:-1;;;;;395:20531:0;;;;;;;;;;720:20:2;;;;395:20531:0;;544:161:2;395:20531:0;;;;1050:58:17;;;;;;675:10:2;395:20531:0;1050:58:17;;395:20531:0;;;;;;;;1050:58:17;;395:20531:0;5670:69:7;;395:20531:0;1050:58:17;;;;;395:20531:0;;1050:58:17;:::i;:::-;395:20531:0;;;;;;:::i;:::-;;;;;;;;;5621:31:7;;;;;;;;:::i;:::-;5670:69;;:::i;:::-;395:20531:0;;5801:22:17;;;:56;;;;;544:161:2;395:20531:0;;;;;;;544:161:2;;720:20;;544:161;;;;395:20531:0;;;;;;;-1:-1:-1;;;395:20531:0;;;;;;;;;;;;;;;;;;;;;5801:56:17;5827:30;;;;;;395:20531:0;;;;5827:30:17;;395:20531:0;;;;;;;;5801:56:17;;;;;395:20531:0;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;870:32:0;395:20531;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1050:50:0;395:20531;;;;;;;;;;;;;;;;;;;;1322:29;395:20531;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1090:65:15;;;:::i;:::-;-1:-1:-1;;;;;395:20531:0;;;11153:14;;;395:20531;11136:32;;11132:109;;11342:8;;395:20531;11325:26;;11321:97;;11530:18;;395:20531;11513:36;;11509:117;;11656:7;395:20531;;;11680:25;;11747:232;11779:25;;;:91;;;11747:232;11779:91;;;395:20531;;11747:232;;11779:91;;;;;12050:26;;;;12046:95;;12212:22;;;;;;;:::i;:::-;395:20531;;12212:32;;;;395:20531;;12208:587;395:20531;;;;;;;12260:16;;395:20531;12260:16;:::i;:::-;;395:20531;12208:587;-1:-1:-1;;395:20531:0;;;;;;;;;12963:13;;;;;;395:20531;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;13249:19;;;;395:20531;;;;;;;-1:-1:-1;;;395:20531:0;;;;;;;;;-1:-1:-1;;;395:20531:0;;;;12936:25;395:20531;;;;;;;;;13024:31;13037:18;13024:10;13037:18;;;:::i;:::-;13024:10;;;:::i;:::-;:31;;:::i;:::-;12936:25;;395:20531;;;;;-1:-1:-1;;;395:20531:0;;;;;;;;;-1:-1:-1;;;395:20531:0;;;;12208:587;12312:13;12327;;;;;;12208:587;;;;;;;12312:13;12386:18;;;;:42;;;12312:13;12386:122;;;12312:13;12361:324;;395:20531;;12312:13;;12361:324;12627:10;;;;395:20531;12627:10;;:::i;:::-;395:20531;;;;;12556:110;;;;;;395:20531;12556:110;12386:122;12473:10;;;;;;;:::i;:::-;395:20531;;;;;12456:43;;;;-1:-1:-1;;;12456:43:0;;;;;;;;;;;;;;;;;12386:122;395:20531;;12456:52;12386:122;;12456:43;;;;;;;;;;;;;;:::i;:::-;;;;;395:20531;;;;;;;;;;12386:42;12408:10;;;;;;:::i;:::-;:20;;395:20531;;12386:42;;12046:95;395:20531;;;;;12099:31;;;;;;395:20531;12099:31;11779:91;11832:22;;;;;;:::i;:::-;395:20531;;;11824:46;;11779:91;;11509:117;395:20531;;;;;11572:43;;;;;;395:20531;11572:43;11321:97;395:20531;;;;;11374:33;;;;;;395:20531;11374:33;11132:109;395:20531;;;;;11191:39;;;;;;395:20531;11191:39;395:20531;;;;;;;;;;;;-1:-1:-1;;395:20531:0;;;;1090:65:15;;:::i;:::-;9830:7:0;395:20531;9932:23;549:2;9932:23;;;9928:107;;395:20531;;;:::i;:::-;16472:15;;;395:20531;;;;-1:-1:-1;;;;;16580:12:0;;;;;395:20531;;16568:176;;16468:604;;;10145:13;10227;;;;;;10220:390;10700:15;395:20531;;;;;;;;10696:83;;10220:390;395:20531;;;:::i;:::-;19347:18;;;;;;395:20531;;9830:7;395:20531;;;;;;;;;;;;;;9830:7;395:20531;;:::i;:::-;;;:::i;:::-;19909:15;;;395:20531;19905:62;;19343:495;395:20531;;;;-1:-1:-1;;;;;20010:39:0;395:20531;;;;;;;;;;-1:-1:-1;;;;;395:20531:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20010:39;395:20531;;19905:62;19940:16;395:20531;;-1:-1:-1;;395:20531:0;;;;-1:-1:-1;395:20531:0;;19940:16;395:20531;;19905:62;;395:20531;;;;;-1:-1:-1;;;395:20531:0;;;;;;;;;-1:-1:-1;;;395:20531:0;;;;19343:495;-1:-1:-1;;395:20531:0;;;;;;;;;;19575:22;;;:::i;:::-;395:20531;;;;;;;;;;;;;;;;;;9830:7;395:20531;;:::i;:::-;19676:9;;;;;19805:14;;;:22;:14;;:::i;:22::-;19343:495;;19687:3;395:20531;;;;;;;;;;;19758:18;19745:31;19758:18;19687:3;19758:18;;:::i;:::-;19745:10;;;;:::i;:31::-;19687:3;:::i;:::-;19649:25;;;;;395:20531;;;;;-1:-1:-1;;;395:20531:0;;;;;;;;;-1:-1:-1;;;395:20531:0;;;;10696:83;395:20531;;;:::i;:::-;;;:::i;:::-;;;;;-1:-1:-1;;;;;395:20531:0;18301:38;395:20531;;;;;;18301:38;;;;-1:-1:-1;;;18301:38:0;;;;;;;;;;;;;10696:83;18349:27;;18387:308;18394:27;;;;;;18387:308;18709:28;;;18705:171;;18890:30;;;;;;;;:::i;:::-;;:40;395:20531;18886:116;10696:83;18886:116;395:20531;;;18953:38;;;;18705:171;395:20531;;;18760:105;;;395:20531;;;18760:105;;;395:20531;;;;;;;10700:15;;18760:105;18387:308;18506:30;;;;;;:::i;:::-;;395:20531;;;;;18459:84;18438:158;;395:20531;;18387:308;;;18438:158;18576:5;;;18301:38;;;;;;;;;;;;;;;:::i;:::-;;;;;;395:20531;;;;;;;;;10220:390;10261:11;;:::i;:::-;10275:10;;;:::i;:::-;395:20531;;-1:-1:-1;;;;;395:20531:0;;;;;;;10261:30;10257:74;;10419:11;;:::i;:::-;10434:10;;;;;:::i;:::-;395:20531;;;;;10419:31;10415:110;;395:20531;;10220:390;;10415:110;395:20531;;;;;10477:33;;;;;;395:20531;10477:33;10257:74;10311:5;;;16568:176;395:20531;;;16634:95;;;395:20531;;16634:95;;;395:20531;-1:-1:-1;395:20531:0;;16634:95;16468:604;-1:-1:-1;;;;;16850:12:0;;;;395:20531;;16842:35;16838:133;;17037:24;;;;:::i;:::-;;16468:604;;16838:133;395:20531;;;;;;;;;16904:52;;;;;;395:20531;16904:52;9928:107;395:20531;;549:2;395:20531;;9978:46;;;;;;395:20531;9978:46;395:20531;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;798:38:0;395:20531;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;947:42:0;395:20531;;;;;;;;;;;;-1:-1:-1;;395:20531:0;;;;;;;;;;;;;;16088:47;;16103:32;16088:47;;:99;;;;;395:20531;;;;;;;16088:99;978:25:9;963:40;;;16088:99:0;;;395:20531;;;;-1:-1:-1;;;;;395:20531:0;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o;:::-;-1:-1:-1;;;395:20531:0;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;1050:58:17;;395:20531:0;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;395:20531:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;-1:-1:-1;;;;;395:20531:0;;;;;;;:::o;:::-;9830:7;395:20531;;;;;;;;9830:7;-1:-1:-1;395:20531:0;;;;;-1:-1:-1;395:20531:0;:::o;:::-;-1:-1:-1;;;395:20531:0;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;:::i;:::-;;;;;-1:-1:-1;;;;;395:20531:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;9830:7;395:20531;;;;;:::i;:::-;;;;;;;;:::i;:::-;;;;9830:7;-1:-1:-1;395:20531:0;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;395:20531:0;;;;;;;:::o;:::-;;;;;-1:-1:-1;;395:20531:0;;:::o;:::-;-1:-1:-1;;;395:20531:0;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;-1:-1:-1;;;;;395:20531:0;;;;;-1:-1:-1;;;;;;395:20531:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;395:20531:0;;;;;;;;;;;;;;:::o;:::-;-1:-1:-1;;;395:20531:0;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;17242:585::-;17417:30;17242:585;17417:30;-1:-1:-1;;;;;17417:12:0;;;395:20531;;;;17417:30;;;;-1:-1:-1;;;17417:30:0;;;;;;;;-1:-1:-1;;;17417:30:0;;;17242:585;17495:11;-1:-1:-1;17495:11:0;;;17491:90;;17607:15;;;395:20531;17607:19;;;:94;;;;17242:585;17590:197;;;17797:23;;17242:585;:::o;17590:197::-;395:20531;;;17733:43;;;395:20531;;-1:-1:-1;;;;;395:20531:0;;;17417:30;17733:43;;395:20531;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;395:20531:0;;;;;17733:43;17607:94;395:20531;;;;;;;;;17676:7;395:20531;;;;;;;17686:15;-1:-1:-1;17607:94:0;;;17491:90;-1:-1:-1;395:20531:0;;;17529:41;;;395:20531;;-1:-1:-1;;;;;395:20531:0;;;17417:30;17529:41;;395:20531;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17417:30;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;395:20531;;;-1:-1:-1;395:20531:0;;;;;;;;;;;;;;-1:-1:-1;;;;;395:20531:0;;;;;-1:-1:-1;;;;;;395:20531:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;395:20531:0;;;;;;;;;;;;;;;;;;;;;;;;;;;1050:58:17;395:20531:0;;-1:-1:-1;;395:20531:0;;;;;:::i;:::-;;;;-1:-1:-1;395:20531:0;;;;:::o;:::-;;;:::o;1401:132:15:-;-1:-1:-1;;;;;1309:6:15;395:20531:0;;736:10:8;1465:23:15;395:20531:0;;1401:132:15:o;395:20531:0:-;;;;-1:-1:-1;;;395:20531:0;;;;;;;;;;;;;;;;;;7865:644:7;;;;8075:427;;;395:20531:0;;;8107:22:7;8103:290;;8407:17;;:::o;8103:290::-;1746:19;:23;395:20531:0;;8407:17:7;:::o;395:20531:0:-;;;;-1:-1:-1;;;395:20531:0;;;;;;;;;;;;;;;;;;8075:427:7;395:20531:0;;;;-1:-1:-1;9212:21:7;:17;;9387:145;;;;;;;9208:388;395:20531:0;;9564:20:7;-1:-1:-1;;;9564:20:7;;395:20531:0;;9564:20:7;;;;395:20531:0;;;;;;;;;9232:1:7;395:20531:0;;;;;;;;;;;;9232:1:7;395:20531:0;;;;;;;1050:58:17;;395:20531:0;;;;;9564:20:7;;;;395:20531:0;;;;;;;;;;;;;;;;;;;-1:-1:-1;395:20531:0;

Swarm Source

ipfs://dcc00f8f3db01542a4c841c7d12c5b86e9fd0ea17ed2c8fbc951a314b8ffe054

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.