I am working on building a DApp that interacts with the Yearn.Finance vaults, using the standard ERC4626 standards. This is my first DApp connecting to Yearn.Finance.

During development, I am looking for an option where I do not need to pay gas fees; hence looking for a solution on a testnet or Ganache on local machine.

At first, I attempted to use the SDK examples repository to try to discover and connect to some existing Vaults (or proxy) on the Goerli net (by altering the chainId and RPC_URL in the codebase). But it seems the SDK does not support chainId=4(Rinkeby) OR 5(Goerli).

When this failed, I started exploring the sample vaults repo (https://github.com/yearn/yearn-vaults/) to try and deploy them on a Goerli. But this is failing in the below section:

Note: ETHERSCAN_TOKEN and WEB3_INFURA_PROJECT_ID env vars are already configured

$ brownie run scripts/deploy.py --network goerli


You are using: 'dev' [0x2fcBCe13dB0193c2c75Ed87CB506817b17A19932]
Vault Registry [v2.registry.ychad.eth]: 0xaF1f5e1c19cB68B30aAD73846eFfDf78a5863319
  File "brownie/_cli/run.py", line 51, in main
    return_value, frame = run(
  File "brownie/project/scripts.py", line 110, in run
    return_value = f_locals[method_name](*args, **kwargs)
  File "./scripts/deploy.py", line 42, in main
    registry = Registry.at(
  File "brownie/network/contract.py", line 259, in at
    contract = ProjectContract(self._project, build, address, owner, tx)
  File "brownie/network/contract.py", line 1308, in __init__
    _DeployedContractBase.__init__(self, address, owner, tx)
  File "brownie/network/contract.py", line 708, in __init__
    raise ContractNotFound(f"No contract deployed at {address}")
ContractNotFound: No contract deployed at 0xaF1f5e1c19cB68B30aAD73846eFfDf78a5863319

Checking on Etherscan, the ENS for 'v2.registry.ychad.eth' resolves at the address mentioned above (https://etherscan.io/enslookup-search?search=v2.registry.ychad.eth)

I would highly appreciate your input on how I can have this example vaults deployed on Goerli or Rinkeby testnets, and then attempt to connect to them using a DApp.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.