Skip to content

FELT-Labs/vault-v2-adapters

Repository files navigation

Foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.

Foundry consists of:

  • Forge: Ethereum testing framework (like Truffle, Hardhat and DappTools).
  • Cast: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
  • Anvil: Local Ethereum node, akin to Ganache, Hardhat Network.
  • Chisel: Fast, utilitarian, and verbose solidity REPL.

Documentation

https://book.getfoundry.sh/

Usage

Build

forge build

Test

forge test

Some test require fork of mainnet. Those can be run as:

forge test --fork-url $RPC_URL

Format

forge fmt

Gas Snapshots

forge snapshot

Anvil

anvil

Deploy

forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>

Cast

cast <subcommand>

Help

forge --help
anvil --help
cast --help

Deploy VaultV2

The deployment script creates a new VaultV2 instance and configures it to work with a LidoAdapter. The script handles:

  • VaultV2 creation via the VaultV2Factory
  • LidoAdapter deployment and configuration
  • Role assignment and timelock configuration
  • Adapter registry setup and caps configuration

Run the deployment script:

# Run the deployment script (without block explorer verification)
forge script script/DeployVaultV2.s.sol \
  --rpc-url $RPC_URL \
  --private-key $PRIVATE_KEY \
  --broadcast
# Run the deployment script (with verification on Etherscan)
# Refer to Foundry documentation for non Etherscan block explorers
forge script script/DeployVaultV2.s.sol \
  --rpc-url $RPC_URL \
  --private-key $PRIVATE_KEY \
  --broadcast \
  --etherscan-api-key $ETHERSCAN_API_KEY \
  --verify

About

Adapters for Morpho vault v2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published