chore: instantiate router config in warp generators (#4807)
### Description Uncomments generator code to actually instantiate a `routerConfig`, as recommended in https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/4799#discussion_r1826157666 ### Drive-by changes <!-- Are there any minor or drive-by changes also included? --> ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests --> --------- Co-authored-by: Trevor Porter <tkporter4@gmail.com>pull/4810/head
parent
3660ebe47b
commit
ffbc13cc58
@ -0,0 +1,30 @@ |
||||
import { Contexts } from '../../config/contexts.js'; |
||||
import { Role } from '../../src/roles.js'; |
||||
import { |
||||
getArgs, |
||||
withBuildArtifactPath, |
||||
withChains, |
||||
withConcurrentDeploy, |
||||
withContext, |
||||
} from '../agent-utils.js'; |
||||
import { getEnvironmentConfig, getHyperlaneCore } from '../core-utils.js'; |
||||
|
||||
export async function getRouterConfig() { |
||||
const { |
||||
context = Contexts.Hyperlane, |
||||
environment, |
||||
chains, |
||||
} = await withContext( |
||||
withConcurrentDeploy(withChains(withBuildArtifactPath(getArgs()))), |
||||
).argv; |
||||
const envConfig = getEnvironmentConfig(environment); |
||||
|
||||
let multiProvider = await envConfig.getMultiProvider( |
||||
context, |
||||
Role.Deployer, |
||||
true, |
||||
chains, |
||||
); |
||||
const { core } = await getHyperlaneCore(environment, multiProvider); |
||||
return core.getRouterConfig(envConfig.owners); |
||||
} |
Loading…
Reference in new issue