@hyperlane-xyz/core 3.8.0-beta0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/buildArtifact.json +1 -1
  2. package/contracts/middleware/InterchainAccountRouter.sol +152 -8
  3. package/contracts/mock/MockHyperlaneEnvironment.sol +0 -3
  4. package/contracts/test/TestInterchainGasPaymaster.sol +4 -0
  5. package/dist/contracts/middleware/InterchainAccountRouter.d.ts +76 -32
  6. package/dist/contracts/middleware/InterchainAccountRouter.d.ts.map +1 -1
  7. package/dist/contracts/test/TestInterchainGasPaymaster.d.ts +16 -1
  8. package/dist/contracts/test/TestInterchainGasPaymaster.d.ts.map +1 -1
  9. package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.d.ts +113 -5
  10. package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.d.ts.map +1 -1
  11. package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.js +146 -5
  12. package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.js.map +1 -1
  13. package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.d.ts +1 -1
  14. package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.d.ts.map +1 -1
  15. package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.js +1 -1
  16. package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.js.map +1 -1
  17. package/dist/factories/contracts/test/TestInterchainGasPaymaster__factory.d.ts +11 -1
  18. package/dist/factories/contracts/test/TestInterchainGasPaymaster__factory.d.ts.map +1 -1
  19. package/dist/factories/contracts/test/TestInterchainGasPaymaster__factory.js +14 -1
  20. package/dist/factories/contracts/test/TestInterchainGasPaymaster__factory.js.map +1 -1
  21. package/package.json +2 -2
@@ -1,12 +1,25 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.13;
3
3
 
4
+ /*@@@@@@@ @@@@@@@@@
5
+ @@@@@@@@@ @@@@@@@@@
6
+ @@@@@@@@@ @@@@@@@@@
7
+ @@@@@@@@@ @@@@@@@@@
8
+ @@@@@@@@@@@@@@@@@@@@@@@@@
9
+ @@@@@ HYPERLANE @@@@@@@
10
+ @@@@@@@@@@@@@@@@@@@@@@@@@
11
+ @@@@@@@@@ @@@@@@@@@
12
+ @@@@@@@@@ @@@@@@@@@
13
+ @@@@@@@@@ @@@@@@@@@
14
+ @@@@@@@@@ @@@@@@@@*/
15
+
4
16
  // ============ Internal Imports ============
5
17
  import {OwnableMulticall} from "./libs/OwnableMulticall.sol";
6
18
  import {InterchainAccountMessage} from "./libs/InterchainAccountMessage.sol";
7
19
  import {CallLib} from "./libs/Call.sol";
8
20
  import {MinimalProxy} from "../libs/MinimalProxy.sol";
9
21
  import {TypeCasts} from "../libs/TypeCasts.sol";
22
+ import {StandardHookMetadata} from "../hooks/libs/StandardHookMetadata.sol";
10
23
  import {EnumerableMapExtended} from "../libs/EnumerableMapExtended.sol";
11
24
  import {Router} from "../client/Router.sol";
12
25
 
@@ -82,17 +95,17 @@ contract InterchainAccountRouter is Router {
82
95
 
83
96
  /**
84
97
  * @notice Initializes the contract with HyperlaneConnectionClient contracts
85
- * @param _interchainGasPaymaster Unused but required by HyperlaneConnectionClient
98
+ * @param _customHook used by the Router to set the hook to override with
86
99
  * @param _interchainSecurityModule The address of the local ISM contract
87
100
  * @param _owner The address with owner privileges
88
101
  */
89
102
  function initialize(
90
- address _interchainGasPaymaster,
103
+ address _customHook,
91
104
  address _interchainSecurityModule,
92
105
  address _owner
93
106
  ) external initializer {
94
107
  _MailboxClient_initialize(
95
- _interchainGasPaymaster,
108
+ _customHook,
96
109
  _interchainSecurityModule,
97
110
  _owner
98
111
  );
@@ -157,7 +170,7 @@ contract InterchainAccountRouter is Router {
157
170
  address _to,
158
171
  uint256 _value,
159
172
  bytes memory _data
160
- ) external returns (bytes32) {
173
+ ) external payable returns (bytes32) {
161
174
  bytes32 _router = routers(_destination);
162
175
  bytes32 _ism = isms[_destination];
163
176
  bytes memory _body = InterchainAccountMessage.encode(
@@ -170,6 +183,44 @@ contract InterchainAccountRouter is Router {
170
183
  return _dispatchMessage(_destination, _router, _ism, _body);
171
184
  }
172
185
 
186
+ /**
187
+ * @notice Dispatches a single remote call to be made by an owner's
188
+ * interchain account on the destination domain
189
+ * @dev Uses the default router and ISM addresses for the destination
190
+ * domain, reverting if none have been configured
191
+ * @param _destination The remote domain of the chain to make calls on
192
+ * @param _to The address of the contract to call
193
+ * @param _value The value to include in the call
194
+ * @param _data The calldata
195
+ * @param _hookMetadata The hook metadata to override with for the hook set by the owner
196
+ * @return The Hyperlane message ID
197
+ */
198
+ function callRemote(
199
+ uint32 _destination,
200
+ address _to,
201
+ uint256 _value,
202
+ bytes memory _data,
203
+ bytes memory _hookMetadata
204
+ ) external payable returns (bytes32) {
205
+ bytes32 _router = routers(_destination);
206
+ bytes32 _ism = isms[_destination];
207
+ bytes memory _body = InterchainAccountMessage.encode(
208
+ msg.sender,
209
+ _ism,
210
+ _to,
211
+ _value,
212
+ _data
213
+ );
214
+ return
215
+ _dispatchMessageWithMetadata(
216
+ _destination,
217
+ _router,
218
+ _ism,
219
+ _body,
220
+ _hookMetadata
221
+ );
222
+ }
223
+
173
224
  /**
174
225
  * @notice Dispatches a sequence of remote calls to be made by an owner's
175
226
  * interchain account on the destination domain
@@ -183,10 +234,44 @@ contract InterchainAccountRouter is Router {
183
234
  function callRemote(
184
235
  uint32 _destination,
185
236
  CallLib.Call[] calldata _calls
186
- ) external returns (bytes32) {
237
+ ) external payable returns (bytes32) {
187
238
  bytes32 _router = routers(_destination);
188
239
  bytes32 _ism = isms[_destination];
189
- return callRemoteWithOverrides(_destination, _router, _ism, _calls);
240
+ bytes memory _body = InterchainAccountMessage.encode(
241
+ msg.sender,
242
+ _ism,
243
+ _calls
244
+ );
245
+
246
+ return _dispatchMessage(_destination, _router, _ism, _body);
247
+ }
248
+
249
+ /**
250
+ * @notice Dispatches a sequence of remote calls to be made by an owner's
251
+ * interchain account on the destination domain
252
+ * @dev Uses the default router and ISM addresses for the destination
253
+ * domain, reverting if none have been configured
254
+ * @dev Recommend using CallLib.build to format the interchain calls.
255
+ * @param _destination The remote domain of the chain to make calls on
256
+ * @param _calls The sequence of calls to make
257
+ * @param _hookMetadata The hook metadata to override with for the hook set by the owner
258
+ * @return The Hyperlane message ID
259
+ */
260
+ function callRemote(
261
+ uint32 _destination,
262
+ CallLib.Call[] calldata _calls,
263
+ bytes calldata _hookMetadata
264
+ ) external payable returns (bytes32) {
265
+ bytes32 _router = routers(_destination);
266
+ bytes32 _ism = isms[_destination];
267
+ return
268
+ callRemoteWithOverrides(
269
+ _destination,
270
+ _router,
271
+ _ism,
272
+ _calls,
273
+ _hookMetadata
274
+ );
190
275
  }
191
276
 
192
277
  /**
@@ -395,7 +480,7 @@ contract InterchainAccountRouter is Router {
395
480
  bytes32 _router,
396
481
  bytes32 _ism,
397
482
  CallLib.Call[] calldata _calls
398
- ) public returns (bytes32) {
483
+ ) public payable returns (bytes32) {
399
484
  bytes memory _body = InterchainAccountMessage.encode(
400
485
  msg.sender,
401
486
  _ism,
@@ -404,6 +489,39 @@ contract InterchainAccountRouter is Router {
404
489
  return _dispatchMessage(_destination, _router, _ism, _body);
405
490
  }
406
491
 
492
+ /**
493
+ * @notice Dispatches a sequence of remote calls to be made by an owner's
494
+ * interchain account on the destination domain
495
+ * @dev Recommend using CallLib.build to format the interchain calls
496
+ * @param _destination The remote domain of the chain to make calls on
497
+ * @param _router The remote router address
498
+ * @param _ism The remote ISM address
499
+ * @param _calls The sequence of calls to make
500
+ * @param _hookMetadata The hook metadata to override with for the hook set by the owner
501
+ * @return The Hyperlane message ID
502
+ */
503
+ function callRemoteWithOverrides(
504
+ uint32 _destination,
505
+ bytes32 _router,
506
+ bytes32 _ism,
507
+ CallLib.Call[] calldata _calls,
508
+ bytes memory _hookMetadata
509
+ ) public payable returns (bytes32) {
510
+ bytes memory _body = InterchainAccountMessage.encode(
511
+ msg.sender,
512
+ _ism,
513
+ _calls
514
+ );
515
+ return
516
+ _dispatchMessageWithMetadata(
517
+ _destination,
518
+ _router,
519
+ _ism,
520
+ _body,
521
+ _hookMetadata
522
+ );
523
+ }
524
+
407
525
  // ============ Internal Functions ============
408
526
 
409
527
  /**
@@ -474,7 +592,33 @@ contract InterchainAccountRouter is Router {
474
592
  ) private returns (bytes32) {
475
593
  require(_router != bytes32(0), "no router specified for destination");
476
594
  emit RemoteCallDispatched(_destination, msg.sender, _router, _ism);
477
- return mailbox.dispatch(_destination, _router, _body);
595
+ return mailbox.dispatch{value: msg.value}(_destination, _router, _body);
596
+ }
597
+
598
+ /**
599
+ * @notice Dispatches an InterchainAccountMessage to the remote router with hook metadata
600
+ * @param _destination The remote domain
601
+ * @param _router The address of the remote InterchainAccountRouter
602
+ * @param _ism The address of the remote ISM
603
+ * @param _body The InterchainAccountMessage body
604
+ * @param _hookMetadata The hook metadata to override with for the hook set by the owner
605
+ */
606
+ function _dispatchMessageWithMetadata(
607
+ uint32 _destination,
608
+ bytes32 _router,
609
+ bytes32 _ism,
610
+ bytes memory _body,
611
+ bytes memory _hookMetadata
612
+ ) private returns (bytes32) {
613
+ require(_router != bytes32(0), "no router specified for destination");
614
+ emit RemoteCallDispatched(_destination, msg.sender, _router, _ism);
615
+ return
616
+ mailbox.dispatch{value: msg.value}(
617
+ _destination,
618
+ _router,
619
+ _body,
620
+ _hookMetadata
621
+ );
478
622
  }
479
623
 
480
624
  /**
@@ -31,9 +31,6 @@ contract MockHyperlaneEnvironment {
31
31
  originMailbox.setDefaultIsm(address(isms[originDomain]));
32
32
  destinationMailbox.setDefaultIsm(address(isms[destinationDomain]));
33
33
 
34
- igps[originDomain] = new TestInterchainGasPaymaster();
35
- igps[destinationDomain] = new TestInterchainGasPaymaster();
36
-
37
34
  originMailbox.transferOwnership(msg.sender);
38
35
  destinationMailbox.transferOwnership(msg.sender);
39
36
 
@@ -17,4 +17,8 @@ contract TestInterchainGasPaymaster is InterchainGasPaymaster {
17
17
  ) public pure override returns (uint256) {
18
18
  return gasPrice * gasAmount;
19
19
  }
20
+
21
+ function getDefaultGasUsage() public pure returns (uint256) {
22
+ return DEFAULT_GAS_USAGE;
23
+ }
20
24
  }
@@ -17,8 +17,11 @@ export declare namespace CallLib {
17
17
  export interface InterchainAccountRouterInterface extends utils.Interface {
18
18
  functions: {
19
19
  "callRemote(uint32,address,uint256,bytes)": FunctionFragment;
20
+ "callRemote(uint32,(bytes32,uint256,bytes)[],bytes)": FunctionFragment;
20
21
  "callRemote(uint32,(bytes32,uint256,bytes)[])": FunctionFragment;
22
+ "callRemote(uint32,address,uint256,bytes,bytes)": FunctionFragment;
21
23
  "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[])": FunctionFragment;
24
+ "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[],bytes)": FunctionFragment;
22
25
  "domains()": FunctionFragment;
23
26
  "enrollRemoteRouter(uint32,bytes32)": FunctionFragment;
24
27
  "enrollRemoteRouterAndIsm(uint32,bytes32,bytes32)": FunctionFragment;
@@ -46,19 +49,25 @@ export interface InterchainAccountRouterInterface extends utils.Interface {
46
49
  "unenrollRemoteRouter(uint32)": FunctionFragment;
47
50
  "unenrollRemoteRouters(uint32[])": FunctionFragment;
48
51
  };
49
- getFunction(nameOrSignatureOrTopic: "callRemote(uint32,address,uint256,bytes)" | "callRemote(uint32,(bytes32,uint256,bytes)[])" | "callRemoteWithOverrides" | "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[])" | "domains" | "domains()" | "enrollRemoteRouter" | "enrollRemoteRouter(uint32,bytes32)" | "enrollRemoteRouterAndIsm" | "enrollRemoteRouterAndIsm(uint32,bytes32,bytes32)" | "enrollRemoteRouterAndIsms" | "enrollRemoteRouterAndIsms(uint32[],bytes32[],bytes32[])" | "enrollRemoteRouters" | "enrollRemoteRouters(uint32[],bytes32[])" | "getDeployedInterchainAccount(uint32,address,address,address)" | "getDeployedInterchainAccount(uint32,bytes32,bytes32,address)" | "getLocalInterchainAccount(uint32,address,address,address)" | "getLocalInterchainAccount(uint32,bytes32,bytes32,address)" | "getRemoteInterchainAccount(uint32,address)" | "getRemoteInterchainAccount(address,address,address)" | "handle" | "handle(uint32,bytes32,bytes)" | "hook" | "hook()" | "initialize" | "initialize(address,address,address)" | "interchainSecurityModule" | "interchainSecurityModule()" | "isms" | "isms(uint32)" | "localDomain" | "localDomain()" | "mailbox" | "mailbox()" | "owner" | "owner()" | "renounceOwnership" | "renounceOwnership()" | "routers" | "routers(uint32)" | "setHook" | "setHook(address)" | "setInterchainSecurityModule" | "setInterchainSecurityModule(address)" | "transferOwnership" | "transferOwnership(address)" | "unenrollRemoteRouter" | "unenrollRemoteRouter(uint32)" | "unenrollRemoteRouters" | "unenrollRemoteRouters(uint32[])"): FunctionFragment;
52
+ getFunction(nameOrSignatureOrTopic: "callRemote(uint32,address,uint256,bytes)" | "callRemote(uint32,(bytes32,uint256,bytes)[],bytes)" | "callRemote(uint32,(bytes32,uint256,bytes)[])" | "callRemote(uint32,address,uint256,bytes,bytes)" | "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[])" | "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[],bytes)" | "domains" | "domains()" | "enrollRemoteRouter" | "enrollRemoteRouter(uint32,bytes32)" | "enrollRemoteRouterAndIsm" | "enrollRemoteRouterAndIsm(uint32,bytes32,bytes32)" | "enrollRemoteRouterAndIsms" | "enrollRemoteRouterAndIsms(uint32[],bytes32[],bytes32[])" | "enrollRemoteRouters" | "enrollRemoteRouters(uint32[],bytes32[])" | "getDeployedInterchainAccount(uint32,address,address,address)" | "getDeployedInterchainAccount(uint32,bytes32,bytes32,address)" | "getLocalInterchainAccount(uint32,address,address,address)" | "getLocalInterchainAccount(uint32,bytes32,bytes32,address)" | "getRemoteInterchainAccount(uint32,address)" | "getRemoteInterchainAccount(address,address,address)" | "handle" | "handle(uint32,bytes32,bytes)" | "hook" | "hook()" | "initialize" | "initialize(address,address,address)" | "interchainSecurityModule" | "interchainSecurityModule()" | "isms" | "isms(uint32)" | "localDomain" | "localDomain()" | "mailbox" | "mailbox()" | "owner" | "owner()" | "renounceOwnership" | "renounceOwnership()" | "routers" | "routers(uint32)" | "setHook" | "setHook(address)" | "setInterchainSecurityModule" | "setInterchainSecurityModule(address)" | "transferOwnership" | "transferOwnership(address)" | "unenrollRemoteRouter" | "unenrollRemoteRouter(uint32)" | "unenrollRemoteRouters" | "unenrollRemoteRouters(uint32[])"): FunctionFragment;
50
53
  encodeFunctionData(functionFragment: "callRemote(uint32,address,uint256,bytes)", values: [
51
54
  PromiseOrValue<BigNumberish>,
52
55
  PromiseOrValue<string>,
53
56
  PromiseOrValue<BigNumberish>,
54
57
  PromiseOrValue<BytesLike>
55
58
  ]): string;
59
+ encodeFunctionData(functionFragment: "callRemote(uint32,(bytes32,uint256,bytes)[],bytes)", values: [
60
+ PromiseOrValue<BigNumberish>,
61
+ CallLib.CallStruct[],
62
+ PromiseOrValue<BytesLike>
63
+ ]): string;
56
64
  encodeFunctionData(functionFragment: "callRemote(uint32,(bytes32,uint256,bytes)[])", values: [PromiseOrValue<BigNumberish>, CallLib.CallStruct[]]): string;
57
- encodeFunctionData(functionFragment: "callRemoteWithOverrides", values: [
65
+ encodeFunctionData(functionFragment: "callRemote(uint32,address,uint256,bytes,bytes)", values: [
66
+ PromiseOrValue<BigNumberish>,
67
+ PromiseOrValue<string>,
58
68
  PromiseOrValue<BigNumberish>,
59
69
  PromiseOrValue<BytesLike>,
60
- PromiseOrValue<BytesLike>,
61
- CallLib.CallStruct[]
70
+ PromiseOrValue<BytesLike>
62
71
  ]): string;
63
72
  encodeFunctionData(functionFragment: "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[])", values: [
64
73
  PromiseOrValue<BigNumberish>,
@@ -66,6 +75,13 @@ export interface InterchainAccountRouterInterface extends utils.Interface {
66
75
  PromiseOrValue<BytesLike>,
67
76
  CallLib.CallStruct[]
68
77
  ]): string;
78
+ encodeFunctionData(functionFragment: "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[],bytes)", values: [
79
+ PromiseOrValue<BigNumberish>,
80
+ PromiseOrValue<BytesLike>,
81
+ PromiseOrValue<BytesLike>,
82
+ CallLib.CallStruct[],
83
+ PromiseOrValue<BytesLike>
84
+ ]): string;
69
85
  encodeFunctionData(functionFragment: "domains", values?: undefined): string;
70
86
  encodeFunctionData(functionFragment: "domains()", values?: undefined): string;
71
87
  encodeFunctionData(functionFragment: "enrollRemoteRouter", values: [PromiseOrValue<BigNumberish>, PromiseOrValue<BytesLike>]): string;
@@ -169,9 +185,11 @@ export interface InterchainAccountRouterInterface extends utils.Interface {
169
185
  encodeFunctionData(functionFragment: "unenrollRemoteRouters", values: [PromiseOrValue<BigNumberish>[]]): string;
170
186
  encodeFunctionData(functionFragment: "unenrollRemoteRouters(uint32[])", values: [PromiseOrValue<BigNumberish>[]]): string;
171
187
  decodeFunctionResult(functionFragment: "callRemote(uint32,address,uint256,bytes)", data: BytesLike): Result;
188
+ decodeFunctionResult(functionFragment: "callRemote(uint32,(bytes32,uint256,bytes)[],bytes)", data: BytesLike): Result;
172
189
  decodeFunctionResult(functionFragment: "callRemote(uint32,(bytes32,uint256,bytes)[])", data: BytesLike): Result;
173
- decodeFunctionResult(functionFragment: "callRemoteWithOverrides", data: BytesLike): Result;
190
+ decodeFunctionResult(functionFragment: "callRemote(uint32,address,uint256,bytes,bytes)", data: BytesLike): Result;
174
191
  decodeFunctionResult(functionFragment: "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[])", data: BytesLike): Result;
192
+ decodeFunctionResult(functionFragment: "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[],bytes)", data: BytesLike): Result;
175
193
  decodeFunctionResult(functionFragment: "domains", data: BytesLike): Result;
176
194
  decodeFunctionResult(functionFragment: "domains()", data: BytesLike): Result;
177
195
  decodeFunctionResult(functionFragment: "enrollRemoteRouter", data: BytesLike): Result;
@@ -300,16 +318,22 @@ export interface InterchainAccountRouter extends BaseContract {
300
318
  once: OnEvent<this>;
301
319
  removeListener: OnEvent<this>;
302
320
  functions: {
303
- "callRemote(uint32,address,uint256,bytes)"(_destination: PromiseOrValue<BigNumberish>, _to: PromiseOrValue<string>, _value: PromiseOrValue<BigNumberish>, _data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
321
+ "callRemote(uint32,address,uint256,bytes)"(_destination: PromiseOrValue<BigNumberish>, _to: PromiseOrValue<string>, _value: PromiseOrValue<BigNumberish>, _data: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
322
+ from?: PromiseOrValue<string>;
323
+ }): Promise<ContractTransaction>;
324
+ "callRemote(uint32,(bytes32,uint256,bytes)[],bytes)"(_destination: PromiseOrValue<BigNumberish>, _calls: CallLib.CallStruct[], _hookMetadata: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
304
325
  from?: PromiseOrValue<string>;
305
326
  }): Promise<ContractTransaction>;
306
- "callRemote(uint32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _calls: CallLib.CallStruct[], overrides?: Overrides & {
327
+ "callRemote(uint32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _calls: CallLib.CallStruct[], overrides?: PayableOverrides & {
307
328
  from?: PromiseOrValue<string>;
308
329
  }): Promise<ContractTransaction>;
309
- callRemoteWithOverrides(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], overrides?: Overrides & {
330
+ "callRemote(uint32,address,uint256,bytes,bytes)"(_destination: PromiseOrValue<BigNumberish>, _to: PromiseOrValue<string>, _value: PromiseOrValue<BigNumberish>, _data: PromiseOrValue<BytesLike>, _hookMetadata: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
310
331
  from?: PromiseOrValue<string>;
311
332
  }): Promise<ContractTransaction>;
312
- "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], overrides?: Overrides & {
333
+ "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], overrides?: PayableOverrides & {
334
+ from?: PromiseOrValue<string>;
335
+ }): Promise<ContractTransaction>;
336
+ "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[],bytes)"(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], _hookMetadata: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
313
337
  from?: PromiseOrValue<string>;
314
338
  }): Promise<ContractTransaction>;
315
339
  domains(overrides?: CallOverrides): Promise<[number[]]>;
@@ -356,10 +380,10 @@ export interface InterchainAccountRouter extends BaseContract {
356
380
  }): Promise<ContractTransaction>;
357
381
  hook(overrides?: CallOverrides): Promise<[string]>;
358
382
  "hook()"(overrides?: CallOverrides): Promise<[string]>;
359
- initialize(_interchainGasPaymaster: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
383
+ initialize(_customHook: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
360
384
  from?: PromiseOrValue<string>;
361
385
  }): Promise<ContractTransaction>;
362
- "initialize(address,address,address)"(_interchainGasPaymaster: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
386
+ "initialize(address,address,address)"(_customHook: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
363
387
  from?: PromiseOrValue<string>;
364
388
  }): Promise<ContractTransaction>;
365
389
  interchainSecurityModule(overrides?: CallOverrides): Promise<[string]>;
@@ -411,16 +435,22 @@ export interface InterchainAccountRouter extends BaseContract {
411
435
  from?: PromiseOrValue<string>;
412
436
  }): Promise<ContractTransaction>;
413
437
  };
414
- "callRemote(uint32,address,uint256,bytes)"(_destination: PromiseOrValue<BigNumberish>, _to: PromiseOrValue<string>, _value: PromiseOrValue<BigNumberish>, _data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
438
+ "callRemote(uint32,address,uint256,bytes)"(_destination: PromiseOrValue<BigNumberish>, _to: PromiseOrValue<string>, _value: PromiseOrValue<BigNumberish>, _data: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
439
+ from?: PromiseOrValue<string>;
440
+ }): Promise<ContractTransaction>;
441
+ "callRemote(uint32,(bytes32,uint256,bytes)[],bytes)"(_destination: PromiseOrValue<BigNumberish>, _calls: CallLib.CallStruct[], _hookMetadata: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
415
442
  from?: PromiseOrValue<string>;
416
443
  }): Promise<ContractTransaction>;
417
- "callRemote(uint32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _calls: CallLib.CallStruct[], overrides?: Overrides & {
444
+ "callRemote(uint32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _calls: CallLib.CallStruct[], overrides?: PayableOverrides & {
418
445
  from?: PromiseOrValue<string>;
419
446
  }): Promise<ContractTransaction>;
420
- callRemoteWithOverrides(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], overrides?: Overrides & {
447
+ "callRemote(uint32,address,uint256,bytes,bytes)"(_destination: PromiseOrValue<BigNumberish>, _to: PromiseOrValue<string>, _value: PromiseOrValue<BigNumberish>, _data: PromiseOrValue<BytesLike>, _hookMetadata: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
421
448
  from?: PromiseOrValue<string>;
422
449
  }): Promise<ContractTransaction>;
423
- "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], overrides?: Overrides & {
450
+ "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], overrides?: PayableOverrides & {
451
+ from?: PromiseOrValue<string>;
452
+ }): Promise<ContractTransaction>;
453
+ "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[],bytes)"(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], _hookMetadata: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
424
454
  from?: PromiseOrValue<string>;
425
455
  }): Promise<ContractTransaction>;
426
456
  domains(overrides?: CallOverrides): Promise<number[]>;
@@ -467,10 +497,10 @@ export interface InterchainAccountRouter extends BaseContract {
467
497
  }): Promise<ContractTransaction>;
468
498
  hook(overrides?: CallOverrides): Promise<string>;
469
499
  "hook()"(overrides?: CallOverrides): Promise<string>;
470
- initialize(_interchainGasPaymaster: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
500
+ initialize(_customHook: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
471
501
  from?: PromiseOrValue<string>;
472
502
  }): Promise<ContractTransaction>;
473
- "initialize(address,address,address)"(_interchainGasPaymaster: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
503
+ "initialize(address,address,address)"(_customHook: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
474
504
  from?: PromiseOrValue<string>;
475
505
  }): Promise<ContractTransaction>;
476
506
  interchainSecurityModule(overrides?: CallOverrides): Promise<string>;
@@ -523,9 +553,11 @@ export interface InterchainAccountRouter extends BaseContract {
523
553
  }): Promise<ContractTransaction>;
524
554
  callStatic: {
525
555
  "callRemote(uint32,address,uint256,bytes)"(_destination: PromiseOrValue<BigNumberish>, _to: PromiseOrValue<string>, _value: PromiseOrValue<BigNumberish>, _data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<string>;
556
+ "callRemote(uint32,(bytes32,uint256,bytes)[],bytes)"(_destination: PromiseOrValue<BigNumberish>, _calls: CallLib.CallStruct[], _hookMetadata: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<string>;
526
557
  "callRemote(uint32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _calls: CallLib.CallStruct[], overrides?: CallOverrides): Promise<string>;
527
- callRemoteWithOverrides(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], overrides?: CallOverrides): Promise<string>;
558
+ "callRemote(uint32,address,uint256,bytes,bytes)"(_destination: PromiseOrValue<BigNumberish>, _to: PromiseOrValue<string>, _value: PromiseOrValue<BigNumberish>, _data: PromiseOrValue<BytesLike>, _hookMetadata: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<string>;
528
559
  "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], overrides?: CallOverrides): Promise<string>;
560
+ "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[],bytes)"(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], _hookMetadata: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<string>;
529
561
  domains(overrides?: CallOverrides): Promise<number[]>;
530
562
  "domains()"(overrides?: CallOverrides): Promise<number[]>;
531
563
  enrollRemoteRouter(_domain: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<void>;
@@ -546,8 +578,8 @@ export interface InterchainAccountRouter extends BaseContract {
546
578
  "handle(uint32,bytes32,bytes)"(_origin: PromiseOrValue<BigNumberish>, _sender: PromiseOrValue<BytesLike>, _message: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<void>;
547
579
  hook(overrides?: CallOverrides): Promise<string>;
548
580
  "hook()"(overrides?: CallOverrides): Promise<string>;
549
- initialize(_interchainGasPaymaster: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
550
- "initialize(address,address,address)"(_interchainGasPaymaster: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
581
+ initialize(_customHook: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
582
+ "initialize(address,address,address)"(_customHook: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
551
583
  interchainSecurityModule(overrides?: CallOverrides): Promise<string>;
552
584
  "interchainSecurityModule()"(overrides?: CallOverrides): Promise<string>;
553
585
  isms(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
@@ -586,16 +618,22 @@ export interface InterchainAccountRouter extends BaseContract {
586
618
  RemoteIsmEnrolled(domain?: PromiseOrValue<BigNumberish> | null, ism?: null): RemoteIsmEnrolledEventFilter;
587
619
  };
588
620
  estimateGas: {
589
- "callRemote(uint32,address,uint256,bytes)"(_destination: PromiseOrValue<BigNumberish>, _to: PromiseOrValue<string>, _value: PromiseOrValue<BigNumberish>, _data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
621
+ "callRemote(uint32,address,uint256,bytes)"(_destination: PromiseOrValue<BigNumberish>, _to: PromiseOrValue<string>, _value: PromiseOrValue<BigNumberish>, _data: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
622
+ from?: PromiseOrValue<string>;
623
+ }): Promise<BigNumber>;
624
+ "callRemote(uint32,(bytes32,uint256,bytes)[],bytes)"(_destination: PromiseOrValue<BigNumberish>, _calls: CallLib.CallStruct[], _hookMetadata: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
625
+ from?: PromiseOrValue<string>;
626
+ }): Promise<BigNumber>;
627
+ "callRemote(uint32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _calls: CallLib.CallStruct[], overrides?: PayableOverrides & {
590
628
  from?: PromiseOrValue<string>;
591
629
  }): Promise<BigNumber>;
592
- "callRemote(uint32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _calls: CallLib.CallStruct[], overrides?: Overrides & {
630
+ "callRemote(uint32,address,uint256,bytes,bytes)"(_destination: PromiseOrValue<BigNumberish>, _to: PromiseOrValue<string>, _value: PromiseOrValue<BigNumberish>, _data: PromiseOrValue<BytesLike>, _hookMetadata: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
593
631
  from?: PromiseOrValue<string>;
594
632
  }): Promise<BigNumber>;
595
- callRemoteWithOverrides(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], overrides?: Overrides & {
633
+ "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], overrides?: PayableOverrides & {
596
634
  from?: PromiseOrValue<string>;
597
635
  }): Promise<BigNumber>;
598
- "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], overrides?: Overrides & {
636
+ "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[],bytes)"(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], _hookMetadata: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
599
637
  from?: PromiseOrValue<string>;
600
638
  }): Promise<BigNumber>;
601
639
  domains(overrides?: CallOverrides): Promise<BigNumber>;
@@ -642,10 +680,10 @@ export interface InterchainAccountRouter extends BaseContract {
642
680
  }): Promise<BigNumber>;
643
681
  hook(overrides?: CallOverrides): Promise<BigNumber>;
644
682
  "hook()"(overrides?: CallOverrides): Promise<BigNumber>;
645
- initialize(_interchainGasPaymaster: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
683
+ initialize(_customHook: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
646
684
  from?: PromiseOrValue<string>;
647
685
  }): Promise<BigNumber>;
648
- "initialize(address,address,address)"(_interchainGasPaymaster: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
686
+ "initialize(address,address,address)"(_customHook: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
649
687
  from?: PromiseOrValue<string>;
650
688
  }): Promise<BigNumber>;
651
689
  interchainSecurityModule(overrides?: CallOverrides): Promise<BigNumber>;
@@ -698,16 +736,22 @@ export interface InterchainAccountRouter extends BaseContract {
698
736
  }): Promise<BigNumber>;
699
737
  };
700
738
  populateTransaction: {
701
- "callRemote(uint32,address,uint256,bytes)"(_destination: PromiseOrValue<BigNumberish>, _to: PromiseOrValue<string>, _value: PromiseOrValue<BigNumberish>, _data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
739
+ "callRemote(uint32,address,uint256,bytes)"(_destination: PromiseOrValue<BigNumberish>, _to: PromiseOrValue<string>, _value: PromiseOrValue<BigNumberish>, _data: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
740
+ from?: PromiseOrValue<string>;
741
+ }): Promise<PopulatedTransaction>;
742
+ "callRemote(uint32,(bytes32,uint256,bytes)[],bytes)"(_destination: PromiseOrValue<BigNumberish>, _calls: CallLib.CallStruct[], _hookMetadata: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
743
+ from?: PromiseOrValue<string>;
744
+ }): Promise<PopulatedTransaction>;
745
+ "callRemote(uint32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _calls: CallLib.CallStruct[], overrides?: PayableOverrides & {
702
746
  from?: PromiseOrValue<string>;
703
747
  }): Promise<PopulatedTransaction>;
704
- "callRemote(uint32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _calls: CallLib.CallStruct[], overrides?: Overrides & {
748
+ "callRemote(uint32,address,uint256,bytes,bytes)"(_destination: PromiseOrValue<BigNumberish>, _to: PromiseOrValue<string>, _value: PromiseOrValue<BigNumberish>, _data: PromiseOrValue<BytesLike>, _hookMetadata: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
705
749
  from?: PromiseOrValue<string>;
706
750
  }): Promise<PopulatedTransaction>;
707
- callRemoteWithOverrides(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], overrides?: Overrides & {
751
+ "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], overrides?: PayableOverrides & {
708
752
  from?: PromiseOrValue<string>;
709
753
  }): Promise<PopulatedTransaction>;
710
- "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[])"(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], overrides?: Overrides & {
754
+ "callRemoteWithOverrides(uint32,bytes32,bytes32,(bytes32,uint256,bytes)[],bytes)"(_destination: PromiseOrValue<BigNumberish>, _router: PromiseOrValue<BytesLike>, _ism: PromiseOrValue<BytesLike>, _calls: CallLib.CallStruct[], _hookMetadata: PromiseOrValue<BytesLike>, overrides?: PayableOverrides & {
711
755
  from?: PromiseOrValue<string>;
712
756
  }): Promise<PopulatedTransaction>;
713
757
  domains(overrides?: CallOverrides): Promise<PopulatedTransaction>;
@@ -754,10 +798,10 @@ export interface InterchainAccountRouter extends BaseContract {
754
798
  }): Promise<PopulatedTransaction>;
755
799
  hook(overrides?: CallOverrides): Promise<PopulatedTransaction>;
756
800
  "hook()"(overrides?: CallOverrides): Promise<PopulatedTransaction>;
757
- initialize(_interchainGasPaymaster: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
801
+ initialize(_customHook: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
758
802
  from?: PromiseOrValue<string>;
759
803
  }): Promise<PopulatedTransaction>;
760
- "initialize(address,address,address)"(_interchainGasPaymaster: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
804
+ "initialize(address,address,address)"(_customHook: PromiseOrValue<string>, _interchainSecurityModule: PromiseOrValue<string>, _owner: PromiseOrValue<string>, overrides?: Overrides & {
761
805
  from?: PromiseOrValue<string>;
762
806
  }): Promise<PopulatedTransaction>;
763
807
  interchainSecurityModule(overrides?: CallOverrides): Promise<PopulatedTransaction>;