chore: enroll validators for megabatch + infra deployer fixes (#4383)
chore: enroll validators for megabatch - ~~also includes some of the verifier fixes in https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/4381~~ - drive-by: passing the timeout through to the core deployer - drive-by: fixing artifact write-back in infra deploy (resolves https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/4351) - drive-by: adds a script to solely check for validator announcements and print a nice table ![image](https://github.com/user-attachments/assets/ced42cf2-71af-4cff-b573-23b55a080a0a) --------- Signed-off-by: pbio <10051819+paulbalaji@users.noreply.github.com>pull/4391/head
parent
330d302a61
commit
44588c31d4
@ -0,0 +1,5 @@ |
||||
--- |
||||
'@hyperlane-xyz/sdk': minor |
||||
--- |
||||
|
||||
Enroll new validators for cyber degenchain kroma lisk lukso merlin metis mint proofofplay real sanko tangle xai taiko |
@ -0,0 +1,41 @@ |
||||
import { defaultMultisigConfigs } from '@hyperlane-xyz/sdk'; |
||||
import { eqAddress } from '@hyperlane-xyz/utils'; |
||||
|
||||
import { isEthereumProtocolChain } from '../src/utils/utils.js'; |
||||
|
||||
import { getArgs, withChains } from './agent-utils.js'; |
||||
import { getEnvironmentConfig, getHyperlaneCore } from './core-utils.js'; |
||||
|
||||
async function main() { |
||||
const { environment, chains } = await withChains(getArgs()).argv; |
||||
const config = getEnvironmentConfig(environment); |
||||
const { core } = await getHyperlaneCore(environment); |
||||
|
||||
const targetNetworks = ( |
||||
chains && chains.length > 0 ? chains : config.supportedChainNames |
||||
).filter(isEthereumProtocolChain); |
||||
|
||||
const results = await Promise.all( |
||||
targetNetworks.map(async (chain) => { |
||||
const validatorAnnounce = core.getContracts(chain).validatorAnnounce; |
||||
const announcedValidators = |
||||
await validatorAnnounce.getAnnouncedValidators(); |
||||
|
||||
const validators = defaultMultisigConfigs[chain].validators || []; |
||||
const missingValidators = validators.filter( |
||||
(validator) => |
||||
!announcedValidators.some((x) => eqAddress(x, validator)), |
||||
); |
||||
|
||||
return { |
||||
chain, |
||||
status: |
||||
missingValidators.length === 0 ? '✅' : missingValidators.join(', '), |
||||
}; |
||||
}), |
||||
); |
||||
|
||||
console.table(results); |
||||
} |
||||
|
||||
main().catch(console.error); |
Loading…
Reference in new issue