File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ export function loadProgramsInDeployOrder(
8080 programName: string,
8181 coreSalt: string,
8282 warpSalt?: string,
83- ): { id: string, program: string }[] {
83+ ): { id: string; program: string }[] {
8484 const visited = new Set<string>();
8585 let programs: Program[] = [];
8686
Original file line number Diff line number Diff line change @@ -466,11 +466,17 @@ export class CosmosNativeProvider implements AltVM.IProvider<EncodeObject> {
466466 async getCreateMailboxTransaction (
467467 req : AltVM . ReqCreateMailbox ,
468468 ) : Promise < MsgCreateMailboxEncodeObject > {
469+ assert (
470+ req . defaultIsmAddress ,
471+ `default ism address needed in cosmos native` ,
472+ ) ;
473+
469474 return {
470475 typeUrl : R . MsgCreateMailbox . proto . type ,
471476 value : R . MsgCreateMailbox . proto . converter . create ( {
472477 local_domain : req . domainId ,
473478 owner : req . signer ,
479+ default_ism : req . defaultIsmAddress ,
474480 } ) ,
475481 } ;
476482 }
Original file line number Diff line number Diff line change @@ -111,12 +111,7 @@ export class AltVMCoreModule<PT extends ProtocolType> extends HyperlaneModule<
111111 const chainName = multiProvider . getChainName ( chain ) ;
112112 const domainId = multiProvider . getDomainId ( chain ) ;
113113
114- // 1. Deploy Mailbox with initial configuration
115- const mailbox = await signer . createMailbox ( {
116- domainId : domainId ,
117- } ) ;
118-
119- // 2. Deploy default ISM
114+ // 1. Deploy default ISM
120115 const ismModule = await AltVMIsmModule . create ( {
121116 chain : chainName ,
122117 config : config . defaultIsm ,
@@ -129,6 +124,12 @@ export class AltVMCoreModule<PT extends ProtocolType> extends HyperlaneModule<
129124
130125 const { deployedIsm : defaultIsm } = ismModule . serialize ( ) ;
131126
127+ // 2. Deploy Mailbox with initial configuration
128+ const mailbox = await signer . createMailbox ( {
129+ domainId : domainId ,
130+ defaultIsmAddress : defaultIsm ,
131+ } ) ;
132+
132133 // 3. Deploy default hook
133134 const defaultHookModule = await AltVMHookModule . create ( {
134135 chain : chainName ,
Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ export type ResQuoteRemoteTransfer = { denom: string; amount: bigint };
191191export type ReqCreateMailbox = {
192192 signer : string ;
193193 domainId : number ;
194+ defaultIsmAddress ?: string ;
194195} ;
195196export type ResCreateMailbox = { mailboxAddress : string } ;
196197
You can’t perform that action at this time.
0 commit comments