@hyperlane-xyz/cli 3.2.0 → 3.4.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.
- package/dist/src/commands/config.js +4 -4
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/deploy.js +10 -7
- package/dist/src/commands/deploy.js.map +1 -1
- package/dist/src/commands/options.d.ts.map +1 -1
- package/dist/src/commands/options.js +1 -2
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/send.js +2 -5
- package/dist/src/commands/send.js.map +1 -1
- package/dist/src/commands/status.d.ts.map +1 -1
- package/dist/src/commands/status.js +0 -2
- package/dist/src/commands/status.js.map +1 -1
- package/dist/src/config/artifacts.d.ts +9 -1
- package/dist/src/config/artifacts.d.ts.map +1 -1
- package/dist/src/config/artifacts.js +26 -2
- package/dist/src/config/artifacts.js.map +1 -1
- package/dist/src/config/chain.d.ts +1 -1
- package/dist/src/config/chain.d.ts.map +1 -1
- package/dist/src/config/chain.js +4 -22
- package/dist/src/config/chain.js.map +1 -1
- package/dist/src/config/hooks.d.ts +89 -211
- package/dist/src/config/hooks.d.ts.map +1 -1
- package/dist/src/config/hooks.js +220 -84
- package/dist/src/config/hooks.js.map +1 -1
- package/dist/src/config/ism.d.ts +3 -3
- package/dist/src/config/ism.d.ts.map +1 -1
- package/dist/src/config/ism.js +26 -19
- package/dist/src/config/ism.js.map +1 -1
- package/dist/src/config/multisig.d.ts.map +1 -1
- package/dist/src/config/multisig.js +13 -3
- package/dist/src/config/multisig.js.map +1 -1
- package/dist/src/config/warp.d.ts.map +1 -1
- package/dist/src/config/warp.js +5 -5
- package/dist/src/config/warp.js.map +1 -1
- package/dist/src/context.d.ts +33 -400
- package/dist/src/context.d.ts.map +1 -1
- package/dist/src/context.js +41 -11
- package/dist/src/context.js.map +1 -1
- package/dist/src/context.test.d.ts +2 -0
- package/dist/src/context.test.d.ts.map +1 -0
- package/dist/src/context.test.js +21 -0
- package/dist/src/context.test.js.map +1 -0
- package/dist/src/deploy/agent.d.ts +3 -2
- package/dist/src/deploy/agent.d.ts.map +1 -1
- package/dist/src/deploy/agent.js +10 -22
- package/dist/src/deploy/agent.js.map +1 -1
- package/dist/src/deploy/core.d.ts +5 -1
- package/dist/src/deploy/core.d.ts.map +1 -1
- package/dist/src/deploy/core.js +63 -102
- package/dist/src/deploy/core.js.map +1 -1
- package/dist/src/deploy/warp.d.ts.map +1 -1
- package/dist/src/deploy/warp.js +15 -9
- package/dist/src/deploy/warp.js.map +1 -1
- package/dist/src/send/message.d.ts +3 -3
- package/dist/src/send/message.d.ts.map +1 -1
- package/dist/src/send/message.js +13 -8
- package/dist/src/send/message.js.map +1 -1
- package/dist/src/send/transfer.d.ts +4 -4
- package/dist/src/send/transfer.d.ts.map +1 -1
- package/dist/src/send/transfer.js +22 -11
- package/dist/src/send/transfer.js.map +1 -1
- package/dist/src/status/message.d.ts +3 -3
- package/dist/src/status/message.d.ts.map +1 -1
- package/dist/src/status/message.js +14 -5
- package/dist/src/status/message.js.map +1 -1
- package/dist/src/tests/hooks.test.d.ts +2 -0
- package/dist/src/tests/hooks.test.d.ts.map +1 -0
- package/dist/src/tests/hooks.test.js +83 -0
- package/dist/src/tests/hooks.test.js.map +1 -0
- package/dist/src/tests/ism.test.js +1 -1
- package/dist/src/tests/ism.test.js.map +1 -1
- package/dist/src/tests/multisig.test.js +1 -1
- package/dist/src/tests/multisig.test.js.map +1 -1
- package/dist/src/utils/chains.d.ts +2 -2
- package/dist/src/utils/chains.d.ts.map +1 -1
- package/dist/src/utils/chains.js +8 -9
- package/dist/src/utils/chains.js.map +1 -1
- package/dist/src/utils/files.d.ts.map +1 -1
- package/dist/src/utils/files.js +5 -0
- package/dist/src/utils/files.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/examples/hooks.yaml +66 -0
- package/examples/ism-advanced.yaml +1 -1
- package/package.json +3 -3
- package/examples/hook-config.yaml +0 -18
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { input } from '@inquirer/prompts';
|
|
1
|
+
import { confirm, input } from '@inquirer/prompts';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
import { ZHash } from '@hyperlane-xyz/sdk';
|
|
3
4
|
import { isValidAddress, normalizeAddressEvm, objMap, } from '@hyperlane-xyz/utils';
|
|
4
5
|
import { errorRed, log, logBlue, logGreen } from '../../logger.js';
|
|
6
|
+
import { sdkContractAddressesMap } from '../context.js';
|
|
5
7
|
import { runMultiChainSelectionStep } from '../utils/chains.js';
|
|
6
8
|
import { mergeYamlOrJson, readYamlOrJson } from '../utils/files.js';
|
|
7
9
|
import { readChainConfigsIfExists } from './chain.js';
|
|
8
10
|
const MultisigConfigMapSchema = z.object({}).catchall(z.object({
|
|
9
11
|
threshold: z.number(),
|
|
10
|
-
validators: z.array(
|
|
12
|
+
validators: z.array(ZHash),
|
|
11
13
|
}));
|
|
12
14
|
export function readMultisigConfig(filePath) {
|
|
13
15
|
const config = readYamlOrJson(filePath);
|
|
@@ -44,6 +46,7 @@ export function isValidMultisigConfig(config) {
|
|
|
44
46
|
}
|
|
45
47
|
export async function createMultisigConfig({ format, outPath, chainConfigPath, }) {
|
|
46
48
|
logBlue('Creating a new multisig config');
|
|
49
|
+
log('Select your own chain below to run your own validators. If you want to reuse existing Hyperlane validators instead of running your own, do not select additional mainnet or testnet chains.');
|
|
47
50
|
const customChains = readChainConfigsIfExists(chainConfigPath);
|
|
48
51
|
const chains = await runMultiChainSelectionStep(customChains);
|
|
49
52
|
const result = {};
|
|
@@ -55,6 +58,13 @@ export async function createMultisigConfig({ format, outPath, chainConfigPath, }
|
|
|
55
58
|
result[chain] = lastConfig;
|
|
56
59
|
continue;
|
|
57
60
|
}
|
|
61
|
+
if (Object.keys(sdkContractAddressesMap).includes(chain)) {
|
|
62
|
+
const reuseCoreConfig = await confirm({
|
|
63
|
+
message: 'Use existing Hyperlane validators for this chain?',
|
|
64
|
+
});
|
|
65
|
+
if (reuseCoreConfig)
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
58
68
|
const thresholdInput = await input({
|
|
59
69
|
message: 'Enter threshold of signers (number)',
|
|
60
70
|
});
|
|
@@ -78,7 +88,7 @@ export async function createMultisigConfig({ format, outPath, chainConfigPath, }
|
|
|
78
88
|
mergeYamlOrJson(outPath, result, format);
|
|
79
89
|
}
|
|
80
90
|
else {
|
|
81
|
-
errorRed(`Multisig config is invalid, please see https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/cli/examples/
|
|
91
|
+
errorRed(`Multisig config is invalid, please see https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/cli/examples/ism.yaml for an example`);
|
|
82
92
|
throw new Error('Invalid multisig config');
|
|
83
93
|
}
|
|
84
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multisig.js","sourceRoot":"","sources":["../../../src/config/multisig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"multisig.js","sourceRoot":"","sources":["../../../src/config/multisig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAA4B,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAEL,cAAc,EACd,mBAAmB,EACnB,MAAM,GACP,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAc,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEhF,OAAO,EAAE,w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,CAAC;YACH,IAAI,eAAe;gBAAE,SAAS;QAChC,CAAC;QAED,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC;YACjC,OAAO,EAAE,qCAAqC;SAC/C,CAAC,CAAC;QACH,MAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QAE/C,MAAM,eAAe,GAAG,MAAM,KAAK,CAAC;YAClC,OAAO,EAAE,kDAAkD;SAC5D,CAAC,CAAC;QACH,MAAM,UAAU,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QACnE,UAAU,GAAG;YACX,SAAS;YACT,UAAU;SACX,CAAC;QACF,MAAM,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC;QAE3B,gFAAgF;QAChF,2BAA2B;QAC3B,2DAA2D;QAC3D,MAAM;IACR,CAAC;IAED,IAAI,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,QAAQ,CAAC,6CAA6C,OAAO,EAAE,CAAC,CAAC;QACjE,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;SAAM,CAAC;QACN,QAAQ,CACN,sJAAsJ,CACvJ,CAAC;QACF,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warp.d.ts","sourceRoot":"","sources":["../../../src/config/warp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"warp.d.ts","sourceRoot":"","sources":["../../../src/config/warp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAS,MAAM,oBAAoB,CAAC;AAOtD,OAAO,EAAE,UAAU,EAAmC,MAAM,mBAAmB,CAAC;AAWhF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBhC,CAAC;AAEH,KAAK,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC3B,UAAU,EAAE,KAAK,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAClD,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWnD;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,GAAG,WAEjD;AAED,wBAAsB,gBAAgB,CAAC,EACrC,MAAM,EACN,OAAO,EACP,eAAe,GAChB,EAAE;IACD,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;CACzB,iBA+CA"}
|
package/dist/src/config/warp.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { confirm, input } from '@inquirer/prompts';
|
|
2
2
|
import { ethers } from 'ethers';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { TokenType } from '@hyperlane-xyz/sdk';
|
|
4
|
+
import { TokenType, ZHash } from '@hyperlane-xyz/sdk';
|
|
5
5
|
import { errorRed, logBlue, logGreen } from '../../logger.js';
|
|
6
6
|
import { runMultiChainSelectionStep, runSingleChainSelectionStep, } from '../utils/chains.js';
|
|
7
7
|
import { readYamlOrJson, writeYamlOrJson } from '../utils/files.js';
|
|
8
8
|
import { readChainConfigsIfExists } from './chain.js';
|
|
9
9
|
const ConnectionConfigSchema = {
|
|
10
|
-
mailbox:
|
|
11
|
-
interchainGasPaymaster:
|
|
12
|
-
interchainSecurityModule:
|
|
10
|
+
mailbox: ZHash.optional(),
|
|
11
|
+
interchainGasPaymaster: ZHash.optional(),
|
|
12
|
+
interchainSecurityModule: ZHash.optional(),
|
|
13
13
|
foreignDeployment: z.string().optional(),
|
|
14
14
|
};
|
|
15
15
|
export const WarpRouteConfigSchema = z.object({
|
|
16
16
|
base: z.object({
|
|
17
17
|
type: z.literal(TokenType.native).or(z.literal(TokenType.collateral)),
|
|
18
18
|
chainName: z.string(),
|
|
19
|
-
address:
|
|
19
|
+
address: ZHash.optional(),
|
|
20
20
|
isNft: z.boolean().optional(),
|
|
21
21
|
name: z.string().optional(),
|
|
22
22
|
symbol: z.string().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warp.js","sourceRoot":"","sources":["../../../src/config/warp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"warp.js","sourceRoot":"","sources":["../../../src/config/warp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iB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,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC;IACpE,MAAM,WAAW,GAAG,QAAQ;QAC1B,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW;QAC9B,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,QAAQ;QACpB,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,MAAM,OAAO,CAAC,EAAE,OAAO,EAAE,gCAAgC,EAAE,CAAC,CAAC;IAEjE,MAAM,eAAe,GAAG,MAAM,0BAA0B,CACtD,YAAY,EACZ,yDAAyD,CAC1D,CAAC;IAEF,uEAAuE;IAEvE,MAAM,MAAM,GAAoB;QAC9B,IAAI,EAAE;YACJ,SAAS,EAAE,SAAS;YACpB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,WAAW;YACpB,KAAK;SACN;QACD,UAAU,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;KACnE,CAAC;IAEF,IAAI,sBAAsB,CAAC,MAAM,CAAC,EAAE,CAAC;QACnC,QAAQ,CAAC,+CAA+C,OAAO,EAAE,CAAC,CAAC;QACnE,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;SAAM,CAAC;QACN,QAAQ,CACN,0JAA0J,CAC3J,CAAC;QACF,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC"}
|
package/dist/src/context.d.ts
CHANGED
|
@@ -1,404 +1,37 @@
|
|
|
1
1
|
import { ethers } from 'ethers';
|
|
2
|
-
import { ChainMap, ChainMetadata, HyperlaneContractsMap, MultiProvider } from '@hyperlane-xyz/sdk';
|
|
3
|
-
export declare const sdkContractAddressesMap:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
bsc: {
|
|
20
|
-
storageGasOracle: string;
|
|
21
|
-
proxyAdmin: string;
|
|
22
|
-
merkleRootMultisigIsmFactory: string;
|
|
23
|
-
messageIdMultisigIsmFactory: string;
|
|
24
|
-
aggregationIsmFactory: string;
|
|
25
|
-
aggregationHookFactory: string;
|
|
26
|
-
routingIsmFactory: string;
|
|
27
|
-
mailbox: string;
|
|
28
|
-
merkleTreeHook: string;
|
|
29
|
-
interchainGasPaymaster: string;
|
|
30
|
-
aggregationHook: string;
|
|
31
|
-
protocolFee: string;
|
|
32
|
-
validatorAnnounce: string;
|
|
33
|
-
};
|
|
34
|
-
arbitrum: {
|
|
35
|
-
storageGasOracle: string;
|
|
36
|
-
proxyAdmin: string;
|
|
37
|
-
merkleRootMultisigIsmFactory: string;
|
|
38
|
-
messageIdMultisigIsmFactory: string;
|
|
39
|
-
aggregationIsmFactory: string;
|
|
40
|
-
aggregationHookFactory: string;
|
|
41
|
-
routingIsmFactory: string;
|
|
42
|
-
merkleTreeHook: string;
|
|
43
|
-
interchainGasPaymaster: string;
|
|
44
|
-
aggregationHook: string;
|
|
45
|
-
protocolFee: string;
|
|
46
|
-
mailbox: string;
|
|
47
|
-
validatorAnnounce: string;
|
|
48
|
-
};
|
|
49
|
-
optimism: {
|
|
50
|
-
storageGasOracle: string;
|
|
51
|
-
proxyAdmin: string;
|
|
52
|
-
merkleRootMultisigIsmFactory: string;
|
|
53
|
-
messageIdMultisigIsmFactory: string;
|
|
54
|
-
aggregationIsmFactory: string;
|
|
55
|
-
aggregationHookFactory: string;
|
|
56
|
-
routingIsmFactory: string;
|
|
57
|
-
merkleTreeHook: string;
|
|
58
|
-
interchainGasPaymaster: string;
|
|
59
|
-
aggregationHook: string;
|
|
60
|
-
protocolFee: string;
|
|
61
|
-
mailbox: string;
|
|
62
|
-
validatorAnnounce: string;
|
|
63
|
-
};
|
|
64
|
-
moonbeam: {
|
|
65
|
-
storageGasOracle: string;
|
|
66
|
-
proxyAdmin: string;
|
|
67
|
-
merkleRootMultisigIsmFactory: string;
|
|
68
|
-
messageIdMultisigIsmFactory: string;
|
|
69
|
-
aggregationIsmFactory: string;
|
|
70
|
-
aggregationHookFactory: string;
|
|
71
|
-
routingIsmFactory: string;
|
|
72
|
-
mailbox: string;
|
|
73
|
-
merkleTreeHook: string;
|
|
74
|
-
interchainGasPaymaster: string;
|
|
75
|
-
aggregationHook: string;
|
|
76
|
-
protocolFee: string;
|
|
77
|
-
validatorAnnounce: string;
|
|
78
|
-
};
|
|
79
|
-
gnosis: {
|
|
80
|
-
storageGasOracle: string;
|
|
81
|
-
proxyAdmin: string;
|
|
82
|
-
merkleRootMultisigIsmFactory: string;
|
|
83
|
-
messageIdMultisigIsmFactory: string;
|
|
84
|
-
aggregationIsmFactory: string;
|
|
85
|
-
aggregationHookFactory: string;
|
|
86
|
-
mailbox: string;
|
|
87
|
-
routingIsmFactory: string;
|
|
88
|
-
merkleTreeHook: string;
|
|
89
|
-
interchainGasPaymaster: string;
|
|
90
|
-
aggregationHook: string;
|
|
91
|
-
protocolFee: string;
|
|
92
|
-
validatorAnnounce: string;
|
|
93
|
-
};
|
|
94
|
-
base: {
|
|
95
|
-
merkleRootMultisigIsmFactory: string;
|
|
96
|
-
messageIdMultisigIsmFactory: string;
|
|
97
|
-
aggregationIsmFactory: string;
|
|
98
|
-
aggregationHookFactory: string;
|
|
99
|
-
routingIsmFactory: string;
|
|
100
|
-
proxyAdmin: string;
|
|
101
|
-
mailbox: string;
|
|
102
|
-
merkleTreeHook: string;
|
|
103
|
-
storageGasOracle: string;
|
|
104
|
-
interchainGasPaymaster: string;
|
|
105
|
-
aggregationHook: string;
|
|
106
|
-
protocolFee: string;
|
|
107
|
-
validatorAnnounce: string;
|
|
108
|
-
};
|
|
109
|
-
scroll: {
|
|
110
|
-
merkleRootMultisigIsmFactory: string;
|
|
111
|
-
messageIdMultisigIsmFactory: string;
|
|
112
|
-
aggregationIsmFactory: string;
|
|
113
|
-
aggregationHookFactory: string;
|
|
114
|
-
routingIsmFactory: string;
|
|
115
|
-
merkleTreeHook: string;
|
|
116
|
-
proxyAdmin: string;
|
|
117
|
-
storageGasOracle: string;
|
|
118
|
-
interchainGasPaymaster: string;
|
|
119
|
-
aggregationHook: string;
|
|
120
|
-
protocolFee: string;
|
|
121
|
-
mailbox: string;
|
|
122
|
-
validatorAnnounce: string;
|
|
123
|
-
};
|
|
124
|
-
polygonzkevm: {
|
|
125
|
-
merkleRootMultisigIsmFactory: string;
|
|
126
|
-
messageIdMultisigIsmFactory: string;
|
|
127
|
-
aggregationIsmFactory: string;
|
|
128
|
-
aggregationHookFactory: string;
|
|
129
|
-
routingIsmFactory: string;
|
|
130
|
-
merkleTreeHook: string;
|
|
131
|
-
proxyAdmin: string;
|
|
132
|
-
storageGasOracle: string;
|
|
133
|
-
interchainGasPaymaster: string;
|
|
134
|
-
aggregationHook: string;
|
|
135
|
-
protocolFee: string;
|
|
136
|
-
mailbox: string;
|
|
137
|
-
validatorAnnounce: string;
|
|
138
|
-
};
|
|
139
|
-
celo: {
|
|
140
|
-
storageGasOracle: string;
|
|
141
|
-
proxyAdmin: string;
|
|
142
|
-
merkleRootMultisigIsmFactory: string;
|
|
143
|
-
messageIdMultisigIsmFactory: string;
|
|
144
|
-
aggregationIsmFactory: string;
|
|
145
|
-
aggregationHookFactory: string;
|
|
146
|
-
routingIsmFactory: string;
|
|
147
|
-
merkleTreeHook: string;
|
|
148
|
-
interchainGasPaymaster: string;
|
|
149
|
-
aggregationHook: string;
|
|
150
|
-
protocolFee: string;
|
|
151
|
-
mailbox: string;
|
|
152
|
-
validatorAnnounce: string;
|
|
153
|
-
};
|
|
154
|
-
ethereum: {
|
|
155
|
-
storageGasOracle: string;
|
|
156
|
-
proxyAdmin: string;
|
|
157
|
-
merkleRootMultisigIsmFactory: string;
|
|
158
|
-
messageIdMultisigIsmFactory: string;
|
|
159
|
-
aggregationIsmFactory: string;
|
|
160
|
-
aggregationHookFactory: string;
|
|
161
|
-
routingIsmFactory: string;
|
|
162
|
-
merkleTreeHook: string;
|
|
163
|
-
interchainGasPaymaster: string;
|
|
164
|
-
aggregationHook: string;
|
|
165
|
-
protocolFee: string;
|
|
166
|
-
mailbox: string;
|
|
167
|
-
validatorAnnounce: string;
|
|
168
|
-
};
|
|
169
|
-
avalanche: {
|
|
170
|
-
storageGasOracle: string;
|
|
171
|
-
proxyAdmin: string;
|
|
172
|
-
merkleRootMultisigIsmFactory: string;
|
|
173
|
-
messageIdMultisigIsmFactory: string;
|
|
174
|
-
aggregationIsmFactory: string;
|
|
175
|
-
aggregationHookFactory: string;
|
|
176
|
-
routingIsmFactory: string;
|
|
177
|
-
merkleTreeHook: string;
|
|
178
|
-
interchainGasPaymaster: string;
|
|
179
|
-
aggregationHook: string;
|
|
180
|
-
protocolFee: string;
|
|
181
|
-
mailbox: string;
|
|
182
|
-
validatorAnnounce: string;
|
|
183
|
-
};
|
|
184
|
-
mantapacific: {
|
|
185
|
-
merkleRootMultisigIsmFactory: string;
|
|
186
|
-
messageIdMultisigIsmFactory: string;
|
|
187
|
-
aggregationIsmFactory: string;
|
|
188
|
-
aggregationHookFactory: string;
|
|
189
|
-
routingIsmFactory: string;
|
|
190
|
-
proxyAdmin: string;
|
|
191
|
-
mailbox: string;
|
|
192
|
-
domainRoutingIsm: string;
|
|
193
|
-
storageGasOracle: string;
|
|
194
|
-
interchainGasPaymaster: string;
|
|
195
|
-
merkleTreeHook: string;
|
|
196
|
-
aggregationHook: string;
|
|
197
|
-
protocolFee: string;
|
|
198
|
-
validatorAnnounce: string;
|
|
199
|
-
};
|
|
200
|
-
basegoerli: {
|
|
201
|
-
merkleRootMultisigIsmFactory: string;
|
|
202
|
-
messageIdMultisigIsmFactory: string;
|
|
203
|
-
aggregationIsmFactory: string;
|
|
204
|
-
aggregationHookFactory: string;
|
|
205
|
-
routingIsmFactory: string;
|
|
206
|
-
proxyAdmin: string;
|
|
207
|
-
mailbox: string;
|
|
208
|
-
validatorAnnounce: string;
|
|
209
|
-
merkleTreeHook: string;
|
|
210
|
-
storageGasOracle: string;
|
|
211
|
-
interchainGasPaymaster: string;
|
|
212
|
-
aggregationHook: string;
|
|
213
|
-
protocolFee: string;
|
|
214
|
-
fallbackRoutingHook: string;
|
|
215
|
-
};
|
|
216
|
-
arbitrumgoerli: {
|
|
217
|
-
merkleRootMultisigIsmFactory: string;
|
|
218
|
-
messageIdMultisigIsmFactory: string;
|
|
219
|
-
aggregationIsmFactory: string;
|
|
220
|
-
aggregationHookFactory: string;
|
|
221
|
-
routingIsmFactory: string;
|
|
222
|
-
proxyAdmin: string;
|
|
223
|
-
mailbox: string;
|
|
224
|
-
validatorAnnounce: string;
|
|
225
|
-
merkleTreeHook: string;
|
|
226
|
-
storageGasOracle: string;
|
|
227
|
-
interchainGasPaymaster: string;
|
|
228
|
-
aggregationHook: string;
|
|
229
|
-
protocolFee: string;
|
|
230
|
-
fallbackRoutingHook: string;
|
|
231
|
-
};
|
|
232
|
-
optimismgoerli: {
|
|
233
|
-
merkleRootMultisigIsmFactory: string;
|
|
234
|
-
messageIdMultisigIsmFactory: string;
|
|
235
|
-
aggregationIsmFactory: string;
|
|
236
|
-
aggregationHookFactory: string;
|
|
237
|
-
routingIsmFactory: string;
|
|
238
|
-
proxyAdmin: string;
|
|
239
|
-
mailbox: string;
|
|
240
|
-
validatorAnnounce: string;
|
|
241
|
-
merkleTreeHook: string;
|
|
242
|
-
storageGasOracle: string;
|
|
243
|
-
interchainGasPaymaster: string;
|
|
244
|
-
aggregationHook: string;
|
|
245
|
-
protocolFee: string;
|
|
246
|
-
fallbackRoutingHook: string;
|
|
247
|
-
};
|
|
248
|
-
scrollsepolia: {
|
|
249
|
-
merkleRootMultisigIsmFactory: string;
|
|
250
|
-
messageIdMultisigIsmFactory: string;
|
|
251
|
-
aggregationIsmFactory: string;
|
|
252
|
-
aggregationHookFactory: string;
|
|
253
|
-
routingIsmFactory: string;
|
|
254
|
-
proxyAdmin: string;
|
|
255
|
-
mailbox: string;
|
|
256
|
-
validatorAnnounce: string;
|
|
257
|
-
merkleTreeHook: string;
|
|
258
|
-
storageGasOracle: string;
|
|
259
|
-
interchainGasPaymaster: string;
|
|
260
|
-
aggregationHook: string;
|
|
261
|
-
protocolFee: string;
|
|
262
|
-
fallbackRoutingHook: string;
|
|
263
|
-
};
|
|
264
|
-
alfajores: {
|
|
265
|
-
merkleRootMultisigIsmFactory: string;
|
|
266
|
-
messageIdMultisigIsmFactory: string;
|
|
267
|
-
aggregationIsmFactory: string;
|
|
268
|
-
aggregationHookFactory: string;
|
|
269
|
-
routingIsmFactory: string;
|
|
270
|
-
proxyAdmin: string;
|
|
271
|
-
mailbox: string;
|
|
272
|
-
validatorAnnounce: string;
|
|
273
|
-
merkleTreeHook: string;
|
|
274
|
-
storageGasOracle: string;
|
|
275
|
-
interchainGasPaymaster: string;
|
|
276
|
-
aggregationHook: string;
|
|
277
|
-
protocolFee: string;
|
|
278
|
-
fallbackRoutingHook: string;
|
|
279
|
-
};
|
|
280
|
-
polygonzkevmtestnet: {
|
|
281
|
-
merkleRootMultisigIsmFactory: string;
|
|
282
|
-
messageIdMultisigIsmFactory: string;
|
|
283
|
-
aggregationIsmFactory: string;
|
|
284
|
-
aggregationHookFactory: string;
|
|
285
|
-
routingIsmFactory: string;
|
|
286
|
-
proxyAdmin: string;
|
|
287
|
-
mailbox: string;
|
|
288
|
-
validatorAnnounce: string;
|
|
289
|
-
merkleTreeHook: string;
|
|
290
|
-
storageGasOracle: string;
|
|
291
|
-
interchainGasPaymaster: string;
|
|
292
|
-
aggregationHook: string;
|
|
293
|
-
protocolFee: string;
|
|
294
|
-
fallbackRoutingHook: string;
|
|
295
|
-
};
|
|
296
|
-
sepolia: {
|
|
297
|
-
merkleRootMultisigIsmFactory: string;
|
|
298
|
-
messageIdMultisigIsmFactory: string;
|
|
299
|
-
aggregationIsmFactory: string;
|
|
300
|
-
aggregationHookFactory: string;
|
|
301
|
-
routingIsmFactory: string;
|
|
302
|
-
proxyAdmin: string;
|
|
303
|
-
storageGasOracle: string;
|
|
304
|
-
interchainGasPaymaster: string;
|
|
305
|
-
aggregationHook: string;
|
|
306
|
-
protocolFee: string;
|
|
307
|
-
mailbox: string;
|
|
308
|
-
merkleTreeHook: string;
|
|
309
|
-
validatorAnnounce: string;
|
|
310
|
-
fallbackRoutingHook: string;
|
|
311
|
-
};
|
|
312
|
-
fuji: {
|
|
313
|
-
merkleRootMultisigIsmFactory: string;
|
|
314
|
-
messageIdMultisigIsmFactory: string;
|
|
315
|
-
aggregationIsmFactory: string;
|
|
316
|
-
aggregationHookFactory: string;
|
|
317
|
-
routingIsmFactory: string;
|
|
318
|
-
proxyAdmin: string;
|
|
319
|
-
mailbox: string;
|
|
320
|
-
validatorAnnounce: string;
|
|
321
|
-
merkleTreeHook: string;
|
|
322
|
-
storageGasOracle: string;
|
|
323
|
-
interchainGasPaymaster: string;
|
|
324
|
-
aggregationHook: string;
|
|
325
|
-
protocolFee: string;
|
|
326
|
-
fallbackRoutingHook: string;
|
|
327
|
-
};
|
|
328
|
-
bsctestnet: {
|
|
329
|
-
merkleRootMultisigIsmFactory: string;
|
|
330
|
-
messageIdMultisigIsmFactory: string;
|
|
331
|
-
aggregationIsmFactory: string;
|
|
332
|
-
aggregationHookFactory: string;
|
|
333
|
-
routingIsmFactory: string;
|
|
334
|
-
proxyAdmin: string;
|
|
335
|
-
storageGasOracle: string;
|
|
336
|
-
interchainGasPaymaster: string;
|
|
337
|
-
aggregationHook: string;
|
|
338
|
-
protocolFee: string;
|
|
339
|
-
mailbox: string;
|
|
340
|
-
merkleTreeHook: string;
|
|
341
|
-
validatorAnnounce: string;
|
|
342
|
-
fallbackRoutingHook: string;
|
|
343
|
-
};
|
|
344
|
-
goerli: {
|
|
345
|
-
merkleRootMultisigIsmFactory: string;
|
|
346
|
-
messageIdMultisigIsmFactory: string;
|
|
347
|
-
aggregationIsmFactory: string;
|
|
348
|
-
aggregationHookFactory: string;
|
|
349
|
-
routingIsmFactory: string;
|
|
350
|
-
proxyAdmin: string;
|
|
351
|
-
storageGasOracle: string;
|
|
352
|
-
interchainGasPaymaster: string;
|
|
353
|
-
aggregationHook: string;
|
|
354
|
-
protocolFee: string;
|
|
355
|
-
merkleTreeHook: string;
|
|
356
|
-
mailbox: string;
|
|
357
|
-
validatorAnnounce: string;
|
|
358
|
-
fallbackRoutingHook: string;
|
|
359
|
-
};
|
|
360
|
-
moonbasealpha: {
|
|
361
|
-
merkleRootMultisigIsmFactory: string;
|
|
362
|
-
messageIdMultisigIsmFactory: string;
|
|
363
|
-
aggregationIsmFactory: string;
|
|
364
|
-
aggregationHookFactory: string;
|
|
365
|
-
routingIsmFactory: string;
|
|
366
|
-
proxyAdmin: string;
|
|
367
|
-
mailbox: string;
|
|
368
|
-
merkleTreeHook: string;
|
|
369
|
-
storageGasOracle: string;
|
|
370
|
-
interchainGasPaymaster: string;
|
|
371
|
-
aggregationHook: string;
|
|
372
|
-
protocolFee: string;
|
|
373
|
-
validatorAnnounce: string;
|
|
374
|
-
fallbackRoutingHook: string;
|
|
375
|
-
};
|
|
376
|
-
mumbai: {
|
|
377
|
-
merkleRootMultisigIsmFactory: string;
|
|
378
|
-
messageIdMultisigIsmFactory: string;
|
|
379
|
-
aggregationIsmFactory: string;
|
|
380
|
-
aggregationHookFactory: string;
|
|
381
|
-
routingIsmFactory: string;
|
|
382
|
-
merkleTreeHook: string;
|
|
383
|
-
proxyAdmin: string;
|
|
384
|
-
storageGasOracle: string;
|
|
385
|
-
interchainGasPaymaster: string;
|
|
386
|
-
aggregationHook: string;
|
|
387
|
-
protocolFee: string;
|
|
388
|
-
mailbox: string;
|
|
389
|
-
validatorAnnounce: string;
|
|
390
|
-
fallbackRoutingHook: string;
|
|
391
|
-
};
|
|
392
|
-
};
|
|
393
|
-
export declare function getMergedContractAddresses(artifacts?: HyperlaneContractsMap<any>): HyperlaneContractsMap<any>;
|
|
394
|
-
export declare function getContext(chainConfigPath: string): {
|
|
395
|
-
customChains: ChainMap<ChainMetadata>;
|
|
396
|
-
multiProvider: MultiProvider<object>;
|
|
397
|
-
};
|
|
398
|
-
export declare function getContextWithSigner(key: string, chainConfigPath: string): {
|
|
399
|
-
signer: ethers.Wallet;
|
|
2
|
+
import { ChainMap, ChainMetadata, ChainName, HyperlaneContractsMap, MultiProvider } from '@hyperlane-xyz/sdk';
|
|
3
|
+
export declare const sdkContractAddressesMap: HyperlaneContractsMap<any>;
|
|
4
|
+
export declare function getMergedContractAddresses(artifacts?: HyperlaneContractsMap<any>, chains?: ChainName[]): HyperlaneContractsMap<any>;
|
|
5
|
+
interface ContextSettings {
|
|
6
|
+
chainConfigPath?: string;
|
|
7
|
+
coreConfig?: {
|
|
8
|
+
coreArtifactsPath?: string;
|
|
9
|
+
promptMessage?: string;
|
|
10
|
+
};
|
|
11
|
+
keyConfig?: {
|
|
12
|
+
key?: string;
|
|
13
|
+
promptMessage?: string;
|
|
14
|
+
};
|
|
15
|
+
skipConfirmation?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface CommandContextBase {
|
|
400
18
|
customChains: ChainMap<ChainMetadata>;
|
|
401
|
-
multiProvider: MultiProvider
|
|
402
|
-
}
|
|
19
|
+
multiProvider: MultiProvider;
|
|
20
|
+
}
|
|
21
|
+
type CommandContext<P extends ContextSettings> = CommandContextBase & (P extends {
|
|
22
|
+
keyConfig: object;
|
|
23
|
+
} ? {
|
|
24
|
+
signer: ethers.Signer;
|
|
25
|
+
} : {
|
|
26
|
+
signer: undefined;
|
|
27
|
+
}) & (P extends {
|
|
28
|
+
coreConfig: object;
|
|
29
|
+
} ? {
|
|
30
|
+
coreArtifacts: HyperlaneContractsMap<any>;
|
|
31
|
+
} : {
|
|
32
|
+
coreArtifacts: undefined;
|
|
33
|
+
});
|
|
34
|
+
export declare function getContext<P extends ContextSettings>({ chainConfigPath, coreConfig, keyConfig, skipConfirmation, }: P): Promise<CommandContext<P>>;
|
|
403
35
|
export declare function getMultiProvider(customChains: ChainMap<ChainMetadata>, signer?: ethers.Signer): MultiProvider<object>;
|
|
36
|
+
export {};
|
|
404
37
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EACL,QAAQ,EACR,aAAa,EACb,SAAS,EACT,qBAAqB,EACrB,aAAa,EAGd,MAAM,oBAAoB,CAAC;AAO5B,eAAO,MAAM,uBAAuB,EAAE,qBAAqB,CAAC,GAAG,CAG9D,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,SAAS,CAAC,EAAE,qBAAqB,CAAC,GAAG,CAAC,EACtC,MAAM,CAAC,EAAE,SAAS,EAAE,8BAoBrB;AAED,UAAU,eAAe;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE;QACX,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,SAAS,CAAC,EAAE;QACV,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,UAAU,kBAAkB;IAC1B,YAAY,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;IACtC,aAAa,EAAE,aAAa,CAAC;CAC9B;AAGD,KAAK,cAAc,CAAC,CAAC,SAAS,eAAe,IAAI,kBAAkB,GACjE,CAAC,CAAC,SAAS;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAC5B;IAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAA;CAAE,GACzB;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC,GAC1B,CAAC,CAAC,SAAS;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GAC7B;IAAE,aAAa,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAA;CAAE,GAC7C;IAAE,aAAa,EAAE,SAAS,CAAA;CAAE,CAAC,CAAC;AAEpC,wBAAsB,UAAU,CAAC,CAAC,SAAS,eAAe,EAAE,EAC1D,eAAe,EACf,UAAU,EACV,SAAS,EACT,gBAAgB,GACjB,EAAE,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAqChC;AAED,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,QAAQ,CAAC,aAAa,CAAC,EACrC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,yBAMvB"}
|
package/dist/src/context.js
CHANGED
|
@@ -1,24 +1,54 @@
|
|
|
1
|
+
import { input } from '@inquirer/prompts';
|
|
1
2
|
import { MultiProvider, chainMetadata, hyperlaneEnvironments, } from '@hyperlane-xyz/sdk';
|
|
2
|
-
import { objMerge } from '@hyperlane-xyz/utils';
|
|
3
|
+
import { objFilter, objMap, objMerge } from '@hyperlane-xyz/utils';
|
|
4
|
+
import { runDeploymentArtifactStep } from './config/artifacts.js';
|
|
3
5
|
import { readChainConfigsIfExists } from './config/chain.js';
|
|
4
6
|
import { keyToSigner } from './utils/keys.js';
|
|
5
7
|
export const sdkContractAddressesMap = {
|
|
6
8
|
...hyperlaneEnvironments.testnet,
|
|
7
9
|
...hyperlaneEnvironments.mainnet,
|
|
8
10
|
};
|
|
9
|
-
export function getMergedContractAddresses(artifacts) {
|
|
10
|
-
|
|
11
|
+
export function getMergedContractAddresses(artifacts, chains) {
|
|
12
|
+
// if chains include non sdkContractAddressesMap chains, don't recover interchainGasPaymaster
|
|
13
|
+
let sdkContractsAddressesToRecover = sdkContractAddressesMap;
|
|
14
|
+
if (chains?.some((chain) => !Object.keys(sdkContractAddressesMap).includes(chain))) {
|
|
15
|
+
sdkContractsAddressesToRecover = objMap(sdkContractAddressesMap, (_, v) => objFilter(v, (key, v) => key !== 'interchainGasPaymaster'));
|
|
16
|
+
}
|
|
17
|
+
return objMerge(sdkContractsAddressesToRecover, artifacts || {});
|
|
11
18
|
}
|
|
12
|
-
export function getContext(chainConfigPath) {
|
|
13
|
-
const customChains = readChainConfigsIfExists(chainConfigPath);
|
|
14
|
-
const multiProvider = getMultiProvider(customChains);
|
|
15
|
-
return { customChains, multiProvider };
|
|
16
|
-
}
|
|
17
|
-
export function getContextWithSigner(key, chainConfigPath) {
|
|
18
|
-
const signer = keyToSigner(key);
|
|
19
|
+
export async function getContext({ chainConfigPath, coreConfig, keyConfig, skipConfirmation, }) {
|
|
19
20
|
const customChains = readChainConfigsIfExists(chainConfigPath);
|
|
21
|
+
let signer = undefined;
|
|
22
|
+
if (keyConfig) {
|
|
23
|
+
let key;
|
|
24
|
+
if (keyConfig.key)
|
|
25
|
+
key = keyConfig.key;
|
|
26
|
+
else if (skipConfirmation)
|
|
27
|
+
throw new Error('No key provided');
|
|
28
|
+
else
|
|
29
|
+
key = await input({
|
|
30
|
+
message: keyConfig.promptMessage ||
|
|
31
|
+
'Please enter a private key or use the HYP_KEY environment variable',
|
|
32
|
+
});
|
|
33
|
+
signer = keyToSigner(key);
|
|
34
|
+
}
|
|
35
|
+
let coreArtifacts = undefined;
|
|
36
|
+
if (coreConfig) {
|
|
37
|
+
coreArtifacts =
|
|
38
|
+
(await runDeploymentArtifactStep({
|
|
39
|
+
artifactsPath: coreConfig.coreArtifactsPath,
|
|
40
|
+
message: coreConfig.promptMessage ||
|
|
41
|
+
'Do you want to use some core deployment address artifacts? This is required for PI chains (non-core chains).',
|
|
42
|
+
skipConfirmation,
|
|
43
|
+
})) || {};
|
|
44
|
+
}
|
|
20
45
|
const multiProvider = getMultiProvider(customChains, signer);
|
|
21
|
-
return {
|
|
46
|
+
return {
|
|
47
|
+
customChains,
|
|
48
|
+
signer,
|
|
49
|
+
multiProvider,
|
|
50
|
+
coreArtifacts,
|
|
51
|
+
};
|
|
22
52
|
}
|
|
23
53
|
export function getMultiProvider(customChains, signer) {
|
|
24
54
|
const chainConfigs = { ...chainMetadata, ...customChains };
|
package/dist/src/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,OAAO,EAKL,aAAa,EACb,aAAa,EACb,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,CAAC,MAAM,uBAAuB,GAA+B;IACjE,GAAG,qBAAqB,CAAC,OAAO;IAChC,GAAG,qBAAqB,CAAC,OAAO;CACjC,CAAC;AAEF,MAAM,UAAU,0BAA0B,CACxC,SAAsC,EACtC,MAAoB;IAEpB,6FAA6F;IAC7F,IAAI,8BAA8B,GAAG,uBAAuB,CAAC;IAC7D,IACE,MAAM,EAAE,IAAI,CACV,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CACjE,EACD,CAAC;QACD,8BAA8B,GAAG,MAAM,CAAC,uBAAuB,EAAE,CAAC,CAAC,EA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