@settlemint/sdk-cli 0.6.59-mainf907740 → 0.6.59-pr75b10d9
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 +85 -80
- package/dist/cli.js.map +17 -17
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -197427,7 +197427,7 @@ ${Bt.cyan(Yt)}
|
|
|
197427
197427
|
code: "ENOENT"
|
|
197428
197428
|
}), getPathInfo = (e9, t7) => {
|
|
197429
197429
|
var r6 = t7.colon || or;
|
|
197430
|
-
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
197430
|
+
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.HSERY8BZ35:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(r6)];
|
|
197431
197431
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
197432
197432
|
var a5 = nr ? n6.split(r6) : [""];
|
|
197433
197433
|
if (nr) {
|
|
@@ -200564,7 +200564,7 @@ ${whileRunning(e9)}`;
|
|
|
200564
200564
|
};
|
|
200565
200565
|
ni = Object.assign(async function _main() {
|
|
200566
200566
|
var e9 = new Cli({
|
|
200567
|
-
binaryVersion: "0.6.59-
|
|
200567
|
+
binaryVersion: "0.6.59-pr75b10d9",
|
|
200568
200568
|
binaryLabel: "gql.tada CLI",
|
|
200569
200569
|
binaryName: "gql.tada"
|
|
200570
200570
|
});
|
|
@@ -218401,7 +218401,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
218401
218401
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
218402
218402
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
218403
218403
|
var getPathInfo2 = (cmd2, {
|
|
218404
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
218404
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.HSERY8BZ35:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
218405
218405
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
218406
218406
|
delimiter: optDelimiter = delimiter
|
|
218407
218407
|
}) => {
|
|
@@ -218605,7 +218605,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
218605
218605
|
let pathToInitial;
|
|
218606
218606
|
try {
|
|
218607
218607
|
pathToInitial = which.sync(initialCmd, {
|
|
218608
|
-
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
218608
|
+
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.HSERY8BZ35:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
218609
218609
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
218610
218610
|
}).toLowerCase();
|
|
218611
218611
|
} catch (err) {
|
|
@@ -219322,7 +219322,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
219322
219322
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
219323
219323
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
219324
219324
|
var getPathInfo2 = (cmd2, {
|
|
219325
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
219325
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.HSERY8BZ35:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
219326
219326
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
219327
219327
|
delimiter: optDelimiter = delimiter
|
|
219328
219328
|
}) => {
|
|
@@ -235213,7 +235213,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
235213
235213
|
const colon = opt2.colon || COLON;
|
|
235214
235214
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
235215
235215
|
...isWindows2 ? [process.cwd()] : [],
|
|
235216
|
-
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
235216
|
+
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.HSERY8BZ35:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
|
|
235217
235217
|
];
|
|
235218
235218
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
235219
235219
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -273258,7 +273258,7 @@ function connectCommand() {
|
|
|
273258
273258
|
var package_default = {
|
|
273259
273259
|
name: "@settlemint/sdk-cli",
|
|
273260
273260
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
273261
|
-
version: "0.6.59-
|
|
273261
|
+
version: "0.6.59-pr75b10d9",
|
|
273262
273262
|
type: "module",
|
|
273263
273263
|
private: false,
|
|
273264
273264
|
license: "FSL-1.1-MIT",
|
|
@@ -273309,8 +273309,8 @@ var package_default = {
|
|
|
273309
273309
|
"@inquirer/input": "4.1.0",
|
|
273310
273310
|
"@inquirer/password": "4.0.3",
|
|
273311
273311
|
"@inquirer/select": "4.0.3",
|
|
273312
|
-
"@settlemint/sdk-js": "0.6.59-
|
|
273313
|
-
"@settlemint/sdk-utils": "0.6.59-
|
|
273312
|
+
"@settlemint/sdk-js": "0.6.59-pr75b10d9",
|
|
273313
|
+
"@settlemint/sdk-utils": "0.6.59-pr75b10d9",
|
|
273314
273314
|
"get-tsconfig": "4.8.1",
|
|
273315
273315
|
giget: "1.2.3"
|
|
273316
273316
|
},
|
|
@@ -274170,9 +274170,9 @@ function createExamples(examples) {
|
|
|
274170
274170
|
return `
|
|
274171
274171
|
Examples:
|
|
274172
274172
|
|
|
274173
|
-
${examples.map(({ description, command
|
|
274173
|
+
${examples.map(({ description, command }) => {
|
|
274174
274174
|
return ` # ${description}
|
|
274175
|
-
$
|
|
274175
|
+
$ bunx @settlemint/sdk-cli@latest ${command}`;
|
|
274176
274176
|
}).join(`
|
|
274177
274177
|
|
|
274178
274178
|
`)}`;
|
|
@@ -274214,12 +274214,11 @@ function loginCommand() {
|
|
|
274214
274214
|
${createExamples([
|
|
274215
274215
|
{
|
|
274216
274216
|
description: "Login to your SettleMint account",
|
|
274217
|
-
command: "login"
|
|
274217
|
+
command: "settlemint login"
|
|
274218
274218
|
},
|
|
274219
274219
|
{
|
|
274220
274220
|
description: "Login to your SettleMint account using a token from STDIN",
|
|
274221
|
-
command: "login --token-stdin --accept-defaults"
|
|
274222
|
-
commandPrefix: "cat ~/my_token.txt | "
|
|
274221
|
+
command: "cat ~/my_token.txt | settlemint login --token-stdin --accept-defaults"
|
|
274223
274222
|
}
|
|
274224
274223
|
])}`).option("-a, --accept-defaults", "Accept the default and previously set values").option("-d, --default", "Set this instance as the default").option("--token-stdin", "Provide a token using STDIN").action(async ({ acceptDefaults, default: isDefault, tokenStdin }) => {
|
|
274225
274224
|
intro("Login to your SettleMint account");
|
|
@@ -275842,62 +275841,62 @@ function createCommand4() {
|
|
|
275842
275841
|
});
|
|
275843
275842
|
}
|
|
275844
275843
|
|
|
275845
|
-
// src/utils/passthrough-options.ts
|
|
275846
|
-
function mapPassthroughOptions(options, command) {
|
|
275847
|
-
const optionArgs = Object.entries(options).map(([key2, value4]) => {
|
|
275848
|
-
if (value4 === true) {
|
|
275849
|
-
return `--${key2}`;
|
|
275850
|
-
}
|
|
275851
|
-
return `--${key2}=${value4}`;
|
|
275852
|
-
});
|
|
275853
|
-
return [...optionArgs, ...command.args];
|
|
275854
|
-
}
|
|
275855
|
-
|
|
275856
275844
|
// src/commands/smart-contract-set/foundry/build.ts
|
|
275857
275845
|
function foundryBuildCommand() {
|
|
275858
|
-
|
|
275859
|
-
|
|
275860
|
-
|
|
275846
|
+
const build = new Command2("build");
|
|
275847
|
+
build.description("Build the smart contracts using Foundry/forge");
|
|
275848
|
+
build.action(async () => {
|
|
275849
|
+
await executeCommand("forge", ["build"]);
|
|
275861
275850
|
});
|
|
275851
|
+
return build;
|
|
275862
275852
|
}
|
|
275863
275853
|
|
|
275864
275854
|
// src/commands/smart-contract-set/foundry/format.ts
|
|
275865
275855
|
function foundryFormatCommand() {
|
|
275866
|
-
|
|
275867
|
-
|
|
275868
|
-
|
|
275856
|
+
const format3 = new Command2("format");
|
|
275857
|
+
format3.description("Format the smart contracts using Foundry/forge");
|
|
275858
|
+
format3.action(async () => {
|
|
275859
|
+
await executeCommand("forge", ["fmt"]);
|
|
275869
275860
|
note("Smart contract set formatted successfully!");
|
|
275870
275861
|
});
|
|
275862
|
+
return format3;
|
|
275871
275863
|
}
|
|
275872
275864
|
|
|
275873
275865
|
// src/commands/smart-contract-set/foundry/network.ts
|
|
275874
275866
|
function foundryNetworkCommand() {
|
|
275875
|
-
|
|
275876
|
-
|
|
275877
|
-
|
|
275867
|
+
const network = new Command2("network");
|
|
275868
|
+
network.description("Start a development network Foundry/anvil");
|
|
275869
|
+
network.action(async () => {
|
|
275870
|
+
await executeCommand("anvil", []);
|
|
275878
275871
|
});
|
|
275872
|
+
return network;
|
|
275879
275873
|
}
|
|
275880
275874
|
|
|
275881
275875
|
// src/commands/smart-contract-set/foundry/test.ts
|
|
275882
275876
|
function foundryTestCommand() {
|
|
275883
|
-
|
|
275884
|
-
|
|
275885
|
-
|
|
275877
|
+
const test = new Command2("test");
|
|
275878
|
+
test.description("Test the smart contracts using Foundry/forge");
|
|
275879
|
+
test.action(async () => {
|
|
275880
|
+
await executeCommand("forge", ["test"]);
|
|
275886
275881
|
});
|
|
275882
|
+
return test;
|
|
275887
275883
|
}
|
|
275888
275884
|
|
|
275889
275885
|
// src/commands/smart-contract-set/hardhat/build.ts
|
|
275890
275886
|
function hardhatBuildCommand() {
|
|
275891
|
-
|
|
275892
|
-
|
|
275887
|
+
const build = new Command2("build");
|
|
275888
|
+
build.description("Build the smart contracts using Hardhat");
|
|
275889
|
+
build.action(async () => {
|
|
275893
275890
|
const { command, args } = await getPackageManagerExecutable();
|
|
275894
|
-
await executeCommand(command, [...args, "hardhat", "compile"
|
|
275891
|
+
await executeCommand(command, [...args, "hardhat", "compile"]);
|
|
275895
275892
|
});
|
|
275893
|
+
return build;
|
|
275896
275894
|
}
|
|
275897
275895
|
|
|
275898
275896
|
// src/commands/smart-contract-set/hardhat/deploy/local.ts
|
|
275899
275897
|
function hardhatDeployLocalCommand() {
|
|
275900
|
-
|
|
275898
|
+
const build = new Command2("local").description("Deploy the smart contracts using Hardhat/ignition to the local development network").option("-m, --module <ignitionmodule>", 'The module to deploy with Ignition, defaults to "ignition/modules/main.ts"').option("-r, --reset", "Reset the deployment").option("--verify", "Verify the deployment");
|
|
275899
|
+
build.action(async ({ module, reset: reset2, verify }) => {
|
|
275901
275900
|
const { command, args } = await getPackageManagerExecutable();
|
|
275902
275901
|
await executeCommand(command, [
|
|
275903
275902
|
...args,
|
|
@@ -275911,6 +275910,7 @@ function hardhatDeployLocalCommand() {
|
|
|
275911
275910
|
module ?? "ignition/modules/main.ts"
|
|
275912
275911
|
].filter(Boolean));
|
|
275913
275912
|
});
|
|
275913
|
+
return build;
|
|
275914
275914
|
}
|
|
275915
275915
|
|
|
275916
275916
|
// src/commands/smart-contract-set/prompts/address.prompt.ts
|
|
@@ -275947,6 +275947,26 @@ async function addressPrompt({
|
|
|
275947
275947
|
return address;
|
|
275948
275948
|
}
|
|
275949
275949
|
|
|
275950
|
+
// src/commands/smart-contract-set/prompts/deployment-id.prompt.ts
|
|
275951
|
+
async function deploymentIdPrompt(env2, accept, prod) {
|
|
275952
|
+
const defaultDeploymentId = env2.SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID;
|
|
275953
|
+
if (accept) {
|
|
275954
|
+
return defaultDeploymentId;
|
|
275955
|
+
}
|
|
275956
|
+
const deploymentId = await esm_default4({
|
|
275957
|
+
message: "What is the deployment ID of your smart contract set (optional)?",
|
|
275958
|
+
required: false,
|
|
275959
|
+
default: defaultDeploymentId
|
|
275960
|
+
});
|
|
275961
|
+
if (deploymentId !== defaultDeploymentId) {
|
|
275962
|
+
await writeEnvSpinner(!!prod, {
|
|
275963
|
+
...env2,
|
|
275964
|
+
SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: deploymentId
|
|
275965
|
+
});
|
|
275966
|
+
}
|
|
275967
|
+
return deploymentId;
|
|
275968
|
+
}
|
|
275969
|
+
|
|
275950
275970
|
// src/utils/hardhat-config.ts
|
|
275951
275971
|
async function getHardhatConfigData(envConfig) {
|
|
275952
275972
|
try {
|
|
@@ -275976,19 +275996,8 @@ function isHardhatConfig(config4) {
|
|
|
275976
275996
|
|
|
275977
275997
|
// src/commands/smart-contract-set/hardhat/deploy/remote.ts
|
|
275978
275998
|
function hardhatDeployRemoteCommand() {
|
|
275979
|
-
const
|
|
275980
|
-
|
|
275981
|
-
module,
|
|
275982
|
-
reset: reset2,
|
|
275983
|
-
verify,
|
|
275984
|
-
deploymentId,
|
|
275985
|
-
defaultSender,
|
|
275986
|
-
parameters,
|
|
275987
|
-
strategy,
|
|
275988
|
-
prod,
|
|
275989
|
-
acceptDefaults,
|
|
275990
|
-
blockchainNodeId
|
|
275991
|
-
}) => {
|
|
275999
|
+
const build = new Command2("remote").description("Deploy the smart contracts using Hardhat/ignition to the remote network on the platform").option("-m, --module <ignitionmodule>", 'The module to deploy with Ignition, defaults to "ignition/modules/main.ts"').option("--deployment-id <deploymentId>", "Set a custom deployment id").option("-r, --reset", "Reset the deployment").option("--verify", "Verify the deployment").option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID (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");
|
|
276000
|
+
build.action(async ({ module, reset: reset2, verify, deploymentId, prod, acceptDefaults, blockchainNodeId }) => {
|
|
275992
276001
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
275993
276002
|
const env2 = await loadEnv(false, !!prod);
|
|
275994
276003
|
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
@@ -276028,6 +276037,7 @@ function hardhatDeployRemoteCommand() {
|
|
|
276028
276037
|
if (!address) {
|
|
276029
276038
|
cancel2("No private key selected. Please select one to continue.");
|
|
276030
276039
|
}
|
|
276040
|
+
const customDeploymentId = deploymentId ?? await deploymentIdPrompt(env2, autoAccept, prod);
|
|
276031
276041
|
const { command, args } = await getPackageManagerExecutable();
|
|
276032
276042
|
await executeCommand(command, [
|
|
276033
276043
|
...args,
|
|
@@ -276036,16 +276046,13 @@ function hardhatDeployRemoteCommand() {
|
|
|
276036
276046
|
"deploy",
|
|
276037
276047
|
...reset2 ? ["--reset"] : [],
|
|
276038
276048
|
...verify ? ["--verify"] : [],
|
|
276039
|
-
...
|
|
276040
|
-
...defaultSender ? ["--default-sender", defaultSender] : [],
|
|
276041
|
-
...parameters ? ["--parameters", parameters] : [],
|
|
276042
|
-
...strategy ? ["--strategy", strategy] : [],
|
|
276049
|
+
...customDeploymentId ? ["--deployment-id", customDeploymentId] : [],
|
|
276043
276050
|
"--network",
|
|
276044
276051
|
"btp",
|
|
276045
276052
|
module ?? "ignition/modules/main.ts"
|
|
276046
276053
|
].filter(Boolean), { env: envConfig });
|
|
276047
276054
|
});
|
|
276048
|
-
return
|
|
276055
|
+
return build;
|
|
276049
276056
|
}
|
|
276050
276057
|
|
|
276051
276058
|
// src/commands/smart-contract-set/hardhat/deploy.ts
|
|
@@ -276058,33 +276065,29 @@ function hardhatDeployCommand() {
|
|
|
276058
276065
|
|
|
276059
276066
|
// src/commands/smart-contract-set/hardhat/network.ts
|
|
276060
276067
|
function hardhatNetworkCommand() {
|
|
276061
|
-
|
|
276062
|
-
|
|
276068
|
+
const network = new Command2("network");
|
|
276069
|
+
network.description("Start a development network using Hardhat");
|
|
276070
|
+
network.action(async () => {
|
|
276063
276071
|
const { command, args } = await getPackageManagerExecutable();
|
|
276064
|
-
await executeCommand(command, [...args, "hardhat", "node"
|
|
276072
|
+
await executeCommand(command, [...args, "hardhat", "node"]);
|
|
276065
276073
|
});
|
|
276074
|
+
return network;
|
|
276066
276075
|
}
|
|
276067
276076
|
|
|
276068
276077
|
// src/commands/smart-contract-set/hardhat/script/local.ts
|
|
276069
276078
|
function hardhatScriptLocalCommand() {
|
|
276070
|
-
|
|
276079
|
+
const build = new Command2("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"');
|
|
276080
|
+
build.action(async ({ script }) => {
|
|
276071
276081
|
const { command, args } = await getPackageManagerExecutable();
|
|
276072
|
-
await executeCommand(command, [
|
|
276073
|
-
...args,
|
|
276074
|
-
"hardhat",
|
|
276075
|
-
"run",
|
|
276076
|
-
script,
|
|
276077
|
-
"--network",
|
|
276078
|
-
"localhost",
|
|
276079
|
-
...compile ? ["--no-compile"] : []
|
|
276080
|
-
]);
|
|
276082
|
+
await executeCommand(command, [...args, "hardhat", "run", script, "--network", "localhost"]);
|
|
276081
276083
|
});
|
|
276084
|
+
return build;
|
|
276082
276085
|
}
|
|
276083
276086
|
|
|
276084
276087
|
// src/commands/smart-contract-set/hardhat/script/remote.ts
|
|
276085
276088
|
function hardhatScriptRemoteCommand() {
|
|
276086
|
-
const
|
|
276087
|
-
|
|
276089
|
+
const build = new Command2("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-id <blockchainNodeId>", "Blockchain Node ID (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");
|
|
276090
|
+
build.action(async ({ script, prod, blockchainNodeId, acceptDefaults }) => {
|
|
276088
276091
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
|
276089
276092
|
const env2 = await loadEnv(false, !!prod);
|
|
276090
276093
|
const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
@@ -276107,9 +276110,9 @@ function hardhatScriptRemoteCommand() {
|
|
|
276107
276110
|
}
|
|
276108
276111
|
const envConfig = await settlemint.foundry.env(nodeId);
|
|
276109
276112
|
const { command, args } = await getPackageManagerExecutable();
|
|
276110
|
-
await executeCommand(command, [...args, "hardhat", "run", script, "--network", "btp"
|
|
276113
|
+
await executeCommand(command, [...args, "hardhat", "run", script, "--network", "btp"], { env: envConfig });
|
|
276111
276114
|
});
|
|
276112
|
-
return
|
|
276115
|
+
return build;
|
|
276113
276116
|
}
|
|
276114
276117
|
|
|
276115
276118
|
// src/commands/smart-contract-set/hardhat/script.ts
|
|
@@ -276122,11 +276125,13 @@ function hardhatScriptCommand() {
|
|
|
276122
276125
|
|
|
276123
276126
|
// src/commands/smart-contract-set/hardhat/test.ts
|
|
276124
276127
|
function hardhatTestCommand() {
|
|
276125
|
-
|
|
276126
|
-
|
|
276128
|
+
const test = new Command2("test");
|
|
276129
|
+
test.description("Test the smart contracts using Hardhat");
|
|
276130
|
+
test.action(async () => {
|
|
276127
276131
|
const { command, args } = await getPackageManagerExecutable();
|
|
276128
|
-
await executeCommand(command, [...args, "hardhat", "test"
|
|
276132
|
+
await executeCommand(command, [...args, "hardhat", "test"]);
|
|
276129
276133
|
});
|
|
276134
|
+
return test;
|
|
276130
276135
|
}
|
|
276131
276136
|
|
|
276132
276137
|
// src/commands/smart-contract-set/subgraph/build.ts
|
|
@@ -276508,4 +276513,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
276508
276513
|
cancel2(reason);
|
|
276509
276514
|
});
|
|
276510
276515
|
|
|
276511
|
-
//# debugId=
|
|
276516
|
+
//# debugId=C419D07D95A4BD7A64756E2164756E21
|