ETH Price: $2,918.48 (+4.08%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040170751462023-04-18 17:51:35569 days ago1681840295IN
 Create: VaultRegistry
0 ETH0.0635878669.10507423

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VaultRegistry

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 7 : VaultRegistry.sol
// SPDX-License-Identifier: GPL-3.0
// Docgen-SOLC: 0.8.15

pragma solidity ^0.8.15;

import { Owned } from "../utils/Owned.sol";
import { VaultMetadata } from "../interfaces/vault/IVaultRegistry.sol";
import { IERC4626Upgradeable as IERC4626 } from "openzeppelin-contracts-upgradeable/interfaces/IERC4626Upgradeable.sol";

/**
 * @title   VaultRegistry
 * @author  RedVeil
 * @notice  Registers vaults with metadata for use by a frontend.
 */
contract VaultRegistry is Owned {
  /*//////////////////////////////////////////////////////////////
                            IMMUTABLES
    //////////////////////////////////////////////////////////////*/

  /// @param _owner `AdminProxy`
  constructor(address _owner) Owned(_owner) {}

  /*//////////////////////////////////////////////////////////////
                            REGISTRATION LOGIC
    //////////////////////////////////////////////////////////////*/

  // vault to metadata
  mapping(address => VaultMetadata) public metadata;

  // asset to vault addresses
  mapping(address => address[]) public vaultsByAsset;

  // addresses of all registered vaults
  address[] public allVaults;

  event VaultAdded(address vaultAddress, string metadataCID);

  error VaultAlreadyRegistered();

  /**
   * @notice Registers a new vault with Metadata which can be used by a frontend. Caller must be owner. (`VaultController`)
   * @param _metadata VaultMetadata (See IVaultRegistry for more details)
   */
  function registerVault(VaultMetadata calldata _metadata) external onlyOwner {
    if (metadata[_metadata.vault].vault != address(0)) revert VaultAlreadyRegistered();

    metadata[_metadata.vault] = _metadata;

    allVaults.push(_metadata.vault);
    vaultsByAsset[IERC4626(_metadata.vault).asset()].push(_metadata.vault);

    emit VaultAdded(_metadata.vault, _metadata.metadataCID);
  }

  /*//////////////////////////////////////////////////////////////
                            VAULT VIEWING LOGIC
    //////////////////////////////////////////////////////////////*/

  function getVault(address vault) external view returns (VaultMetadata memory) {
    return metadata[vault];
  }

  function getVaultsByAsset(address asset) external view returns (address[] memory) {
    return vaultsByAsset[asset];
  }

  function getTotalVaults() external view returns (uint256) {
    return allVaults.length;
  }

  function getRegisteredAddresses() external view returns (address[] memory) {
    return allVaults;
  }

  function getSubmitter(address vault) external view returns (VaultMetadata memory) {
    return metadata[vault];
  }
}

File 2 of 7 : IERC4626Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (interfaces/IERC4626.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20Upgradeable.sol";
import "../token/ERC20/extensions/IERC20MetadataUpgradeable.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 IERC4626Upgradeable is IERC20Upgradeable, IERC20MetadataUpgradeable {
    event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 3 of 7 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";

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

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

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

File 5 of 7 : IOwned.sol
// SPDX-License-Identifier: GPL-3.0
// Docgen-SOLC: 0.8.15

pragma solidity ^0.8.15;

interface IOwned {
  function owner() external view returns (address);

  function nominatedOwner() external view returns (address);

  function nominateNewOwner(address owner) external;

  function acceptOwnership() external;
}

File 6 of 7 : IVaultRegistry.sol
// SPDX-License-Identifier: GPL-3.0
// Docgen-SOLC: 0.8.15
pragma solidity ^0.8.15;

import { IOwned } from "../IOwned.sol";

struct VaultMetadata {
  /// @notice Vault address
  address vault;
  /// @notice Staking contract for the vault
  address staking;
  /// @notice Owner and Vault creator
  address creator;
  /// @notice IPFS CID of vault metadata
  string metadataCID;
  /// @notice OPTIONAL - If the asset is an Lp Token these are its underlying assets
  address[8] swapTokenAddresses;
  /// @notice OPTIONAL - If the asset is an Lp Token its the pool address
  address swapAddress;
  /// @notice OPTIONAL - If the asset is an Lp Token this is the identifier of the exchange (1 = curve)
  uint256 exchange;
}

interface IVaultRegistry is IOwned {
  function getVault(address vault) external view returns (VaultMetadata memory);

  function getSubmitter(address vault) external view returns (address);

  function registerVault(VaultMetadata memory metadata) external;
}

File 7 of 7 : Owned.sol
// SPDX-License-Identifier: GPL-3.0
// Docgen-SOLC: 0.8.15

pragma solidity ^0.8.15;

// https://docs.synthetix.io/contracts/source/contracts/owned
contract Owned {
  address public owner;
  address public nominatedOwner;

  constructor(address _owner) {
    require(_owner != address(0), "Owner address cannot be 0");
    owner = _owner;
    emit OwnerChanged(address(0), _owner);
  }

  function nominateNewOwner(address _owner) external virtual onlyOwner {
    nominatedOwner = _owner;
    emit OwnerNominated(_owner);
  }

  function acceptOwnership() external virtual {
    require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
    emit OwnerChanged(owner, nominatedOwner);
    owner = nominatedOwner;
    nominatedOwner = address(0);
  }

  modifier onlyOwner() {
    _onlyOwner();
    _;
  }

  function _onlyOwner() private view {
    require(msg.sender == owner, "Only the contract owner may perform this action");
  }

  event OwnerNominated(address newOwner);
  event OwnerChanged(address oldOwner, address newOwner);
}

Settings
{
  "remappings": [
    "@openzeppelin/=node_modules/@openzeppelin/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/",
    "openzeppelin-contracts/=node_modules/@openzeppelin/contracts/",
    "solmate/=lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"VaultAlreadyRegistered","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vaultAddress","type":"address"},{"indexed":false,"internalType":"string","name":"metadataCID","type":"string"}],"name":"VaultAdded","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allVaults","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRegisteredAddresses","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"getSubmitter","outputs":[{"components":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"staking","type":"address"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"string","name":"metadataCID","type":"string"},{"internalType":"address[8]","name":"swapTokenAddresses","type":"address[8]"},{"internalType":"address","name":"swapAddress","type":"address"},{"internalType":"uint256","name":"exchange","type":"uint256"}],"internalType":"struct VaultMetadata","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalVaults","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"getVault","outputs":[{"components":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"staking","type":"address"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"string","name":"metadataCID","type":"string"},{"internalType":"address[8]","name":"swapTokenAddresses","type":"address[8]"},{"internalType":"address","name":"swapAddress","type":"address"},{"internalType":"uint256","name":"exchange","type":"uint256"}],"internalType":"struct VaultMetadata","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getVaultsByAsset","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"metadata","outputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"staking","type":"address"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"string","name":"metadataCID","type":"string"},{"internalType":"address","name":"swapAddress","type":"address"},{"internalType":"uint256","name":"exchange","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"staking","type":"address"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"string","name":"metadataCID","type":"string"},{"internalType":"address[8]","name":"swapTokenAddresses","type":"address[8]"},{"internalType":"address","name":"swapAddress","type":"address"},{"internalType":"uint256","name":"exchange","type":"uint256"}],"internalType":"struct VaultMetadata","name":"_metadata","type":"tuple"}],"name":"registerVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"vaultsByAsset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5060405161105238038061105283398101604081905261002f916100e8565b806001600160a01b03811661008a5760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015260640160405180910390fd5b600080546001600160a01b0319166001600160a01b03831690811782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a15050610118565b6000602082840312156100fa57600080fd5b81516001600160a01b038116811461011157600080fd5b9392505050565b610f2b806101276000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063535e2f801161008c57806379ba50971161006657806379ba5097146101c15780638da5cb5b146101c95780639094a91e146101dc578063a8d9bc8a146100d457600080fd5b8063535e2f801461018a57806353a47bb71461019d5780635486f100146101b057600080fd5b80630eb9af38146100d457806310894052146100fd5780631627540c1461011d578063227ef061146101325780632ba215721461013a578063453131fa1461015f575b600080fd5b6100e76100e236600461096d565b6101ef565b6040516100f491906109de565b60405180910390f35b61011061010b36600461096d565b61033d565b6040516100f49190610a81565b61013061012b36600461096d565b6103b3565b005b610110610410565b61014d61014836600461096d565b610472565b6040516100f496959493929190610ace565b61017261016d366004610b14565b61054a565b6040516001600160a01b0390911681526020016100f4565b610130610198366004610b40565b610582565b600154610172906001600160a01b031681565b6004546040519081526020016100f4565b610130610766565b600054610172906001600160a01b031681565b6101726101ea366004610b7c565b610855565b6101f76108f3565b6001600160a01b03808316600090815260026020818152604092839020835160e0810185528154861681526001820154861692810192909252918201549093169183019190915260038101805460608401919061025390610b95565b80601f016020809104026020016040519081016040528092919081815260200182805461027f90610b95565b80156102cc5780601f106102a1576101008083540402835291602001916102cc565b820191906000526020600020905b8154815290600101906020018083116102af57829003601f168201915b50505091835250506040805161010081019182905260209092019190600484019060089082845b81546001600160a01b031681526001909101906020018083116102f3575050509183525050600c8201546001600160a01b03166020820152600d9091015460409091015292915050565b6001600160a01b0381166000908152600360209081526040918290208054835181840281018401909452808452606093928301828280156103a757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610389575b50505050509050919050565b6103bb61087f565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce22906020015b60405180910390a150565b6060600480548060200260200160405190810160405280929190818152602001828054801561046857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161044a575b5050505050905090565b600260208190526000918252604090912080546001820154928201546003830180546001600160a01b039384169584169492909316926104b190610b95565b80601f01602080910402602001604051908101604052809291908181526020018280546104dd90610b95565b801561052a5780601f106104ff5761010080835404028352916020019161052a565b820191906000526020600020905b81548152906001019060200180831161050d57829003601f168201915b50505050600c830154600d9093015491926001600160a01b031691905086565b6003602052816000526040600020818154811061056657600080fd5b6000918252602090912001546001600160a01b03169150829050565b61058a61087f565b600060028161059c602085018561096d565b6001600160a01b03908116825260208201929092526040016000205416146105d7576040516324ec133760e11b815260040160405180910390fd5b80600260006105e9602084018461096d565b6001600160a01b03168152602081019190915260400160002061060c8282610dbd565b506004905061061e602083018361096d565b81546001810183556000928352602080842090910180546001600160a01b0319166001600160a01b039390931692909217909155600391906106629084018461096d565b6001600160a01b03166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561069f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c39190610e98565b6001600160a01b03168152602080820192909252604001600020906106ea9083018361096d565b815460018101835560009283526020928390200180546001600160a01b0319166001600160a01b03929092169190911790557fde06d0a5d42d84f08a24160dce7f131d29654700d65bbf5e6a75a3dc047e01899061074a9083018361096d565b6107576060840184610c02565b60405161040593929190610eb5565b6001546001600160a01b031633146107e35760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b60648201526084015b60405180910390fd5b600054600154604080516001600160a01b0393841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6004818154811061086557600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633146108f15760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b60648201526084016107da565b565b6040805160e0810182526000808252602082018190529181019190915260608082015260808101610922610936565b815260006020820181905260409091015290565b6040518061010001604052806008906020820280368337509192915050565b6001600160a01b038116811461096a57600080fd5b50565b60006020828403121561097f57600080fd5b813561098a81610955565b9392505050565b6000815180845260005b818110156109b75760208185018101518683018201520161099b565b818111156109c9576000602083870101525b50601f01601f19169290920160200192915050565b6000602080835260018060a01b038085511682850152808286015116604085015280604086015116606085015260608501516101c0806080870152610a276101e0870183610991565b9150608087015160a0870160005b6008811015610a54578251861682529186019190860190600101610a35565b50505060a08701516001600160a01b03166101a087015260c0909601519590940194909452509092915050565b6020808252825182820181905260009190848201906040850190845b81811015610ac25783516001600160a01b031683529284019291840191600101610a9d565b50909695505050505050565b600060018060a01b0380891683528088166020840152808716604084015260c06060840152610b0060c0840187610991565b941660808301525060a00152949350505050565b60008060408385031215610b2757600080fd5b8235610b3281610955565b946020939093013593505050565b600060208284031215610b5257600080fd5b813567ffffffffffffffff811115610b6957600080fd5b82016101c0818503121561098a57600080fd5b600060208284031215610b8e57600080fd5b5035919050565b600181811c90821680610ba957607f821691505b602082108103610bc957634e487b7160e01b600052602260045260246000fd5b50919050565b60008135610bdc81610955565b92915050565b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000808335601e19843603018112610c1957600080fd5b83018035915067ffffffffffffffff821115610c3457600080fd5b602001915036819003821315610c4957600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b601f821115610cb057600081815260208120601f850160051c81016020861015610c8d5750805b601f850160051c820191505b81811015610cac57828155600101610c99565b5050505b505050565b67ffffffffffffffff831115610ccd57610ccd610c50565b610ce183610cdb8354610b95565b83610c66565b6000601f841160018114610d155760008515610cfd5750838201355b600019600387901b1c1916600186901b178355610d6f565b600083815260209020601f19861690835b82811015610d465786850135825560209485019460019092019101610d26565b5086821015610d635760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b818160005b6008811015610d6f578235610d8f81610955565b82546001600160a01b0319166001600160a01b03919091161782556020929092019160019182019101610d7b565b8135610dc881610955565b610dd28183610be2565b506020820135610de181610955565b610dee8160018401610be2565b506040820135610dfd81610955565b610e0a8160028401610be2565b506060820135601e19833603018112610e2257600080fd5b8201803567ffffffffffffffff811115610e3b57600080fd5b602082019150803603821315610e5057600080fd5b610e5e818360038601610cb5565b5050610e706080830160048301610d76565b610e89610e806101808401610bcf565b600c8301610be2565b6101a0820135600d8201555050565b600060208284031215610eaa57600080fd5b815161098a81610955565b6001600160a01b03841681526040602082018190528101829052818360608301376000818301606090810191909152601f909201601f191601019291505056fea2646970667358221220f5109c09a6052d0adf8dd5414792937c380aef095135b0bab13cf107ad67398c64736f6c634300080f0033000000000000000000000000564fbe59c448743fa9382e691a0320458f6dcde5

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063535e2f801161008c57806379ba50971161006657806379ba5097146101c15780638da5cb5b146101c95780639094a91e146101dc578063a8d9bc8a146100d457600080fd5b8063535e2f801461018a57806353a47bb71461019d5780635486f100146101b057600080fd5b80630eb9af38146100d457806310894052146100fd5780631627540c1461011d578063227ef061146101325780632ba215721461013a578063453131fa1461015f575b600080fd5b6100e76100e236600461096d565b6101ef565b6040516100f491906109de565b60405180910390f35b61011061010b36600461096d565b61033d565b6040516100f49190610a81565b61013061012b36600461096d565b6103b3565b005b610110610410565b61014d61014836600461096d565b610472565b6040516100f496959493929190610ace565b61017261016d366004610b14565b61054a565b6040516001600160a01b0390911681526020016100f4565b610130610198366004610b40565b610582565b600154610172906001600160a01b031681565b6004546040519081526020016100f4565b610130610766565b600054610172906001600160a01b031681565b6101726101ea366004610b7c565b610855565b6101f76108f3565b6001600160a01b03808316600090815260026020818152604092839020835160e0810185528154861681526001820154861692810192909252918201549093169183019190915260038101805460608401919061025390610b95565b80601f016020809104026020016040519081016040528092919081815260200182805461027f90610b95565b80156102cc5780601f106102a1576101008083540402835291602001916102cc565b820191906000526020600020905b8154815290600101906020018083116102af57829003601f168201915b50505091835250506040805161010081019182905260209092019190600484019060089082845b81546001600160a01b031681526001909101906020018083116102f3575050509183525050600c8201546001600160a01b03166020820152600d9091015460409091015292915050565b6001600160a01b0381166000908152600360209081526040918290208054835181840281018401909452808452606093928301828280156103a757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610389575b50505050509050919050565b6103bb61087f565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce22906020015b60405180910390a150565b6060600480548060200260200160405190810160405280929190818152602001828054801561046857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161044a575b5050505050905090565b600260208190526000918252604090912080546001820154928201546003830180546001600160a01b039384169584169492909316926104b190610b95565b80601f01602080910402602001604051908101604052809291908181526020018280546104dd90610b95565b801561052a5780601f106104ff5761010080835404028352916020019161052a565b820191906000526020600020905b81548152906001019060200180831161050d57829003601f168201915b50505050600c830154600d9093015491926001600160a01b031691905086565b6003602052816000526040600020818154811061056657600080fd5b6000918252602090912001546001600160a01b03169150829050565b61058a61087f565b600060028161059c602085018561096d565b6001600160a01b03908116825260208201929092526040016000205416146105d7576040516324ec133760e11b815260040160405180910390fd5b80600260006105e9602084018461096d565b6001600160a01b03168152602081019190915260400160002061060c8282610dbd565b506004905061061e602083018361096d565b81546001810183556000928352602080842090910180546001600160a01b0319166001600160a01b039390931692909217909155600391906106629084018461096d565b6001600160a01b03166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561069f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c39190610e98565b6001600160a01b03168152602080820192909252604001600020906106ea9083018361096d565b815460018101835560009283526020928390200180546001600160a01b0319166001600160a01b03929092169190911790557fde06d0a5d42d84f08a24160dce7f131d29654700d65bbf5e6a75a3dc047e01899061074a9083018361096d565b6107576060840184610c02565b60405161040593929190610eb5565b6001546001600160a01b031633146107e35760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b60648201526084015b60405180910390fd5b600054600154604080516001600160a01b0393841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6004818154811061086557600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633146108f15760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b60648201526084016107da565b565b6040805160e0810182526000808252602082018190529181019190915260608082015260808101610922610936565b815260006020820181905260409091015290565b6040518061010001604052806008906020820280368337509192915050565b6001600160a01b038116811461096a57600080fd5b50565b60006020828403121561097f57600080fd5b813561098a81610955565b9392505050565b6000815180845260005b818110156109b75760208185018101518683018201520161099b565b818111156109c9576000602083870101525b50601f01601f19169290920160200192915050565b6000602080835260018060a01b038085511682850152808286015116604085015280604086015116606085015260608501516101c0806080870152610a276101e0870183610991565b9150608087015160a0870160005b6008811015610a54578251861682529186019190860190600101610a35565b50505060a08701516001600160a01b03166101a087015260c0909601519590940194909452509092915050565b6020808252825182820181905260009190848201906040850190845b81811015610ac25783516001600160a01b031683529284019291840191600101610a9d565b50909695505050505050565b600060018060a01b0380891683528088166020840152808716604084015260c06060840152610b0060c0840187610991565b941660808301525060a00152949350505050565b60008060408385031215610b2757600080fd5b8235610b3281610955565b946020939093013593505050565b600060208284031215610b5257600080fd5b813567ffffffffffffffff811115610b6957600080fd5b82016101c0818503121561098a57600080fd5b600060208284031215610b8e57600080fd5b5035919050565b600181811c90821680610ba957607f821691505b602082108103610bc957634e487b7160e01b600052602260045260246000fd5b50919050565b60008135610bdc81610955565b92915050565b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000808335601e19843603018112610c1957600080fd5b83018035915067ffffffffffffffff821115610c3457600080fd5b602001915036819003821315610c4957600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b601f821115610cb057600081815260208120601f850160051c81016020861015610c8d5750805b601f850160051c820191505b81811015610cac57828155600101610c99565b5050505b505050565b67ffffffffffffffff831115610ccd57610ccd610c50565b610ce183610cdb8354610b95565b83610c66565b6000601f841160018114610d155760008515610cfd5750838201355b600019600387901b1c1916600186901b178355610d6f565b600083815260209020601f19861690835b82811015610d465786850135825560209485019460019092019101610d26565b5086821015610d635760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b818160005b6008811015610d6f578235610d8f81610955565b82546001600160a01b0319166001600160a01b03919091161782556020929092019160019182019101610d7b565b8135610dc881610955565b610dd28183610be2565b506020820135610de181610955565b610dee8160018401610be2565b506040820135610dfd81610955565b610e0a8160028401610be2565b506060820135601e19833603018112610e2257600080fd5b8201803567ffffffffffffffff811115610e3b57600080fd5b602082019150803603821315610e5057600080fd5b610e5e818360038601610cb5565b5050610e706080830160048301610d76565b610e89610e806101808401610bcf565b600c8301610be2565b6101a0820135600d8201555050565b600060208284031215610eaa57600080fd5b815161098a81610955565b6001600160a01b03841681526040602082018190528101829052818360608301376000818301606090810191909152601f909201601f191601019291505056fea2646970667358221220f5109c09a6052d0adf8dd5414792937c380aef095135b0bab13cf107ad67398c64736f6c634300080f0033

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

000000000000000000000000564fbe59c448743fa9382e691a0320458f6dcde5

-----Decoded View---------------
Arg [0] : _owner (address): 0x564fBe59c448743FA9382E691a0320458F6dCDE5

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000564fbe59c448743fa9382e691a0320458f6dcde5


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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.