Skip to content

Commit 3d93909

Browse files
committed
fix
1 parent be16c6f commit 3d93909

File tree

5 files changed

+22
-27
lines changed

5 files changed

+22
-27
lines changed

contract_manager/scripts/deploy_evm_lazer_contracts.ts

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
* EXAMPLES:
2020
*
2121
* 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>
2323
*
2424
* 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>
2626
*
2727
* 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
2929
*
3030
* 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
3232
*
3333
* NOTES:
3434
* - The --deploy flag defaults to true if no other flags are specified
@@ -175,7 +175,6 @@ async function deployPythLazerContract(
175175
*/
176176
function updateContractsFile(chain: EvmChain, address: string): void {
177177
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.
179178
const lazerContract = new EvmLazerContract(chain, address);
180179
DefaultStore.lazer_contracts[lazerContract.getId()] = lazerContract;
181180
DefaultStore.saveAllContracts();
@@ -213,11 +212,6 @@ async function updateTrustedSigner(
213212
expiresAt: number,
214213
privateKey: PrivateKey,
215214
): 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-
221215
const contract = getOrCreateLazerContract(chain, contractAddress);
222216
await contract.updateTrustedSigner(trustedSigner, expiresAt, privateKey);
223217
}
@@ -288,7 +282,7 @@ export async function main() {
288282

289283
// Step 2: Update trusted signer if requested
290284
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()}...`);
292286
console.log(`Signer Address: ${argv["update-signer"]}`);
293287
console.log(
294288
`Expires At: ${new Date(argv["expires-at"] * 1000).toISOString()}`,
@@ -320,13 +314,13 @@ export async function main() {
320314
toPrivateKey(argv["private-key"]),
321315
);
322316

323-
console.log(`✅ Trusted signer updated successfully`);
317+
console.log(`\n✅ Trusted signer updated successfully`);
324318
}
325319

326320
// Summary
327321
console.log(`\n Operation Summary:`);
328322
if (argv.deploy && argv["update-signer"]) {
329-
console.log(`✅ Contract deployed at: ${deployedAddress}`);
323+
console.log(`\n✅ Contract deployed at: ${deployedAddress}`);
330324
console.log(`Trusted signer updated: ${argv["update-signer"]}`);
331325
console.log(
332326
`Expires at: ${new Date(argv["expires-at"]! * 1000).toISOString()}`,

contract_manager/src/core/contracts/evm.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,10 +946,11 @@ export class EvmLazerContract extends Storable {
946946
return EvmLazerContract.type;
947947
}
948948

949-
toJson(): { type: string; address: string } {
949+
toJson() {
950950
return {
951-
type: EvmLazerContract.type,
951+
chain: this.chain.getId(),
952952
address: this.address,
953+
type: EvmLazerContract.type,
953954
};
954955
}
955956

contract_manager/store/chains/EvmChains.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@
12831283
{
12841284
"id": "ethereal_devnet",
12851285
"mainnet": false,
1286-
"rpcUrl": "https://rpc-ethereal-devnet-0.t.conduit.xyz/",
1286+
"rpcUrl": "http://127.0.0.1:8545",
12871287
"networkId": 13374201,
12881288
"type": "EvmChain"
12891289
},

contract_manager/store/contracts/EvmLazerContracts.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@
99
"address": "0xACeA761c27A909d4D3895128EBe6370FDE2dF481",
1010
"type": "EvmLazerContract"
1111
},
12-
{
13-
"chain": "ethereal_devnet",
14-
"address": "0xACeA761c27A909d4D3895128EBe6370FDE2dF481",
15-
"type": "EvmLazerContract"
16-
},
1712
{
1813
"chain": "ethereal_testnet_v2",
19-
"address": "0xACeA761c27A909d4D3895128EBe6370FDE2dF481",
14+
"address": "0x4D4772F06c595F69FB57039599a180536FDE8245",
2015
"type": "EvmLazerContract"
2116
},
2217
{
@@ -58,5 +53,10 @@
5853
"chain": "polynomial",
5954
"address": "0xACeA761c27A909d4D3895128EBe6370FDE2dF481",
6055
"type": "EvmLazerContract"
56+
},
57+
{
58+
"chain": "ethereal_devnet",
59+
"address": "0x4D4772F06c595F69FB57039599a180536FDE8245",
60+
"type": "EvmLazerContract"
6161
}
62-
]
62+
]

lazer/contracts/evm/script/PythLazerDeploy.s.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,14 @@ contract PythLazerDeployScript is Script {
176176
}
177177

178178
function run() public {
179-
address impl = deployImplementation("lazer:impl");
180-
deployProxy("lazer:proxy", impl);
179+
address impl = deployImplementation("tazer:impl");
180+
deployProxy("tazer:proxy", impl);
181181
}
182182

183183
function migrate() public {
184184
// Deploys new version and updates proxy to use new address
185-
address proxyAddress = getProxyAddress("lazer:proxy");
186-
address newImpl = deployImplementation("lazer:impl");
185+
address proxyAddress = getProxyAddress("tazer:proxy");
186+
address newImpl = deployImplementation("tazer:impl");
187187
bytes memory migrateCall = abi.encodeWithSignature("migrate()");
188188
vm.startBroadcast();
189189
UUPSUpgradeable proxy = UUPSUpgradeable(proxyAddress);

0 commit comments

Comments
 (0)