@hyperlane-xyz/deploy-sdk 3.1.0 → 4.0.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 (36) hide show
  1. package/dist/core/core-artifact-reader.d.ts +19 -1
  2. package/dist/core/core-artifact-reader.d.ts.map +1 -1
  3. package/dist/core/core-artifact-reader.js +23 -3
  4. package/dist/core/core-artifact-reader.js.map +1 -1
  5. package/dist/core/core-artifact-reader.test.d.ts +2 -0
  6. package/dist/core/core-artifact-reader.test.d.ts.map +1 -0
  7. package/dist/core/core-artifact-reader.test.js +300 -0
  8. package/dist/core/core-artifact-reader.test.js.map +1 -0
  9. package/dist/core/core-writer.d.ts +42 -0
  10. package/dist/core/core-writer.d.ts.map +1 -0
  11. package/dist/core/core-writer.js +230 -0
  12. package/dist/core/core-writer.js.map +1 -0
  13. package/dist/core/core-writer.test.d.ts +2 -0
  14. package/dist/core/core-writer.test.d.ts.map +1 -0
  15. package/dist/core/core-writer.test.js +980 -0
  16. package/dist/core/core-writer.test.js.map +1 -0
  17. package/dist/hook/hook-writer.d.ts.map +1 -1
  18. package/dist/hook/hook-writer.js +2 -1
  19. package/dist/hook/hook-writer.js.map +1 -1
  20. package/dist/index.d.ts +7 -9
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +7 -9
  23. package/dist/index.js.map +1 -1
  24. package/package.json +10 -10
  25. package/dist/AltVMCoreModule.d.ts +0 -94
  26. package/dist/AltVMCoreModule.d.ts.map +0 -1
  27. package/dist/AltVMCoreModule.js +0 -368
  28. package/dist/AltVMCoreModule.js.map +0 -1
  29. package/dist/AltVMCoreReader.d.ts +0 -16
  30. package/dist/AltVMCoreReader.d.ts.map +0 -1
  31. package/dist/AltVMCoreReader.js +0 -36
  32. package/dist/AltVMCoreReader.js.map +0 -1
  33. package/dist/core-module.d.ts +0 -5
  34. package/dist/core-module.d.ts.map +0 -1
  35. package/dist/core-module.js +0 -28
  36. package/dist/core-module.js.map +0 -1
@@ -1,368 +0,0 @@
1
- import { isArtifactNew } from '@hyperlane-xyz/provider-sdk/artifact';
2
- import { hookConfigToArtifact, } from '@hyperlane-xyz/provider-sdk/hook';
3
- import { ismConfigToArtifact, mergeIsmArtifacts, } from '@hyperlane-xyz/provider-sdk/ism';
4
- import { rootLogger } from '@hyperlane-xyz/utils';
5
- import { AltVMCoreReader } from './AltVMCoreReader.js';
6
- import { createHookWriter } from './hook/hook-writer.js';
7
- import { createIsmWriter } from './ism/generic-ism-writer.js';
8
- import { validateIsmConfig } from './utils/validation.js';
9
- export class AltVMCoreModule {
10
- chainLookup;
11
- signer;
12
- args;
13
- logger = rootLogger.child({ module: 'AltVMCoreModule' });
14
- coreReader;
15
- // Cached chain name
16
- chainName;
17
- constructor(chainLookup, signer, args) {
18
- this.chainLookup = chainLookup;
19
- this.signer = signer;
20
- this.args = args;
21
- const metadata = chainLookup.getChainMetadata(args.chain);
22
- this.chainName = metadata.name;
23
- this.coreReader = new AltVMCoreReader(metadata, chainLookup, signer);
24
- }
25
- /**
26
- * Reads the core configuration from the mailbox address
27
- * @returns The core config.
28
- */
29
- async read() {
30
- return this.coreReader.deriveCoreConfig(this.args.addresses.mailbox);
31
- }
32
- serialize() {
33
- return this.args.addresses;
34
- }
35
- /**
36
- * Deploys the Core contracts.
37
- * @returns The created AltVMCoreModule instance.
38
- */
39
- static async create(params) {
40
- const addresses = await AltVMCoreModule.deploy(params);
41
- return new AltVMCoreModule(params.chainLookup, params.signer, {
42
- addresses,
43
- chain: params.chain,
44
- config: params.config,
45
- });
46
- }
47
- /**
48
- * Deploys the core Hyperlane contracts.
49
- * @returns The deployed core contract addresses.
50
- */
51
- static async deploy(params) {
52
- const { config, chainLookup, chain, signer } = params;
53
- const metadata = chainLookup.getChainMetadata(chain);
54
- const chainName = metadata.name;
55
- const domainId = metadata.domainId;
56
- // Validate ISM configuration before deployment
57
- validateIsmConfig(config.defaultIsm, chainName, 'core default ISM');
58
- // 1. Deploy default ISM using artifact writer
59
- let defaultIsm;
60
- if (typeof config.defaultIsm === 'string') {
61
- // Address reference - use existing ISM
62
- defaultIsm = config.defaultIsm;
63
- }
64
- else {
65
- // Deploy new ISM
66
- const writer = createIsmWriter(metadata, chainLookup, signer);
67
- const artifact = ismConfigToArtifact(config.defaultIsm, chainLookup);
68
- const [deployed] = await writer.create(artifact);
69
- defaultIsm = deployed.deployed.address;
70
- }
71
- // 2. Deploy Mailbox with initial configuration
72
- const mailbox = await signer.createMailbox({
73
- domainId: domainId,
74
- defaultIsmAddress: defaultIsm,
75
- });
76
- // 3. Deploy default hook
77
- let defaultHook;
78
- if (typeof config.defaultHook === 'string') {
79
- // Address reference - use existing hook
80
- defaultHook = config.defaultHook;
81
- }
82
- else {
83
- // Deploy new hook with mailbox context
84
- const writer = createHookWriter(metadata, chainLookup, signer, {
85
- mailbox: mailbox.mailboxAddress,
86
- });
87
- const artifact = hookConfigToArtifact(config.defaultHook, chainLookup);
88
- const [deployed] = await writer.create(artifact);
89
- defaultHook = deployed.deployed.address;
90
- }
91
- // 4. Deploy required hook
92
- let requiredHook;
93
- if (typeof config.requiredHook === 'string') {
94
- // Address reference - use existing hook
95
- requiredHook = config.requiredHook;
96
- }
97
- else {
98
- // Deploy new hook with mailbox context
99
- const writer = createHookWriter(metadata, chainLookup, signer, {
100
- mailbox: mailbox.mailboxAddress,
101
- });
102
- const artifact = hookConfigToArtifact(config.requiredHook, chainLookup);
103
- const [deployed] = await writer.create(artifact);
104
- requiredHook = deployed.deployed.address;
105
- }
106
- // 5. Update the configuration with the newly created hooks
107
- await signer.setDefaultIsm({
108
- mailboxAddress: mailbox.mailboxAddress,
109
- ismAddress: defaultIsm,
110
- });
111
- await signer.setDefaultHook({
112
- mailboxAddress: mailbox.mailboxAddress,
113
- hookAddress: defaultHook,
114
- });
115
- await signer.setRequiredHook({
116
- mailboxAddress: mailbox.mailboxAddress,
117
- hookAddress: requiredHook,
118
- });
119
- if (signer.getSignerAddress() !== config.owner) {
120
- await signer.setMailboxOwner({
121
- mailboxAddress: mailbox.mailboxAddress,
122
- newOwner: config.owner,
123
- });
124
- }
125
- const validatorAnnounce = await signer.createValidatorAnnounce({
126
- mailboxAddress: mailbox.mailboxAddress,
127
- });
128
- const addresses = {
129
- mailbox: mailbox.mailboxAddress,
130
- staticMerkleRootMultisigIsmFactory: '',
131
- proxyAdmin: '',
132
- staticMerkleRootWeightedMultisigIsmFactory: '',
133
- staticAggregationHookFactory: '',
134
- staticAggregationIsmFactory: '',
135
- staticMessageIdMultisigIsmFactory: '',
136
- staticMessageIdWeightedMultisigIsmFactory: '',
137
- validatorAnnounce: validatorAnnounce.validatorAnnounceId,
138
- testRecipient: '',
139
- interchainAccountRouter: '',
140
- domainRoutingIsmFactory: '',
141
- incrementalDomainRoutingIsmFactory: '',
142
- };
143
- if (config.defaultIsm && typeof config.defaultIsm !== 'string') {
144
- switch (config.defaultIsm.type) {
145
- case 'merkleRootMultisigIsm': {
146
- addresses.staticMerkleRootMultisigIsmFactory = defaultIsm;
147
- break;
148
- }
149
- case 'messageIdMultisigIsm': {
150
- addresses.staticMessageIdMultisigIsmFactory = defaultIsm;
151
- break;
152
- }
153
- case 'domainRoutingIsm': {
154
- addresses.domainRoutingIsmFactory = defaultIsm;
155
- break;
156
- }
157
- }
158
- }
159
- if (config.defaultHook && typeof config.defaultHook !== 'string') {
160
- switch (config.defaultHook.type) {
161
- case 'interchainGasPaymaster': {
162
- addresses.interchainGasPaymaster = defaultHook;
163
- break;
164
- }
165
- case 'merkleTreeHook': {
166
- addresses.merkleTreeHook = defaultHook;
167
- break;
168
- }
169
- }
170
- }
171
- if (config.requiredHook && typeof config.requiredHook !== 'string') {
172
- switch (config.requiredHook.type) {
173
- case 'interchainGasPaymaster': {
174
- addresses.interchainGasPaymaster = requiredHook;
175
- break;
176
- }
177
- case 'merkleTreeHook': {
178
- addresses.merkleTreeHook = requiredHook;
179
- break;
180
- }
181
- }
182
- }
183
- return addresses;
184
- }
185
- /**
186
- * Updates the core contracts with the provided configuration.
187
- *
188
- * @param expectedConfig - The configuration for the core contracts to be updated.
189
- * @returns An array of transactions that were executed to update the contract.
190
- */
191
- async update(expectedConfig) {
192
- const actualConfig = await this.read();
193
- const transactions = [];
194
- transactions.push(...(await this.createDefaultIsmUpdateTxs(actualConfig, expectedConfig)), ...(await this.createDefaultHookUpdateTxs(actualConfig, expectedConfig)), ...(await this.createRequiredHookUpdateTxs(actualConfig, expectedConfig)), ...(await this.createMailboxOwnerUpdateTxs(actualConfig, expectedConfig)));
195
- return transactions;
196
- }
197
- async createMailboxOwnerUpdateTxs(actualConfig, expectedConfig) {
198
- if (actualConfig.owner === expectedConfig.owner) {
199
- return [];
200
- }
201
- return [
202
- {
203
- annotation: `Transferring ownership of Mailbox from ${actualConfig.owner} to ${expectedConfig.owner}`,
204
- ...(await this.signer.getSetMailboxOwnerTransaction({
205
- signer: actualConfig.owner,
206
- mailboxAddress: this.args.addresses.mailbox,
207
- newOwner: expectedConfig.owner,
208
- })),
209
- },
210
- ];
211
- }
212
- /**
213
- * Create a transaction to update an existing ISM config, or deploy a new ISM and return a tx to setDefaultIsm
214
- *
215
- * @param actualConfig - The on-chain router configuration, including the ISM configuration, and address.
216
- * @param expectedConfig - The expected token router configuration, including the ISM configuration.
217
- * @returns Transaction that need to be executed to update the ISM configuration.
218
- */
219
- async createDefaultIsmUpdateTxs(actualConfig, expectedConfig) {
220
- const updateTransactions = [];
221
- const actualDefaultIsmConfig = actualConfig.defaultIsm;
222
- // Try to update (may also deploy) Ism with the expected config
223
- const { deployedIsm, ismUpdateTxs } = await this.deployOrUpdateIsm(actualDefaultIsmConfig, expectedConfig.defaultIsm);
224
- if (ismUpdateTxs.length) {
225
- updateTransactions.push(...ismUpdateTxs);
226
- }
227
- const newIsmDeployed = actualDefaultIsmConfig.address !== deployedIsm;
228
- if (newIsmDeployed) {
229
- const { mailbox } = this.serialize();
230
- updateTransactions.push({
231
- annotation: `Updating default ISM of Mailbox from ${actualDefaultIsmConfig.address} to ${deployedIsm}`,
232
- ...(await this.signer.getSetDefaultIsmTransaction({
233
- signer: actualConfig.owner,
234
- mailboxAddress: mailbox,
235
- ismAddress: deployedIsm,
236
- })),
237
- });
238
- }
239
- return updateTransactions;
240
- }
241
- /**
242
- * Updates or deploys the ISM using the provided configuration.
243
- *
244
- * @returns Object with deployedIsm address, and update Transactions
245
- */
246
- async deployOrUpdateIsm(actualDefaultIsmConfig, expectDefaultIsmConfig) {
247
- // If expected ISM is an address reference, use it directly
248
- if (typeof expectDefaultIsmConfig === 'string') {
249
- return {
250
- deployedIsm: expectDefaultIsmConfig,
251
- ismUpdateTxs: [],
252
- };
253
- }
254
- const chainMetadata = this.chainLookup.getChainMetadata(this.args.chain);
255
- const writer = createIsmWriter(chainMetadata, this.chainLookup, this.signer);
256
- // Read actual ISM state
257
- const actualArtifact = await writer.read(actualDefaultIsmConfig.address);
258
- // Convert expected config to artifact format
259
- const expectedArtifact = ismConfigToArtifact(expectDefaultIsmConfig, this.chainLookup);
260
- this.logger.info(`Comparing target ISM config with ${this.args.chain} chain`);
261
- // Update existing ISM (only routing ISMs support updates)
262
- // Merge artifacts to preserve DEPLOYED state for unchanged nested ISMs
263
- const mergedArtifact = mergeIsmArtifacts(actualArtifact, expectedArtifact);
264
- // If merge resulted in NEW state, deploy it
265
- if (isArtifactNew(mergedArtifact)) {
266
- const [deployed] = await writer.create(mergedArtifact);
267
- return {
268
- deployedIsm: deployed.deployed.address,
269
- ismUpdateTxs: [],
270
- };
271
- }
272
- else {
273
- // Otherwise update in-place (artifact is DEPLOYED)
274
- const ismUpdateTxs = await writer.update(mergedArtifact);
275
- return {
276
- deployedIsm: mergedArtifact.deployed.address,
277
- ismUpdateTxs,
278
- };
279
- }
280
- }
281
- /**
282
- * Create a transaction to update an existing Hook config, or deploy a new Hook and return a tx to setDefaultHook
283
- *
284
- * @param actualConfig - The on-chain router configuration, including the Hook configuration, and address.
285
- * @param expectedConfig - The expected token router configuration, including the Hook configuration.
286
- * @returns Transaction that need to be executed to update the Hook configuration.
287
- */
288
- async createDefaultHookUpdateTxs(actualConfig, expectedConfig) {
289
- const updateTransactions = [];
290
- const actualDefaultHookConfig = actualConfig.defaultHook;
291
- // Try to update (may also deploy) Hook with the expected config
292
- const { deployedHook, hookUpdateTxs } = await this.deployOrUpdateHook(actualDefaultHookConfig, expectedConfig.defaultHook);
293
- if (hookUpdateTxs.length) {
294
- updateTransactions.push(...hookUpdateTxs);
295
- }
296
- const newHookDeployed = actualDefaultHookConfig.address !== deployedHook;
297
- if (newHookDeployed) {
298
- const { mailbox } = this.serialize();
299
- updateTransactions.push({
300
- annotation: `Updating default Hook of Mailbox from ${actualDefaultHookConfig.address} to ${deployedHook}`,
301
- ...(await this.signer.getSetDefaultHookTransaction({
302
- signer: actualConfig.owner,
303
- mailboxAddress: mailbox,
304
- hookAddress: deployedHook,
305
- })),
306
- });
307
- }
308
- return updateTransactions;
309
- }
310
- /**
311
- * Create a transaction to update an existing Hook config, or deploy a new Hook and return a tx to setRequiredHook
312
- *
313
- * @param actualConfig - The on-chain router configuration, including the Hook configuration, and address.
314
- * @param expectedConfig - The expected token router configuration, including the Hook configuration.
315
- * @returns Transaction that need to be executed to update the Hook configuration.
316
- */
317
- async createRequiredHookUpdateTxs(actualConfig, expectedConfig) {
318
- const updateTransactions = [];
319
- const actualRequiredHookConfig = actualConfig.requiredHook;
320
- // Try to update (may also deploy) Hook with the expected config
321
- const { deployedHook, hookUpdateTxs } = await this.deployOrUpdateHook(actualRequiredHookConfig, expectedConfig.requiredHook);
322
- if (hookUpdateTxs.length) {
323
- updateTransactions.push(...hookUpdateTxs);
324
- }
325
- const newHookDeployed = actualRequiredHookConfig.address !== deployedHook;
326
- if (newHookDeployed) {
327
- const { mailbox } = this.serialize();
328
- updateTransactions.push({
329
- annotation: `Updating required Hook of Mailbox from ${actualRequiredHookConfig.address} to ${deployedHook}`,
330
- ...(await this.signer.getSetRequiredHookTransaction({
331
- signer: actualConfig.owner,
332
- mailboxAddress: mailbox,
333
- hookAddress: deployedHook,
334
- })),
335
- });
336
- }
337
- return updateTransactions;
338
- }
339
- /**
340
- * Updates or deploys the Hook using the provided configuration.
341
- *
342
- * @returns Object with deployedHook address, and update Transactions
343
- */
344
- async deployOrUpdateHook(actualHookConfig, expectHookConfig) {
345
- // If expected hook is an address reference, use it directly
346
- if (typeof expectHookConfig === 'string') {
347
- return {
348
- deployedHook: expectHookConfig,
349
- hookUpdateTxs: [],
350
- };
351
- }
352
- const chainMetadata = this.chainLookup.getChainMetadata(this.args.chain);
353
- const writer = createHookWriter(chainMetadata, this.chainLookup, this.signer, {
354
- mailbox: this.args.addresses.mailbox,
355
- });
356
- this.logger.info(`Comparing target Hook config with ${this.args.chain} chain`);
357
- // Use the new deployOrUpdate method from HookWriter
358
- const result = await writer.deployOrUpdate({
359
- actualAddress: actualHookConfig.address,
360
- expectedConfig: expectHookConfig,
361
- });
362
- return {
363
- deployedHook: result.address,
364
- hookUpdateTxs: result.transactions,
365
- };
366
- }
367
- }
368
- //# sourceMappingURL=AltVMCoreModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AltVMCoreModule.js","sourceRoot":"","sources":["../src/AltVMCoreModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAQrE,OAAO,EAGL,oBAAoB,GACrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAGL,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AAOzC,OAAO,EAAmB,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,OAAO,eAAe;IAQL;IACA;IACF;IAT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,CAAC;QACzE,MAAM,MAAM,GAAG,gBAAgB,CAC7B,aAAa,EACb,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,MAAM,EACX;YACE,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO;SACrC,CACF,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,qCAAqC,IAAI,CAAC,IAAI,CAAC,KAAK,QAAQ,CAC7D,CAAC;QAEF,oDAAoD;QACpD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC;YACzC,aAAa,EAAE,gBAAgB,CAAC,OAAO;YACvC,cAAc,EAAE,gBAAgB;SACjC,CAAC,CAAC;QAEH,OAAO;YACL,YAAY,EAAE,MAAM,CAAC,OAAO;YAC5B,aAAa,EAAE,MAAM,CAAC,YAAY;SACnC,CAAC;IACJ,CAAC;CACF"}
@@ -1,16 +0,0 @@
1
- import { AltVM } from '@hyperlane-xyz/provider-sdk';
2
- import { ChainLookup, ChainMetadataForAltVM } from '@hyperlane-xyz/provider-sdk/chain';
3
- import { CoreModuleType, DerivedCoreConfig } from '@hyperlane-xyz/provider-sdk/core';
4
- import { HypReader } from '@hyperlane-xyz/provider-sdk/module';
5
- import { Address, Logger } from '@hyperlane-xyz/utils';
6
- export declare class AltVMCoreReader implements HypReader<CoreModuleType> {
7
- protected readonly chainMetadata: ChainMetadataForAltVM;
8
- protected readonly chainLookup: ChainLookup;
9
- protected readonly provider: AltVM.IProvider;
10
- protected readonly logger: Logger;
11
- private readonly ismReader;
12
- constructor(chainMetadata: ChainMetadataForAltVM, chainLookup: ChainLookup, provider: AltVM.IProvider);
13
- read(address: string): Promise<DerivedCoreConfig>;
14
- deriveCoreConfig(mailboxAddress: Address): Promise<DerivedCoreConfig>;
15
- }
16
- //# sourceMappingURL=AltVMCoreReader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AltVMCoreReader.d.ts","sourceRoot":"","sources":["../src/AltVMCoreReader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EACL,WAAW,EACX,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAc,MAAM,sBAAsB,CAAC;AAKnE,qBAAa,eAAgB,YAAW,SAAS,CAAC,cAAc,CAAC;IAO7D,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,qBAAqB;IACvD,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW;IAC3C,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS;IAR9C,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAE9B;IACH,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;gBAGjB,aAAa,EAAE,qBAAqB,EACpC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,KAAK,CAAC,SAAS;IAKxC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIjD,gBAAgB,CAAC,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAgB5E"}
@@ -1,36 +0,0 @@
1
- import { rootLogger } from '@hyperlane-xyz/utils';
2
- import { createHookReader } from './hook/hook-reader.js';
3
- import { createIsmReader } from './ism/generic-ism.js';
4
- export class AltVMCoreReader {
5
- chainMetadata;
6
- chainLookup;
7
- provider;
8
- logger = rootLogger.child({
9
- module: 'AltVMCoreReader',
10
- });
11
- ismReader;
12
- constructor(chainMetadata, chainLookup, provider) {
13
- this.chainMetadata = chainMetadata;
14
- this.chainLookup = chainLookup;
15
- this.provider = provider;
16
- this.ismReader = createIsmReader(this.chainMetadata, this.chainLookup);
17
- }
18
- async read(address) {
19
- return this.deriveCoreConfig(address);
20
- }
21
- async deriveCoreConfig(mailboxAddress) {
22
- const mailbox = await this.provider.getMailbox({
23
- mailboxAddress: mailboxAddress,
24
- });
25
- const hookReader = createHookReader(this.chainMetadata, this.chainLookup, {
26
- mailbox: mailboxAddress,
27
- });
28
- return {
29
- owner: mailbox.owner,
30
- defaultIsm: await this.ismReader.deriveIsmConfig(mailbox.defaultIsm),
31
- defaultHook: await hookReader.deriveHookConfig(mailbox.defaultHook),
32
- requiredHook: await hookReader.deriveHookConfig(mailbox.requiredHook),
33
- };
34
- }
35
- }
36
- //# sourceMappingURL=AltVMCoreReader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AltVMCoreReader.js","sourceRoot":"","sources":["../src/AltVMCoreReader.ts"],"names":[],"mappings":"AAUA,OAAO,EAAmB,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAa,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAElE,MAAM,OAAO,eAAe;IAOL;IACA;IACA;IARF,MAAM,GAAW,UAAU,CAAC,KAAK,CAAC;QACnD,MAAM,EAAE,iBAAiB;KAC1B,CAAC,CAAC;IACc,SAAS,CAAY;IAEtC,YACqB,aAAoC,EACpC,WAAwB,EACxB,QAAyB;QAFzB,kBAAa,GAAb,aAAa,CAAuB;QACpC,gBAAW,GAAX,WAAW,CAAa;QACxB,aAAQ,GAAR,QAAQ,CAAiB;QAE5C,IAAI,CAAC,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACzE,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,cAAuB;QAC5C,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;YAC7C,cAAc,EAAE,cAAc;SAC/B,CAAC,CAAC;QAEH,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,WAAW,EAAE;YACxE,OAAO,EAAE,cAAc;SACxB,CAAC,CAAC;QAEH,OAAO;YACL,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,UAAU,EAAE,MAAM,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,UAAU,CAAC;YACpE,WAAW,EAAE,MAAM,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC;YACnE,YAAY,EAAE,MAAM,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,YAAY,CAAC;SACtE,CAAC;IACJ,CAAC;CACF"}
@@ -1,5 +0,0 @@
1
- import { ChainLookup, ChainMetadataForAltVM } from '@hyperlane-xyz/provider-sdk/chain';
2
- import { CoreModuleType } from '@hyperlane-xyz/provider-sdk/core';
3
- import { ModuleProvider } from '@hyperlane-xyz/provider-sdk/module';
4
- export declare function coreModuleProvider(chainLookup: ChainLookup, chainMetadata: ChainMetadataForAltVM): ModuleProvider<CoreModuleType>;
5
- //# sourceMappingURL=core-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"core-module.d.ts","sourceRoot":"","sources":["../src/core-module.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAc,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAKL,cAAc,EAEf,MAAM,oCAAoC,CAAC;AAmC5C,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,qBAAqB,GACnC,cAAc,CAAC,cAAc,CAAC,CAEhC"}
@@ -1,28 +0,0 @@
1
- import { AltVMCoreModule } from './AltVMCoreModule.js';
2
- import { AltVMCoreReader } from './AltVMCoreReader.js';
3
- class CoreModuleProvider {
4
- chainLookup;
5
- chainMetadata;
6
- constructor(chainLookup, chainMetadata) {
7
- this.chainLookup = chainLookup;
8
- this.chainMetadata = chainMetadata;
9
- }
10
- async createModule(signer, config) {
11
- return await AltVMCoreModule.create({
12
- chainLookup: this.chainLookup,
13
- chain: this.chainMetadata.name,
14
- signer,
15
- config,
16
- });
17
- }
18
- connectModule(signer, args) {
19
- return new AltVMCoreModule(this.chainLookup, signer, args);
20
- }
21
- connectReader(provider) {
22
- return new AltVMCoreReader(this.chainMetadata, this.chainLookup, provider);
23
- }
24
- }
25
- export function coreModuleProvider(chainLookup, chainMetadata) {
26
- return new CoreModuleProvider(chainLookup, chainMetadata);
27
- }
28
- //# sourceMappingURL=core-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"core-module.js","sourceRoot":"","sources":["../src/core-module.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,kBAAkB;IAEZ;IACA;IAFV,YACU,WAAwB,EACxB,aAAoC;QADpC,gBAAW,GAAX,WAAW,CAAa;QACxB,kBAAa,GAAb,aAAa,CAAuB;IAC3C,CAAC;IAEJ,KAAK,CAAC,YAAY,CAChB,MAAuC,EACvC,MAAkB;QAElB,OAAO,MAAM,eAAe,CAAC,MAAM,CAAC;YAClC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI;YAC9B,MAAM;YACN,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CACX,MAAuC,EACvC,IAAmC;QAEnC,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;IAED,aAAa,CAAC,QAAwB;QACpC,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC7E,CAAC;CACF;AAED,MAAM,UAAU,kBAAkB,CAChC,WAAwB,EACxB,aAAoC;IAEpC,OAAO,IAAI,kBAAkB,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AAC5D,CAAC"}