From 3cdd62f501006b6353703b30a6012079c0d61ab2 Mon Sep 17 00:00:00 2001 From: Maxime GRIS Date: Sat, 14 Dec 2024 11:47:18 +0100 Subject: [PATCH] feat: filter chains to check depending on Operator chain --- typescript/cli/src/avs/check.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/typescript/cli/src/avs/check.ts b/typescript/cli/src/avs/check.ts index 27055c6848..88844369a4 100644 --- a/typescript/cli/src/avs/check.ts +++ b/typescript/cli/src/avs/check.ts @@ -81,7 +81,7 @@ export const checkValidatorAvsSetup = async ( ); if (!isObjEmpty(avsOperatorRecord)) { - await setValidatorInfo(context, avsOperatorRecord, topLevelErrors); + await setValidatorInfo(chain, context, avsOperatorRecord, topLevelErrors); } logOutput(avsOperatorRecord, topLevelErrors); @@ -226,6 +226,7 @@ const setOperatorName = async ( }; const setValidatorInfo = async ( + operatorChain: string, context: CommandContext, avsOperatorRecord: Record, topLevelErrors: string[], @@ -242,6 +243,10 @@ const setValidatorInfo = async ( // skip if chain is not an Ethereum chain if (chainMetadata[chain].protocol !== ProtocolType.Ethereum) continue; + // skip if chain is a testnet chain and operator chain is Ethereum chain + if (operatorChain === 'ethereum' && chainMetadata[chain].isTestnet) + continue; + const chainAddresses = addresses[chain]; // skip if no contract addresses are found for this chain