@hyperlane-xyz/deploy-sdk 3.0.1 → 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.
- package/dist/core/core-artifact-reader.d.ts +67 -0
- package/dist/core/core-artifact-reader.d.ts.map +1 -0
- package/dist/core/core-artifact-reader.js +117 -0
- package/dist/core/core-artifact-reader.js.map +1 -0
- package/dist/core/core-artifact-reader.test.d.ts +2 -0
- package/dist/core/core-artifact-reader.test.d.ts.map +1 -0
- package/dist/core/core-artifact-reader.test.js +300 -0
- package/dist/core/core-artifact-reader.test.js.map +1 -0
- package/dist/core/core-writer.d.ts +42 -0
- package/dist/core/core-writer.d.ts.map +1 -0
- package/dist/core/core-writer.js +230 -0
- package/dist/core/core-writer.js.map +1 -0
- package/dist/core/core-writer.test.d.ts +2 -0
- package/dist/core/core-writer.test.d.ts.map +1 -0
- package/dist/core/core-writer.test.js +980 -0
- package/dist/core/core-writer.test.js.map +1 -0
- package/dist/hook/hook-reader.d.ts +5 -2
- package/dist/hook/hook-reader.d.ts.map +1 -1
- package/dist/hook/hook-reader.js +4 -3
- package/dist/hook/hook-reader.js.map +1 -1
- package/dist/hook/hook-writer.d.ts.map +1 -1
- package/dist/hook/hook-writer.js +2 -1
- package/dist/hook/hook-writer.js.map +1 -1
- package/dist/index.d.ts +7 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -8
- package/dist/index.js.map +1 -1
- package/dist/ism/generic-ism.d.ts.map +1 -1
- package/dist/ism/generic-ism.js +3 -40
- package/dist/ism/generic-ism.js.map +1 -1
- package/dist/warp/warp-reader.d.ts +0 -2
- package/dist/warp/warp-reader.d.ts.map +1 -1
- package/dist/warp/warp-reader.js +7 -5
- package/dist/warp/warp-reader.js.map +1 -1
- package/package.json +10 -10
- package/dist/AltVMCoreModule.d.ts +0 -94
- package/dist/AltVMCoreModule.d.ts.map +0 -1
- package/dist/AltVMCoreModule.js +0 -368
- package/dist/AltVMCoreModule.js.map +0 -1
- package/dist/AltVMCoreReader.d.ts +0 -18
- package/dist/AltVMCoreReader.d.ts.map +0 -1
- package/dist/AltVMCoreReader.js +0 -35
- package/dist/AltVMCoreReader.js.map +0 -1
- package/dist/core-module.d.ts +0 -5
- package/dist/core-module.d.ts.map +0 -1
- package/dist/core-module.js +0 -28
- package/dist/core-module.js.map +0 -1
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { getProtocolProvider, } from '@hyperlane-xyz/provider-sdk';
|
|
2
|
+
import { ArtifactState, isArtifactNew, isArtifactUnderived, toDeployedOrUndefined, } from '@hyperlane-xyz/provider-sdk/artifact';
|
|
3
|
+
import { mergeHookArtifacts, } from '@hyperlane-xyz/provider-sdk/hook';
|
|
4
|
+
import { mergeIsmArtifacts, } from '@hyperlane-xyz/provider-sdk/ism';
|
|
5
|
+
import { ZERO_ADDRESS_HEX_32, rootLogger } from '@hyperlane-xyz/utils';
|
|
6
|
+
import { createHookWriter } from '../hook/hook-writer.js';
|
|
7
|
+
import { createIsmWriter } from '../ism/generic-ism-writer.js';
|
|
8
|
+
import { CoreArtifactReader } from './core-artifact-reader.js';
|
|
9
|
+
export function createCoreWriter(chainMetadata, chainLookup, signer) {
|
|
10
|
+
const protocolProvider = getProtocolProvider(chainMetadata.protocol);
|
|
11
|
+
const mailboxArtifactManager = protocolProvider.createMailboxArtifactManager(chainMetadata);
|
|
12
|
+
const validatorAnnounceArtifactManager = protocolProvider.createValidatorAnnounceArtifactManager(chainMetadata);
|
|
13
|
+
return new CoreWriter(mailboxArtifactManager, validatorAnnounceArtifactManager, chainMetadata, chainLookup, signer);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Orchestrates core deployment (mailbox, ISM, hooks, validator announce)
|
|
17
|
+
* using the Artifact API. Extends CoreArtifactReader for read().
|
|
18
|
+
*
|
|
19
|
+
* Does not implement ArtifactWriter<MailboxArtifactConfig, DeployedMailboxAddress>
|
|
20
|
+
* because create() returns a composite result (mailbox + validator announce) rather
|
|
21
|
+
* than a single [ArtifactDeployed, TxReceipt[]] tuple. The update() signature does
|
|
22
|
+
* conform to the standard pattern.
|
|
23
|
+
*/
|
|
24
|
+
export class CoreWriter extends CoreArtifactReader {
|
|
25
|
+
validatorAnnounceArtifactManager;
|
|
26
|
+
signer;
|
|
27
|
+
logger = rootLogger.child({
|
|
28
|
+
module: CoreWriter.name,
|
|
29
|
+
});
|
|
30
|
+
ismWriter;
|
|
31
|
+
constructor(mailboxArtifactManager, validatorAnnounceArtifactManager, chainMetadata, chainLookup, signer) {
|
|
32
|
+
super(mailboxArtifactManager, chainMetadata, chainLookup);
|
|
33
|
+
this.validatorAnnounceArtifactManager = validatorAnnounceArtifactManager;
|
|
34
|
+
this.signer = signer;
|
|
35
|
+
this.ismWriter = createIsmWriter(this.chainMetadata, this.chainLookup, this.signer);
|
|
36
|
+
}
|
|
37
|
+
async create(artifact) {
|
|
38
|
+
const { config } = artifact;
|
|
39
|
+
const allReceipts = [];
|
|
40
|
+
const chainName = this.chainMetadata.name;
|
|
41
|
+
this.logger.info(`Starting core deployment on ${chainName}`);
|
|
42
|
+
// Step 1: Deploy ISM if NEW
|
|
43
|
+
let onChainIsmArtifact;
|
|
44
|
+
if (isArtifactNew(config.defaultIsm)) {
|
|
45
|
+
const [deployed, ismReceipts] = await this.ismWriter.create(config.defaultIsm);
|
|
46
|
+
allReceipts.push(...ismReceipts);
|
|
47
|
+
onChainIsmArtifact = deployed;
|
|
48
|
+
this.logger.info(`Default ISM deployed at ${deployed.deployed.address} on ${chainName}`);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
onChainIsmArtifact = config.defaultIsm;
|
|
52
|
+
}
|
|
53
|
+
// Step 2: Create mailbox with ISM + zero hooks initially
|
|
54
|
+
const mailboxWriter = this.mailboxArtifactManager.createWriter('mailbox', this.signer);
|
|
55
|
+
// Create mailbox with ISM but zero hooks initially.
|
|
56
|
+
// Hooks require the mailbox address for deployment (circular dependency),
|
|
57
|
+
// so we create mailbox first, deploy hooks in Step 3, then update mailbox in Step 4.
|
|
58
|
+
const initialMailboxArtifact = {
|
|
59
|
+
artifactState: ArtifactState.NEW,
|
|
60
|
+
config: {
|
|
61
|
+
owner: this.signer.getSignerAddress(), // Signer owns initially; transferred in Step 4
|
|
62
|
+
defaultIsm: onChainIsmArtifact,
|
|
63
|
+
defaultHook: {
|
|
64
|
+
artifactState: ArtifactState.UNDERIVED,
|
|
65
|
+
deployed: { address: ZERO_ADDRESS_HEX_32 },
|
|
66
|
+
},
|
|
67
|
+
requiredHook: {
|
|
68
|
+
artifactState: ArtifactState.UNDERIVED,
|
|
69
|
+
deployed: { address: ZERO_ADDRESS_HEX_32 },
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
const [deployedMailbox, mailboxReceipts] = await mailboxWriter.create(initialMailboxArtifact);
|
|
74
|
+
allReceipts.push(...mailboxReceipts);
|
|
75
|
+
const mailboxAddress = deployedMailbox.deployed.address;
|
|
76
|
+
this.logger.info(`Mailbox deployed at ${mailboxAddress} on ${chainName}`);
|
|
77
|
+
const hookWriter = createHookWriter(this.chainMetadata, this.chainLookup, this.signer, { mailbox: mailboxAddress });
|
|
78
|
+
// Step 3: Deploy hooks if NEW (hooks need mailbox address)
|
|
79
|
+
let onChainDefaultHookArtifact;
|
|
80
|
+
if (isArtifactNew(config.defaultHook)) {
|
|
81
|
+
const [deployed, hookReceipts] = await hookWriter.create(config.defaultHook);
|
|
82
|
+
allReceipts.push(...hookReceipts);
|
|
83
|
+
onChainDefaultHookArtifact = deployed;
|
|
84
|
+
this.logger.info(`Default hook deployed at ${deployed.deployed.address} on ${chainName}`);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
onChainDefaultHookArtifact = config.defaultHook;
|
|
88
|
+
}
|
|
89
|
+
let onChainRequiredHookArtifact;
|
|
90
|
+
if (isArtifactNew(config.requiredHook)) {
|
|
91
|
+
const [deployed, hookReceipts] = await hookWriter.create(config.requiredHook);
|
|
92
|
+
allReceipts.push(...hookReceipts);
|
|
93
|
+
onChainRequiredHookArtifact = deployed;
|
|
94
|
+
this.logger.info(`Required hook deployed at ${deployed.deployed.address} on ${chainName}`);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
onChainRequiredHookArtifact = config.requiredHook;
|
|
98
|
+
}
|
|
99
|
+
// Step 4: Update mailbox with hooks + transfer owner
|
|
100
|
+
const updatedMailboxArtifact = {
|
|
101
|
+
artifactState: ArtifactState.DEPLOYED,
|
|
102
|
+
config: {
|
|
103
|
+
owner: config.owner,
|
|
104
|
+
defaultIsm: onChainIsmArtifact,
|
|
105
|
+
defaultHook: onChainDefaultHookArtifact,
|
|
106
|
+
requiredHook: onChainRequiredHookArtifact,
|
|
107
|
+
},
|
|
108
|
+
deployed: deployedMailbox.deployed,
|
|
109
|
+
};
|
|
110
|
+
const updateTxs = await mailboxWriter.update(updatedMailboxArtifact);
|
|
111
|
+
for (const tx of updateTxs) {
|
|
112
|
+
const receipt = await this.signer.sendAndConfirmTransaction(tx);
|
|
113
|
+
allReceipts.push(receipt);
|
|
114
|
+
}
|
|
115
|
+
// Step 5: Deploy validator announce (if supported by protocol)
|
|
116
|
+
let validatorAnnounceArtifact = null;
|
|
117
|
+
if (this.validatorAnnounceArtifactManager) {
|
|
118
|
+
const vaWriter = this.validatorAnnounceArtifactManager.createWriter('validatorAnnounce', this.signer);
|
|
119
|
+
const vaArtifact = {
|
|
120
|
+
artifactState: ArtifactState.NEW,
|
|
121
|
+
config: { mailboxAddress },
|
|
122
|
+
};
|
|
123
|
+
const [deployed, vaReceipts] = await vaWriter.create(vaArtifact);
|
|
124
|
+
allReceipts.push(...vaReceipts);
|
|
125
|
+
validatorAnnounceArtifact = deployed;
|
|
126
|
+
this.logger.info(`Validator announce deployed at ${deployed.deployed.address} on ${chainName}`);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
this.logger.info(`Validator announce not supported by protocol for ${chainName}`);
|
|
130
|
+
}
|
|
131
|
+
this.logger.info(`Core deployment complete on ${chainName}`);
|
|
132
|
+
return [
|
|
133
|
+
{
|
|
134
|
+
mailbox: updatedMailboxArtifact,
|
|
135
|
+
validatorAnnounce: validatorAnnounceArtifact,
|
|
136
|
+
},
|
|
137
|
+
allReceipts,
|
|
138
|
+
];
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Returns mailbox update transactions for the caller to submit.
|
|
142
|
+
* Note: may perform on-chain writes as a side effect when sub-components
|
|
143
|
+
* (ISM, hooks) require fresh deployment via `create()`.
|
|
144
|
+
*/
|
|
145
|
+
async update(expectedArtifact) {
|
|
146
|
+
const { config: expectedConfig, deployed } = expectedArtifact;
|
|
147
|
+
const { address: mailboxAddress } = deployed;
|
|
148
|
+
const updateTxs = [];
|
|
149
|
+
// Read actual state (fully expanded)
|
|
150
|
+
const currentArtifact = await this.read(mailboxAddress);
|
|
151
|
+
const currentConfig = currentArtifact.config;
|
|
152
|
+
// Extract current artifacts: DEPLOYED if expanded, undefined if UNDERIVED (zero-address)
|
|
153
|
+
// Throws if UNDERIVED with non-zero address (unexpected state)
|
|
154
|
+
const currentIsm = toDeployedOrUndefined(currentConfig.defaultIsm, 'defaultIsm');
|
|
155
|
+
const currentDefaultHook = toDeployedOrUndefined(currentConfig.defaultHook, 'defaultHook');
|
|
156
|
+
const currentRequiredHook = toDeployedOrUndefined(currentConfig.requiredHook, 'requiredHook');
|
|
157
|
+
// Update ISM
|
|
158
|
+
const { address: newIsmAddress, transactions: ismTxs } = await this.deployOrUpdateIsm(currentIsm, expectedConfig.defaultIsm);
|
|
159
|
+
updateTxs.push(...ismTxs);
|
|
160
|
+
// Update default hook
|
|
161
|
+
const { address: newDefaultHookAddress, transactions: defaultHookTxs } = await this.deployOrUpdateHook(currentDefaultHook, expectedConfig.defaultHook, mailboxAddress);
|
|
162
|
+
updateTxs.push(...defaultHookTxs);
|
|
163
|
+
// Update required hook
|
|
164
|
+
const { address: newRequiredHookAddress, transactions: requiredHookTxs } = await this.deployOrUpdateHook(currentRequiredHook, expectedConfig.requiredHook, mailboxAddress);
|
|
165
|
+
updateTxs.push(...requiredHookTxs);
|
|
166
|
+
const mailboxWriter = this.mailboxArtifactManager.createWriter('mailbox', this.signer);
|
|
167
|
+
const updatedMailboxArtifact = {
|
|
168
|
+
artifactState: ArtifactState.DEPLOYED,
|
|
169
|
+
config: {
|
|
170
|
+
owner: expectedConfig.owner,
|
|
171
|
+
defaultIsm: {
|
|
172
|
+
artifactState: ArtifactState.UNDERIVED,
|
|
173
|
+
deployed: { address: newIsmAddress },
|
|
174
|
+
},
|
|
175
|
+
defaultHook: {
|
|
176
|
+
artifactState: ArtifactState.UNDERIVED,
|
|
177
|
+
deployed: { address: newDefaultHookAddress },
|
|
178
|
+
},
|
|
179
|
+
requiredHook: {
|
|
180
|
+
artifactState: ArtifactState.UNDERIVED,
|
|
181
|
+
deployed: { address: newRequiredHookAddress },
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
deployed: currentArtifact.deployed,
|
|
185
|
+
};
|
|
186
|
+
const mailboxUpdateTxs = await mailboxWriter.update(updatedMailboxArtifact);
|
|
187
|
+
updateTxs.push(...mailboxUpdateTxs);
|
|
188
|
+
return updateTxs;
|
|
189
|
+
}
|
|
190
|
+
async deployOrUpdateIsm(currentIsmArtifact, expectedIsm) {
|
|
191
|
+
const chainName = this.chainMetadata.name;
|
|
192
|
+
// If expected is UNDERIVED (just an address reference), use as-is
|
|
193
|
+
if (isArtifactUnderived(expectedIsm)) {
|
|
194
|
+
return { address: expectedIsm.deployed.address, transactions: [] };
|
|
195
|
+
}
|
|
196
|
+
// Merge current with expected (preserves DEPLOYED state for unchanged nested ISMs)
|
|
197
|
+
const mergedArtifact = mergeIsmArtifacts(currentIsmArtifact, expectedIsm);
|
|
198
|
+
if (isArtifactNew(mergedArtifact)) {
|
|
199
|
+
const [deployed] = await this.ismWriter.create(mergedArtifact);
|
|
200
|
+
this.logger.info(`ISM deployed at ${deployed.deployed.address} on ${chainName}`);
|
|
201
|
+
return { address: deployed.deployed.address, transactions: [] };
|
|
202
|
+
}
|
|
203
|
+
const updateTxs = await this.ismWriter.update(mergedArtifact);
|
|
204
|
+
return {
|
|
205
|
+
address: mergedArtifact.deployed.address,
|
|
206
|
+
transactions: updateTxs,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
async deployOrUpdateHook(currentHookArtifact, expectedHook, mailboxAddress) {
|
|
210
|
+
const chainName = this.chainMetadata.name;
|
|
211
|
+
// If expected is UNDERIVED (just an address reference), use as-is
|
|
212
|
+
if (isArtifactUnderived(expectedHook)) {
|
|
213
|
+
return { address: expectedHook.deployed.address, transactions: [] };
|
|
214
|
+
}
|
|
215
|
+
const hookWriter = createHookWriter(this.chainMetadata, this.chainLookup, this.signer, { mailbox: mailboxAddress });
|
|
216
|
+
// Merge current with expected
|
|
217
|
+
const mergedArtifact = mergeHookArtifacts(currentHookArtifact, expectedHook);
|
|
218
|
+
if (isArtifactNew(mergedArtifact)) {
|
|
219
|
+
const [deployed] = await hookWriter.create(mergedArtifact);
|
|
220
|
+
this.logger.info(`Hook deployed at ${deployed.deployed.address} on ${chainName}`);
|
|
221
|
+
return { address: deployed.deployed.address, transactions: [] };
|
|
222
|
+
}
|
|
223
|
+
const updateTxs = await hookWriter.update(mergedArtifact);
|
|
224
|
+
return {
|
|
225
|
+
address: mergedArtifact.deployed.address,
|
|
226
|
+
transactions: updateTxs,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
//# sourceMappingURL=core-writer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-writer.js","sourceRoot":"","sources":["../../src/core/core-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAKL,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,sCAAsC,CAAC;AA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