@settlemint/sdk-cli 1.1.5-pr687f780a → 1.1.5-pr9a741b34
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 +31 -6
- package/dist/cli.js.map +16 -16
- package/package.json +3 -3
package/dist/cli.js
CHANGED
@@ -274462,7 +274462,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
274462
274462
|
var package_default = {
|
274463
274463
|
name: "@settlemint/sdk-cli",
|
274464
274464
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
274465
|
-
version: "1.1.5-
|
274465
|
+
version: "1.1.5-pr9a741b34",
|
274466
274466
|
type: "module",
|
274467
274467
|
private: false,
|
274468
274468
|
license: "FSL-1.1-MIT",
|
@@ -274510,8 +274510,8 @@ var package_default = {
|
|
274510
274510
|
"@inquirer/input": "4.1.5",
|
274511
274511
|
"@inquirer/password": "4.0.8",
|
274512
274512
|
"@inquirer/select": "4.0.8",
|
274513
|
-
"@settlemint/sdk-js": "1.1.5-
|
274514
|
-
"@settlemint/sdk-utils": "1.1.5-
|
274513
|
+
"@settlemint/sdk-js": "1.1.5-pr9a741b34",
|
274514
|
+
"@settlemint/sdk-utils": "1.1.5-pr9a741b34",
|
274515
274515
|
"@types/node": "22.13.1",
|
274516
274516
|
"@types/semver": "7.5.8",
|
274517
274517
|
"@types/which": "3.0.4",
|
@@ -284676,8 +284676,10 @@ function foundryBuildCommand() {
|
|
284676
284676
|
command: "scs foundry build --optimize --force"
|
284677
284677
|
}
|
284678
284678
|
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
|
284679
|
+
intro("Building smart contracts using Foundry");
|
284679
284680
|
const forgeOptions = mapPassthroughOptions(passThroughOptions, cmd2);
|
284680
284681
|
await executeFoundryCommand("forge", ["build", ...forgeOptions]);
|
284682
|
+
outro("Smart contracts built successfully");
|
284681
284683
|
});
|
284682
284684
|
}
|
284683
284685
|
|
@@ -284697,9 +284699,10 @@ function foundryFormatCommand() {
|
|
284697
284699
|
command: "scs foundry format --check"
|
284698
284700
|
}
|
284699
284701
|
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
|
284702
|
+
intro("Formatting smart contracts using Foundry");
|
284700
284703
|
const forgeOptions = mapPassthroughOptions(passThroughOptions, cmd2);
|
284701
284704
|
await executeFoundryCommand("forge", ["fmt", ...forgeOptions]);
|
284702
|
-
|
284705
|
+
outro("Smart contracts formatted successfully");
|
284703
284706
|
});
|
284704
284707
|
}
|
284705
284708
|
|
@@ -284740,8 +284743,10 @@ function foundryTestCommand() {
|
|
284740
284743
|
command: "scs foundry test --match-test testToken"
|
284741
284744
|
}
|
284742
284745
|
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
|
284746
|
+
intro("Running smart contract tests using Foundry");
|
284743
284747
|
const forgeOptions = mapPassthroughOptions(passThroughOptions, cmd2);
|
284744
284748
|
await executeFoundryCommand("forge", ["test", ...forgeOptions]);
|
284749
|
+
outro("Smart contract tests completed");
|
284745
284750
|
});
|
284746
284751
|
}
|
284747
284752
|
|
@@ -284777,10 +284782,12 @@ function hardhatBuildCommand() {
|
|
284777
284782
|
command: "scs hardhat build --concurrency 2"
|
284778
284783
|
}
|
284779
284784
|
])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
|
284785
|
+
intro("Building smart contracts using Hardhat");
|
284780
284786
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
284781
284787
|
const hardhatOptions = mapPassthroughOptions(passThroughOptions, cmd2);
|
284782
284788
|
const { command, args } = await getPackageManagerExecutable();
|
284783
284789
|
await executeCommand(command, [...args, "hardhat", "compile", ...hardhatOptions]);
|
284790
|
+
outro("Smart contracts built successfully");
|
284784
284791
|
});
|
284785
284792
|
}
|
284786
284793
|
|
@@ -284804,6 +284811,7 @@ function hardhatDeployLocalCommand() {
|
|
284804
284811
|
command: "scs hardhat deploy local --verify"
|
284805
284812
|
}
|
284806
284813
|
])).option("-m, --module <ignitionmodule>", 'The module to deploy with Ignition, defaults to "ignition/modules/main.ts"').option("-r, --reset", "Wipes the existing deployment state before deploying").option("-v, --verify", "Verify the deployment on Etherscan").action(async ({ module, reset: reset2, verify }) => {
|
284814
|
+
intro("Deploying smart contracts to local network using Hardhat/Ignition");
|
284807
284815
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
284808
284816
|
const { command, args } = await getPackageManagerExecutable();
|
284809
284817
|
await executeCommand(command, [
|
@@ -284817,6 +284825,7 @@ function hardhatDeployLocalCommand() {
|
|
284817
284825
|
"localhost",
|
284818
284826
|
module ?? "ignition/modules/main.ts"
|
284819
284827
|
].filter(Boolean));
|
284828
|
+
outro("Smart contracts deployed successfully to local network");
|
284820
284829
|
});
|
284821
284830
|
}
|
284822
284831
|
|
@@ -284981,6 +284990,7 @@ function hardhatDeployRemoteCommand() {
|
|
284981
284990
|
acceptDefaults,
|
284982
284991
|
blockchainNode: blockchainNodeUniqueName
|
284983
284992
|
}) => {
|
284993
|
+
intro("Deploying smart contracts to remote network using Hardhat/Ignition");
|
284984
284994
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
284985
284995
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
284986
284996
|
const env2 = await loadEnv(false, !!prod);
|
@@ -285024,6 +285034,7 @@ function hardhatDeployRemoteCommand() {
|
|
285024
285034
|
address,
|
285025
285035
|
module ?? "ignition/modules/main.ts"
|
285026
285036
|
].filter(Boolean), { env: envConfig });
|
285037
|
+
outro("Smart contracts deployed successfully to remote network");
|
285027
285038
|
});
|
285028
285039
|
return cmd2;
|
285029
285040
|
}
|
@@ -285052,16 +285063,19 @@ function hardhatNetworkCommand() {
|
|
285052
285063
|
command: "scs hardhat network --port 3000"
|
285053
285064
|
}
|
285054
285065
|
])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
|
285066
|
+
intro("Starting development network using Hardhat");
|
285055
285067
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
285056
285068
|
const hardhatOptions = mapPassthroughOptions(passThroughOptions, cmd2);
|
285057
285069
|
const { command, args } = await getPackageManagerExecutable();
|
285058
285070
|
await executeCommand(command, [...args, "hardhat", "node", ...hardhatOptions]);
|
285071
|
+
outro("Development network started successfully");
|
285059
285072
|
});
|
285060
285073
|
}
|
285061
285074
|
|
285062
285075
|
// src/commands/smart-contract-set/hardhat/script/local.ts
|
285063
285076
|
function hardhatScriptLocalCommand() {
|
285064
285077
|
return new Command("local").description("Run a Hardhat script to deploy a contract on the platform or interact with a deployed contract.").requiredOption("-s, --script <script>", 'The script to run with Hardhat , e.g. "scripts/deploy.ts"').option("--no-compile", "Don't compile before running this task").action(async ({ script, compile }) => {
|
285078
|
+
intro("Running Hardhat script on local network");
|
285065
285079
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
285066
285080
|
const { command, args } = await getPackageManagerExecutable();
|
285067
285081
|
await executeCommand(command, [
|
@@ -285073,6 +285087,7 @@ function hardhatScriptLocalCommand() {
|
|
285073
285087
|
"localhost",
|
285074
285088
|
...compile ? ["--no-compile"] : []
|
285075
285089
|
]);
|
285090
|
+
outro("Script execution completed successfully");
|
285076
285091
|
});
|
285077
285092
|
}
|
285078
285093
|
|
@@ -285080,6 +285095,7 @@ function hardhatScriptLocalCommand() {
|
|
285080
285095
|
function hardhatScriptRemoteCommand() {
|
285081
285096
|
const cmd2 = new Command("remote").description("Run a Hardhat script to deploy a contract on the platform or interact with a deployed contract.").requiredOption("-s, --script <script>", 'The script to run with Hardhat , e.g. "scripts/deploy.ts"').option("--blockchain-node <blockchainNode>", "Blockchain Node unique name (optional, defaults to the blockchain node in the environment)").option("--prod", "Connect to your production environment").option("-a, --accept-defaults", "Accept the default and previously set values").option("--no-compile", "Don't compile before running this task");
|
285082
285097
|
cmd2.action(async ({ script, prod, blockchainNode: blockchainNodeUniqueName, acceptDefaults, compile }) => {
|
285098
|
+
intro("Running Hardhat script on remote network");
|
285083
285099
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
285084
285100
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
285085
285101
|
const env2 = await loadEnv(false, !!prod);
|
@@ -285097,6 +285113,7 @@ function hardhatScriptRemoteCommand() {
|
|
285097
285113
|
const envConfig = await settlemint.foundry.env(node.uniqueName);
|
285098
285114
|
const { command, args } = await getPackageManagerExecutable();
|
285099
285115
|
await executeCommand(command, [...args, "hardhat", "run", script, "--network", "btp", ...compile ? ["--no-compile"] : []], { env: envConfig });
|
285116
|
+
outro("Script execution completed successfully");
|
285100
285117
|
});
|
285101
285118
|
return cmd2;
|
285102
285119
|
}
|
@@ -285129,10 +285146,12 @@ function hardhatTestCommand() {
|
|
285129
285146
|
command: "scs hardhat test test/token.test.ts"
|
285130
285147
|
}
|
285131
285148
|
])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption().action(async (options, cmd2) => {
|
285149
|
+
intro("Running smart contract tests using Hardhat");
|
285132
285150
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
285133
285151
|
const hardhatOptions = mapPassthroughOptions(options, cmd2);
|
285134
285152
|
const { command, args } = await getPackageManagerExecutable();
|
285135
285153
|
await executeCommand(command, [...args, "hardhat", "test", ...hardhatOptions]);
|
285154
|
+
outro("Smart contract tests completed");
|
285136
285155
|
});
|
285137
285156
|
}
|
285138
285157
|
|
@@ -285301,6 +285320,7 @@ async function getNodeName({
|
|
285301
285320
|
// src/commands/smart-contract-set/subgraph/build.ts
|
285302
285321
|
function subgraphBuildCommand() {
|
285303
285322
|
return new Command("build").description("Build the subgraph").action(async () => {
|
285323
|
+
intro("Building subgraph");
|
285304
285324
|
await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
|
285305
285325
|
await subgraphSetup({
|
285306
285326
|
network: SETTLEMINT_NETWORK
|
@@ -285310,6 +285330,7 @@ function subgraphBuildCommand() {
|
|
285310
285330
|
const cwd2 = dirname10(subgraphYamlFile);
|
285311
285331
|
await executeCommand(command, [...args, "graph", "codegen", subgraphYamlFile], { cwd: cwd2 });
|
285312
285332
|
await executeCommand(command, [...args, "graph", "build", subgraphYamlFile], { cwd: cwd2 });
|
285333
|
+
outro("Subgraph built successfully");
|
285313
285334
|
});
|
285314
285335
|
}
|
285315
285336
|
|
@@ -285317,6 +285338,7 @@ function subgraphBuildCommand() {
|
|
285317
285338
|
import { dirname as dirname11 } from "node:path";
|
285318
285339
|
function subgraphCodegenCommand() {
|
285319
285340
|
return new Command("codegen").description("Codegen the subgraph types").action(async () => {
|
285341
|
+
intro("Generating subgraph types");
|
285320
285342
|
await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
|
285321
285343
|
await subgraphSetup({
|
285322
285344
|
network: SETTLEMINT_NETWORK
|
@@ -285326,6 +285348,7 @@ function subgraphCodegenCommand() {
|
|
285326
285348
|
await executeCommand(command, [...args, "graph", "codegen", subgraphYamlFile], {
|
285327
285349
|
cwd: dirname11(subgraphYamlFile)
|
285328
285350
|
});
|
285351
|
+
outro("Subgraph types generated successfully");
|
285329
285352
|
});
|
285330
285353
|
}
|
285331
285354
|
|
@@ -285376,6 +285399,7 @@ function subgraphDeployCommand() {
|
|
285376
285399
|
command: "scs subgraph deploy my-subgraph"
|
285377
285400
|
}
|
285378
285401
|
])).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").argument("[subgraph-name]", "The name of the subgraph to deploy (defaults to value in .env if not provided)").action(async (subgraphName, { prod, acceptDefaults }) => {
|
285402
|
+
intro("Deploying subgraph");
|
285379
285403
|
await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
|
285380
285404
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
285381
285405
|
const env2 = await loadEnv(false, !!prod);
|
@@ -285444,6 +285468,7 @@ function subgraphDeployCommand() {
|
|
285444
285468
|
SETTLEMINT_THEGRAPH: theGraphMiddleware.uniqueName,
|
285445
285469
|
...graphEndpoints
|
285446
285470
|
});
|
285471
|
+
outro("Subgraph deployed successfully");
|
285447
285472
|
});
|
285448
285473
|
}
|
285449
285474
|
async function updateSpecVersion(specVersion) {
|
@@ -285552,7 +285577,7 @@ ${error5.stack}`));
|
|
285552
285577
|
}
|
285553
285578
|
function registerCommands() {
|
285554
285579
|
const sdkcli = new Command;
|
285555
|
-
sdkcli.name("settlemint").usage("[command]").description(`CLI for SettleMint (v${package_default.version})`).version(package_default.version, "-v, --version", "Output the current version").helpOption("-h, --help", "Display help for command").allowUnknownOption().showSuggestionAfterError(true).showHelpAfterError();
|
285580
|
+
sdkcli.name("settlemint").usage("[command]").description(`CLI for SettleMint (v${package_default.version})`).version(package_default.version, "-v, --version", "Output the current version").helpOption("-h, --help", "Display help for command").allowUnknownOption().showSuggestionAfterError(true).showHelpAfterError().passThroughOptions();
|
285556
285581
|
sdkcli.addCommand(connectCommand());
|
285557
285582
|
sdkcli.addCommand(codegenCommand());
|
285558
285583
|
sdkcli.addCommand(platformCommand());
|
@@ -285580,4 +285605,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
285580
285605
|
// src/cli.ts
|
285581
285606
|
sdkCliCommand();
|
285582
285607
|
|
285583
|
-
//# debugId=
|
285608
|
+
//# debugId=AE560069B1DC5A2564756E2164756E21
|