Skip to content

yearn/yearn-lens

Repository files navigation

Yearn Lens

What you'll find here

  • CI/CD pipelines used by Github Actions to provide linting checks and test runs. (workflows/)

  • A suite of Solidity Smart Contracts responsible for the Yearn Lens infrastructure. (contracts/)

  • Interfaces for Yearn + external DeFi protocols on ethereum mainnet. (interfaces/)

  • Test suite that runs on a Brownie+Ganache mainnet fork. (tests/)

  • Deployment script. (tests/)

This mix is configured for use with Ganache on a forked mainnet.

Basic Use

Installing dependencies

yarn install --frozen-lockfile
pip install -r requirements-dev.txt

Running linting

Solidity linting

yarn lint:check
yarn lint

Python tests linting

yarn lint:tests-check
yarn lint:tests

Tests

See the Brownie documentation for more detailed information on testing your project.

Running all tests

brownie test

Running a single test file

brownie test tests/registry_adapters/test_adapter_vaults_v1.py

Running a single test interactively

brownie test tests/registry_adapters/test_adapter_vaults_v1.py --interactive

Known issues

No access to archive state errors

If you are using Ganache to fork a network, then you may have issues with the blockchain archive state every 30 minutes. This is due to your node provider (i.e. Infura) only allowing free users access to 30 minutes of archive state. To solve this, upgrade to a paid plan, or simply restart your ganache instance and redploy your contracts.

Alternatively, Infura can be replaced with Alchemy API, which does not timeout after 30 minutes. This would require changes in your ~/.brownie/network-config.yaml file, affecting global Brownie configuration. Works only with ganache < 7.0.0. Following configuration is provided only for educational purposes, more information can be found in Brownie documentation. You will need to set ALCHEMY_SECRET_KEY environment variable, which can be found on Alchemy dashboard.

development:
  - cmd: ganache-cli
    cmd_settings:
      accounts: 10
      evm_version: istanbul
      fork: mainnet-alchemy
      gas_limit: 12000000
      mnemonic: brownie
      port: 8545
    host: http://127.0.0.1
    id: mainnet-fork
    name: Ganache-CLI (Mainnet Fork)
    timeout: 120

live:
  - name: Ethereum
    networks:
      - chainid: 1
        explorer: https://api.etherscan.io/api
        host: https://eth-mainnet.alchemyapi.io/v2/$ALCHEMY_SECRET_KEY
        id: mainnet-alchemy
        name: Mainnet (Alchemy)

Deployment Addresses

Contract Ethereum Fantom Arbitrum
AddressesProvider Link Link Link
Oracle Link Link Link
CalculationsChainlink Link n/a n/a
CalculationsChainlinkRegistry n/a n/a Link
CalculationsBand n/a Link n/a
CalculationsFixedForex Link n/a n/a
CalculationsSynth Link n/a n/a
CalculationsCurve Link Link Link
CalculationsYearnVaults Link n/a n/a
CalculationsIronBank Link n/a n/a
CalculationsUniswapV3 Link n/a n/a
CalculationsSushiswap Link Link Link
CalculationsSpookyswap n/a Link n/a
CalculationsZeroPrice Link n/a n/a
RegistryAdapterIronBank Link Link Link
RegistryAdapterV2Vaults Link Link Link
Helper Link Link Link
BalancesHelper Link Link Link
StrategiesHelper Link Link Link
PricesHelper Link n/a n/a
AllowancesHelper Link Link Link
AddressMergeHelper Link Link n/a
ParnterTracker Link n/a n/a
CurveRegistryOverrides Link n/a Link
AddressGeneratorV2Vaults Link Link Link
AddressGeneratorIronBank Link Link Link

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published