@settlemint/sdk-cli 1.0.9-pr397d36cc → 1.0.9-pr5f0bc595

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/dist/cli.js CHANGED
@@ -268710,7 +268710,9 @@ var DotEnvSchema = z.object({
268710
268710
  SETTLEMINT_BLOCKSCOUT: UniqueNameSchema.optional(),
268711
268711
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema.optional(),
268712
268712
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema.optional(),
268713
- SETTLEMINT_NEW_PROJECT_NAME: z.string().optional()
268713
+ SETTLEMINT_NEW_PROJECT_NAME: z.string().optional(),
268714
+ SETTLEMINT_SMART_CONTRACT_ADDRESS: z.string().optional(),
268715
+ SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z.string().optional()
268714
268716
  });
268715
268717
  var DotEnvSchemaPartial = DotEnvSchema.partial();
268716
268718
  var IdSchema = z.union([
@@ -269055,7 +269057,7 @@ function table(title, data) {
269055
269057
  var package_default = {
269056
269058
  name: "@settlemint/sdk-cli",
269057
269059
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
269058
- version: "1.0.9-pr397d36cc",
269060
+ version: "1.0.9-pr5f0bc595",
269059
269061
  type: "module",
269060
269062
  private: false,
269061
269063
  license: "FSL-1.1-MIT",
@@ -269104,13 +269106,13 @@ var package_default = {
269104
269106
  semver: "7.6.3",
269105
269107
  slugify: "1.6.6",
269106
269108
  yoctocolors: "2.1.1",
269107
- "@commander-js/extra-typings": "13.1.0",
269109
+ "@commander-js/extra-typings": "13.0.0",
269108
269110
  "@inquirer/confirm": "5.1.3",
269109
269111
  "@inquirer/input": "4.1.3",
269110
269112
  "@inquirer/password": "4.0.6",
269111
269113
  "@inquirer/select": "4.0.6",
269112
- "@settlemint/sdk-js": "1.0.9-pr397d36cc",
269113
- "@settlemint/sdk-utils": "1.0.9-pr397d36cc",
269114
+ "@settlemint/sdk-js": "1.0.9-pr5f0bc595",
269115
+ "@settlemint/sdk-utils": "1.0.9-pr5f0bc595",
269114
269116
  "get-tsconfig": "4.10.0",
269115
269117
  giget: "1.2.3",
269116
269118
  yaml: "2.7.0"
@@ -272388,7 +272390,9 @@ var DotEnvSchema2 = z.object({
272388
272390
  SETTLEMINT_BLOCKSCOUT: UniqueNameSchema2.optional(),
272389
272391
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
272390
272392
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema2.optional(),
272391
- SETTLEMINT_NEW_PROJECT_NAME: z.string().optional()
272393
+ SETTLEMINT_NEW_PROJECT_NAME: z.string().optional(),
272394
+ SETTLEMINT_SMART_CONTRACT_ADDRESS: z.string().optional(),
272395
+ SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z.string().optional()
272392
272396
  });
272393
272397
  var DotEnvSchemaPartial2 = DotEnvSchema2.partial();
272394
272398
  var IdSchema2 = z.union([
@@ -272977,7 +272981,9 @@ async function writeEnvSpinner(prod, env2) {
272977
272981
  SETTLEMINT_BLOCKSCOUT: env2.SETTLEMINT_BLOCKSCOUT,
272978
272982
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT,
272979
272983
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT,
272980
- SETTLEMINT_NEW_PROJECT_NAME: env2.SETTLEMINT_NEW_PROJECT_NAME
272984
+ SETTLEMINT_NEW_PROJECT_NAME: env2.SETTLEMINT_NEW_PROJECT_NAME,
272985
+ SETTLEMINT_SMART_CONTRACT_ADDRESS: env2.SETTLEMINT_SMART_CONTRACT_ADDRESS,
272986
+ SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: env2.SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID
272981
272987
  };
272982
272988
  await writeEnv({
272983
272989
  prod,
@@ -278722,13 +278728,13 @@ async function addressPrompt({
278722
278728
  hardhatConfig
278723
278729
  }) {
278724
278730
  const possiblePrivateKeys = node.privateKeys?.filter((privateKey) => privateKey.privateKeyType !== "HD_ECDSA_P256") ?? [];
278725
- const defaultAddress = hardhatConfig.networks?.btp?.from ?? possiblePrivateKeys[0]?.address;
278731
+ const defaultAddress = env2.SETTLEMINT_SMART_CONTRACT_ADDRESS ?? hardhatConfig.networks?.btp?.from ?? possiblePrivateKeys[0]?.address;
278726
278732
  const defaultPossible = accept && defaultAddress;
278727
278733
  if (!node.privateKeys || node.privateKeys.length === 0) {
278728
278734
  cancel2(`No ECDSA P256 or HSM ECDSA P256 private key is activated on the node '${node.uniqueName}'. Please activate a private key on this node or specify a different node.`);
278729
278735
  }
278730
278736
  if (defaultPossible) {
278731
- if (possiblePrivateKeys.some((privateKey) => privateKey.address?.toLowerCase() === defaultAddress?.toLowerCase())) {
278737
+ if (node.privateKeys.some((privateKey) => privateKey.address?.toLowerCase() === defaultAddress?.toLowerCase())) {
278732
278738
  return defaultAddress;
278733
278739
  }
278734
278740
  note(`Private key with address '${defaultAddress}' not activated on the node '${node.uniqueName}'.
@@ -278742,6 +278748,12 @@ Please select another key or activate this key on the node and try again.`, "war
278742
278748
  })),
278743
278749
  default: defaultAddress ?? possiblePrivateKeys[0]?.address
278744
278750
  });
278751
+ if (address && address !== env2.SETTLEMINT_SMART_CONTRACT_ADDRESS) {
278752
+ await writeEnvSpinner(!!prod, {
278753
+ ...env2,
278754
+ SETTLEMINT_SMART_CONTRACT_ADDRESS: address
278755
+ });
278756
+ }
278745
278757
  return address;
278746
278758
  }
278747
278759
 
@@ -278830,10 +278842,7 @@ function hardhatDeployRemoteCommand() {
278830
278842
  if (verify && !hardhatConfig?.etherscan?.apiKey) {
278831
278843
  cancel2("It is not possible to verify the deployment on this network unless you supply an Etherscan API key in the hardhat.config.ts file");
278832
278844
  }
278833
- let address = defaultSender ?? null;
278834
- if (!defaultSender) {
278835
- address = await addressPrompt({ env: env2, accept: autoAccept, prod, node, hardhatConfig });
278836
- }
278845
+ const address = await addressPrompt({ env: env2, accept: autoAccept, prod, node, hardhatConfig });
278837
278846
  if (!address) {
278838
278847
  return nothingSelectedError("private key");
278839
278848
  }
@@ -278846,12 +278855,11 @@ function hardhatDeployRemoteCommand() {
278846
278855
  ...reset2 ? ["--reset"] : [],
278847
278856
  ...verify ? ["--verify"] : [],
278848
278857
  ...deploymentId ? ["--deployment-id", deploymentId] : [],
278858
+ ...defaultSender ? ["--default-sender", defaultSender] : [],
278849
278859
  ...parameters ? ["--parameters", parameters] : [],
278850
278860
  ...strategy ? ["--strategy", strategy] : [],
278851
278861
  "--network",
278852
278862
  "btp",
278853
- "--default-sender",
278854
- address,
278855
278863
  module ?? "ignition/modules/main.ts"
278856
278864
  ].filter(Boolean), { env: envConfig });
278857
278865
  });
@@ -279388,4 +279396,4 @@ async function sdkCliCommand(argv = process.argv) {
279388
279396
  // src/cli.ts
279389
279397
  sdkCliCommand();
279390
279398
 
279391
- //# debugId=A7EA74315F93C4E164756E2164756E21
279399
+ //# debugId=37BA8CCF411BF49D64756E2164756E21