-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Description
We already have automatic checks for V3 vaults that confirm the registries and other key contracts. We also have checks for the veYFI gauges. It would be beneficial to extend these checks to also confirm V2 contract addresses are correct.
Flow for the existing checks:
- In the
/scriptsfolder there is a script calledrunAddressChecksthat checks contracts pulled from RPC calls against a constants file with contract addresses. This script is run on every dev run (yarn start). https://github.com/yearn/yearn-devdocs/tree/master/scripts - The
constants.tsfile is located in/src/ethereumand contains important addresses and info. This is where V2 vault registry contracts would live. See the addresses here: https://docs.yearn.fi/developers/addresses/v2-contracts and here: https://docs.yearn.fi/developers/wallet-integration#getting-v2-yvaults-manually- Vault Registry
- Release registry
- Health Check
- Factory Contract
Unlike V3, these are not the same for all chains, so they need to be added per chain. Ignore Fantom, as it is dead.
- There are
v3Calls.tsandv3Checks.tsfiles in/src/ethereumwhich can be used as a reference for the flow for the V2 calls and checks. The calls file makes RPC calls to get the addresses from registry contracts and ENS names. The checks file then compares those against the constants file. - The scripts file will then need to be updated to accept the V2 checks.
To be considered:
- There isn't much to check since most v2 registries don't have ENS names and don't come from other contracts. So maybe this isn't super useful? or maybe It would be good to give all these registries ENS names that can be resolved, and if the registries change then we also change the ENS.
Metadata
Metadata
Assignees
Labels
No labels