Monorepo for Aesthetic.Computer
aesthetic.computer
1#!/usr/bin/env node
2// Fix the tezos-kidlisp network from ghostnet to mainnet
3
4import { connect } from './system/backend/database.mjs';
5
6console.log("🔧 Fixing tezos-kidlisp network configuration...\n");
7
8try {
9 const database = await connect();
10 const secrets = database.db.collection("secrets");
11
12 // Check current value
13 const current = await secrets.findOne({ _id: "tezos-kidlisp" });
14 console.log("Current configuration:");
15 console.log(` - address: ${current.address}`);
16 console.log(` - network: ${current.network}`);
17
18 if (current.network === "mainnet") {
19 console.log("\n✅ Already set to mainnet, no change needed!");
20 } else {
21 console.log("\n🔧 Updating network from 'ghostnet' to 'mainnet'...");
22
23 const result = await secrets.updateOne(
24 { _id: "tezos-kidlisp" },
25 { $set: { network: "mainnet" } }
26 );
27
28 if (result.modifiedCount > 0) {
29 console.log("✅ Successfully updated to mainnet!");
30
31 // Verify
32 const updated = await secrets.findOne({ _id: "tezos-kidlisp" });
33 console.log("\nVerified:");
34 console.log(` - address: ${updated.address}`);
35 console.log(` - network: ${updated.network}`);
36 } else {
37 console.log("⚠️ No changes made");
38 }
39 }
40
41 await database.disconnect();
42 console.log("\n✅ Done!");
43} catch (error) {
44 console.error("\n❌ Error:", error.message);
45 process.exit(1);
46}