Skip to content

Commit

Permalink
feat: filter chains to check depending on Operator chain
Browse files Browse the repository at this point in the history
  • Loading branch information
maximegris committed Dec 14, 2024
1 parent 08cf6ac commit 3cdd62f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion typescript/cli/src/avs/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -226,6 +226,7 @@ const setOperatorName = async (
};

const setValidatorInfo = async (
operatorChain: string,
context: CommandContext,
avsOperatorRecord: Record<Address, ValidatorInfo>,
topLevelErrors: string[],
Expand All @@ -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
Expand Down

0 comments on commit 3cdd62f

Please sign in to comment.