3export type GuardValidatorFn = (p: {ethNetwork: string, name: string, cluster_name: string, action: string}) => Promise<void> 5export const mkGuardValidator = ({getSafeEthVal}: {getSafeEthVal: (p: {ethNetwork: string}) => {name: string, cluster_name: string, ethValidatorNums?: number[]}}): GuardValidatorFn => async ({ethNetwork, name, cluster_name, action}) => { 6 if (action == 'delete') return 7 const ethVal = getSafeEthVal({ethNetwork}) 8 const isMatch = ethVal.name == name && ethVal.cluster_name == cluster_name 10 console.log({ethVal, name, cluster_name}) 11 throw new Error('NOT SAFE, CANNOT DEPLOY') 13 for (const ethValidatorNum of ethVal.ethValidatorNums ?? []) {