@settlemint/sdk-cli 1.0.9-pr00edf246 → 1.0.9-pr04907cb7
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 +18 -23
- package/dist/cli.js.map +8 -8
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -268710,9 +268710,7 @@ 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()
|
|
268714
|
-
SETTLEMINT_SMART_CONTRACT_ADDRESS: z.string().optional(),
|
|
268715
|
-
SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z.string().optional()
|
|
268713
|
+
SETTLEMINT_NEW_PROJECT_NAME: z.string().optional()
|
|
268716
268714
|
});
|
|
268717
268715
|
var DotEnvSchemaPartial = DotEnvSchema.partial();
|
|
268718
268716
|
var IdSchema = z.union([
|
|
@@ -268946,6 +268944,9 @@ var cancel2 = (msg) => {
|
|
|
268946
268944
|
throw new CancelError2(msg);
|
|
268947
268945
|
};
|
|
268948
268946
|
async function executeCommand(command, args, options) {
|
|
268947
|
+
console.log("command", command);
|
|
268948
|
+
console.log("args", args);
|
|
268949
|
+
console.log("options", options);
|
|
268949
268950
|
const child = spawn(command, args, { env: { ...process.env, ...options?.env } });
|
|
268950
268951
|
process.stdin.pipe(child.stdin);
|
|
268951
268952
|
const output = [];
|
|
@@ -269057,7 +269058,7 @@ function table(title, data) {
|
|
|
269057
269058
|
var package_default = {
|
|
269058
269059
|
name: "@settlemint/sdk-cli",
|
|
269059
269060
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
269060
|
-
version: "1.0.9-
|
|
269061
|
+
version: "1.0.9-pr04907cb7",
|
|
269061
269062
|
type: "module",
|
|
269062
269063
|
private: false,
|
|
269063
269064
|
license: "FSL-1.1-MIT",
|
|
@@ -269111,8 +269112,8 @@ var package_default = {
|
|
|
269111
269112
|
"@inquirer/input": "4.1.3",
|
|
269112
269113
|
"@inquirer/password": "4.0.6",
|
|
269113
269114
|
"@inquirer/select": "4.0.6",
|
|
269114
|
-
"@settlemint/sdk-js": "1.0.9-
|
|
269115
|
-
"@settlemint/sdk-utils": "1.0.9-
|
|
269115
|
+
"@settlemint/sdk-js": "1.0.9-pr04907cb7",
|
|
269116
|
+
"@settlemint/sdk-utils": "1.0.9-pr04907cb7",
|
|
269116
269117
|
"get-tsconfig": "4.10.0",
|
|
269117
269118
|
giget: "1.2.3",
|
|
269118
269119
|
yaml: "2.7.0"
|
|
@@ -272390,9 +272391,7 @@ var DotEnvSchema2 = z.object({
|
|
|
272390
272391
|
SETTLEMINT_BLOCKSCOUT: UniqueNameSchema2.optional(),
|
|
272391
272392
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
|
|
272392
272393
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema2.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()
|
|
272394
|
+
SETTLEMINT_NEW_PROJECT_NAME: z.string().optional()
|
|
272396
272395
|
});
|
|
272397
272396
|
var DotEnvSchemaPartial2 = DotEnvSchema2.partial();
|
|
272398
272397
|
var IdSchema2 = z.union([
|
|
@@ -272981,9 +272980,7 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
272981
272980
|
SETTLEMINT_BLOCKSCOUT: env2.SETTLEMINT_BLOCKSCOUT,
|
|
272982
272981
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT,
|
|
272983
272982
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT,
|
|
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
|
|
272983
|
+
SETTLEMINT_NEW_PROJECT_NAME: env2.SETTLEMINT_NEW_PROJECT_NAME
|
|
272987
272984
|
};
|
|
272988
272985
|
await writeEnv({
|
|
272989
272986
|
prod,
|
|
@@ -278728,13 +278725,13 @@ async function addressPrompt({
|
|
|
278728
278725
|
hardhatConfig
|
|
278729
278726
|
}) {
|
|
278730
278727
|
const possiblePrivateKeys = node.privateKeys?.filter((privateKey) => privateKey.privateKeyType !== "HD_ECDSA_P256") ?? [];
|
|
278731
|
-
const defaultAddress =
|
|
278728
|
+
const defaultAddress = hardhatConfig.networks?.btp?.from ?? possiblePrivateKeys[0]?.address;
|
|
278732
278729
|
const defaultPossible = accept && defaultAddress;
|
|
278733
278730
|
if (!node.privateKeys || node.privateKeys.length === 0) {
|
|
278734
278731
|
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.`);
|
|
278735
278732
|
}
|
|
278736
278733
|
if (defaultPossible) {
|
|
278737
|
-
if (
|
|
278734
|
+
if (possiblePrivateKeys.some((privateKey) => privateKey.address?.toLowerCase() === defaultAddress?.toLowerCase())) {
|
|
278738
278735
|
return defaultAddress;
|
|
278739
278736
|
}
|
|
278740
278737
|
note(`Private key with address '${defaultAddress}' not activated on the node '${node.uniqueName}'.
|
|
@@ -278748,12 +278745,6 @@ Please select another key or activate this key on the node and try again.`, "war
|
|
|
278748
278745
|
})),
|
|
278749
278746
|
default: defaultAddress ?? possiblePrivateKeys[0]?.address
|
|
278750
278747
|
});
|
|
278751
|
-
if (address && address !== env2.SETTLEMINT_SMART_CONTRACT_ADDRESS) {
|
|
278752
|
-
await writeEnvSpinner(!!prod, {
|
|
278753
|
-
...env2,
|
|
278754
|
-
SETTLEMINT_SMART_CONTRACT_ADDRESS: address
|
|
278755
|
-
});
|
|
278756
|
-
}
|
|
278757
278748
|
return address;
|
|
278758
278749
|
}
|
|
278759
278750
|
|
|
@@ -278842,7 +278833,10 @@ function hardhatDeployRemoteCommand() {
|
|
|
278842
278833
|
if (verify && !hardhatConfig?.etherscan?.apiKey) {
|
|
278843
278834
|
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");
|
|
278844
278835
|
}
|
|
278845
|
-
|
|
278836
|
+
let address = defaultSender ?? null;
|
|
278837
|
+
if (!defaultSender) {
|
|
278838
|
+
address = await addressPrompt({ env: env2, accept: autoAccept, prod, node, hardhatConfig });
|
|
278839
|
+
}
|
|
278846
278840
|
if (!address) {
|
|
278847
278841
|
return nothingSelectedError("private key");
|
|
278848
278842
|
}
|
|
@@ -278855,11 +278849,12 @@ function hardhatDeployRemoteCommand() {
|
|
|
278855
278849
|
...reset2 ? ["--reset"] : [],
|
|
278856
278850
|
...verify ? ["--verify"] : [],
|
|
278857
278851
|
...deploymentId ? ["--deployment-id", deploymentId] : [],
|
|
278858
|
-
...defaultSender ? ["--default-sender", defaultSender] : [],
|
|
278859
278852
|
...parameters ? ["--parameters", parameters] : [],
|
|
278860
278853
|
...strategy ? ["--strategy", strategy] : [],
|
|
278861
278854
|
"--network",
|
|
278862
278855
|
"btp",
|
|
278856
|
+
"--default-sender",
|
|
278857
|
+
address,
|
|
278863
278858
|
module ?? "ignition/modules/main.ts"
|
|
278864
278859
|
].filter(Boolean), { env: envConfig });
|
|
278865
278860
|
});
|
|
@@ -279396,4 +279391,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
|
279396
279391
|
// src/cli.ts
|
|
279397
279392
|
sdkCliCommand();
|
|
279398
279393
|
|
|
279399
|
-
//# debugId=
|
|
279394
|
+
//# debugId=DE9BD636077CEC6764756E2164756E21
|