@ -14,6 +14,7 @@ import {
} from '@hyperlane-xyz/sdk' ;
import { Contexts } from '../config/contexts.js' ;
import { DEPLOYER } from '../config/environments/mainnet3/owners.js' ;
import { getWarpConfig } from '../config/warp.js' ;
import { HyperlaneAppGovernor } from '../src/govern/HyperlaneAppGovernor.js' ;
import { HyperlaneCoreGovernor } from '../src/govern/HyperlaneCoreGovernor.js' ;
@ -35,13 +36,16 @@ import { getHelloWorldApp } from './helloworld/utils.js';
function getArgs() {
return withChain ( withModuleAndFork ( withContext ( getRootArgs ( ) ) ) )
. boolean ( 'asdeployer' )
. default ( 'asdeployer' , false )
. boolean ( 'govern' )
. default ( 'govern' , false )
. alias ( 'g' , 'govern' ) . argv ;
}
async function check() {
const { fork , govern , module , environment , context , chain } = await getArgs ( ) ;
const { fork , govern , module , environment , context , chain , asdeployer } =
await getArgs ( ) ;
const envConfig = getEnvironmentConfig ( environment ) ;
let multiProvider = await envConfig . getMultiProvider ( ) ;
@ -54,11 +58,13 @@ async function check() {
[ fork ] : { blocks : { confirmations : 0 } } ,
} ) ;
const owner = await resolveOrDeployAccountOwner (
multiProvider ,
fork ,
envConfig . core [ fork ] . owner ,
) ;
const owner = asdeployer
? DEPLOYER
: await resolveOrDeployAccountOwner (
multiProvider ,
fork ,
envConfig . core [ fork ] . owner ,
) ;
const signer = await impersonateAccount ( owner , 1 e18 ) ;
multiProvider . setSigner ( fork , signer ) ;