|
19 | 19 | * EXAMPLES: |
20 | 20 | * |
21 | 21 | * Deploy only: |
22 | | - * node deploy_evm_lazer_contracts.ts --chain ethereum --private-key <key> |
| 22 | + * npx ts-node deploy_evm_lazer_contracts.ts --chain ethereum --private-key <key> |
23 | 23 | * |
24 | 24 | * Deploy with verification: |
25 | | - * node deploy_evm_lazer_contracts.ts --chain ethereum --private-key <key> --verify --etherscan-api-key <key> |
| 25 | + * npx ts-node deploy_evm_lazer_contracts.ts --chain ethereum --private-key <key> --verify --etherscan-api-key <key> |
26 | 26 | * |
27 | 27 | * Update trusted signer only (requires existing contract): |
28 | | - * node deploy_evm_lazer_contracts.ts --chain ethereum --private-key <key> --deploy false --update-signer 0x123... --expires-at 1735689600 |
| 28 | + * npx ts-node deploy_evm_lazer_contracts.ts --chain ethereum --private-key <key> --deploy false --update-signer 0x123... --expires-at 1735689600 |
29 | 29 | * |
30 | 30 | * Deploy and update trusted signer in one command: |
31 | | - * node deploy_evm_lazer_contracts.ts --chain ethereum --private-key <key> --update-signer 0x123... --expires-at 1735689600 |
| 31 | + * npx ts-node deploy_evm_lazer_contracts.ts --chain ethereum --private-key <key> --update-signer 0x123... --expires-at 1735689600 |
32 | 32 | * |
33 | 33 | * NOTES: |
34 | 34 | * - The --deploy flag defaults to true if no other flags are specified |
@@ -175,7 +175,6 @@ async function deployPythLazerContract( |
175 | 175 | */ |
176 | 176 | function updateContractsFile(chain: EvmChain, address: string): void { |
177 | 177 | console.log(`Updating contracts file for ${chain.getId()}`); |
178 | | - // FIXME: This is not working as expected. The contract is not being saved to the store. |
179 | 178 | const lazerContract = new EvmLazerContract(chain, address); |
180 | 179 | DefaultStore.lazer_contracts[lazerContract.getId()] = lazerContract; |
181 | 180 | DefaultStore.saveAllContracts(); |
@@ -213,11 +212,6 @@ async function updateTrustedSigner( |
213 | 212 | expiresAt: number, |
214 | 213 | privateKey: PrivateKey, |
215 | 214 | ): Promise<void> { |
216 | | - console.log(`Updating trusted signer on ${chain.getId()}...`); |
217 | | - console.log(`Contract: ${contractAddress}`); |
218 | | - console.log(`Trusted Signer: ${trustedSigner}`); |
219 | | - console.log(`Expires At: ${new Date(expiresAt * 1000).toISOString()}`); |
220 | | - |
221 | 215 | const contract = getOrCreateLazerContract(chain, contractAddress); |
222 | 216 | await contract.updateTrustedSigner(trustedSigner, expiresAt, privateKey); |
223 | 217 | } |
@@ -288,7 +282,7 @@ export async function main() { |
288 | 282 |
|
289 | 283 | // Step 2: Update trusted signer if requested |
290 | 284 | if (argv["update-signer"] && argv["expires-at"]) { |
291 | | - console.log(`Updating trusted signer on ${chain.getId()}...`); |
| 285 | + console.log(`\nUpdating trusted signer on ${chain.getId()}...`); |
292 | 286 | console.log(`Signer Address: ${argv["update-signer"]}`); |
293 | 287 | console.log( |
294 | 288 | `Expires At: ${new Date(argv["expires-at"] * 1000).toISOString()}`, |
@@ -320,13 +314,13 @@ export async function main() { |
320 | 314 | toPrivateKey(argv["private-key"]), |
321 | 315 | ); |
322 | 316 |
|
323 | | - console.log(`✅ Trusted signer updated successfully`); |
| 317 | + console.log(`\n✅ Trusted signer updated successfully`); |
324 | 318 | } |
325 | 319 |
|
326 | 320 | // Summary |
327 | 321 | console.log(`\n Operation Summary:`); |
328 | 322 | if (argv.deploy && argv["update-signer"]) { |
329 | | - console.log(`✅ Contract deployed at: ${deployedAddress}`); |
| 323 | + console.log(`\n✅ Contract deployed at: ${deployedAddress}`); |
330 | 324 | console.log(`Trusted signer updated: ${argv["update-signer"]}`); |
331 | 325 | console.log( |
332 | 326 | `Expires at: ${new Date(argv["expires-at"]! * 1000).toISOString()}`, |
|
0 commit comments