Skip to content
Verified contractPartialAGPL-3.0-only

NestVault

Address0xf60499b60ca71db115e65d122dfa4b017e636f58
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.30

 

Same code

21 more contracts

 

Details

Compiler
solc 0.8.30+commit.73712a01
Language
solidity
Optimization
Yes, 200 runs
EVM version
osaka
Via IR
yes
License
AGPL-3.0-only
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
25,723,990
Creation transaction
0x4251f4fd01…cb9558e594
Libraries
contracts/NestVault.sol:NestVaultAdminLogic0x650e…c6b56econtracts/NestVault.sol:NestVaultRedeemLogic0x48b8…a340afcontracts/NestVault.sol:NestVaultDepositLogic0x9a1f…9d93f4contracts/NestVault.sol:NestVaultOperatorLogic0x6980…b7343ccontracts/NestVault.sol:NestVaultTransferLogic0xb46c…f8be8b

97 files

The source code is large: one file is shown at a time. Choose a file in the list.

contracts/NestVault.sol

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.30;

// contracts
import {NestVaultPermit2} from "contracts/NestVaultPermit2.sol";
import {ERC4626Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC4626Upgradeable.sol";

/// @title  NestVault
/// @notice NestVault is an IERC7575 & IERC7540Redeem-compatible vault
///         It allows users to deposit assets and mint shares, redeem shares for assets, and interact with operators
///         via the ERC7540 standard. The vault uses NestShare for managing underlying assets
/// @dev    This contract is upgradeable and composes `NestVaultCore` through `NestVaultPermit2`, with
///         ERC4626-style deposit/mint and ERC7540 async redeem/operator behavior.
/// @author plumenetwork
contract NestVault is NestVaultPermit2 {
    /// @notice Initializes the contract with the address of the share and base tokens.
    /// @param _share The address of the share token
    constructor(address payable _share, address _permit2) NestVaultPermit2(_share, _permit2) {
        _disableInitializers();
    }

    /// @notice Initializes the vault with the necessary configurations
    /// @dev    Initializes key components such as the accountant, asset, and owner
    /// @param  _accountant                     address The address of the NestHubAccountant contract
    /// @param  _asset                          address The underlying asset that users deposit (e.g., ERC20 token)
    /// @param  _owner                          address The address of the owner of the vault
    /// @param  _minRate                        uint256 The minimum rate allowed for the vault,
    ///                                                 it should be less than the decimals of the underlying asset
    /// @param  _operatorRegistry               address The operator registry (zero disables registry)
    function initialize(
        address _accountant,
        address _asset,
        address _owner,
        uint256 _minRate,
        address _operatorRegistry
    ) external virtual initializer {
        __NestVaultCore_init(_accountant, _asset, _owner, _minRate, _operatorRegistry, version());
    }

    /// @notice Returns the version of the NestVault contract.
    /// @dev    This version is used to track contract upgrades.
    /// @return string A string representing the version of the contract.
    function version() public pure returns (string memory) {
        return "1.1.0";
    }

    /// @inheritdoc ERC4626Upgradeable
    function deposit(uint256 _assets, address _receiver) public virtual override returns (uint256) {
        return super.deposit(_assets, _receiver);
    }

    /// @inheritdoc ERC4626Upgradeable
    function mint(uint256 _shares, address _receiver) public virtual override returns (uint256) {
        return super.mint(_shares, _receiver);
    }
}
Compiler settingsShow
{
  "viaIR": true,
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "libraries": {
    "contracts/NestVault.sol": {
      "NestVaultAdminLogic": "0x650e7888021464ef21acca35ebf555eae6c6b56e",
      "NestVaultRedeemLogic": "0x48b81f8045197dc8cb4bd0ec82ad01fec9a340af",
      "NestVaultDepositLogic": "0x9a1f7fadf287b1589052be86935cc5c58d9d93f4",
      "NestVaultOperatorLogic": "0x69809ff5f7184456bc1b5d99da06ef9861b7343c",
      "NestVaultTransferLogic": "0xb46cd1bec30df4d7b863ac577cc55de750f8be8b"
    }
  },
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "evmVersion": "osaka",
  "remappings": [
    "@boring-vault/=node_modules/boring-vault/",
    "@layerzerolabs/=node_modules/@layerzerolabs/",
    "@morpho/=node_modules/morpho/src/",
    "@openzeppelin/=node_modules/@openzeppelin/",
    "@pendle/=node_modules/@pendle/",
    "@predicate/=node_modules/@predicate/contracts/",
    "@solmate/=node_modules/solmate/src/",
    "@uniswap/permit2/=node_modules/@uniswap/permit2/src/",
    "boring-vault/=node_modules/boring-vault/",
    "createx/=node_modules/createx/src/",
    "ds-test/=node_modules/@layerzerolabs/toolbox-foundry/lib/ds-test/",
    "forge-std/=node_modules/forge-std/src/",
    "hardhat-deploy/=node_modules/hardhat-deploy/",
    "hardhat/=node_modules/hardhat/",
    "morpho/=node_modules/morpho/",
    "solidity-bytes-utils/contracts/=node_modules/@layerzerolabs/toolbox-foundry/lib/solidity-bytes-utils/",
    "solmate/=node_modules/solmate/",
    "src/=node_modules/boring-vault/src/"
  ]
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.