Skip to content

Commit 8a4448c

Browse files
committed
ci: Reset version and add logging to detect race condition
1 parent e617f41 commit 8a4448c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

cli/src/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,9 @@ yargs(hideBin(process.argv))
476476
// TODO: is there an easier way to do this?
477477
const { ntt: upgraded } = await nttFromManager(ch, chainConfig.manager);
478478

479+
console.log("UPGRADE -> CHAINCONFIG BEFORE:", JSON.stringify(chainConfig));
479480
chainConfig.version = getVersion(chain, upgraded)
481+
console.log("UPGRADE -> CHAINCONFIG AFTER:", JSON.stringify(chainConfig));
480482
fs.writeFileSync(path, JSON.stringify(deployments, null, 2));
481483

482484
console.log(`Successfully upgraded ${chain} to version ${toVersion || 'local version'}`);
@@ -1721,6 +1723,7 @@ async function pullChainConfig<N extends Network, C extends Chain>(
17211723
const pauser = await ntt.getPauser();
17221724

17231725
const version = getVersion(manager.chain, ntt);
1726+
console.log("PULLCHAINCONFIG VERSION:", version);
17241727

17251728
const transceiverPauser = await ntt.getTransceiver(0).then((t) => t?.getPauser() ?? null);
17261729

@@ -1740,6 +1743,7 @@ async function pullChainConfig<N extends Network, C extends Chain>(
17401743
inbound: {},
17411744
},
17421745
};
1746+
console.log("PULLCHAINCONFIG CONFIG:", JSON.stringify(config, null, 2));
17431747
if (transceiverPauser) {
17441748
config.transceivers.wormhole.pauser = transceiverPauser.toString();
17451749
}

solana/ts/sdk/ntt.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,9 @@ export class SolanaNtt<N extends Network, C extends SolanaChains>
618618
sender ? new SolanaAddress(sender).unwrap() : undefined
619619
);
620620
} catch (e) {
621+
console.log("NOT DEPLOYED!");
621622
// This might happen if e.g. the program is not deployed yet.
622-
const version = "2.0.0";
623+
const version = "3.0.0";
623624
return version;
624625
}
625626
}

0 commit comments

Comments
 (0)