Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
20794744 | 158 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x15cACEaF...Bfce2c210 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
AeraVaultV2
Compiler Version
v0.8.21+commit.d9974bed
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.21; import "@openzeppelin/ERC165.sol"; import "@openzeppelin/ERC165Checker.sol"; import "@openzeppelin/IERC4626.sol"; import "@openzeppelin/Math.sol"; import "@openzeppelin/Ownable2Step.sol"; import "@openzeppelin/Pausable.sol"; import "@openzeppelin/ReentrancyGuard.sol"; import "@openzeppelin/SafeERC20.sol"; import "./interfaces/IAeraV2Factory.sol"; import "./interfaces/IHooks.sol"; import "./interfaces/IVault.sol"; import {ONE} from "./Constants.sol"; /// @title AeraVaultV2. /// @notice Aera Vault V2 Vault contract. contract AeraVaultV2 is IVault, ERC165, Ownable2Step, Pausable, ReentrancyGuard { using SafeERC20 for IERC20; /// @notice Largest possible fee earned proportion per one second. /// @dev 0.0000001% per second, i.e. 3.1536% per year. /// 0.0000001% * (365 * 24 * 60 * 60) = 3.1536% /// or 3.16224% per year in leap years. uint256 private constant _MAX_FEE = 10 ** 9; /// @notice Number of decimals for fee token. uint256 private immutable _feeTokenDecimals; /// @notice Number of decimals for numeraire token. uint256 private immutable _numeraireTokenDecimals; /// @notice Fee token used by asset registry. IERC20 private immutable _feeToken; /// @notice Fee per second in 18 decimal fixed point format. uint256 public immutable fee; /// @notice Asset registry address. IAssetRegistry public immutable assetRegistry; /// @notice The address of wrapped native token. address public immutable wrappedNativeToken; /// STORAGE /// /// @notice Hooks module address. IHooks public hooks; /// @notice Guardian address. address public guardian; /// @notice Fee recipient address. address public feeRecipient; /// @notice True if vault has been finalized. bool public finalized; /// @notice Last measured value of assets in vault. uint256 public lastValue; /// @notice Last spot price of fee token. uint256 public lastFeeTokenPrice; /// @notice Fee earned amount for each prior fee recipient. mapping(address => uint256) public fees; /// @notice Total fee earned and unclaimed amount by all fee recipients. uint256 public feeTotal; /// @notice Last timestamp when fee index was reserved. uint256 public lastFeeCheckpoint; /// MODIFIERS /// /// @dev Throws if called by any account other than the owner or guardian. modifier onlyOwnerOrGuardian() { if (msg.sender != owner() && msg.sender != guardian) { revert Aera__CallerIsNotOwnerAndGuardian(); } _; } /// @dev Throws if called by any account other than the guardian. modifier onlyGuardian() { if (msg.sender != guardian) { revert Aera__CallerIsNotGuardian(); } _; } /// @dev Throws if called after the vault is finalized. modifier whenNotFinalized() { if (finalized) { revert Aera__VaultIsFinalized(); } _; } /// @dev Throws if hooks is not set modifier whenHooksSet() { if (address(hooks) == address(0)) { revert Aera__HooksIsZeroAddress(); } _; } /// @dev Calculate current guardian fees. modifier reserveFees() { _reserveFees(); _; } /// @dev Check insolvency of fee token was not made worse. modifier checkReservedFees() { uint256 prevFeeTokenBalance = IERC20(_feeToken).balanceOf(address(this)); _; _checkReservedFees(prevFeeTokenBalance); } /// FUNCTIONS /// constructor() Ownable() ReentrancyGuard() { ( address owner_, address assetRegistry_, address hooks_, address guardian_, address feeRecipient_, uint256 fee_ ) = IAeraV2Factory(msg.sender).parameters(); // Requirements: check provided addresses. _checkAssetRegistryAddress(assetRegistry_); _checkHooksAddress(hooks_); _checkGuardianAddress(guardian_, owner_); _checkFeeRecipientAddress(feeRecipient_, owner_); // Requirements: check that initial owner is not zero address. if (owner_ == address(0)) { revert Aera__InitialOwnerIsZeroAddress(); } // Requirements: check if fee is within bounds. if (fee_ > _MAX_FEE) { revert Aera__FeeIsAboveMax(fee_, _MAX_FEE); } // Effects: initialize vault state. wrappedNativeToken = IAeraV2Factory(msg.sender).wrappedNativeToken(); assetRegistry = IAssetRegistry(assetRegistry_); hooks = IHooks(hooks_); guardian = guardian_; feeRecipient = feeRecipient_; fee = fee_; lastFeeCheckpoint = block.timestamp; // Effects: cache numeraire and fee token decimals. _feeToken = IAssetRegistry(assetRegistry_).feeToken(); _feeTokenDecimals = IERC20Metadata(address(_feeToken)).decimals(); _numeraireTokenDecimals = IERC20Metadata(address(assetRegistry.numeraireToken())).decimals(); // Effects: set new owner. _transferOwnership(owner_); // Effects: pause vault. _pause(); // Log setting of asset registry. emit SetAssetRegistry(assetRegistry_); // Log new hooks address. emit SetHooks(hooks_); // Log the current guardian and fee recipient. emit SetGuardianAndFeeRecipient(guardian_, feeRecipient_); } /// @inheritdoc IVault function deposit(AssetValue[] calldata amounts) external override nonReentrant onlyOwner whenHooksSet whenNotFinalized reserveFees { // Hooks: before transferring assets. hooks.beforeDeposit(amounts); // Requirements: check that provided amounts are sorted by asset and unique. _checkAmountsSorted(amounts); IAssetRegistry.AssetInformation[] memory assets = assetRegistry.assets(); uint256 numAmounts = amounts.length; AssetValue memory assetValue; bool isRegistered; for (uint256 i = 0; i < numAmounts;) { assetValue = amounts[i]; (isRegistered,) = _isAssetRegistered(assetValue.asset, assets); // Requirements: check that deposited assets are registered. if (!isRegistered) { revert Aera__AssetIsNotRegistered(assetValue.asset); } // Interactions: transfer asset from owner to vault. assetValue.asset.safeTransferFrom( msg.sender, address(this), assetValue.value ); unchecked { i++; // gas savings } // Log deposit for this asset. emit Deposit(msg.sender, assetValue.asset, assetValue.value); } // Hooks: after transferring assets. hooks.afterDeposit(amounts); } /// @inheritdoc IVault function withdraw(AssetValue[] calldata amounts) external override nonReentrant onlyOwner whenHooksSet whenNotFinalized reserveFees { IAssetRegistry.AssetInformation[] memory assets = assetRegistry.assets(); // Requirements: check the withdraw request. _checkWithdrawRequest(assets, amounts); // Requirements: check that provided amounts are sorted by asset and unique. _checkAmountsSorted(amounts); // Hooks: before transferring assets. hooks.beforeWithdraw(amounts); uint256 numAmounts = amounts.length; AssetValue memory assetValue; for (uint256 i = 0; i < numAmounts;) { assetValue = amounts[i]; if (assetValue.value == 0) { unchecked { i++; // gas savings } continue; } // Interactions: withdraw assets. assetValue.asset.safeTransfer(msg.sender, assetValue.value); // Log withdrawal for this asset. emit Withdraw(msg.sender, assetValue.asset, assetValue.value); unchecked { i++; // gas savings } } // Hooks: after transferring assets. hooks.afterWithdraw(amounts); } /// @inheritdoc IVault function setGuardianAndFeeRecipient( address newGuardian, address newFeeRecipient ) external override onlyOwner whenNotFinalized reserveFees { // Requirements: check guardian and fee recipient addresses. _checkGuardianAddress(newGuardian, msg.sender); _checkFeeRecipientAddress(newFeeRecipient, msg.sender); // Effects: update guardian and fee recipient addresses. guardian = newGuardian; // slither-disable-next-line missing-zero-check feeRecipient = newFeeRecipient; // Log new guardian and fee recipient addresses. emit SetGuardianAndFeeRecipient(newGuardian, newFeeRecipient); } /// @inheritdoc IVault function setHooks(address newHooks) external override nonReentrant onlyOwner whenNotFinalized reserveFees { // Requirements: validate hooks address. _checkHooksAddress(newHooks); // Effects: decommission old hooks contract. if (address(hooks) != address(0)) { hooks.decommission(); } // Effects: set new hooks address. hooks = IHooks(newHooks); // Log new hooks address. emit SetHooks(newHooks); } /// @inheritdoc IVault /// @dev reserveFees modifier is not used to avoid reverts. function execute(Operation calldata operation) external override nonReentrant onlyOwner { // Requirements: check that the target contract is not hooks. if (operation.target == address(hooks)) { revert Aera__ExecuteTargetIsHooksAddress(); } // Requirements: check that the target contract is not vault itself. if (operation.target == address(this)) { revert Aera__ExecuteTargetIsVaultAddress(); } // Interactions: execute operation. (bool success, bytes memory result) = operation.target.call{value: operation.value}(operation.data); // Invariants: check that the operation was successful. if (!success) { revert Aera__ExecutionFailed(result); } // Log that the operation was executed. emit Executed(msg.sender, operation); } /// @inheritdoc IVault function finalize() external override nonReentrant onlyOwner whenHooksSet whenNotFinalized reserveFees { // Hooks: before finalizing. hooks.beforeFinalize(); // Effects: mark the vault as finalized. finalized = true; IAssetRegistry.AssetInformation[] memory assets = assetRegistry.assets(); AssetValue[] memory assetAmounts = _getHoldings(assets); uint256 numAssetAmounts = assetAmounts.length; for (uint256 i = 0; i < numAssetAmounts;) { // Effects: transfer registered assets to owner. // Excludes reserved fee tokens and native token (e.g., ETH). if (assetAmounts[i].value > 0) { assetAmounts[i].asset.safeTransfer( msg.sender, assetAmounts[i].value ); } unchecked { i++; // gas savings } } // Hooks: after finalizing. hooks.afterFinalize(); // Log finalization. emit Finalized(msg.sender, assetAmounts); } /// @inheritdoc IVault function pause() external override nonReentrant onlyOwnerOrGuardian whenNotFinalized reserveFees { // Requirements and Effects: checks contract is unpaused and pauses it. _pause(); } /// @inheritdoc IVault function resume() external override onlyOwner whenHooksSet whenNotFinalized { // Effects: start a new fee checkpoint. lastFeeCheckpoint = block.timestamp; // Requirements and Effects: checks contract is paused and unpauses it. _unpause(); } /// @inheritdoc IVault function submit(Operation[] calldata operations) external override nonReentrant onlyGuardian whenHooksSet whenNotFinalized whenNotPaused reserveFees checkReservedFees { // Hooks: before executing operations. hooks.beforeSubmit(operations); uint256 numOperations = operations.length; Operation calldata operation; bytes4 selector; bool success; bytes memory result; address hooksAddress = address(hooks); for (uint256 i = 0; i < numOperations;) { operation = operations[i]; selector = bytes4(operation.data[0:4]); // Requirements: validate that it doesn't transfer asset from owner. if ( selector == IERC20.transferFrom.selector && abi.decode(operation.data[4:], (address)) == owner() ) { revert Aera__SubmitTransfersAssetFromOwner(); } // Requirements: check that operation is not trying to redeem ERC4626 shares from owner. // This could occur if the owner had a pre-existing allowance introduced during deposit. if ( selector == IERC4626.withdraw.selector || selector == IERC4626.redeem.selector ) { (,, address assetOwner) = abi.decode(operation.data[4:], (uint256, address, address)); if (assetOwner == owner()) { revert Aera__SubmitRedeemERC4626AssetFromOwner(); } } // Requirements: check that the target contract is not hooks. if (operation.target == hooksAddress) { revert Aera__SubmitTargetIsHooksAddress(i); } // Requirements: check that the target contract is not vault itself. if (operation.target == address(this)) { revert Aera__SubmitTargetIsVaultAddress(); } // Interactions: execute operation. (success, result) = operation.target.call{value: operation.value}(operation.data); // Invariants: confirm that operation succeeded. if (!success) { revert Aera__SubmissionFailed(i, result); } unchecked { i++; // gas savings } } if (address(this).balance > 0) { wrappedNativeToken.call{value: address(this).balance}(""); } // Hooks: after executing operations. hooks.afterSubmit(operations); // Log submission. emit Submitted(guardian, operations); } /// @inheritdoc IVault function claim() external override nonReentrant reserveFees { uint256 reservedFee = fees[msg.sender]; // Requirements: check that there are fees to claim. if (reservedFee == 0) { revert Aera__NoClaimableFeesForCaller(msg.sender); } uint256 availableFee = Math.min(_feeToken.balanceOf(address(this)), reservedFee); // Requirements: check that fees are available to claim. if (availableFee == 0) { revert Aera__NoAvailableFeesForCaller(msg.sender); } // Effects: update fee total. feeTotal -= availableFee; reservedFee -= availableFee; // Effects: update leftover fee. fees[msg.sender] = reservedFee; // Interactions: transfer fee to caller. _feeToken.safeTransfer(msg.sender, availableFee); // Log the claim. emit Claimed(msg.sender, availableFee, reservedFee, feeTotal); } /// @inheritdoc IVault function holdings() external view override returns (AssetValue[] memory) { IAssetRegistry.AssetInformation[] memory assets = assetRegistry.assets(); return _getHoldings(assets); } /// @inheritdoc IVault function value() external view override returns (uint256 vaultValue) { IAssetRegistry.AssetPriceReading[] memory erc20SpotPrices = assetRegistry.spotPrices(); (vaultValue,) = _value(erc20SpotPrices); } /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view override returns (bool) { return interfaceId == type(IVault).interfaceId || super.supportsInterface(interfaceId); } /// @inheritdoc Ownable function renounceOwnership() public view override onlyOwner { revert Aera__CannotRenounceOwnership(); } /// @inheritdoc Ownable2Step function transferOwnership(address newOwner) public override onlyOwner { // Requirements: check that new owner is disaffiliated from existing roles. if (newOwner == guardian) { revert Aera__GuardianIsOwner(); } if (newOwner == feeRecipient) { revert Aera__FeeRecipientIsOwner(); } // Effects: initiate ownership transfer. super.transferOwnership(newOwner); } /// @notice Only accept native token from the wrapped native token contract /// when burning wrapped native tokens. receive() external payable { // Requirements: verify that the sender is wrapped native token. if (msg.sender != wrappedNativeToken) { revert Aera__NotWrappedNativeTokenContract(); } } /// INTERNAL FUNCTIONS /// /// @notice Calculate guardian fee index. /// @return feeIndex Guardian fee index. function _getFeeIndex() internal view returns (uint256 feeIndex) { if (block.timestamp > lastFeeCheckpoint) { unchecked { feeIndex = block.timestamp - lastFeeCheckpoint; } } return feeIndex; } /// @notice Calculate current guardian fees. function _reserveFees() internal { // Requirements: check if fees are being accrued. if (fee == 0 || paused() || finalized) { return; } uint256 feeIndex = _getFeeIndex(); // Requirements: check if fees have been accruing. if (feeIndex == 0) { return; } // Calculate vault value using oracle or backup value if oracle is reverting. try assetRegistry.spotPrices() returns ( IAssetRegistry.AssetPriceReading[] memory erc20SpotPrices ) { (lastValue, lastFeeTokenPrice) = _value(erc20SpotPrices); } catch (bytes memory reason) { // Check if there is a clear reason for the revert. if (reason.length == 0) { revert Aera__SpotPricesReverted(); } emit SpotPricesReverted(reason); } // Requirements: check that fee token has a positive price. if (lastFeeTokenPrice == 0) { emit NoFeesReserved(lastFeeCheckpoint, lastValue, feeTotal); return; } // Calculate new fee for current fee recipient. // It calculates the fee in fee token decimals. uint256 newFee = lastValue * feeIndex * fee; if (_numeraireTokenDecimals < _feeTokenDecimals) { newFee = newFee * (10 ** (_feeTokenDecimals - _numeraireTokenDecimals)); } else if (_numeraireTokenDecimals > _feeTokenDecimals) { newFee = newFee / (10 ** (_numeraireTokenDecimals - _feeTokenDecimals)); } newFee /= lastFeeTokenPrice; if (newFee == 0) { return; } // Move fee checkpoint only if fee is nonzero lastFeeCheckpoint = block.timestamp; // Effects: accrue fee to fee recipient and remember new fee total. fees[feeRecipient] += newFee; feeTotal += newFee; // Log fee reservation. emit FeesReserved( feeRecipient, newFee, lastFeeCheckpoint, lastValue, lastFeeTokenPrice, feeTotal ); } /// @notice Get current total value of assets in vault and price of fee token. /// @dev It calculates the value in Numeraire token decimals. /// @param erc20SpotPrices Spot prices of ERC20 assets. /// @return vaultValue Current total value. /// @return feeTokenPrice Fee token price. function _value(IAssetRegistry.AssetPriceReading[] memory erc20SpotPrices) internal view returns (uint256 vaultValue, uint256 feeTokenPrice) { IAssetRegistry.AssetInformation[] memory assets = assetRegistry.assets(); AssetValue[] memory assetAmounts = _getHoldings(assets); (uint256[] memory spotPrices, uint256[] memory assetUnits) = _getSpotPricesAndUnits(assets, erc20SpotPrices); uint256 numAssets = assets.length; uint256 balance; for (uint256 i = 0; i < numAssets;) { if (assets[i].isERC4626) { balance = IERC4626(address(assets[i].asset)).convertToAssets( assetAmounts[i].value ); } else { balance = assetAmounts[i].value; } if (assets[i].asset == _feeToken) { feeTokenPrice = spotPrices[i]; } vaultValue += (balance * spotPrices[i]) / assetUnits[i]; unchecked { i++; // gas savings } } uint256 numeraireUnit = 10 ** _numeraireTokenDecimals; if (numeraireUnit != ONE) { vaultValue = vaultValue * numeraireUnit / ONE; } } /// @notice Check that assets in provided amounts are sorted and unique. /// @param amounts Struct details for assets and amounts to withdraw. function _checkAmountsSorted(AssetValue[] memory amounts) internal pure { uint256 numAssets = amounts.length; for (uint256 i = 1; i < numAssets;) { if (amounts[i - 1].asset >= amounts[i].asset) { revert Aera__AmountsOrderIsIncorrect(i); } unchecked { i++; // gas savings } } } /// @notice Check request to withdraw. /// @param assets Struct details for asset information from asset registry. /// @param amounts Struct details for assets and amounts to withdraw. function _checkWithdrawRequest( IAssetRegistry.AssetInformation[] memory assets, AssetValue[] memory amounts ) internal view { uint256 numAmounts = amounts.length; AssetValue[] memory assetAmounts = _getHoldings(assets); bool isRegistered; AssetValue memory assetValue; uint256 assetIndex; for (uint256 i = 0; i < numAmounts;) { assetValue = amounts[i]; (isRegistered, assetIndex) = _isAssetRegistered(assetValue.asset, assets); if (!isRegistered) { revert Aera__AssetIsNotRegistered(assetValue.asset); } if (assetAmounts[assetIndex].value < assetValue.value) { revert Aera__AmountExceedsAvailable( assetValue.asset, assetValue.value, assetAmounts[assetIndex].value ); } unchecked { i++; // gas savings } } } /// @notice Get spot prices and units of requested assets. /// @dev Spot prices are scaled to 18 decimals. /// @param assets Registered assets in asset registry and their information. /// @param erc20SpotPrices Struct details for spot prices of ERC20 assets. /// @return spotPrices Spot prices of assets. /// @return assetUnits Units of assets. function _getSpotPricesAndUnits( IAssetRegistry.AssetInformation[] memory assets, IAssetRegistry.AssetPriceReading[] memory erc20SpotPrices ) internal view returns (uint256[] memory spotPrices, uint256[] memory assetUnits) { uint256 numAssets = assets.length; uint256 numERC20SpotPrices = erc20SpotPrices.length; spotPrices = new uint256[](numAssets); assetUnits = new uint256[](numAssets); IAssetRegistry.AssetInformation memory asset; for (uint256 i = 0; i < numAssets;) { asset = assets[i]; IERC20 assetToFind = ( asset.isERC4626 ? IERC20(IERC4626(address(asset.asset)).asset()) : asset.asset ); uint256 j = 0; for (; j < numERC20SpotPrices;) { if (assetToFind == erc20SpotPrices[j].asset) { break; } unchecked { j++; // gas savings } } spotPrices[i] = erc20SpotPrices[j].spotPrice; assetUnits[i] = 10 ** IERC20Metadata(address(assetToFind)).decimals(); unchecked { i++; // gas savings } } } /// @notice Get total amount of assets in vault. /// @param assets Struct details for registered assets in asset registry. /// @return assetAmounts Amount of assets. function _getHoldings(IAssetRegistry.AssetInformation[] memory assets) internal view returns (AssetValue[] memory assetAmounts) { uint256 numAssets = assets.length; assetAmounts = new AssetValue[](numAssets); IAssetRegistry.AssetInformation memory assetInfo; for (uint256 i = 0; i < numAssets;) { assetInfo = assets[i]; assetAmounts[i] = AssetValue({ asset: assetInfo.asset, value: assetInfo.asset.balanceOf(address(this)) }); if (assetInfo.asset == _feeToken) { assetAmounts[i].value -= Math.min(feeTotal, assetAmounts[i].value); } unchecked { i++; //gas savings } } } /// @notice Check if balance of fee becomes insolvent or becomes more insolvent. /// @param prevFeeTokenBalance Balance of fee token before action. function _checkReservedFees(uint256 prevFeeTokenBalance) internal view { uint256 feeTokenBalance = IERC20(_feeToken).balanceOf(address(this)); if ( feeTokenBalance < feeTotal && feeTokenBalance < prevFeeTokenBalance ) { revert Aera__CannotUseReservedFees(); } } /// @notice Check if the address can be a guardian. /// @param newGuardian Address to check. /// @param owner_ Owner address. function _checkGuardianAddress( address newGuardian, address owner_ ) internal pure { if (newGuardian == address(0)) { revert Aera__GuardianIsZeroAddress(); } if (newGuardian == owner_) { revert Aera__GuardianIsOwner(); } } /// @notice Check if the address can be a fee recipient. /// @param newFeeRecipient Address to check. /// @param owner_ Owner address. function _checkFeeRecipientAddress( address newFeeRecipient, address owner_ ) internal pure { if (newFeeRecipient == address(0)) { revert Aera__FeeRecipientIsZeroAddress(); } if (newFeeRecipient == owner_) { revert Aera__FeeRecipientIsOwner(); } } /// @notice Check if the address can be an asset registry. /// @param newAssetRegistry Address to check. function _checkAssetRegistryAddress(address newAssetRegistry) internal view { if (newAssetRegistry == address(0)) { revert Aera__AssetRegistryIsZeroAddress(); } if ( !ERC165Checker.supportsInterface( newAssetRegistry, type(IAssetRegistry).interfaceId ) ) { revert Aera__AssetRegistryIsNotValid(newAssetRegistry); } if (IAssetRegistry(newAssetRegistry).vault() != address(this)) { revert Aera__AssetRegistryHasInvalidVault(); } } /// @notice Check if the address can be a hooks contract. /// @param newHooks Address to check. function _checkHooksAddress(address newHooks) internal view { if (newHooks == address(0)) { revert Aera__HooksIsZeroAddress(); } if ( !ERC165Checker.supportsInterface(newHooks, type(IHooks).interfaceId) ) { revert Aera__HooksIsNotValid(newHooks); } if (IHooks(newHooks).vault() != address(this)) { revert Aera__HooksHasInvalidVault(); } } /// @notice Check whether asset is registered to asset registry or not. /// @param asset Asset to check. /// @param registeredAssets Array of registered assets. /// @return isRegistered True if asset is registered. /// @return index Index of asset in asset registry. function _isAssetRegistered( IERC20 asset, IAssetRegistry.AssetInformation[] memory registeredAssets ) internal pure returns (bool isRegistered, uint256 index) { uint256 numAssets = registeredAssets.length; for (uint256 i = 0; i < numAssets;) { if (registeredAssets[i].asset < asset) { unchecked { i++; // gas savings } continue; } if (registeredAssets[i].asset == asset) { return (true, i); } break; } } }
// 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Library used to query support of an interface declared via {IERC165}. * * Note that these functions return the actual result of the query: they do not * `revert` if an interface is not supported. It is up to the caller to decide * what to do in these cases. */ library ERC165Checker { // As per the EIP-165 spec, no interface should ever match 0xffffffff bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; /** * @dev Returns true if `account` supports the {IERC165} interface. */ function supportsERC165(address account) internal view returns (bool) { // Any contract that implements ERC165 must explicitly indicate support of // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid return supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) && !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID); } /** * @dev Returns true if `account` supports the interface defined by * `interfaceId`. Support for {IERC165} itself is queried automatically. * * See {IERC165-supportsInterface}. */ function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { // query support of both ERC165 as per the spec and support of _interfaceId return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId); } /** * @dev Returns a boolean array where each value corresponds to the * interfaces passed in and whether they're supported or not. This allows * you to batch check interfaces for a contract where your expectation * is that some interfaces may not be supported. * * See {IERC165-supportsInterface}. * * _Available since v3.4._ */ function getSupportedInterfaces( address account, bytes4[] memory interfaceIds ) internal view returns (bool[] memory) { // an array of booleans corresponding to interfaceIds and whether they're supported or not bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); // query support of ERC165 itself if (supportsERC165(account)) { // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]); } } return interfaceIdsSupported; } /** * @dev Returns true if `account` supports all the interfaces defined in * `interfaceIds`. Support for {IERC165} itself is queried automatically. * * Batch-querying can lead to gas savings by skipping repeated checks for * {IERC165} support. * * See {IERC165-supportsInterface}. */ function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) { // query support of ERC165 itself if (!supportsERC165(account)) { return false; } // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) { return false; } } // all interfaces supported return true; } /** * @notice Query if a contract implements an interface, does not check ERC165 support * @param account The address of the contract to query for support of an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @return true if the contract at account indicates support of the interface with * identifier interfaceId, false otherwise * @dev Assumes that account contains a contract that supports ERC165, otherwise * the behavior of this method is undefined. This precondition can be checked * with {supportsERC165}. * * Some precompiled contracts will falsely indicate support for a given interface, so caution * should be exercised when using this function. * * Interface identification is specified in ERC-165. */ function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) { // prepare call bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId); // perform static call bool success; uint256 returnSize; uint256 returnValue; assembly { success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20) returnSize := returndatasize() returnValue := mload(0x00) } return success && returnSize >= 0x20 && returnValue > 0; } }
// 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "./Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// 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)); } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.21; import { AssetRegistryParameters, HooksParameters, VaultParameters } from "../Types.sol"; /// @title IAeraV2Factory /// @notice Interface for the V2 vault factory. interface IAeraV2Factory { /// @notice Create V2 vault. /// @param saltInput The salt input value to generate salt. /// @param description Vault description. /// @param vaultParameters Struct details for vault deployment. /// @param assetRegistryParameters Struct details for asset registry deployment. /// @param hooksParameters Struct details for hooks deployment. /// @return deployedVault The address of deployed vault. /// @return deployedAssetRegistry The address of deployed asset registry. /// @return deployedHooks The address of deployed hooks. function create( bytes32 saltInput, string calldata description, VaultParameters calldata vaultParameters, AssetRegistryParameters memory assetRegistryParameters, HooksParameters memory hooksParameters ) external returns ( address deployedVault, address deployedAssetRegistry, address deployedHooks ); /// @notice Calculate deployment address of V2 vault. /// @param saltInput The salt input value to generate salt. /// @param description Vault description. /// @param vaultParameters Struct details for vault deployment. function computeVaultAddress( bytes32 saltInput, string calldata description, VaultParameters calldata vaultParameters ) external view returns (address); /// @notice Returns the address of wrapped native token. function wrappedNativeToken() external view returns (address); /// @notice Returns vault parameters for vault deployment. /// @return owner Initial owner address. /// @return assetRegistry Asset registry address. /// @return hooks Hooks address. /// @return guardian Guardian address. /// @return feeRecipient Fee recipient address. /// @return fee Fees accrued per second, denoted in 18 decimal fixed point format. function parameters() external view returns ( address owner, address assetRegistry, address hooks, address guardian, address feeRecipient, uint256 fee ); }
// 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; }
// 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); }
// 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;
// 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); }
// 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); }
// 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); }
// 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); } }
// 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; } }
// 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); }
// 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); } } }
// 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; }
// 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); }
// 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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./AggregatorInterface.sol"; import "./AggregatorV3Interface.sol"; interface AggregatorV2V3Interface is AggregatorInterface, AggregatorV3Interface {}
// 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); }
// 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 ); }
{ "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
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"available","type":"uint256"}],"name":"Aera__AmountExceedsAvailable","type":"error"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"Aera__AmountsOrderIsIncorrect","type":"error"},{"inputs":[{"internalType":"contract IERC20","name":"asset","type":"address"}],"name":"Aera__AssetIsNotRegistered","type":"error"},{"inputs":[],"name":"Aera__AssetRegistryHasInvalidVault","type":"error"},{"inputs":[{"internalType":"address","name":"assetRegistry","type":"address"}],"name":"Aera__AssetRegistryIsNotValid","type":"error"},{"inputs":[],"name":"Aera__AssetRegistryIsZeroAddress","type":"error"},{"inputs":[],"name":"Aera__CallerIsNotGuardian","type":"error"},{"inputs":[],"name":"Aera__CallerIsNotOwnerAndGuardian","type":"error"},{"inputs":[],"name":"Aera__CannotRenounceOwnership","type":"error"},{"inputs":[],"name":"Aera__CannotUseReservedFees","type":"error"},{"inputs":[],"name":"Aera__ExecuteTargetIsHooksAddress","type":"error"},{"inputs":[],"name":"Aera__ExecuteTargetIsVaultAddress","type":"error"},{"inputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"name":"Aera__ExecutionFailed","type":"error"},{"inputs":[{"internalType":"uint256","name":"actual","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"Aera__FeeIsAboveMax","type":"error"},{"inputs":[],"name":"Aera__FeeRecipientIsOwner","type":"error"},{"inputs":[],"name":"Aera__FeeRecipientIsZeroAddress","type":"error"},{"inputs":[],"name":"Aera__GuardianIsOwner","type":"error"},{"inputs":[],"name":"Aera__GuardianIsZeroAddress","type":"error"},{"inputs":[],"name":"Aera__HooksHasInvalidVault","type":"error"},{"inputs":[{"internalType":"address","name":"hooks","type":"address"}],"name":"Aera__HooksIsNotValid","type":"error"},{"inputs":[],"name":"Aera__HooksIsZeroAddress","type":"error"},{"inputs":[],"name":"Aera__InitialOwnerIsZeroAddress","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"Aera__NoAvailableFeesForCaller","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"Aera__NoClaimableFeesForCaller","type":"error"},{"inputs":[],"name":"Aera__NotWrappedNativeTokenContract","type":"error"},{"inputs":[],"name":"Aera__SpotPricesReverted","type":"error"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"bytes","name":"result","type":"bytes"}],"name":"Aera__SubmissionFailed","type":"error"},{"inputs":[],"name":"Aera__SubmitRedeemERC4626AssetFromOwner","type":"error"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"Aera__SubmitTargetIsHooksAddress","type":"error"},{"inputs":[],"name":"Aera__SubmitTargetIsVaultAddress","type":"error"},{"inputs":[],"name":"Aera__SubmitTransfersAssetFromOwner","type":"error"},{"inputs":[],"name":"Aera__VaultIsFinalized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"claimedFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"unclaimedFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeTotal","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct Operation","name":"operation","type":"tuple"}],"name":"Executed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastFeeCheckpoint","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastFeeTokenPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeTotal","type":"uint256"}],"name":"FeesReserved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"components":[{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"indexed":false,"internalType":"struct AssetValue[]","name":"withdrawnAmounts","type":"tuple[]"}],"name":"Finalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lastFeeCheckpoint","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeTotal","type":"uint256"}],"name":"NoFeesReserved","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":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"assetRegistry","type":"address"}],"name":"SetAssetRegistry","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"guardian","type":"address"},{"indexed":true,"internalType":"address","name":"feeRecipient","type":"address"}],"name":"SetGuardianAndFeeRecipient","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"hooks","type":"address"}],"name":"SetHooks","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"SpotPricesReverted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"guardian","type":"address"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct Operation[]","name":"operations","type":"tuple[]"}],"name":"Submitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"assetRegistry","outputs":[{"internalType":"contract IAssetRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct AssetValue[]","name":"amounts","type":"tuple[]"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Operation","name":"operation","type":"tuple"}],"name":"execute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"fees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finalized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"holdings","outputs":[{"components":[{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct AssetValue[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hooks","outputs":[{"internalType":"contract IHooks","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastFeeCheckpoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastFeeTokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[],"name":"resume","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newGuardian","type":"address"},{"internalType":"address","name":"newFeeRecipient","type":"address"}],"name":"setGuardianAndFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newHooks","type":"address"}],"name":"setHooks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Operation[]","name":"operations","type":"tuple[]"}],"name":"submit","outputs":[],"stateMutability":"nonpayable","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":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"value","outputs":[{"internalType":"uint256","name":"vaultValue","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct AssetValue[]","name":"amounts","type":"tuple[]"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrappedNativeToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x60806040526004361015610022575b3615610018575f80fd5b6100206123d3565b005b5f3560e01c806301ffc9a714610211578063046f7da21461020c57806317fcb39b146102075780632575e80b1461020257806337bfc1ef146101fd5780633fa4f245146101f857806343183834146101f3578063452a9320146101ee57806346904840146101e95780634bb278f3146101e45780634e71d92d146101df5780634e8bc852146101da57806359e97475146101d55780635c1c6dcd146101d05780635c975abb146101cb57806369eb50ef146101c6578063715018a6146101c1578063779b3c00146101bc57806379ba5097146101b75780638456cb59146101b25780638da5cb5b146101ad578063979d7e86146101a8578063b3f05b97146101a3578063cd7033c41461019e578063ddca3f4314610199578063e30c397814610194578063e79bf13b1461018f578063ecdbb2b31461018a578063f2fde38b14610185578063faaebd21146101805763fb63daa10361000e57611be8565b611bac565b611b00565b6118ae565b611817565b61179f565b611765565b61173f565b61171a565b6116d7565b6116b2565b6115e1565b61150f565b6114f2565b6114b0565b61135c565b611326565b611198565b610ecb565b610924565b610767565b6104f9565b6104d3565b6104ad565b610490565b6103f1565b6103d4565b6103b7565b610374565b61028f565b34610281576020366003190112610281576004356001600160e01b0319811680910361028157807fec75542d0000000000000000000000000000000000000000000000000000000060209214908115610270575b506040519015158152f35b6301ffc9a760e01b9150145f610265565b5f80fd5b5f91031261028157565b34610281575f366003190112610281576102a7613359565b6001600160a01b0360035416156103635760ff60055460a01c166103525742600a5560015460ff8160a01c161561030e5760ff60a01b19166001557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b606460405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152fd5b600460405163b3a5458960e01b8152fd5b600460405163097e401760e11b8152fd5b34610281575f3660031901126102815760206040516001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168152f35b34610281575f366003190112610281576020600754604051908152f35b34610281575f366003190112610281576020600954604051908152f35b34610281575f8060031936011261048d576040519063edf94acd60e01b825280826004816001600160a01b037f0000000000000000000000001ad357adaf5c16dc6401bbef2bf8d4d96d0fc13c165afa8015610488576020928261045c9392610465575b50506127ad565b50604051908152f35b61048192503d8091833e6104798183611dd4565b81019061232b565b5f80610455565b611e54565b80fd5b34610281575f366003190112610281576020600654604051908152f35b34610281575f3660031901126102815760206001600160a01b0360045416604051908152f35b34610281575f3660031901126102815760206001600160a01b0360055416604051908152f35b34610281575f8060031936011261048d57610512613403565b61051a613359565b6001600160a01b038060035416156103635760ff60055460a01c1661035257819061054361247b565b6105646105586003546001600160a01b031690565b6001600160a01b031690565b803b156107635782906004604051809581937fbfd31dc40000000000000000000000000000000000000000000000000000000083525af1908115610488576004928492610750575b506105c5600160a01b60ff60a01b196005541617600555565b604051928380926371a9730560e01b82527f0000000000000000000000001ad357adaf5c16dc6401bbef2bf8d4d96d0fc13c165afa80156104885761061191839161072e575b50612e7f565b8051825b8181106106d4575050816106346105586003546001600160a01b031690565b803b156106d05781906004604051809481937f683acef00000000000000000000000000000000000000000000000000000000083525af18015610488576106b7575b507f11ca3c8bf5b555e9fe7f80a815f6c9a090ccc14a0d37f7016e89b8e4e4b8fd96604051806106a73394826117c5565b0390a26106b46001600255565b80f35b806106c46106ca92611d67565b80610285565b5f610676565b5080fd5b6001906020806106e483876121a0565b5101516106f3575b5001610615565b6107289061071261070484886121a0565b51516001600160a01b031690565b9061071d84886121a0565b510151903390613456565b5f6106ec565b61074a91503d8085833e6107428183611dd4565b810190611f20565b5f61060b565b806106c461075d92611d67565b5f6105ac565b5050fd5b34610281575f8060031936011261048d57610780613403565b61078861247b565b335f9081526008602052604090205480156108f3576040516370a0823160e01b81523060048201527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc291906020816024816001600160a01b0387165afa908115610488576107ff91839186916108c5575b50613347565b9182156108905761086e83610849817f9cdcf2f7714cca3508c7f0110b04a90a80a3a8dd0e35de99689db74d28c5383e9561084461083f83600954612319565b600955565b612319565b9283610866336001600160a01b03165f52600860205260405f2090565b553390613456565b60095460408051948552602085019290925290830152339180606081016106a7565b6040517fd7f3a468000000000000000000000000000000000000000000000000000000008152336004820152602490fd5b0390fd5b6108e6915060203d81116108ec575b6108de8183611dd4565b8101906121b4565b5f6107f9565b503d6108d4565b6040517f2129c592000000000000000000000000000000000000000000000000000000008152336004820152602490fd5b346102815760208060031936011261028157600480359167ffffffffffffffff9182841161028157366023850112156102815783810135928311610281576024840193602436918560051b0101116102815761097e613403565b6001600160a01b0392838254163303610e5557836003541615610e455760ff60055460a01c16610e35576109b06133b0565b6109b861247b565b6040928351946370a0823160e01b865230848701528186602481847f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2165afa958615610488575f96610e16575b50610a1b6105586003546001600160a01b031690565b803b156102815785517f3280648e000000000000000000000000000000000000000000000000000000008152905f908290818381610a5c8a8f8d84016121c3565b03925af1801561048857610e03575b5090610a826105586003546001600160a01b031690565b8216905f5b848110610ba2575050505047610b6b575b610aad6105586003546001600160a01b031690565b94853b15610281575f845180977fa0e38c81000000000000000000000000000000000000000000000000000000008252818381610aed88888b84016121c3565b03925af192831561048857610b3b610558610b4692610b4e997f83175f8c84aa4e36267d4380f6880279b38aab5493b1c7a5db6bf5ffc3d2724597610b58575b50546001600160a01b031690565b9451928392836121c3565b0390a2612fd7565b6100206001600255565b806106c4610b6592611d67565b5f610b2d565b5f808080477f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25af150610b9c612085565b50610a98565b610bad81868b612236565b8781016001600160e01b0319610bd5610bcf610bc98486612045565b90612258565b90612283565b166323b872dd60e01b811480610dce575b610da6577fb460af94000000000000000000000000000000000000000000000000000000008114908115610d7c575b50610d17575b84610c286105588461203b565b14610ce35730610c3a6105588461203b565b14610cbb5781610c695f9392868c610c5c610c55889761203b565b9386612045565b9490915180958193612078565b03930135905af1610c78612085565b9015610c875750600101610a87565b6108c1879189519384937f248ef89c00000000000000000000000000000000000000000000000000000000855284016122ee565b8789517f6829be6f000000000000000000000000000000000000000000000000000000008152fd5b88517f6eb86bd800000000000000000000000000000000000000000000000000000000815280890184815281906020010390fd5b610d36610d2e610d278385612045565b8091612266565b8101906122c4565b91505086610d4d815f54166001600160a01b031690565b911603610c1b578789517f2219f13e000000000000000000000000000000000000000000000000000000008152fd5b7fba087652000000000000000000000000000000000000000000000000000000009150145f610c15565b888a517f37933357000000000000000000000000000000000000000000000000000000008152fd5b50610de7610ddf610d278486612045565b8101906122af565b87610dfb815f54166001600160a01b031690565b911614610be6565b806106c4610e1092611d67565b5f610a6b565b610e2e919650823d84116108ec576108de8183611dd4565b945f610a05565b5060405163b3a5458960e01b8152fd5b5060405163097e401760e11b8152fd5b506040517ff5185ed1000000000000000000000000000000000000000000000000000000008152fd5b9060206003198301126102815760043567ffffffffffffffff9283821161028157806023830112156102815781600401359384116102815760248460061b83010111610281576024019190565b3461028157610ed936610e7e565b90610ee2613403565b610eea613359565b6001600160a01b03918260035416156103635760ff60055460a01c1661035257610f1261247b565b610f276105586003546001600160a01b031690565b92833b156102815782604091825180967f162146fb0000000000000000000000000000000000000000000000000000000082525f978891818381610f708b60049d8e8401611df6565b03925af1801561048857611185575b50610f93610f8e368685611eb7565b612a18565b8251906371a9730560e01b825286828781847f0000000000000000000000001ad357adaf5c16dc6401bbef2bf8d4d96d0fc13c165afa918215610488578792611169575b50908694939291610fe6611fec565b5085915b85831061107a575050506110096105586003546001600160a01b031690565b91823b156110765761104995859151968795869485937f2f40e5b80000000000000000000000000000000000000000000000000000000085528401611df6565b03925af1801561048857611063575b506106b46001600255565b806106c461107092611d67565b5f611058565b8480fd5b9091929394955061109461108f848887612018565b61202d565b926110af826110aa86516001600160a01b031690565b61318d565b501561112e576110ef60016110cb86516001600160a01b031690565b926110e06020880194855190309033906134a9565b0194516001600160a01b031690565b905186519081529083169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f6290602090a390879594939291610fea565b85886108c161114487516001600160a01b031690565b92516362d0df2960e11b81526001600160a01b03909316918301918252829160200190565b61117e9192503d8089833e6107428183611dd4565b905f610fd7565b806106c461119292611d67565b5f610f7f565b34610281576003196020368201126102815760043567ffffffffffffffff811161028157606081600401928236030112610281576111d4613403565b6111dc613359565b6111e58261203b565b6111fd6105586105586003546001600160a01b031690565b6001600160a01b03809216146112fc576112168361203b565b1630146112d2575f8091602461122b8561203b565b6112386044840187612045565b929061124960405180958193612078565b03930135905af1611258612085565b901561129c57507f581f7fcb4603641e147a9f037fab064116f10ab9f195b7de511aac72fb3a45326040518061128f33948261218f565b0390a26100206001600255565b6108c1906040519182917f0e4f9cb400000000000000000000000000000000000000000000000000000000835260048301612102565b60046040517f3dac4c4e000000000000000000000000000000000000000000000000000000008152fd5b60046040517fb06c99f1000000000000000000000000000000000000000000000000000000008152fd5b34610281575f36600319011261028157602060ff60015460a01c166040519015158152f35b6001600160a01b0381160361028157565b3461028157604080600319360112610281576004803561137b8161134b565b602435906113888261134b565b611390613359565b60ff60055460a01c166114a1576113a561247b565b6001600160a01b03928382169384156114795733851461146a57831694851561144457338614611437575050906113f5611411926001600160a01b03166001600160a01b03196004541617600455565b6001600160a01b03166001600160a01b03196005541617600555565b7fef48f1577712f3f29564778f489f620f33b22e71b98872465e95c0794b76952f5f80a3005b51635515a0d760e11b8152fd5b517f12370b1c000000000000000000000000000000000000000000000000000000008152fd5b508451631eeea85b60e21b8152fd5b5084517fc93c2579000000000000000000000000000000000000000000000000000000008152fd5b82845163b3a5458960e01b8152fd5b34610281575f366003190112610281576114c8613359565b60046040517fe55b23a5000000000000000000000000000000000000000000000000000000008152fd5b34610281575f366003190112610281576020600a54604051908152f35b34610281575f8060031936011261048d576001546001600160a01b033381831603611577576001600160a01b0319809216600155825491339083161783553391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b608460405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e657200000000000000000000000000000000000000000000006064820152fd5b34610281575f8060031936011261048d576115fa613403565b6001600160a01b038082541633141590816116a3575b506116795760ff60055460a01c166103525761162a61247b565b6116326133b0565b600160a01b60ff60a01b1960015416176001557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a16106b46001600255565b60046040517f831dddf0000000000000000000000000000000000000000000000000000000008152fd5b9050600454163314155f611610565b34610281575f3660031901126102815760206001600160a01b035f5416604051908152f35b34610281575f3660031901126102815760206040516001600160a01b037f0000000000000000000000001ad357adaf5c16dc6401bbef2bf8d4d96d0fc13c168152f35b34610281575f36600319011261028157602060ff60055460a01c166040519015158152f35b34610281575f3660031901126102815760206001600160a01b0360035416604051908152f35b34610281575f3660031901126102815760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b34610281575f3660031901126102815760206001600160a01b0360015416604051908152f35b60208082019080835283518092528060408094019401925f905b8382106117ee57505050505090565b845180516001600160a01b031687528301518684015294850194938201936001909101906117df565b34610281575f8060031936011261048d57604051906371a9730560e01b825280826004816001600160a01b037f0000000000000000000000001ad357adaf5c16dc6401bbef2bf8d4d96d0fc13c165afa80156104885761188f92826118839392611893575b5050612e7f565b604051918291826117c5565b0390f35b6118a792503d8091833e6107428183611dd4565b5f8061187c565b34610281576118bc36610e7e565b906118c5613403565b6118cd613359565b6001600160a01b03918260035416156103635760ff60055460a01c16610352576118f561247b565b6040918251936371a9730560e01b85525f948581600481857f0000000000000000000000001ad357adaf5c16dc6401bbef2bf8d4d96d0fc13c165afa801561048857611954918791611ae6575b5061194e368686611eb7565b90612a9b565b611962610f8e368585611eb7565b6119776105586003546001600160a01b031690565b803b15611ae25785855180927fb99892750000000000000000000000000000000000000000000000000000000082528183816119b78a8a60048401611df6565b03925af1801561048857611acf575b50908492916119d3611fec565b50835b838110611a385750506119f46105586003546001600160a01b031690565b90813b15611a34578361104995518096819582947f34d184ae00000000000000000000000000000000000000000000000000000000845260048401611df6565b8380fd5b839450611a4d61108f82859660019596612018565b60208101908151908115611ac557611a79611a869233611a7484516001600160a01b031690565b613456565b516001600160a01b031690565b905187519081529084169033907f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb90602090a301905b859392916119d6565b5050500190611abc565b806106c4611adc92611d67565b5f6119c6565b8580fd5b611afa91503d8089833e6107428183611dd4565b5f611942565b3461028157602036600319011261028157600435611b1d8161134b565b611b25613359565b6001600160a01b038080600454169216918214611b9b5780600554168214611b8a57611b4f613359565b816001600160a01b031960015416176001555f54167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227005f80a3005b6004604051635515a0d760e11b8152fd5b6004604051631eeea85b60e21b8152fd5b34610281576020366003190112610281576001600160a01b03600435611bd18161134b565b165f526008602052602060405f2054604051908152f35b3461028157602036600319011261028157600435611c058161134b565b611c0d613403565b611c15613359565b60ff60055460a01c1661035257611c2a61247b565b611c3381613094565b611c486105586003546001600160a01b031690565b906001600160a01b0391828116611cc8575b7fdb0670e174c4203280e70166db52920a0ddc53923128a7e0e964c5350de54f1f611cbb83611ca18682166001600160a01b03166001600160a01b03196003541617600355565b6040516001600160a01b0390911681529081906020820190565b0390a16100206001600255565b90813b15610281575f80926004604051809581937f7f068c0f0000000000000000000000000000000000000000000000000000000083525af18015610488577fdb0670e174c4203280e70166db52920a0ddc53923128a7e0e964c5350de54f1f93611cbb93611ca192611d40575b5093505090611c5a565b806106c4611d4d92611d67565b5f611d36565b634e487b7160e01b5f52604160045260245ffd5b67ffffffffffffffff8111611d7b57604052565b611d53565b6040810190811067ffffffffffffffff821117611d7b57604052565b6080810190811067ffffffffffffffff821117611d7b57604052565b6060810190811067ffffffffffffffff821117611d7b57604052565b90601f8019910116810190811067ffffffffffffffff821117611d7b57604052565b60208082528082018490526040918201939092915f5b828110611e1b57505050505090565b90919293959482806001926001600160a01b038835611e398161134b565b168152878a01358a8201529798970196950193929101611e0c565b6040513d5f823e3d90fd5b60405190611e6c82611d80565b565b67ffffffffffffffff8111611d7b5760051b60200190565b919082604091031261028157604051611e9e81611d80565b60208082948035611eae8161134b565b84520135910152565b929192611ec382611e6e565b604092611ed284519283611dd4565b819581835260208093019160061b84019381851161028157915b848310611efb57505050505050565b838691611f088486611e86565b815201920191611eec565b5190811515820361028157565b9060209182818303126102815780519067ffffffffffffffff8211610281570181601f8201121561028157805192611f5784611e6e565b93604093611f6785519687611dd4565b818652828087019260071b85010193818511610281578301915b848310611f915750505050505090565b60808383031261028157836080918751611faa81611d9c565b8551611fb58161134b565b81528286015183820152611fca898701611f13565b8982015260608087015190611fde8261134b565b820152815201920191611f81565b60405190611ff982611d80565b5f6020838281520152565b634e487b7160e01b5f52603260045260245ffd5b91908110156120285760061b0190565b612004565b612038903690611e86565b90565b356120388161134b565b903590601e1981360301821215610281570180359067ffffffffffffffff82116102815760200191813603831361028157565b908092918237015f815290565b3d156120bf573d9067ffffffffffffffff8211611d7b57604051916120b4601f8201601f191660200184611dd4565b82523d5f602084013e565b606090565b91908251928382525f5b8481106120ee575050825f602080949584010152601f8019910116010190565b6020818301810151848301820152016120ce565b9060206120389281815201906120c4565b6001600160a01b0381356121268161134b565b168252602081013560208301526040810135601e19823603018112156102815701906020823592019167ffffffffffffffff8111610281578036038313610281578060809360606040850152816060850152848401375f828201840152601f01601f1916010190565b906020612038928181520190612113565b80518210156120285760209160051b010190565b90816020910312610281575190565b916020908082850183865252604084019160408260051b86010194845f80925b8584106121f557505050505050505090565b9091929394959697603f198282030188528835605e1985360301811215611a34578661222660019387839401612113565b9a019801969594019291906121e3565b91908110156120285760051b81013590605e1981360301821215610281570190565b906004116102815790600490565b909291928360041161028157831161028157600401916003190190565b6001600160e01b031990358181169392600481106122a057505050565b60040360031b82901b16169150565b9081602091031261028157356120388161134b565b9081606091031261028157803591604060208301356122e28161134b565b9201356120388161134b565b6040906120389392815281602082015201906120c4565b634e487b7160e01b5f52601160045260245ffd5b9190820391821161232657565b612305565b9060209182818303126102815780519067ffffffffffffffff8211610281570181601f820112156102815780519261236284611e6e565b9360409361237285519687611dd4565b818652828087019260061b85010193818511610281578301915b84831061239c5750505050505090565b85838303126102815783869182516123b381611d80565b85516123be8161134b565b8152828601518382015281520192019161238c565b6001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216330361240557565b60046040517f5683d0ea000000000000000000000000000000000000000000000000000000008152fd5b8181029291811591840414171561232657565b604d811161232657600a0a90565b811561245a570490565b634e487b7160e01b5f52601260045260245ffd5b9190820180921161232657565b7f000000000000000000000000000000000000000000000000000000000000000080158015612788575b8015612779575b612776576124b8612797565b908115612698576001600160a01b039160405163edf94acd60e01b81525f81600481877f0000000000000000000000001ad357adaf5c16dc6401bbef2bf8d4d96d0fc13c165afa5f918161275b575b5061273c5750612515612085565b8051156127125761254d7f5d801530a4e94131b234f165923bd70de2c3e71c9891f090501832eb5ddf3d7c9160405191829182612102565b0390a15b6007549081156126ca576125de9261256e6125739260065461242f565b61242f565b7f00000000000000000000000000000000000000000000000000000000000000127f00000000000000000000000000000000000000000000000000000000000000128082101561269c576125ce6125d993926125d392612319565b612442565b9061242f565b612450565b908115612698577fc80de135628ee55c4963b1bf37e23eb2d7325f1d92417e120e02bcea56b9bed99061261042600a55565b61263c6126256005546001600160a01b031690565b6001600160a01b03165f52600860205260405f2090565b61264784825461246e565b905561265861083f8460095461246e565b600554600a546006546007546009546040805198895260208901949094529287019190915260608601526080850152166001600160a01b03169160a090a2565b5050565b908181116126ac575b5050612450565b6125ce6126c393926126bd92612319565b90612450565b5f806126a5565b5050600a54600654600954604080519384526020840192909252908201527fb3da20cbb4a87f41036953a90dfa636fa7b5ad4d642283f4d8cf45be61a79d88925060609150a1565b60046040517f039cd3a0000000000000000000000000000000000000000000000000000000008152fd5b61275161274b612756926127ad565b60075590565b600655565b612551565b61276f91923d8091833e6104798183611dd4565b905f612507565b50565b5060055460a01c60ff166124ac565b5060ff60015460a01c166124a5565b5f600a548042116127a6575090565b9050420390565b5f915f91826001600160a01b039060409283516371a9730560e01b8152600483828281887f0000000000000000000000001ad357adaf5c16dc6401bbef2bf8d4d96d0fc13c165afa9182156104885784926129fc575b5061281d61281683979697959495612e7f565b9483612c50565b91909280519585987f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216925b878a106128b457505050505050505050506128837f0000000000000000000000000000000000000000000000000000000000000012612442565b670de0b6b3a764000081036128955750565b6128a3906128b1929461242f565b670de0b6b3a7640000900490565b91565b9091929394959697989b8c6128d58b6128cd83886121a0565b510151151590565b156129e85761293e818c6128f8610558610558610558610704612904988d6121a0565b6020809581948a6121a0565b510151915180809581947f07a2d13a0000000000000000000000000000000000000000000000000000000083528a83019190602083019252565b03915afa908115610488578f928b926129cb575b50505b86612966610558610704858a6121a0565b146129b2575b9161299c8261299561298e6001966129876129a2978f6121a0565b519061242f565b918b6121a0565b5190612450565b9061246e565b9c01989796959493929190612849565b91819d50886129c183826121a0565b519e50509161296c565b6129e19250803d106108ec576108de8183611dd4565b5f80612952565b60206129f482866121a0565b510151612955565b612a119192503d8086833e6107428183611dd4565b905f612803565b8051600191825b828110612a2c5750505050565b5f19810181811161232657612a4c906001600160a01b03918291856121a0565b51511690612a5a83856121a0565b5151161115612a6a578301612a1f565b602490604051907f0141de6e0000000000000000000000000000000000000000000000000000000082526004820152fd5b90805190612aa883612e7f565b90612ab1611fec565b505f5b838110612ac2575050505050565b612acc81836121a0565b51612ae2866110aa83516001600160a01b031690565b9015612b805760209081612af682886121a0565b5101519282810151809410612b115750505050600101612ab4565b91612b316108c192612b2b8995516001600160a01b031690565b946121a0565b5101516040519384937f9609a70c000000000000000000000000000000000000000000000000000000008552600485016040919493926001600160a01b03606083019616825260208201520152565b6108c1612b9483516001600160a01b031690565b6040516362d0df2960e11b81526001600160a01b0390911660048201529081906024820190565b90612bc582611e6e565b612bd26040519182611dd4565b8281528092612be3601f1991611e6e565b0190602036910137565b60405190612bfa82611d9c565b5f6060838281528260208201528260408201520152565b9081602091031261028157516120388161134b565b90816020910312610281575160ff811681036102815790565b60ff16604d811161232657600a0a90565b90918151835190612c6081612bbb565b94612c6a82612bbb565b94612c73612bed565b505f5b838110612c84575050505050565b612c8e81836121a0565b51604090612c9e82820151151590565b15612e2157610558610558610558612cbd93516001600160a01b031690565b815180917f38d52e0f00000000000000000000000000000000000000000000000000000000825281600460209485935afa908115610488576001600160a01b03925f92612df4575b5050165b5f915b878310612dc5575b91612d3791600485948d612d406001600160a01b03988b602098899889926121a0565b510151926121a0565b5251809681937f313ce567000000000000000000000000000000000000000000000000000000008352165afa801561048857600193612d87925f92612d98575b5050612c3f565b612d91828a6121a0565b5201612c76565b612db79250803d10612dbe575b612daf8183611dd4565b810190612c26565b5f80612d80565b503d612da5565b91612dd661055861070483896121a0565b6001600160a01b03831614612dee5760010191612d0c565b91612d14565b612e139250803d10612e1a575b612e0b8183611dd4565b810190612c11565b5f80612d05565b503d612e01565b516001600160a01b0316612d09565b90612e3a82611e6e565b612e476040519182611dd4565b8281528092612e58601f1991611e6e565b01905f5b828110612e6857505050565b602090612e73611fec565b82828501015201612e5c565b90815191612e8c83612e30565b92612e95612bed565b505f91826001600160a01b0391827f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216915b848110612ed657505050505050565b612ee081836121a0565b5190612ef382516001600160a01b031690565b6040516370a0823160e01b81523060048201526020919082816024818b86165afa91821561048857600195612f64868f610558948f97612f72978e9991612fba575b50612f50612f41611e5f565b6001600160a01b039093168352565b89820152612f5e83836121a0565b526121a0565b50516001600160a01b031690565b14612f7f575b5001612ec7565b612fb2612f9d8b83612f9486600954936121a0565b51015190613347565b91612fa8848d6121a0565b5101918251612319565b90525f612f78565b612fd191508a3d8c116108ec576108de8183611dd4565b5f612f35565b604051906370a0823160e01b82523060048301526020826024816001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2165afa918215610488575f92613074575b506009548210918261306a575b505061304057565b60046040517f58a65885000000000000000000000000000000000000000000000000000000008152fd5b1090505f80613038565b61308d91925060203d81116108ec576108de8183611dd4565b905f61302b565b6001600160a01b0390818116908115610363576130b76130b3826131fb565b1590565b6131515750906020600492604051938480927ffbfa77cf0000000000000000000000000000000000000000000000000000000082525afa918215610488575f92613131575b503091160361310757565b60046040517faf826849000000000000000000000000000000000000000000000000000000008152fd5b61314a91925060203d8111612e1a57612e0b8183611dd4565b905f6130fc565b6040517f8537fbfb0000000000000000000000000000000000000000000000000000000081526001600160a01b03919091166004820152602490fd5b90915f925f9281515f925b8184106131a6575b50505050565b6001600160a01b0391826131ba86846121a0565b515116938381168095106131ec575050836131d4916121a0565b515116146131e4578080806131a0565b600193509150565b60019095019493509150613198565b604051906020808301815f6301ffc9a760e01b958684528660248201526024815261322581611db8565b51617530938685fa933d5f5190866132c8575b50856132be575b508461325c575b50505081613252575090565b61203891506132d3565b839450905f9183946040518581019283526001600160e01b031960248201526024815261328881611db8565b5192fa5f5190913d836132b3575b5050816132a9575b5015905f8080613246565b905015155f61329e565b101591505f80613296565b151594505f61323f565b84111595505f613238565b5f602091604051838101906301ffc9a760e01b82527f755e75630000000000000000000000000000000000000000000000000000000060248201526024815261331b81611db8565b5191617530fa5f513d8261333b575b5081613334575090565b9050151590565b6020111591505f61332a565b9080821015613354575090565b905090565b6001600160a01b035f5416330361336c57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b60ff60015460a01c166133bf57565b606460405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152fd5b60028054146134125760028055565b606460405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b611e6c926001600160a01b03604051937fa9059cbb0000000000000000000000000000000000000000000000000000000060208601521660248401526044830152604482526134a482611d9c565b6134fb565b9290604051926323b872dd60e01b60208501526001600160a01b03809216602485015216604483015260648201526064815260a081019181831067ffffffffffffffff841117611d7b57611e6c926040525b604051613558916001600160a01b031661351482611d80565b5f806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af1613552612085565b916135fa565b80518281159182156135db575b50509050156135715750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b838092935001031261028157816135f29101611f13565b80825f613565565b9192901561365b575081511561360e575090565b3b156136175790565b606460405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b82519091501561366e5750805190602001fd5b6108c19060405191829162461bcd60e51b83526020600484015260248301906120c456fea264697066735822122081da0912feca3cf272c37f112aabdc6f855497b51c02c39e4cad917166ce388f64736f6c63430008150033
Deployed Bytecode Sourcemap
583:29744:0:-:0;;;;;;;;;-1:-1:-1;583:29744:0;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;;;;;-1:-1:-1;;583:29744:0;;;;;;-1:-1:-1;;;;;;583:29744:0;;;;;;;17008:39;17023:24;583:29744;17008:39;;:91;;;;;583:29744;;;;;;;;;;17008:91;-1:-1:-1;;;963:40:8;;;17008:91:0;;;583:29744;-1:-1:-1;583:29744:0;;;;;;;;;:::o;:::-;;;;;;-1:-1:-1;;583:29744:0;;;;1090:65:16;;:::i;:::-;-1:-1:-1;;;;;3172:5:0;583:29744;;3164:28;3160:92;;583:29744;2996:9;583:29744;;;;2992:71;;12446:15;12426:35;583:29744;1742:7:18;583:29744:0;;;;;;;;;-1:-1:-1;;;;583:29744:0;1742:7:18;583:29744:0;2616:22:18;583:29744:0;;;736:10:7;583:29744:0;;2616:22:18;583:29744:0;;;;;-1:-1:-1;;;583:29744:0;;;;;;;;;;;;;;;;;;2992:71;583:29744;;;-1:-1:-1;;;3028:24:0;;;3160:92;583:29744;;;-1:-1:-1;;;3215:26:0;;;583:29744;;;;;;-1:-1:-1;;583:29744:0;;;;;;;-1:-1:-1;;;;;1556:43:0;583:29744;;;;;;;;;;-1:-1:-1;;583:29744:0;;;;;2039:32;583:29744;;;;;;;;;;;;;-1:-1:-1;;583:29744:0;;;;;2265:23;583:29744;;;;;;;;;;;;;;;;;;;;;;16755:26;-1:-1:-1;;;16755:26:0;;:13;;583:29744;16755:13;-1:-1:-1;;;;;16755:13:0;583:29744;16755:26;;;;;;583:29744;16755:26;;16808:23;16755:26;;;;583:29744;16808:23;;;:::i;:::-;583:29744;;;;;;;16755:26;;;;;;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;:::i;583:29744::-;;;;;;;;;-1:-1:-1;;583:29744:0;;;;;1962:24;583:29744;;;;;;;;;;;;;-1:-1:-1;;583:29744:0;;;;;-1:-1:-1;;;;;583:29744:0;;;;;;;;;;;;;;;-1:-1:-1;;583:29744:0;;;;;-1:-1:-1;;;;;1794:27:0;583:29744;;;;;;;;;;;;;;;;;;;;;2276:107:19;;:::i;:::-;1090:65:16;;:::i;:::-;-1:-1:-1;;;;;583:29744:0;3172:5;583:29744;;3164:28;3160:92;;583:29744;2996:9;583:29744;;;;2992:71;;3321:65;;;;:::i;:::-;11004:20;583:29744;3172:5;583:29744;-1:-1:-1;;;;;583:29744:0;;;;-1:-1:-1;;;;;583:29744:0;;;11004:20;:22;;;;;583:29744;;;;;11004:22;;;;583:29744;11004:22;;;;;;;;;583:29744;11004:22;;;;;583:29744;11086:16;;-1:-1:-1;;;;;;;2996:9:0;583:29744;;;2996:9;583:29744;;11086:16;583:29744;;11175:22;;;;-1:-1:-1;;;11175:22:0;;:13;583:29744;11175:22;;;;;;11242:20;11175:22;;;;;583:29744;11242:20;;:::i;:::-;583:29744;;11333:13;11348:19;;;;;;583:29744;;;11820:19;583:29744;3172:5;583:29744;-1:-1:-1;;;;;583:29744:0;;;11820:19;:21;;;;;583:29744;;;;;11820:21;;;;583:29744;11820:21;;;;;;;;;;11328:446;583:29744;11886:35;583:29744;;11896:10;11886:35;11896:10;11886:35;;;:::i;:::-;;;;2343:1:19;1749;2875:22;583:29744:0;2692:213:19;2343:1;583:29744:0;;11820:21;;;;;;:::i;:::-;;;:::i;:::-;;;;;583:29744;;;11333:13;11098:4;11523:21;;:15;;;;;:::i;:::-;;:21;583:29744;11519:171;;11333:13;583:29744;;11333:13;;11519:171;11636:21;11568:15;:21;:15;;;;:::i;:::-;;583:29744;-1:-1:-1;;;;;583:29744:0;;;11568:21;11636:15;;;;;:::i;:::-;;:21;583:29744;11624:10;;11636:21;;:::i;:::-;11519:171;;;11175:22;;;;;;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;11004;;;;;;:::i;:::-;;;;;583:29744;;;;;;;;;;;;;;;;2276:107:19;;:::i;:::-;3321:65:0;;:::i;:::-;15468:10;583:29744;;;;15463:4;583:29744;;;;;;15555:16;;15551:96;;583:29744;;-1:-1:-1;;;15701:34:0;;15729:4;583:29744;15701:34;;583:29744;15701:9;;;:34;583:29744;;;-1:-1:-1;;;;;583:29744:0;;15701:34;;;;;;;15692:57;15701:34;;;;;;;583:29744;15692:57;;:::i;:::-;15829:17;;;15825:97;;16208:12;583:29744;16004:27;583:29744;16263:56;583:29744;15970:24;;583:29744;15970:24;583:29744;15970:24;:::i;:::-;;583:29744;;15970:24;16004:27;:::i;:::-;15468:10;;16083:16;15468:10;-1:-1:-1;;;;;583:29744:0;;;15463:4;583:29744;;;;;;;16083:16;583:29744;15468:10;16208:12;;:::i;:::-;15970:24;583:29744;;;;;;;;;;;;;;;;;;15468:10;;583:29744;;;;16263:56;583:29744;15825:97;583:29744;;15869:42;;;15468:10;583:29744;15869:42;;583:29744;;;15869:42;;;;;15701:34;;;;;;;;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;15551:96;583:29744;;15594:42;;;15468:10;583:29744;15594:42;;583:29744;;;15869:42;583:29744;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2276:107:19;;:::i;:::-;-1:-1:-1;;;;;583:29744:0;;;;;2788:10;:22;2784:87;;583:29744;3172:5;583:29744;;3164:28;3160:92;;583:29744;;;;;;2992:71;;1240:75:18;;:::i;:::-;3321:65:0;;:::i;:::-;583:29744;;;;3536:42;-1:-1:-1;;;3536:42:0;;3572:4;3536:42;;;583:29744;3543:9;;583:29744;3543:9;;;583:29744;3536:42;;;;;;;-1:-1:-1;3536:42:0;;;583:29744;;12902:18;583:29744;3172:5;583:29744;-1:-1:-1;;;;;583:29744:0;;;12902:18;:30;;;;;583:29744;;;12902:30;;583:29744;-1:-1:-1;;583:29744:0;;;-1:-1:-1;583:29744:0;12902:30;583:29744;;12902:30;;;;:::i;:::-;;;;;;;;;;;583:29744;;;13132:14;583:29744;3172:5;583:29744;-1:-1:-1;;;;;583:29744:0;;;13132:14;583:29744;;;-1:-1:-1;13177:17:0;;;;;;15063:21;;;;;15059:113;;13157:1892;15228:17;583:29744;3172:5;583:29744;-1:-1:-1;;;;;583:29744:0;;;15228:17;:29;;;;;;-1:-1:-1;583:29744:0;;15228:29;;583:29744;15228:29;;;;;;;;;;;;:::i;:::-;;;;;;;;;;15300:31;583:29744;15300:31;15228:29;3618:19;15228:29;15300:31;15228:29;;;13157:1892;583:29744;;-1:-1:-1;;;;;583:29744:0;;;15300:31;583:29744;;15300:31;;;;;:::i;:::-;;;;3618:19;:::i;:::-;2343:1:19;1749;2875:22;583:29744:0;2692:213:19;15228:29:0;;;;;;:::i;:::-;;;;15059:113;-1:-1:-1;15135:21:0;;;;15104:18;:57;;;;;:::i;:::-;;15059:113;;13162:13;13223;;;;;:::i;:::-;13268:14;;;-1:-1:-1;;;;;;13261:27:0;13268:19;:14;;;;:::i;:::-;:19;;:::i;:::-;13261:27;;:::i;:::-;583:29744;-1:-1:-1;;;13405:40:0;;:116;;;13162:13;13384:229;;13862:26;13850:38;;:98;;;;;13162:13;13829:406;;;13162:13;14327:16;:32;:16;;;:::i;:32::-;;14323:113;;3572:4;14534:33;:16;;;:::i;:33::-;;14530:113;;14741:16;583:29744;-1:-1:-1;14741:16:0;;;;14787:14;14741:16;;;;:::i;:::-;14787:14;;;:::i;:::-;583:29744;;;;;;;;;:::i;:::-;14741:61;14770:15;;583:29744;14741:61;;;;;:::i;:::-;14882:8;;14878:87;;583:29744;;;13162:13;;14878:87;14917:33;583:29744;;;;14917:33;;;;;;;;;:::i;14530:113::-;583:29744;;;14594:34;;;;14323:113;583:29744;;14386:35;;;;;;583:29744;;;;;;;15869:42;;;13829:406;14027:59;14038:18;:14;;;;:::i;:::-;:18;;;:::i;:::-;14027:59;;;;:::i;:::-;583:29744;;;;14109:21;583:29744;-1:-1:-1;583:29744:0;;-1:-1:-1;;;;;583:29744:0;;;14109:21;583:29744;;14109:21;13829:406;14105:116;583:29744;;;14161:41;;;;13850:98;13924:24;13912:36;;;13850:98;;;13384:229;583:29744;;;13561:37;;;;13405:116;13480:14;13469:41;13480:18;:14;;;;:::i;:18::-;13469:41;;;;:::i;:::-;583:29744;13469:52;583:29744;-1:-1:-1;583:29744:0;;-1:-1:-1;;;;;583:29744:0;;;13469:52;583:29744;;13469:52;13405:116;;12902:30;;;;;;:::i;:::-;;;;3536:42;;;;;;;;;;;;;;;:::i;:::-;;;;;2992:71;583:29744;;;-1:-1:-1;;;3028:24:0;;;3160:92;583:29744;;;-1:-1:-1;;;3215:26:0;;;2784:87;583:29744;;;2833:27;;;;583:29744;;;-1:-1:-1;;583:29744:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;:::i;:::-;2276:107:19;;;:::i;:::-;1090:65:16;;:::i;:::-;-1:-1:-1;;;;;583:29744:0;;3172:5;583:29744;;3164:28;3160:92;;583:29744;2996:9;583:29744;;;;2992:71;;3321:65;;:::i;:::-;5882:19;583:29744;3172:5;583:29744;-1:-1:-1;;;;;583:29744:0;;;5882:19;:28;;;;;;583:29744;;;;;5882:28;;583:29744;5882:28;;-1:-1:-1;583:29744:0;;;;;;5882:28;583:29744;;5882:28;;;;;:::i;:::-;;;;;;;;;;;583:29744;;6006:28;583:29744;;;;;:::i;:::-;6006:28;:::i;:::-;583:29744;;6107:22;-1:-1:-1;;;6107:22:0;;:13;;;;;;583:29744;6107:22;;;;;;;;;;;583:29744;;;;;;;;;;:::i;:::-;;6256:13;6251:732;6271:14;;;;;;583:29744;;;7038:18;583:29744;3172:5;583:29744;-1:-1:-1;;;;;583:29744:0;;;7038:18;:27;;;;;;;583:29744;;;;7038:27;;;;;;;583:29744;7038:27;;;;;:::i;:::-;;;;;;;;;;;6251:732;2343:1:19;;1749;2875:22;583:29744:0;2692:213:19;7038:27:0;;;;;;:::i;:::-;;;;;583:29744;;;6256:13;6315:10;;;;;;;6302:23;6315:10;;;;;:::i;:::-;6302:23;:::i;:::-;583:29744;6357:44;583:29744;;;;-1:-1:-1;;;;;583:29744:0;;;;6357:44;:::i;:::-;6493:13;;6489:103;;583:29744;;;;;-1:-1:-1;;;;;583:29744:0;;;;6749:16;;;;;583:29744;;;6742:4;;6722:10;;6749:16;;:::i;:::-;583:29744;;;-1:-1:-1;;;;;583:29744:0;;;;;;;;;;;;;;;6722:10;;6917:55;;583:29744;;6917:55;6256:13;;;;;;;;;6489:103;583:29744;;6533:44;583:29744;;;-1:-1:-1;;;;;583:29744:0;;;;;;-1:-1:-1;;;6533:44:0;;-1:-1:-1;;;;;583:29744:0;;;6533:44;;;583:29744;;;;;;;;;6107:22;;;;;;;;;;;;;;:::i;:::-;;;;;5882:28;;;;;;:::i;:::-;;;;583:29744;;;;-1:-1:-1;;583:29744:0;;;;;;;;;;;;;;;;;;;;;;;;;;2276:107:19;;:::i;:::-;1090:65:16;;:::i;:::-;10050:16:0;;;:::i;:::-;:34;10070:14;583:29744;10078:5;583:29744;-1:-1:-1;;;;;583:29744:0;;;10050:34;-1:-1:-1;;;;;583:29744:0;;;10050:34;10046:107;;10243:16;;;:::i;:::-;583:29744;10271:4;10243:33;10239:106;;-1:-1:-1;10449:16:0;;10478:15;10449:16;;;:::i;:::-;10495:14;;;;;;:::i;:::-;583:29744;;;10495:14;583:29744;;;;;;:::i;:::-;10449:61;10478:15;;583:29744;10449:61;;;;;:::i;:::-;10589:8;;10585:75;;583:29744;10723:31;10495:14;583:29744;10732:10;10723:31;10732:10;10723:31;;;:::i;:::-;;;;2343:1:19;1749;2875:22;583:29744:0;2692:213:19;10585:75:0;10620:29;583:29744;10495:14;583:29744;10620:29;;;;;;583:29744;10620:29;;;:::i;10239:106::-;583:29744;;;10299:35;;;;10046:107;583:29744;;;10107:35;;;;583:29744;;;;;;-1:-1:-1;;583:29744:0;;;;;;1742:7:18;583:29744:0;;;;;;;;;;;;;-1:-1:-1;;;;;583:29744:0;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;1090:65:16;;:::i;:::-;583:29744:0;2996:9;583:29744;;;;2992:71;;3321:65;;:::i;:::-;-1:-1:-1;;;;;583:29744:0;;;;27508:25;;;27504:92;;8767:10;27609:21;;27605:82;;583:29744;;27972:29;;;27968:100;;8767:10;28081:25;;28077:90;;8918:22;;;;9006:30;8918:22;-1:-1:-1;;;;;583:29744:0;-1:-1:-1;;;;;;583:29744:0;;;;;;;8918:22;-1:-1:-1;;;;;583:29744:0;-1:-1:-1;;;;;;2996:9:0;583:29744;;;2996:9;583:29744;;9006:30;9109:56;-1:-1:-1;9109:56:0;;583:29744;28077:90;583:29744;-1:-1:-1;;;28129:27:0;;;27968:100;583:29744;28024:33;;;;27605:82;583:29744;;;-1:-1:-1;;;27653:23:0;;;27504:92;583:29744;;;27556:29;;;;2992:71;583:29744;;;-1:-1:-1;;;3028:24:0;;;583:29744;;;;;;-1:-1:-1;;583:29744:0;;;;1090:65:16;;:::i;:::-;583:29744:0;;;17217:31;;;;583:29744;;;;;;-1:-1:-1;;583:29744:0;;;;;2355:32;583:29744;;;;;;;;;;;;;;;;;;;;926:13:17;583:29744:0;-1:-1:-1;;;;;736:10:7;583:29744:0;;;1833:24:17;583:29744:0;;-1:-1:-1;;;;;;583:29744:0;;;926:13:17;583:29744:0;;;736:10:7;;583:29744:0;;;;;;736:10:7;583:29744:0;;2639:40:16;;;;583:29744:0;;;;;;-1:-1:-1;;;583:29744:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2276:107:19;;:::i;:::-;-1:-1:-1;;;;;583:29744:0;;;;2541:10;:21;;:47;;;;583:29744;2537:120;;;583:29744;2996:9;583:29744;;;;2992:71;;3321:65;;:::i;:::-;1240:75:18;;:::i;:::-;-1:-1:-1;;;;;;;2337:4:18;583:29744:0;;;2337:4:18;583:29744:0;2357:20:18;583:29744:0;;;2541:10;583:29744;;2357:20:18;2343:1:19;1749;2875:22;583:29744:0;2692:213:19;2537:120:0;583:29744;;;2611:35;;;;2541:47;583:29744;;;;;2541:10;2566:22;;2541:47;;;583:29744;;;;;;-1:-1:-1;;583:29744:0;;;;;-1:-1:-1;;;;;583:29744:0;;;;;;;;;;;;;;;-1:-1:-1;;583:29744:0;;;;;;;-1:-1:-1;;;;;1451:45:0;583:29744;;;;;;;;;;-1:-1:-1;;583:29744:0;;;;;;1878:21;583:29744;;;;;;;;;;;;;;;;;;-1:-1:-1;;583:29744:0;;;;;-1:-1:-1;;;;;1665:19:0;583:29744;;;;;;;;;;;;;;-1:-1:-1;;583:29744:0;;;;;;;1376:28;583:29744;;;;;;;;;-1:-1:-1;;583:29744:0;;;;;-1:-1:-1;;;;;926:13:17;583:29744:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;-1:-1:-1;;;;;583:29744:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16504:22;-1:-1:-1;;;16504:22:0;;:13;;583:29744;16504:13;-1:-1:-1;;;;;16504:13:0;583:29744;16504:22;;;;;;583:29744;16504:22;;16544:20;16504:22;;;;583:29744;16544:20;;;:::i;:::-;583:29744;;;;;;;:::i;:::-;;;;16504:22;;;;;;;;;;;;;:::i;:::-;;;;;583:29744;;;;;;;:::i;:::-;2276:107:19;;;:::i;:::-;1090:65:16;;:::i;:::-;-1:-1:-1;;;;;583:29744:0;;3172:5;583:29744;;3164:28;3160:92;;583:29744;2996:9;583:29744;;;;2992:71;;3321:65;;:::i;:::-;583:29744;;;;7369:22;-1:-1:-1;;;7369:22:0;;-1:-1:-1;7369:13:0;;;583:29744;7369:13;;;583:29744;7369:22;;;;;;7455:38;7369:22;;;;;583:29744;;;;;;;:::i;:::-;7455:38;;:::i;:::-;7589:28;583:29744;;;;;:::i;7589:28::-;7674:20;583:29744;3172:5;583:29744;-1:-1:-1;;;;;583:29744:0;;;7674:20;:29;;;;;583:29744;;;7674:29;;583:29744;7674:29;;;;;;;;583:29744;7674:29;;;:::i;:::-;;;;;;;;;;;583:29744;;;;;;;;:::i;:::-;;7803:13;7818:14;;;;;;583:29744;;8424:19;583:29744;3172:5;583:29744;-1:-1:-1;;;;;583:29744:0;;;8424:19;:28;;;;;;583:29744;8424:28;583:29744;;8424:28;;;;;;583:29744;8424:28;;583:29744;8424:28;;;:::i;:::-;583:29744;;;7803:13;7862:10;;;7849:23;7862:10;;;;583:29744;7862:10;;;:::i;7849:23::-;7891:16;;;583:29744;;;7891:21;;;7887:155;;8144:16;583:29744;8132:10;;583:29744;;;-1:-1:-1;;;;;583:29744:0;;;;8144:16;:::i;:::-;583:29744;-1:-1:-1;;;;;583:29744:0;;;;;;;;;;;;;;;8132:10;;8227:56;;583:29744;;8227:56;583:29744;7803:13;;;;;;;;7887:155;583:29744;;;;8019:8;;;7674:29;;;;;;:::i;:::-;;;;;583:29744;;;7369:22;;;;;;;;;;;;;:::i;:::-;;;;583:29744;;;;;;-1:-1:-1;;583:29744:0;;;;;;;;;:::i;:::-;1090:65:16;;:::i;:::-;-1:-1:-1;;;;;583:29744:0;;;;;;;17463:20;;;17459:81;;583:29744;17565:12;583:29744;;17553:24;;17549:89;;1090:65:16;;:::i;:::-;583:29744:0;-1:-1:-1;;;;;;1228:24:17;583:29744:0;;;1228:24:17;583:29744:0;-1:-1:-1;583:29744:0;;1267:43:17;-1:-1:-1;1267:43:17;;583:29744:0;17549:89;583:29744;;;-1:-1:-1;;;17600:27:0;;;17459:81;583:29744;;;-1:-1:-1;;;17506:23:0;;;583:29744;;;;;;-1:-1:-1;;583:29744:0;;;;-1:-1:-1;;;;;583:29744:0;;;;;:::i;:::-;;-1:-1:-1;583:29744:0;2142:39;583:29744;;;;-1:-1:-1;583:29744:0;;;;;;;;;;;;;;-1:-1:-1;;583:29744:0;;;;;;;;;:::i;:::-;2276:107:19;;:::i;:::-;1090:65:16;;:::i;:::-;583:29744:0;2996:9;583:29744;;;;2992:71;;3321:65;;:::i;:::-;9441:8;;;:::i;:::-;9518:14;583:29744;9526:5;583:29744;-1:-1:-1;;;;;583:29744:0;;;9518:14;583:29744;-1:-1:-1;;;;;583:29744:0;;;;9514:79;;583:29744;9720:18;;583:29744;9646:24;583:29744;;;-1:-1:-1;;;;;583:29744:0;-1:-1:-1;;;;;;9526:5:0;583:29744;;;9526:5;583:29744;;9646:24;583:29744;;-1:-1:-1;;;;;583:29744:0;;;;;;;;;;;;;9720:18;;;;2343:1:19;1749;2875:22;583:29744:0;2692:213:19;9514:79:0;9562:20;;;;;;-1:-1:-1;583:29744:0;;;;;9562:20;;;;583:29744;9562:20;;;;;;;;9720:18;9562:20;9720:18;9562:20;9646:24;9562:20;;;9514:79;;;;;;;;9562:20;;;;;;:::i;:::-;;;;583:29744;-1:-1:-1;;;583:29744:0;;;;;;;;;;;;;;;;:::o;:::-;;:::i;:::-;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;-1:-1:-1;583:29744:0;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;-1:-1:-1;;;;;583:29744:0;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:::o;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;:::o;:::-;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;583:29744:0;;;;;;;:::o;:::-;-1:-1:-1;;;583:29744:0;;;;;;;;;;;;;;;;;;;;:::o;:::-;;:::i;:::-;;;;;;:::i;:::-;;:::o;:::-;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;-1:-1:-1;;583:29744:0;;;;;:::i;:::-;;;;-1:-1:-1;583:29744:0;;;;:::o;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;583:29744:0;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;583:29744:0;;;;;;;;-1:-1:-1;;583:29744:0;;;;:::o;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;2802:8;583:29744;;;;2802:8;583:29744;:::o;:::-;;;;;;2802:8;583:29744;;;;;;;2802:8;583:29744;;-1:-1:-1;;583:29744:0;;:::o;:::-;-1:-1:-1;;;;;;583:29744:0;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;-1:-1:-1;583:29744:0:o;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;583:29744:0;;;;;;;;;;;;;;;;;;:::o;:::-;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;17875:223;-1:-1:-1;;;;;18003:18:0;583:29744;17989:10;:32;17985:107;;17875:223::o;17985:107::-;18044:37;583:29744;;18044:37;;;;583:29744;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;:::o;:::-;;;;;;;:::o;:::-;-1:-1:-1;;;583:29744:0;;;;;;;;;;;;;;;;;;:::o;18543:2166::-;18648:3;:8;;:20;;;;18543:2166;18648:33;;;;18543:2166;18644:70;;18743:14;;:::i;:::-;18831:13;;;18827:50;;-1:-1:-1;;;;;583:29744:0;;;-1:-1:-1;;;18977:26:0;;18655:1;18977:13;:26;:13;;;583:29744;18977:26;;18655:1;;18977:26;;;18543:2166;-1:-1:-1;18973:454:0;;19176:251;;;:::i;:::-;583:29744;;19286:18;19282:90;;19390:26;;583:29744;;;19390:26;;;;;:::i;:::-;;;;18973:454;19509:17;583:29744;19509:22;;;19505:132;;20151:27;583:29744;19776:20;:26;583:29744;19776:9;583:29744;19776:20;:::i;:::-;:26;:::i;:::-;19817:23;19843:17;19817:43;;;;;;19918;19901:62;19918:43;;19911:51;19918:43;;:::i;:::-;19911:51;:::i;:::-;19901:62;;:::i;:::-;20151:27;:::i;:::-;20193:11;;;20189:48;;20527:175;20321:15;20301:35;20321:15;20301:35;583:29744;;20301:35;20423:18;583:29744;20428:12;583:29744;-1:-1:-1;;;;;583:29744:0;;;;-1:-1:-1;;;;;583:29744:0;;;15463:4;583:29744;;;;;;;20423:18;:28;583:29744;;;20423:28;:::i;:::-;583:29744;;20461:18;;583:29744;20461:18;583:29744;20461:18;:::i;:::-;20428:12;583:29744;20301:35;583:29744;19776:9;583:29744;19509:17;583:29744;20461:18;583:29744;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;583:29744:0;;;;20527:175;18543:2166::o;20189:48::-;20220:7;;:::o;19813:328::-;19984:43;;;;19980:161;;19813:328;;;20151:27;:::i;19980:161::-;20085:43;20068:62;20085:43;;20078:51;20085:43;;:::i;20078:51::-;20068:62;;:::i;:::-;19980:161;;;;19505:132;-1:-1:-1;;19567:17:0;583:29744;19586:9;583:29744;19597:8;583:29744;;;;;;;;;;;;;;;;;;19552:54;;-1:-1:-1;583:29744:0;;-1:-1:-1;19552:54:0;19620:7::o;19282:90::-;18977:26;583:29744;;19331:26;;;;18973:454;19108:56;19141:23;19108:56;19141:23;;:::i;:::-;19108:56;583:29744;19108:56;583:29744;19108:56;;583:29744;;19108:56;18973:454;;18977:26;;;;;;;;;;;;;:::i;:::-;;;;;18644:70;18697:7;:::o;18648:33::-;-1:-1:-1;18672:9:0;583:29744;;;;;18648:33;;:20;583:29744;;1742:7:18;583:29744:0;;;;18648:20;;18227:261;583:29744;18324:17;583:29744;18306:15;;:35;18302:154;;18466:15;18227:261;:::o;18302:154::-;18306:15;;;583:29744;18227:261;:::o;21019:1278::-;583:29744;21141:18;583:29744;21161:21;;-1:-1:-1;;;;;583:29744:0;;;;;-1:-1:-1;;;21260:22:0;;;:13;;;;;;583:29744;21260:22;;;;;;;;;;;21019:1278;21327:20;21431:47;21327:20;;;;;;;;;:::i;:::-;21431:47;;;:::i;:::-;583:29744;;;;;21532:15;21563:13;21894:9;;583:29744;21558:563;21578:13;;;;;;22161:23;;;;;;;;;;22155:29;22161:23;22155:29;:::i;:::-;211:4:1;22199:20:0;;22195:96;;21019:1278;:::o;22195:96::-;22248:26;;:32;:26;;;:::i;:::-;211:4:1;583:29744:0;;;;22248:32;22195:96;21019:1278::o;21563:13::-;21612:9;;;;;;;;;;;:19;:9;;;;;:::i;:::-;;:19;583:29744;;;;;21612:19;583:29744;;;21661:111;21678:9;;21661:50;:34;21670:24;21678:15;:9;21733:15;21678:9;;;:::i;21661:50::-;21733:21;:15;;;;;;:::i;:::-;;:21;583:29744;;;21661:111;;;;;583:29744;21661:111;;;;;583:29744;;;;;;;;21661:111;;;;;;;;;;;;;;;;21608:249;21651:121;;21608:249;21875:9;:28;:15;:9;;;;:::i;:28::-;;21871:96;;21608:249;22006:13;21995:41;22006:13;22023;21996:23;583:29744;22006:13;;21981:55;22006:13;;;:::i;:::-;583:29744;21996:23;;:::i;:::-;22023:13;;;:::i;:::-;583:29744;21995:41;;:::i;:::-;21981:55;;:::i;:::-;583:29744;;;21563:13;;;;;;;;;;21871:96;21939:13;;;;;;;;;:::i;:::-;583:29744;21871:96;;;;;;21661:111;;;;;;-1:-1:-1;21661:111:0;;;;;;:::i;:::-;;;;;21608:249;21821:21;:15;;;;:::i;:::-;;:21;583:29744;21608:249;;21260:22;;;;;;;;;;;;;;:::i;:::-;;;;;22454:385;583:29744;;22598:1;22586:13;;22601;;;;;;22454:385;;;;:::o;22586:13::-;-1:-1:-1;;583:29744:0;;;;;;;22635:14;583:29744;-1:-1:-1;;;;;22635:14:0;;;;;:::i;:::-;;583:29744;;22659:10;;;;;:::i;:::-;;583:29744;;-1:-1:-1;22635:40:0;22631:118;;583:29744;;22586:13;;22631:118;583:29744;;;;22702:32;;;;;;;583:29744;22702:32;23042:1029;;583:29744;;23278:20;;;;:::i;:::-;583:29744;;;:::i;:::-;;-1:-1:-1;23423:14:0;;;;;;23042:1029;;;;;:::o;23408:13::-;23467:10;;;;:::i;:::-;;23536:44;583:29744;;;;-1:-1:-1;;;;;583:29744:0;;;23536:44;23599:13;;23595:103;;23716:30;:24;;;;;;:::i;:::-;;:30;583:29744;23749:16;;;;583:29744;23716:49;;;23712:269;;583:29744;;;;;;23408:13;;23712:269;583:29744;23918:24;23792:174;583:29744;;;;;-1:-1:-1;;;;;583:29744:0;;;;23918:24;;:::i;:::-;;:30;583:29744;;;23792:174;;;;;;;;;583:29744;;;;;-1:-1:-1;;;;;583:29744:0;;;;;;;;;;;;;;23595:103;23639:44;583:29744;;;-1:-1:-1;;;;;583:29744:0;;;;;;-1:-1:-1;;;23639:44:0;;-1:-1:-1;;;;;583:29744:0;;;23639:44;;;583:29744;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;:::o;:::-;;;;;;;:::i;:::-;-1:-1:-1;583:29744:0;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::o;24446:1319::-;;;583:29744;;;;24845:24;;;;:::i;:::-;24892;;;;:::i;:::-;583:29744;;;:::i;:::-;;-1:-1:-1;25002:13:0;;;;;;24446:1319;;;;;:::o;24987:13::-;25040:9;;;;:::i;:::-;;25103:15;;583:29744;25103:15;;;583:29744;;;;;;25103:118;;;25148:30;25157:20;583:29744;25148:36;583:29744;;-1:-1:-1;;;;;583:29744:0;;;25148:36;583:29744;;25148:38;;583:29744;25148:38;;25546:28;25626:47;25546:28;25148:38;;;;;;;;;;-1:-1:-1;;;;;25148:38:0;-1:-1:-1;25148:38:0;;;25103:118;583:29744;;;25103:118;-1:-1:-1;25276:241:0;25283:22;;;;;;25276:241;25546:28;:18;:28;25626:47;25546:28;;;25530:44;-1:-1:-1;;;;;25546:28:0;;;:18;;;;;;:::i;:::-;;:28;583:29744;25530:44;;:::i;:::-;583:29744;;25626:47;;;;583:29744;25626:47;;583:29744;25626:47;;;;;;583:29744;25626:47;25620:53;25626:47;-1:-1:-1;25626:47:0;;;25276:241;25620:53;;;:::i;:::-;25588:85;;;;:::i;:::-;583:29744;;24987:13;;25626:47;;;;;;-1:-1:-1;25626:47:0;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;25276:241;25345:18;25330:39;25345:24;:18;;;;:::i;25330:39::-;-1:-1:-1;;;;;583:29744:0;;25330:39;25326:91;;583:29744;;25276:241;;;25326:91;25393:5;;;25148:38;;;;;;-1:-1:-1;25148:38:0;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;25103:118;583:29744;-1:-1:-1;;;;;583:29744:0;25103:118;;583:29744;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;-1:-1:-1;583:29744:0;;;;;;;;;:::o;:::-;;;;;:::i;:::-;;;;;;;;;;25949:813;;583:29744;;26174:27;;;;:::i;:::-;583:29744;;;:::i;:::-;;-1:-1:-1;26275:13:0;;-1:-1:-1;;;;;26542:9:0;;;583:29744;26270:486;26290:13;;;;;;25949:813;;;;;;:::o;26275:13::-;26332:9;;;;:::i;:::-;;583:29744;;;;-1:-1:-1;;;;;583:29744:0;;;;;;-1:-1:-1;;;26449:40:0;;26483:4;26449:40;;;583:29744;26449:40;;;;583:29744;;;;;;26449:40;;;;;;;583:29744;26449:40;26355:149;26449:40;;583:29744;26449:40;;;26523:28;26449:40;;;;;;26275:13;583:29744;26373:131;583:29744;;:::i;:::-;-1:-1:-1;;;;;583:29744:0;;;;;;26373:131;;;;583:29744;26355:149;;;;:::i;:::-;;;:::i;:::-;;583:29744;-1:-1:-1;;;;;583:29744:0;;;26523:28;;26519:153;;26275:13;583:29744;;26275:13;;26519:153;26571:86;26616:41;583:29744;;26635:15;583:29744;26625:8;583:29744;26635:15;;:::i;:::-;;:21;583:29744;26616:41;;:::i;:::-;26571:15;;;;;:::i;:::-;;:21;583:29744;;;26571:86;:::i;:::-;583:29744;;26519:153;;;26449:40;;;;;;;;;;;;;;:::i;:::-;;;;26924:322;583:29744;;27031:42;-1:-1:-1;;;27031:42:0;;27067:4;27031:42;;;583:29744;27031:42;27038:9;583:29744;27038:9;-1:-1:-1;;;;;27038:9:0;583:29744;27031:42;;;;;;;-1:-1:-1;27031:42:0;;;26924:322;583:29744;27119:8;583:29744;27101:26;;:67;;;;26924:322;27084:156;;;;26924:322::o;27084:156::-;27031:42;583:29744;;27200:29;;;;27101:67;27131:37;;-1:-1:-1;27101:67:0;;;;27031:42;;;;;;;;;;;;;;;:::i;:::-;;;;;28986:446;-1:-1:-1;;;;;583:29744:0;;;;29060:22;;;29056:86;;29168:68;29169:67;;;:::i;:::-;29168:68;;583:29744;29168:68;29151:159;;583:29744;;29323:24;;583:29744;;;29323:24;;;;583:29744;29323:24;;;;;;;;;29080:1;29323:24;;;28986:446;29359:4;;583:29744;;29323:41;29319:107;;28986:446::o;29319:107::-;29323:24;583:29744;;29387:28;;;;29323:24;;;;;;;;;;;;;;;:::i;:::-;;;;;29151:159;583:29744;;29268:31;;;-1:-1:-1;;;;;583:29744:0;;;;29268:31;;;583:29744;;;15869:42;29725:600;;;583:29744;29890:13;583:29744;;;;;29969:350;29989:13;;;;;;29969:350;29725:600;;;;:::o;29974:13::-;-1:-1:-1;;;;;30023:19:0;;;;;;:::i;:::-;;583:29744;;;;;;30023:33;;;30019:167;;30204:19;;;;;;:::i;:::-;;583:29744;;30204:34;30200:89;;30303:5;;;;;30200:89;30266:4;;-1:-1:-1;30258:16:0;-1:-1:-1;30258:16:0:o;30019:167::-;583:29744;;;;;;-1:-1:-1;583:29744:0;-1:-1:-1;29974:13:0;;1384:285:9;583:29744:0;;4703:71:9;;;;;1042:25;-1:-1:-1;;;;4703:71:9;;;;;;;;583:29744:0;4703:71:9;;;;;;:::i;:::-;4901:216;;;;;;;;-1:-1:-1;4901:216:9;5136:29;;;;1384:285;5136:48;;;;1384:285;1000:150;;;;1384:285;1580:81;;;;;;1573:88;1384:285;:::o;1580:81::-;1607:54;;;;:::i;1000:150::-;583:29744:0;;;;-1:-1:-1;583:29744:0;;;;;4703:71:9;;;;;;-1:-1:-1;;;;;;4703:71:9;;;583:29744:0;4703:71:9;;;;;;:::i;:::-;4901:216;;;-1:-1:-1;4901:216:9;;;;;5136:29;;1000:150;5136:48;;;;;1000:150;1085:65;;1000:150;;;;;;5136:48;5169:15;;;;5136:48;;;:29;5147:18;;;-1:-1:-1;5136:29:9;;;;:48;5169:15;;;-1:-1:-1;5136:48:9;;;:29;5147:18;-1:-1:-1;5147:18:9;;-1:-1:-1;5136:29:9;;;4530:662;-1:-1:-1;4703:71:9;4530:662;583:29744:0;;4703:71:9;;;;-1:-1:-1;;;4703:71:9;;29211:24:0;4703:71:9;;;583:29744:0;4703:71:9;;;;;;:::i;:::-;4901:216;;;;-1:-1:-1;4901:216:9;;5136:29;;;4530:662;5136:48;;;;5129:55;4530:662;:::o;5136:48::-;5169:15;;;;4530:662;:::o;5136:29::-;4703:71;-1:-1:-1;5147:18:9;;-1:-1:-1;5136:29:9;;;613:106:15;;698:5;;;;;;:13;613:106;:::o;698:13::-;;;613:106;:::o;1401:132:16:-;-1:-1:-1;;;;;1309:6:16;583:29744:0;;736:10:7;1465:23:16;583:29744:0;;1401:132:16:o;583:29744:0:-;;;;-1:-1:-1;;;583:29744:0;;;;;;;;;;;;;;;;;;1830:108:18;583:29744:0;1742:7:18;583:29744:0;;;;;;1830:108:18:o;583:29744:0:-;;;;-1:-1:-1;;;583:29744:0;;;;;;;;;;;;;;;;;;2391:293:19;2525:7;583:29744:0;;2525:19:19;1793:1;;2525:7;583:29744:0;;2391:293:19:o;1793:1::-;;583:29744:0;;-1:-1:-1;;;1793:1:19;;;;;;;;;;;583:29744:0;1793:1:19;583:29744:0;;;1793:1:19;;940:177:20;1050:58;940:177;-1:-1:-1;;;;;583:29744:0;;1050:58:20;583:29744:0;1050:58:20;;;;583:29744:0;1050:58:20;;;583:29744:0;;;;;;1050:58:20;;;;;:::i;:::-;;:::i;1362:205::-;;;583:29744:0;;1490:68:20;-1:-1:-1;;;1490:68:20;;;;-1:-1:-1;;;;;583:29744:0;;;1490:68:20;;;583:29744:0;;;;;;;;;;;1490:68:20;;583:29744:0;;;;;;;;;;;;;1490:68:20;583:29744:0;;;5263:649:20;583:29744:0;;5670:69:6;;-1:-1:-1;;;;;583:29744:0;;;;:::i;:::-;-1:-1:-1;583:29744:0;;;;;;;;;;;5621:31:6;;;;;;;;;;;:::i;:::-;5670:69;;:::i;:::-;583:29744:0;;5801:22:20;;;:56;;;;;5263:649;583:29744:0;;;;;;;5263:649:20;:::o;583:29744:0:-;;;;;;-1:-1:-1;;;583:29744:0;;;;;;;;;;;;;;;;;;;;;;5801:56:20;5827:30;;;;;;583:29744:0;;;;5827:30:20;583:29744:0;5827:30:20;;583:29744:0;:::i;:::-;5801:56:20;;;;;7865:644:6;;;;8075:427;;;583:29744:0;;;8107:22:6;8103:290;;8407:17;;:::o;8103:290::-;1746:19;:23;583:29744:0;;8407:17:6;:::o;583:29744:0:-;;;;-1:-1:-1;;;583:29744:0;;;;;;;;;;;;;;;;;;8075:427:6;583:29744:0;;;;-1:-1:-1;9212:21:6;:17;;9387:145;;;;;;;9208:388;583:29744:0;;;;9564:20:6;;;-1:-1:-1;;;9564:20:6;;583:29744:0;9564:20:6;;;583:29744:0;;;;;;:::i
Swarm Source
ipfs://81da0912feca3cf272c37f112aabdc6f855497b51c02c39e4cad917166ce388f
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.