@0xobelisk/sui-cli 1.2.0-pre.100 → 1.2.0-pre.102

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xobelisk/sui-cli",
3
- "version": "1.2.0-pre.100",
3
+ "version": "1.2.0-pre.102",
4
4
  "description": "Tookit for interacting with move eps framework",
5
5
  "keywords": [
6
6
  "sui",
@@ -47,8 +47,8 @@
47
47
  "yargs": "^17.7.1",
48
48
  "zod": "^3.22.3",
49
49
  "zod-validation-error": "^1.3.0",
50
- "@0xobelisk/sui-client": "1.2.0-pre.100",
51
- "@0xobelisk/sui-common": "1.2.0-pre.100"
50
+ "@0xobelisk/sui-client": "1.2.0-pre.102",
51
+ "@0xobelisk/sui-common": "1.2.0-pre.102"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/cli-progress": "^3.11.5",
@@ -474,6 +474,14 @@ export async function publishDubheFramework(
474
474
  const chainId = await waitForNode(dubhe);
475
475
 
476
476
  await removeEnvContent(`${projectPath}/Move.lock`, network);
477
+ if (network === 'localnet') {
478
+ // When building with --build-env testnet, Sui CLI reads Move.lock's [env.testnet] section
479
+ // and bakes its original-published-id (non-zero for a previously published dubhe) into the
480
+ // bytecode as the package self-address. Publishing then fails with PublishErrorNonZeroAddress
481
+ // because Sui requires the self-address to be 0x0 for a first-time publish.
482
+ // Fix: clear the testnet env section before building so the CLI uses 0x0 from Move.toml.
483
+ await removeEnvContent(`${projectPath}/Move.lock`, 'testnet');
484
+ }
477
485
  await updateMoveTomlAddress(projectPath, '0x0');
478
486
 
479
487
  const startCheckpoint =