-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: enroll validators for megabatch + infra deployer fixes (#4383)
chore: enroll validators for megabatch - ~~also includes some of the verifier fixes in #4381 - drive-by: passing the timeout through to the core deployer - drive-by: fixing artifact write-back in infra deploy (resolves #4351) - drive-by: adds a script to solely check for validator announcements and print a nice table  --------- Signed-off-by: pbio <[email protected]>
- Loading branch information
1 parent
330d302
commit 44588c3
Showing
8 changed files
with
176 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters