@hyperlane-xyz/deploy-sdk 1.4.0 → 2.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.
- package/dist/AltVMCoreModule.d.ts.map +1 -1
- package/dist/AltVMCoreModule.js +1 -2
- package/dist/AltVMCoreModule.js.map +1 -1
- package/dist/index.d.ts +2 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/warp/warp-reader.d.ts +51 -0
- package/dist/warp/warp-reader.d.ts.map +1 -0
- package/dist/warp/warp-reader.js +106 -0
- package/dist/warp/warp-reader.js.map +1 -0
- package/dist/warp/warp-writer.d.ts +66 -0
- package/dist/warp/warp-writer.d.ts.map +1 -0
- package/dist/warp/warp-writer.js +231 -0
- package/dist/warp/warp-writer.js.map +1 -0
- package/dist/warp/warp-writer.test.d.ts +2 -0
- package/dist/warp/warp-writer.test.d.ts.map +1 -0
- package/dist/warp/warp-writer.test.js +903 -0
- package/dist/warp/warp-writer.test.js.map +1 -0
- package/package.json +9 -9
- package/dist/AltVMWarpDeployer.d.ts +0 -14
- package/dist/AltVMWarpDeployer.d.ts.map +0 -1
- package/dist/AltVMWarpDeployer.js +0 -69
- package/dist/AltVMWarpDeployer.js.map +0 -1
- package/dist/AltVMWarpModule.d.ts +0 -96
- package/dist/AltVMWarpModule.d.ts.map +0 -1
- package/dist/AltVMWarpModule.js +0 -416
- package/dist/AltVMWarpModule.js.map +0 -1
- package/dist/AltVMWarpModule.test.d.ts +0 -2
- package/dist/AltVMWarpModule.test.d.ts.map +0 -1
- package/dist/AltVMWarpModule.test.js +0 -508
- package/dist/AltVMWarpModule.test.js.map +0 -1
- package/dist/AltVMWarpRouteReader.d.ts +0 -53
- package/dist/AltVMWarpRouteReader.d.ts.map +0 -1
- package/dist/AltVMWarpRouteReader.js +0 -168
- package/dist/AltVMWarpRouteReader.js.map +0 -1
- package/dist/ism/ism-config-utils.d.ts +0 -37
- package/dist/ism/ism-config-utils.d.ts.map +0 -1
- package/dist/ism/ism-config-utils.js +0 -72
- package/dist/ism/ism-config-utils.js.map +0 -1
- package/dist/warp-module.d.ts +0 -5
- package/dist/warp-module.d.ts.map +0 -1
- package/dist/warp-module.js +0 -28
- package/dist/warp-module.js.map +0 -1
package/dist/AltVMWarpModule.js
DELETED
|
@@ -1,416 +0,0 @@
|
|
|
1
|
-
import { ProtocolType } from '@hyperlane-xyz/provider-sdk';
|
|
2
|
-
import { isArtifactNew } from '@hyperlane-xyz/provider-sdk/artifact';
|
|
3
|
-
import { mergeIsmArtifacts, } from '@hyperlane-xyz/provider-sdk/ism';
|
|
4
|
-
import { addressToBytes32, assert, deepEquals, isZeroishAddress, normalizeConfig, rootLogger, } from '@hyperlane-xyz/utils';
|
|
5
|
-
import { AltVMDeployer } from './AltVMWarpDeployer.js';
|
|
6
|
-
import { AltVMWarpRouteReader } from './AltVMWarpRouteReader.js';
|
|
7
|
-
import { createHookWriter } from './hook/hook-writer.js';
|
|
8
|
-
import { createIsmWriter } from './ism/generic-ism-writer.js';
|
|
9
|
-
import { ismConfigToArtifact } from './ism/ism-config-utils.js';
|
|
10
|
-
import { validateIsmConfig } from './utils/validation.js';
|
|
11
|
-
export class AltVMWarpModule {
|
|
12
|
-
chainLookup;
|
|
13
|
-
signer;
|
|
14
|
-
args;
|
|
15
|
-
logger;
|
|
16
|
-
reader;
|
|
17
|
-
chainName;
|
|
18
|
-
constructor(chainLookup, signer, args) {
|
|
19
|
-
this.chainLookup = chainLookup;
|
|
20
|
-
this.signer = signer;
|
|
21
|
-
this.args = args;
|
|
22
|
-
const metadata = chainLookup.getChainMetadata(args.chain);
|
|
23
|
-
this.chainName = metadata.name;
|
|
24
|
-
this.reader = new AltVMWarpRouteReader(metadata, chainLookup, signer);
|
|
25
|
-
this.logger = rootLogger.child({
|
|
26
|
-
module: AltVMWarpModule.name,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Retrieves the token router configuration for the specified address.
|
|
31
|
-
*
|
|
32
|
-
* @param address - The address to derive the token router configuration from.
|
|
33
|
-
* @returns A promise that resolves to the token router configuration.
|
|
34
|
-
*/
|
|
35
|
-
async read() {
|
|
36
|
-
return this.reader.deriveWarpRouteConfig(this.args.addresses.deployedTokenRoute);
|
|
37
|
-
}
|
|
38
|
-
serialize() {
|
|
39
|
-
return this.args.addresses;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Updates the Warp Route contract with the provided configuration.
|
|
43
|
-
*
|
|
44
|
-
* @param expectedConfig - The configuration for the token router to be updated.
|
|
45
|
-
* @returns An array of transactions that were executed to update the contract, or an error if the update failed.
|
|
46
|
-
*/
|
|
47
|
-
async update(expectedConfig) {
|
|
48
|
-
const actualConfig = await this.read();
|
|
49
|
-
const transactions = [];
|
|
50
|
-
/**
|
|
51
|
-
* @remark
|
|
52
|
-
* The order of operations matter
|
|
53
|
-
* createOwnershipUpdateTxs() must always be LAST because no updates possible after ownership transferred
|
|
54
|
-
*/
|
|
55
|
-
transactions.push(...(await this.createIsmUpdateTxs(actualConfig, expectedConfig)), ...(await this.createHookUpdateTxs(actualConfig, expectedConfig)), ...(await this.createRemoteRouterUpdateTxs(actualConfig, expectedConfig)), ...(await this.createOwnershipUpdateTxs(actualConfig, expectedConfig)));
|
|
56
|
-
return transactions;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Create transactions to update the remote routers for the Warp Route contract.
|
|
60
|
-
*
|
|
61
|
-
* @param actualConfig - The on-chain router configuration, including the remoteRouters array.
|
|
62
|
-
* @param expectedConfig - The expected token router configuration.
|
|
63
|
-
* @returns An array with transactions that need to be executed to enroll the routers
|
|
64
|
-
*/
|
|
65
|
-
async createRemoteRouterUpdateTxs(actualConfig, expectedConfig) {
|
|
66
|
-
this.logger.debug(`Start creating remote router update transactions`);
|
|
67
|
-
const updateTransactions = [];
|
|
68
|
-
if (!expectedConfig.remoteRouters) {
|
|
69
|
-
return [];
|
|
70
|
-
}
|
|
71
|
-
assert(actualConfig.remoteRouters, 'actualRemoteRouters is undefined');
|
|
72
|
-
assert(expectedConfig.remoteRouters, 'expectedRemoteRouters is undefined');
|
|
73
|
-
assert(actualConfig.destinationGas, 'actualDestinationGas is undefined');
|
|
74
|
-
assert(expectedConfig.destinationGas, 'expectedDestinationGas is undefined');
|
|
75
|
-
const { remoteRouters: actualRemoteRouters } = actualConfig;
|
|
76
|
-
const { remoteRouters: expectedRemoteRouters } = expectedConfig;
|
|
77
|
-
const { destinationGas: actualDestinationGas } = actualConfig;
|
|
78
|
-
const { destinationGas: expectedDestinationGas } = expectedConfig;
|
|
79
|
-
// perform checks if domain Ids match between remote router
|
|
80
|
-
// and destination gas configs
|
|
81
|
-
const actualRemoteRoutersString = Object.keys(actualRemoteRouters)
|
|
82
|
-
.sort()
|
|
83
|
-
.toString();
|
|
84
|
-
const actualDestinationGasString = Object.keys(actualDestinationGas)
|
|
85
|
-
.sort()
|
|
86
|
-
.toString();
|
|
87
|
-
const expectedRemoteRoutersString = Object.keys(expectedRemoteRouters)
|
|
88
|
-
.sort()
|
|
89
|
-
.toString();
|
|
90
|
-
const expectedDestinationGasString = Object.keys(expectedDestinationGas)
|
|
91
|
-
.sort()
|
|
92
|
-
.toString();
|
|
93
|
-
assert(actualRemoteRoutersString === actualDestinationGasString, `domain Ids from actual remote router config differ from actual destination gas config: ${actualRemoteRoutersString} : ${actualDestinationGasString}`);
|
|
94
|
-
assert(expectedRemoteRoutersString === expectedDestinationGasString, `domain Ids from expected remote router config differ from actual destination gas config: ${expectedRemoteRoutersString} : ${expectedDestinationGasString}`);
|
|
95
|
-
const routesToEnroll = [];
|
|
96
|
-
const routesToUnenroll = [];
|
|
97
|
-
// get domain Ids where we need to enroll, if the address
|
|
98
|
-
// or the gas updates inside a remote route we need to unenroll
|
|
99
|
-
// and enroll again
|
|
100
|
-
for (const domainId of Object.keys(expectedRemoteRouters)) {
|
|
101
|
-
if (!actualRemoteRouters[domainId]) {
|
|
102
|
-
routesToEnroll.push(domainId);
|
|
103
|
-
continue;
|
|
104
|
-
}
|
|
105
|
-
if (actualRemoteRouters[domainId].address !==
|
|
106
|
-
expectedRemoteRouters[domainId].address) {
|
|
107
|
-
routesToEnroll.push(domainId);
|
|
108
|
-
routesToUnenroll.push(domainId);
|
|
109
|
-
continue;
|
|
110
|
-
}
|
|
111
|
-
if (actualDestinationGas[domainId] !== expectedDestinationGas[domainId]) {
|
|
112
|
-
routesToEnroll.push(domainId);
|
|
113
|
-
routesToUnenroll.push(domainId);
|
|
114
|
-
continue;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
// get domain Ids where we need to unenroll
|
|
118
|
-
for (const domainId of Object.keys(actualRemoteRouters)) {
|
|
119
|
-
if (!expectedRemoteRouters[domainId]) {
|
|
120
|
-
routesToUnenroll.push(domainId);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
if (routesToEnroll.length === 0 && routesToUnenroll.length === 0) {
|
|
124
|
-
this.logger.debug(`No routes to change. No updates needed.`);
|
|
125
|
-
return [];
|
|
126
|
-
}
|
|
127
|
-
// first be unenroll all routes that need to be unenrolled,
|
|
128
|
-
// afterwards we enroll again
|
|
129
|
-
for (const domainId of routesToUnenroll) {
|
|
130
|
-
updateTransactions.push({
|
|
131
|
-
annotation: `Unenrolling Router ${this.args.addresses.deployedTokenRoute} on ${this.args.chain}`,
|
|
132
|
-
...(await this.signer.getUnenrollRemoteRouterTransaction({
|
|
133
|
-
signer: actualConfig.owner,
|
|
134
|
-
tokenAddress: this.args.addresses.deployedTokenRoute,
|
|
135
|
-
receiverDomainId: parseInt(domainId),
|
|
136
|
-
})),
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
for (const domainId of routesToEnroll) {
|
|
140
|
-
updateTransactions.push({
|
|
141
|
-
annotation: `Enrolling Router ${this.args.addresses.deployedTokenRoute} on ${this.args.chain}`,
|
|
142
|
-
...(await this.signer.getEnrollRemoteRouterTransaction({
|
|
143
|
-
signer: actualConfig.owner,
|
|
144
|
-
tokenAddress: this.args.addresses.deployedTokenRoute,
|
|
145
|
-
remoteRouter: {
|
|
146
|
-
receiverDomainId: parseInt(domainId),
|
|
147
|
-
receiverAddress: addressToBytes32(expectedRemoteRouters[domainId].address),
|
|
148
|
-
gas: expectedDestinationGas[domainId],
|
|
149
|
-
},
|
|
150
|
-
})),
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
this.logger.debug(`Created ${updateTransactions.length} remote router update transactions.`);
|
|
154
|
-
return updateTransactions;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Create transactions to update an existing ISM config, or deploy a new ISM and return a tx to setInterchainSecurityModule
|
|
158
|
-
*
|
|
159
|
-
* @param actualConfig - The on-chain router configuration, including the ISM configuration, and address.
|
|
160
|
-
* @param expectedConfig - The expected token router configuration, including the ISM configuration.
|
|
161
|
-
* @returns transaction that need to be executed to update the ISM configuration.
|
|
162
|
-
*/
|
|
163
|
-
async createIsmUpdateTxs(actualConfig, expectedConfig) {
|
|
164
|
-
this.logger.debug(`Start creating token ISM update transactions`);
|
|
165
|
-
const updateTransactions = [];
|
|
166
|
-
if (actualConfig.interchainSecurityModule ===
|
|
167
|
-
expectedConfig.interchainSecurityModule) {
|
|
168
|
-
this.logger.debug(`Token ISM config is the same as target. No updates needed.`);
|
|
169
|
-
return updateTransactions;
|
|
170
|
-
}
|
|
171
|
-
const actualDeployedIsm = actualConfig.interchainSecurityModule?.address ??
|
|
172
|
-
'';
|
|
173
|
-
const actualIsmIsNonZero = actualDeployedIsm && !isZeroishAddress(actualDeployedIsm);
|
|
174
|
-
const expectedIsmIsEmpty = !expectedConfig.interchainSecurityModule ||
|
|
175
|
-
(typeof expectedConfig.interchainSecurityModule === 'string' &&
|
|
176
|
-
isZeroishAddress(expectedConfig.interchainSecurityModule));
|
|
177
|
-
// If expected ISM is empty/zero but actual ISM exists, reset to zero address if
|
|
178
|
-
// the protocol type is not cosmos as the underlying implementation does not support
|
|
179
|
-
// resetting to the default ism yet (will be fixed in the next release of the cosmos sdk)
|
|
180
|
-
const metadata = this.chainLookup.getChainMetadata(this.args.chain);
|
|
181
|
-
if (expectedIsmIsEmpty && actualIsmIsNonZero) {
|
|
182
|
-
if (metadata.protocol === ProtocolType.CosmosNative) {
|
|
183
|
-
this.logger.warn(`CosmosNative does not support unsetting token ISM. Skipping reset from ${actualDeployedIsm} to zero address.`);
|
|
184
|
-
return updateTransactions;
|
|
185
|
-
}
|
|
186
|
-
this.logger.debug(`Resetting ISM from ${actualDeployedIsm} to zero address`);
|
|
187
|
-
return [
|
|
188
|
-
{
|
|
189
|
-
annotation: `Resetting ISM for Warp Route to zero address`,
|
|
190
|
-
...(await this.signer.getSetTokenIsmTransaction({
|
|
191
|
-
signer: actualConfig.owner,
|
|
192
|
-
tokenAddress: this.args.addresses.deployedTokenRoute,
|
|
193
|
-
})),
|
|
194
|
-
},
|
|
195
|
-
];
|
|
196
|
-
}
|
|
197
|
-
// If both are empty/zero, no updates needed
|
|
198
|
-
if (expectedIsmIsEmpty) {
|
|
199
|
-
this.logger.debug(`Token ISM config is empty. No updates needed.`);
|
|
200
|
-
return updateTransactions;
|
|
201
|
-
}
|
|
202
|
-
// Try to update (may also deploy) Ism with the expected config
|
|
203
|
-
const { deployedIsm: expectedDeployedIsm, updateTransactions: ismUpdateTransactions, } = await this.deployOrUpdateIsm(actualConfig, expectedConfig);
|
|
204
|
-
// If an ISM is updated in-place, push the update txs
|
|
205
|
-
updateTransactions.push(...ismUpdateTransactions);
|
|
206
|
-
// If a new ISM is deployed, push the setInterchainSecurityModule tx
|
|
207
|
-
if (actualDeployedIsm !== expectedDeployedIsm) {
|
|
208
|
-
updateTransactions.push({
|
|
209
|
-
annotation: `Setting ISM for Warp Route to ${expectedDeployedIsm}`,
|
|
210
|
-
...(await this.signer.getSetTokenIsmTransaction({
|
|
211
|
-
signer: actualConfig.owner,
|
|
212
|
-
tokenAddress: this.args.addresses.deployedTokenRoute,
|
|
213
|
-
ismAddress: expectedDeployedIsm,
|
|
214
|
-
})),
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
this.logger.debug(`Created ${updateTransactions.length} update token ISM transactions.`);
|
|
218
|
-
return updateTransactions;
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Create transactions to update an existing Hook config, or deploy a new Hook and return a tx to setHook
|
|
222
|
-
*
|
|
223
|
-
* @param actualConfig - The on-chain router configuration, including the ISM configuration, and address.
|
|
224
|
-
* @param expectedConfig - The expected token router configuration, including the ISM configuration.
|
|
225
|
-
* @returns transaction that need to be executed to update the ISM configuration.
|
|
226
|
-
*/
|
|
227
|
-
async createHookUpdateTxs(actualConfig, expectedConfig) {
|
|
228
|
-
this.logger.debug(`Start creating token Hook update transactions`);
|
|
229
|
-
const updateTransactions = [];
|
|
230
|
-
// Only Aleo supports hook updates for AltVM chains
|
|
231
|
-
const metadata = this.chainLookup.getChainMetadata(this.args.chain);
|
|
232
|
-
if (metadata.protocol !== ProtocolType.Aleo) {
|
|
233
|
-
this.logger.debug(`Hook updates not supported for protocol ${metadata.protocol}. Skipping.`);
|
|
234
|
-
return updateTransactions;
|
|
235
|
-
}
|
|
236
|
-
if (deepEquals(normalizeConfig(actualConfig.hook), normalizeConfig(expectedConfig.hook))) {
|
|
237
|
-
this.logger.debug(`Token Hook config is the same as target. No updates needed.`);
|
|
238
|
-
return updateTransactions;
|
|
239
|
-
}
|
|
240
|
-
const actualDeployedHook = actualConfig.hook?.address ?? '';
|
|
241
|
-
const actualHookIsNonZero = actualDeployedHook && !isZeroishAddress(actualDeployedHook);
|
|
242
|
-
const expectedHookIsEmpty = !expectedConfig.hook ||
|
|
243
|
-
(typeof expectedConfig.hook === 'string' &&
|
|
244
|
-
isZeroishAddress(expectedConfig.hook));
|
|
245
|
-
if (expectedHookIsEmpty && actualHookIsNonZero) {
|
|
246
|
-
this.logger.debug(`Resetting Hook from ${actualDeployedHook} to zero address`);
|
|
247
|
-
return [
|
|
248
|
-
{
|
|
249
|
-
annotation: `Resetting Hook for Warp Route to zero address`,
|
|
250
|
-
...(await this.signer.getSetTokenHookTransaction({
|
|
251
|
-
signer: actualConfig.owner,
|
|
252
|
-
tokenAddress: this.args.addresses.deployedTokenRoute,
|
|
253
|
-
})),
|
|
254
|
-
},
|
|
255
|
-
];
|
|
256
|
-
}
|
|
257
|
-
// If both are empty/zero, no updates needed
|
|
258
|
-
if (expectedHookIsEmpty) {
|
|
259
|
-
this.logger.debug(`Token Hook config is empty. No updates needed.`);
|
|
260
|
-
return updateTransactions;
|
|
261
|
-
}
|
|
262
|
-
// Try to update (may also deploy) Hook with the expected config
|
|
263
|
-
const { deployedHook: expectedDeployedHook, updateTransactions: hookUpdateTransactions, } = await this.deployOrUpdateHook(actualConfig, expectedConfig);
|
|
264
|
-
// If an Hook is updated in-place, push the update txs
|
|
265
|
-
updateTransactions.push(...hookUpdateTransactions);
|
|
266
|
-
// If a new Hook is deployed, push the setHook tx
|
|
267
|
-
if (actualDeployedHook !== expectedDeployedHook) {
|
|
268
|
-
updateTransactions.push({
|
|
269
|
-
annotation: `Setting Hook for Warp Route to ${expectedDeployedHook}`,
|
|
270
|
-
...(await this.signer.getSetTokenHookTransaction({
|
|
271
|
-
signer: actualConfig.owner,
|
|
272
|
-
tokenAddress: this.args.addresses.deployedTokenRoute,
|
|
273
|
-
hookAddress: expectedDeployedHook,
|
|
274
|
-
})),
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
this.logger.debug(`Created ${updateTransactions.length} update token Hook transactions.`);
|
|
278
|
-
return updateTransactions;
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Transfer ownership of an existing Warp route with a given config.
|
|
282
|
-
*
|
|
283
|
-
* @param actualConfig - The on-chain router configuration.
|
|
284
|
-
* @param expectedConfig - The expected token router configuration.
|
|
285
|
-
* @returns transaction that need to be executed to update the owner.
|
|
286
|
-
*/
|
|
287
|
-
async createOwnershipUpdateTxs(actualConfig, expectedConfig) {
|
|
288
|
-
this.logger.debug(`Start creating token owner update transactions`);
|
|
289
|
-
if (actualConfig.owner === expectedConfig.owner) {
|
|
290
|
-
this.logger.debug(`Token owner is the same as target. No updates needed.`);
|
|
291
|
-
return [];
|
|
292
|
-
}
|
|
293
|
-
this.logger.debug(`Created 1 update token owner update transaction.`);
|
|
294
|
-
return [
|
|
295
|
-
{
|
|
296
|
-
annotation: `Transferring ownership of ${this.args.addresses.deployedTokenRoute} from ${actualConfig.owner} to ${expectedConfig.owner}`,
|
|
297
|
-
...(await this.signer.getSetTokenOwnerTransaction({
|
|
298
|
-
signer: actualConfig.owner,
|
|
299
|
-
tokenAddress: this.args.addresses.deployedTokenRoute,
|
|
300
|
-
newOwner: expectedConfig.owner,
|
|
301
|
-
})),
|
|
302
|
-
},
|
|
303
|
-
];
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* Updates or deploys the ISM using the provided configuration.
|
|
307
|
-
*
|
|
308
|
-
* @returns Object with deployedIsm address, and update Transactions
|
|
309
|
-
*/
|
|
310
|
-
async deployOrUpdateIsm(actualConfig, expectedConfig) {
|
|
311
|
-
this.logger.debug(`Start deploying token ISM`);
|
|
312
|
-
assert(expectedConfig.interchainSecurityModule, 'Ism derived incorrectly');
|
|
313
|
-
// Validate ISM configuration is supported by provider-sdk
|
|
314
|
-
validateIsmConfig(expectedConfig.interchainSecurityModule, this.chainName, 'warp route ISM');
|
|
315
|
-
// If ISM is an address reference, use it directly without updates
|
|
316
|
-
if (typeof expectedConfig.interchainSecurityModule === 'string') {
|
|
317
|
-
return {
|
|
318
|
-
deployedIsm: expectedConfig.interchainSecurityModule,
|
|
319
|
-
updateTransactions: [],
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
const metadata = this.chainLookup.getChainMetadata(this.args.chain);
|
|
323
|
-
const writer = createIsmWriter(metadata, this.chainLookup, this.signer);
|
|
324
|
-
const actualIsmAddress = actualConfig.interchainSecurityModule?.address ??
|
|
325
|
-
'';
|
|
326
|
-
// Convert expected config to artifact format
|
|
327
|
-
const expectedArtifact = ismConfigToArtifact(expectedConfig.interchainSecurityModule, this.chainLookup);
|
|
328
|
-
// If no existing ISM, deploy new one directly (no comparison needed)
|
|
329
|
-
if (!actualIsmAddress) {
|
|
330
|
-
this.logger.debug(`No existing ISM found, deploying new one`);
|
|
331
|
-
const [deployed] = await writer.create(expectedArtifact);
|
|
332
|
-
return {
|
|
333
|
-
deployedIsm: deployed.deployed.address,
|
|
334
|
-
updateTransactions: [],
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
// Read actual ISM state (only when we have existing ISM to compare)
|
|
338
|
-
const actualArtifact = await writer.read(actualIsmAddress);
|
|
339
|
-
this.logger.debug(`Comparing target ISM config with ${this.args.chain} chain`);
|
|
340
|
-
// Update existing ISM (only routing ISMs support updates)
|
|
341
|
-
// Merge artifacts to preserve DEPLOYED state for unchanged nested ISMs
|
|
342
|
-
const mergedArtifact = mergeIsmArtifacts(actualArtifact, expectedArtifact);
|
|
343
|
-
// If merge resulted in NEW state, deploy it
|
|
344
|
-
if (isArtifactNew(mergedArtifact)) {
|
|
345
|
-
const [deployed] = await writer.create(mergedArtifact);
|
|
346
|
-
return {
|
|
347
|
-
deployedIsm: deployed.deployed.address,
|
|
348
|
-
updateTransactions: [],
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
else {
|
|
352
|
-
// Otherwise update in-place (artifact is DEPLOYED)
|
|
353
|
-
const updateTransactions = await writer.update(mergedArtifact);
|
|
354
|
-
return {
|
|
355
|
-
deployedIsm: mergedArtifact.deployed.address,
|
|
356
|
-
updateTransactions,
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
* Updates or deploys the Hook using the provided configuration.
|
|
362
|
-
*
|
|
363
|
-
* @returns Object with deployedHook address, and update Transactions
|
|
364
|
-
*/
|
|
365
|
-
async deployOrUpdateHook(actualConfig, expectedConfig) {
|
|
366
|
-
this.logger.debug(`Start deploying token Hook`);
|
|
367
|
-
assert(expectedConfig.hook, 'Hook derived incorrectly');
|
|
368
|
-
// If expected hook is an address reference, use it directly
|
|
369
|
-
if (typeof expectedConfig.hook === 'string') {
|
|
370
|
-
return {
|
|
371
|
-
deployedHook: expectedConfig.hook,
|
|
372
|
-
updateTransactions: [],
|
|
373
|
-
};
|
|
374
|
-
}
|
|
375
|
-
const metadata = this.chainLookup.getChainMetadata(this.args.chain);
|
|
376
|
-
const writer = createHookWriter(metadata, this.chainLookup, this.signer, {
|
|
377
|
-
mailbox: expectedConfig.mailbox,
|
|
378
|
-
});
|
|
379
|
-
const actualHookAddress = actualConfig.hook?.address ?? '';
|
|
380
|
-
this.logger.debug(`Comparing target Hook config with ${this.args.chain} chain`);
|
|
381
|
-
// Use the new deployOrUpdate method from HookWriter
|
|
382
|
-
const result = await writer.deployOrUpdate({
|
|
383
|
-
actualAddress: actualHookAddress || undefined,
|
|
384
|
-
expectedConfig: expectedConfig.hook,
|
|
385
|
-
});
|
|
386
|
-
return {
|
|
387
|
-
deployedHook: result.address,
|
|
388
|
-
updateTransactions: result.transactions,
|
|
389
|
-
};
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* Deploys the Warp Route.
|
|
393
|
-
*
|
|
394
|
-
* @param chain - The chain to deploy the module on.
|
|
395
|
-
* @param config - The configuration for the token router.
|
|
396
|
-
* @param chainLookup - Chain metadata lookup functions
|
|
397
|
-
* @param signer - The AltVM signing client
|
|
398
|
-
* @returns A new instance of the AltVMWarpModule.
|
|
399
|
-
*/
|
|
400
|
-
static async create(params) {
|
|
401
|
-
const deployer = new AltVMDeployer({
|
|
402
|
-
[params.chain]: params.signer,
|
|
403
|
-
});
|
|
404
|
-
const { [params.chain]: deployedTokenRoute } = await deployer.deploy({
|
|
405
|
-
[params.chain]: params.config,
|
|
406
|
-
});
|
|
407
|
-
return new AltVMWarpModule(params.chainLookup, params.signer, {
|
|
408
|
-
addresses: {
|
|
409
|
-
deployedTokenRoute,
|
|
410
|
-
},
|
|
411
|
-
chain: params.chain,
|
|
412
|
-
config: params.config,
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
//# sourceMappingURL=AltVMWarpModule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AltVMWarpModule.js","sourceRoot":"","sources":["../src/AltVMWarpModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAGrE,OAAO,EAEL,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AAazC,OAAO,EAEL,gBAAgB,EAChB,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,UAAU,GACX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,OAAO,eAAe;IAOL;IACA;IACF;IART,MAAM,CAA6C;IAE7D,MAAM,CAAuB;IACb,SAAS,CAAS;IAElC,YACqB,WAAwB,EACxB,MAA6C,EAC/C,IAA0C;QAFxC,gBAAW,GAAX,WAAW,CAAa;QACxB,WAAM,GAAN,MAAM,CAAuC;QAC/C,SAAI,GAAJ,IAAI,CAAsC;QAE3D,MAAM,QAAQ,GAAG,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1D,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,IA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