@settlemint/sdk-cli 0.6.41-pr3ecf44f → 0.6.41-pre47f5d9
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 +191 -270
- package/dist/cli.js.map +14 -16
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -268061,9 +268061,8 @@ var DotEnvSchema = z4.object({
|
|
|
268061
268061
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema.optional(),
|
|
268062
268062
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema.optional(),
|
|
268063
268063
|
SETTLEMINT_NEW_PROJECT_NAME: z4.string().optional(),
|
|
268064
|
-
|
|
268065
|
-
|
|
268066
|
-
SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID: z4.string().optional()
|
|
268064
|
+
SETTLEMINT_SMART_CONTRACT_ADDRESS: z4.string().optional(),
|
|
268065
|
+
SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z4.string().optional()
|
|
268067
268066
|
});
|
|
268068
268067
|
var DotEnvSchemaPartial = DotEnvSchema.partial();
|
|
268069
268068
|
function validate(schema, value4) {
|
|
@@ -268530,9 +268529,8 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
268530
268529
|
SETTLEMINT_BLOCKSCOUT: env2.SETTLEMINT_BLOCKSCOUT,
|
|
268531
268530
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT,
|
|
268532
268531
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT,
|
|
268533
|
-
|
|
268534
|
-
|
|
268535
|
-
SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID: env2.SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID
|
|
268532
|
+
SETTLEMINT_SMART_CONTRACT_ADDRESS: env2.SETTLEMINT_SMART_CONTRACT_ADDRESS,
|
|
268533
|
+
SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: env2.SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID
|
|
268536
268534
|
}, false);
|
|
268537
268535
|
await writeEnv(prod, {
|
|
268538
268536
|
SETTLEMINT_ACCESS_TOKEN: env2.SETTLEMINT_ACCESS_TOKEN,
|
|
@@ -268747,9 +268745,8 @@ var DotEnvSchema2 = z4.object({
|
|
|
268747
268745
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
|
|
268748
268746
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema2.optional(),
|
|
268749
268747
|
SETTLEMINT_NEW_PROJECT_NAME: z4.string().optional(),
|
|
268750
|
-
|
|
268751
|
-
|
|
268752
|
-
SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID: z4.string().optional()
|
|
268748
|
+
SETTLEMINT_SMART_CONTRACT_ADDRESS: z4.string().optional(),
|
|
268749
|
+
SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z4.string().optional()
|
|
268753
268750
|
});
|
|
268754
268751
|
var DotEnvSchemaPartial2 = DotEnvSchema2.partial();
|
|
268755
268752
|
function validate2(schema, value4) {
|
|
@@ -272337,7 +272334,7 @@ function connectCommand() {
|
|
|
272337
272334
|
var package_default = {
|
|
272338
272335
|
name: "@settlemint/sdk-cli",
|
|
272339
272336
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
272340
|
-
version: "0.6.41-
|
|
272337
|
+
version: "0.6.41-pre47f5d9",
|
|
272341
272338
|
type: "module",
|
|
272342
272339
|
private: false,
|
|
272343
272340
|
license: "FSL-1.1-MIT",
|
|
@@ -272387,8 +272384,8 @@ var package_default = {
|
|
|
272387
272384
|
"@inquirer/input": "4.1.0",
|
|
272388
272385
|
"@inquirer/password": "4.0.3",
|
|
272389
272386
|
"@inquirer/select": "4.0.3",
|
|
272390
|
-
"@settlemint/sdk-js": "0.6.41-
|
|
272391
|
-
"@settlemint/sdk-utils": "0.6.41-
|
|
272387
|
+
"@settlemint/sdk-js": "0.6.41-pre47f5d9",
|
|
272388
|
+
"@settlemint/sdk-utils": "0.6.41-pre47f5d9",
|
|
272392
272389
|
"get-tsconfig": "4.8.1",
|
|
272393
272390
|
giget: "1.2.3"
|
|
272394
272391
|
},
|
|
@@ -273498,7 +273495,6 @@ function capitalizeFirstLetter(val) {
|
|
|
273498
273495
|
}
|
|
273499
273496
|
async function executeCommand2(command, args, options) {
|
|
273500
273497
|
const child = spawn2(command, args, { env: { ...process.env, ...options?.env } });
|
|
273501
|
-
process.stdin.pipe(child.stdin);
|
|
273502
273498
|
return new Promise((resolve22, reject) => {
|
|
273503
273499
|
child.stdout.on("data", (data) => {
|
|
273504
273500
|
console.log(data.toString());
|
|
@@ -273509,7 +273505,6 @@ async function executeCommand2(command, args, options) {
|
|
|
273509
273505
|
child.on("error", (err) => reject(err));
|
|
273510
273506
|
child.on("close", (code2) => {
|
|
273511
273507
|
if (code2 === 0 || code2 === null || code2 === 143) {
|
|
273512
|
-
process.stdin.unpipe(child.stdin);
|
|
273513
273508
|
resolve22();
|
|
273514
273509
|
return;
|
|
273515
273510
|
}
|
|
@@ -273568,9 +273563,8 @@ var DotEnvSchema3 = z4.object({
|
|
|
273568
273563
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema3.optional(),
|
|
273569
273564
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema3.optional(),
|
|
273570
273565
|
SETTLEMINT_NEW_PROJECT_NAME: z4.string().optional(),
|
|
273571
|
-
|
|
273572
|
-
|
|
273573
|
-
SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID: z4.string().optional()
|
|
273566
|
+
SETTLEMINT_SMART_CONTRACT_ADDRESS: z4.string().optional(),
|
|
273567
|
+
SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z4.string().optional()
|
|
273574
273568
|
});
|
|
273575
273569
|
var DotEnvSchemaPartial3 = DotEnvSchema3.partial();
|
|
273576
273570
|
function validate3(schema, value4) {
|
|
@@ -274219,27 +274213,15 @@ function graphMiddlewareCreateCommand() {
|
|
|
274219
274213
|
type: "middleware",
|
|
274220
274214
|
alias: "gr",
|
|
274221
274215
|
execute: (cmd2, baseAction) => {
|
|
274222
|
-
addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").option("--
|
|
274223
|
-
applicationId,
|
|
274224
|
-
smartContractSetId,
|
|
274225
|
-
storageId,
|
|
274226
|
-
blockchainNodeId,
|
|
274227
|
-
provider,
|
|
274228
|
-
region,
|
|
274229
|
-
size,
|
|
274230
|
-
type: type4,
|
|
274231
|
-
...defaultArgs
|
|
274232
|
-
}) => {
|
|
274216
|
+
addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").option("--storage-id <storageId>", "Storage ID (IFPS)").option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID").action(async (name2, { applicationId, storageId, blockchainNodeId, provider, region, size, type: type4, ...defaultArgs }) => {
|
|
274233
274217
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
274234
274218
|
const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
|
|
274235
|
-
const smartContractSet = smartContractSetId ?? env2.SETTLEMINT_SMART_CONTRACT_SET;
|
|
274236
274219
|
const blockchainNode = blockchainNodeId ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
|
|
274237
274220
|
const storage = storageId ?? env2.SETTLEMINT_IPFS;
|
|
274238
274221
|
const result = await settlemint.middleware.create({
|
|
274239
274222
|
name: name2,
|
|
274240
274223
|
applicationId: application,
|
|
274241
274224
|
interface: "HA_GRAPH",
|
|
274242
|
-
smartContractSetId: smartContractSet,
|
|
274243
274225
|
storageId: storage,
|
|
274244
274226
|
blockchainNodeId: blockchainNode,
|
|
274245
274227
|
provider,
|
|
@@ -274268,7 +274250,7 @@ function graphMiddlewareCreateCommand() {
|
|
|
274268
274250
|
},
|
|
274269
274251
|
{
|
|
274270
274252
|
description: "Create a graph middleware in a different application",
|
|
274271
|
-
command: "platform create middleware graph my-graph --application-id 123456789 --
|
|
274253
|
+
command: "platform create middleware graph my-graph --application-id 123456789 --blockchain-node-id node-123 --storage-id storage-123"
|
|
274272
274254
|
}
|
|
274273
274255
|
]
|
|
274274
274256
|
});
|
|
@@ -274351,7 +274333,7 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
274351
274333
|
},
|
|
274352
274334
|
{
|
|
274353
274335
|
description: "Create a smart contract portal middleware in a different application",
|
|
274354
|
-
command: "platform create middleware smart-contract-portal my-portal --application-id 123456789 --
|
|
274336
|
+
command: "platform create middleware smart-contract-portal my-portal --application-id 123456789 --blockchain-node-id node-123"
|
|
274355
274337
|
}
|
|
274356
274338
|
]
|
|
274357
274339
|
});
|
|
@@ -274459,223 +274441,6 @@ function privateKeyCreateCommand() {
|
|
|
274459
274441
|
return new Command2("private-key").alias("pk").description("Create a private key in the SettleMint platform").addCommand(privateKeyHdCreateCommand()).addCommand(privateKeyHsmCreateCommand());
|
|
274460
274442
|
}
|
|
274461
274443
|
|
|
274462
|
-
// src/constants/smart-contract-sets.ts
|
|
274463
|
-
var SMART_CONTRACT_SET_DETAILS = [
|
|
274464
|
-
{
|
|
274465
|
-
id: "solidity-empty",
|
|
274466
|
-
name: "Empty",
|
|
274467
|
-
image: {
|
|
274468
|
-
registry: "ghcr.io",
|
|
274469
|
-
repository: "settlemint/solidity-empty",
|
|
274470
|
-
tag: "7.7.7"
|
|
274471
|
-
}
|
|
274472
|
-
},
|
|
274473
|
-
{
|
|
274474
|
-
id: "solidity-token-erc20",
|
|
274475
|
-
name: "ERC20 token",
|
|
274476
|
-
image: {
|
|
274477
|
-
registry: "ghcr.io",
|
|
274478
|
-
repository: "settlemint/solidity-token-erc20",
|
|
274479
|
-
tag: "7.7.7"
|
|
274480
|
-
}
|
|
274481
|
-
},
|
|
274482
|
-
{
|
|
274483
|
-
id: "solidity-token-erc1155",
|
|
274484
|
-
name: "ERC1155 token",
|
|
274485
|
-
image: {
|
|
274486
|
-
registry: "ghcr.io",
|
|
274487
|
-
repository: "settlemint/solidity-token-erc1155",
|
|
274488
|
-
tag: "7.7.7"
|
|
274489
|
-
}
|
|
274490
|
-
},
|
|
274491
|
-
{
|
|
274492
|
-
id: "solidity-token-erc20-metatx",
|
|
274493
|
-
name: "ERC20 token with MetaTx",
|
|
274494
|
-
image: {
|
|
274495
|
-
registry: "ghcr.io",
|
|
274496
|
-
repository: "settlemint/solidity-token-erc20-metatx",
|
|
274497
|
-
tag: "7.7.7"
|
|
274498
|
-
}
|
|
274499
|
-
},
|
|
274500
|
-
{
|
|
274501
|
-
id: "solidity-supplychain",
|
|
274502
|
-
name: "Supplychain",
|
|
274503
|
-
image: {
|
|
274504
|
-
registry: "ghcr.io",
|
|
274505
|
-
repository: "settlemint/solidity-supplychain",
|
|
274506
|
-
tag: "7.7.7"
|
|
274507
|
-
}
|
|
274508
|
-
},
|
|
274509
|
-
{
|
|
274510
|
-
id: "chaincode-ts-empty",
|
|
274511
|
-
name: "Empty typescript",
|
|
274512
|
-
image: {
|
|
274513
|
-
registry: "ghcr.io",
|
|
274514
|
-
repository: "settlemint/chaincode-typescript-empty",
|
|
274515
|
-
tag: "7.0.13"
|
|
274516
|
-
}
|
|
274517
|
-
},
|
|
274518
|
-
{
|
|
274519
|
-
id: "chaincode-ts-empty-pdc",
|
|
274520
|
-
name: "Empty typescript with PDC",
|
|
274521
|
-
image: {
|
|
274522
|
-
registry: "ghcr.io",
|
|
274523
|
-
repository: "settlemint/chaincode-typescript-empty-pdc",
|
|
274524
|
-
tag: "7.0.1"
|
|
274525
|
-
}
|
|
274526
|
-
},
|
|
274527
|
-
{
|
|
274528
|
-
id: "chaincode-go-empty",
|
|
274529
|
-
name: "Empty go",
|
|
274530
|
-
image: {
|
|
274531
|
-
registry: "ghcr.io",
|
|
274532
|
-
repository: "settlemint/chaincode-go-empty",
|
|
274533
|
-
tag: "7.0.5"
|
|
274534
|
-
}
|
|
274535
|
-
},
|
|
274536
|
-
{
|
|
274537
|
-
id: "solidity-statemachine",
|
|
274538
|
-
name: "State Machine",
|
|
274539
|
-
image: {
|
|
274540
|
-
registry: "ghcr.io",
|
|
274541
|
-
repository: "settlemint/solidity-statemachine",
|
|
274542
|
-
tag: "7.7.7"
|
|
274543
|
-
}
|
|
274544
|
-
},
|
|
274545
|
-
{
|
|
274546
|
-
id: "solidity-token-erc20-crowdsale",
|
|
274547
|
-
name: "ERC20 token with crowdsale mechanism",
|
|
274548
|
-
image: {
|
|
274549
|
-
registry: "ghcr.io",
|
|
274550
|
-
repository: "settlemint/solidity-token-erc20-crowdsale",
|
|
274551
|
-
tag: "7.7.7"
|
|
274552
|
-
}
|
|
274553
|
-
},
|
|
274554
|
-
{
|
|
274555
|
-
id: "solidity-token-erc721",
|
|
274556
|
-
name: "ERC721",
|
|
274557
|
-
image: {
|
|
274558
|
-
registry: "ghcr.io",
|
|
274559
|
-
repository: "settlemint/solidity-token-erc721",
|
|
274560
|
-
tag: "7.7.7"
|
|
274561
|
-
}
|
|
274562
|
-
},
|
|
274563
|
-
{
|
|
274564
|
-
id: "solidity-token-erc721a",
|
|
274565
|
-
name: "ERC721a",
|
|
274566
|
-
image: {
|
|
274567
|
-
registry: "ghcr.io",
|
|
274568
|
-
repository: "settlemint/solidity-token-erc721a",
|
|
274569
|
-
tag: "7.7.7"
|
|
274570
|
-
}
|
|
274571
|
-
},
|
|
274572
|
-
{
|
|
274573
|
-
id: "solidity-token-erc721-generative-art",
|
|
274574
|
-
name: "ERC721 Generative Art",
|
|
274575
|
-
image: {
|
|
274576
|
-
registry: "ghcr.io",
|
|
274577
|
-
repository: "settlemint/solidity-token-erc721-generative-art",
|
|
274578
|
-
tag: "7.7.7"
|
|
274579
|
-
}
|
|
274580
|
-
},
|
|
274581
|
-
{
|
|
274582
|
-
id: "solidity-token-soulbound",
|
|
274583
|
-
name: "Soulbound Token",
|
|
274584
|
-
image: {
|
|
274585
|
-
registry: "ghcr.io",
|
|
274586
|
-
repository: "settlemint/solidity-token-soulbound",
|
|
274587
|
-
tag: "7.7.7"
|
|
274588
|
-
}
|
|
274589
|
-
},
|
|
274590
|
-
{
|
|
274591
|
-
id: "solidity-diamond-bond",
|
|
274592
|
-
name: "Diamond bond",
|
|
274593
|
-
image: {
|
|
274594
|
-
registry: "ghcr.io",
|
|
274595
|
-
repository: "settlemint/solidity-diamond-bond",
|
|
274596
|
-
tag: "7.7.7"
|
|
274597
|
-
}
|
|
274598
|
-
},
|
|
274599
|
-
{
|
|
274600
|
-
id: "solidity-attestation-service",
|
|
274601
|
-
name: "Attestation Service",
|
|
274602
|
-
image: {
|
|
274603
|
-
registry: "ghcr.io",
|
|
274604
|
-
repository: "settlemint/solidity-attestation-service",
|
|
274605
|
-
tag: "7.7.7"
|
|
274606
|
-
}
|
|
274607
|
-
},
|
|
274608
|
-
{
|
|
274609
|
-
id: "solidity-zeto",
|
|
274610
|
-
name: "Zeto",
|
|
274611
|
-
featureflagged: true,
|
|
274612
|
-
image: {
|
|
274613
|
-
registry: "ghcr.io",
|
|
274614
|
-
repository: "settlemint/solidity-zeto",
|
|
274615
|
-
tag: "7.7.7"
|
|
274616
|
-
}
|
|
274617
|
-
},
|
|
274618
|
-
{
|
|
274619
|
-
id: "solidity-starterkit",
|
|
274620
|
-
name: "Starterkit",
|
|
274621
|
-
featureflagged: true,
|
|
274622
|
-
image: {
|
|
274623
|
-
registry: "ghcr.io",
|
|
274624
|
-
repository: "settlemint/solidity-predeployed",
|
|
274625
|
-
tag: "7.7.7"
|
|
274626
|
-
}
|
|
274627
|
-
}
|
|
274628
|
-
];
|
|
274629
|
-
var SMART_CONTRACT_SETS = SMART_CONTRACT_SET_DETAILS.map((set) => set.id);
|
|
274630
|
-
|
|
274631
|
-
// src/commands/platform/smart-contract-set/create.ts
|
|
274632
|
-
function smartContractSetCreateCommand() {
|
|
274633
|
-
return getCreateCommand({
|
|
274634
|
-
name: "smart-contract-set",
|
|
274635
|
-
type: "smart contract set",
|
|
274636
|
-
alias: "scs",
|
|
274637
|
-
execute: (cmd2, baseAction) => {
|
|
274638
|
-
addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID").addOption(new Option("--use-case <useCase>", "Use case for the smart contract set").choices(SMART_CONTRACT_SETS).makeOptionMandatory()).option("--user-id <userId>", "User ID").action(async (name2, { applicationId, blockchainNodeId, provider, region, size, type: type4, useCase, userId, ...defaultArgs }) => {
|
|
274639
|
-
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
274640
|
-
const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
|
|
274641
|
-
const blockchainNode = blockchainNodeId ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
|
|
274642
|
-
const result = await settlemint.smartContractSet.create({
|
|
274643
|
-
name: name2,
|
|
274644
|
-
applicationId: application,
|
|
274645
|
-
blockchainNodeId: blockchainNode,
|
|
274646
|
-
provider,
|
|
274647
|
-
region,
|
|
274648
|
-
size,
|
|
274649
|
-
type: type4,
|
|
274650
|
-
useCase,
|
|
274651
|
-
userId
|
|
274652
|
-
});
|
|
274653
|
-
return {
|
|
274654
|
-
result,
|
|
274655
|
-
mapDefaultEnv: () => {
|
|
274656
|
-
return {
|
|
274657
|
-
SETTLEMINT_APPLICATION: application,
|
|
274658
|
-
SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode,
|
|
274659
|
-
SETTLEMINT_SMART_CONTRACT_SET: result.id
|
|
274660
|
-
};
|
|
274661
|
-
}
|
|
274662
|
-
};
|
|
274663
|
-
});
|
|
274664
|
-
});
|
|
274665
|
-
},
|
|
274666
|
-
examples: [
|
|
274667
|
-
{
|
|
274668
|
-
description: "Create a smart contract set and save as default",
|
|
274669
|
-
command: "platform create smart-contract-set my-contracts --use-case nft --accept-defaults -d"
|
|
274670
|
-
},
|
|
274671
|
-
{
|
|
274672
|
-
description: "Create a smart contract set in a different application",
|
|
274673
|
-
command: "platform create smart-contract-set my-contracts --application-id 123456789 --blockchain-node-id node-123 --use-case nft --user-id user-123"
|
|
274674
|
-
}
|
|
274675
|
-
]
|
|
274676
|
-
});
|
|
274677
|
-
}
|
|
274678
|
-
|
|
274679
274444
|
// src/commands/platform/storage/ipfs/create.ts
|
|
274680
274445
|
function ipfsStorageCreateCommand() {
|
|
274681
274446
|
return getCreateCommand({
|
|
@@ -274728,7 +274493,7 @@ function storageCreateCommand() {
|
|
|
274728
274493
|
|
|
274729
274494
|
// src/commands/platform/create.ts
|
|
274730
274495
|
function createCommand3() {
|
|
274731
|
-
return new Command2("create").alias("c").description("Create a resource in the SettleMint platform").addCommand(workspaceCreateCommand()).addCommand(applicationCreateCommand()).addCommand(blockchainNetworkCreateCommand()).addCommand(privateKeyCreateCommand()).addCommand(
|
|
274496
|
+
return new Command2("create").alias("c").description("Create a resource in the SettleMint platform").addCommand(workspaceCreateCommand()).addCommand(applicationCreateCommand()).addCommand(blockchainNetworkCreateCommand()).addCommand(privateKeyCreateCommand()).addCommand(middlewareCreateCommand()).addCommand(storageCreateCommand()).addCommand(integrationToolCreateCommand()).addCommand(insightsCreateCommand()).addCommand(applicationAccessTokenCreateCommand());
|
|
274732
274497
|
}
|
|
274733
274498
|
|
|
274734
274499
|
// src/commands/platform/prompts/delete-confirmation.prompt.ts
|
|
@@ -275025,19 +274790,6 @@ function privateKeyRestartCommand() {
|
|
|
275025
274790
|
return new Command2("private-key").alias("pk").description("Restart a private key in the SettleMint platform").addCommand(hdEcdsaP256RestartCommand());
|
|
275026
274791
|
}
|
|
275027
274792
|
|
|
275028
|
-
// src/commands/platform/smart-contract-set/restart.ts
|
|
275029
|
-
function smartContractSetRestartCommand() {
|
|
275030
|
-
return getRestartCommand({
|
|
275031
|
-
name: "smart-contract-set",
|
|
275032
|
-
type: "smart contract set",
|
|
275033
|
-
alias: "scs",
|
|
275034
|
-
envKey: "SETTLEMINT_SMART_CONTRACT_SET",
|
|
275035
|
-
restartFunction: async (settlemint, id) => {
|
|
275036
|
-
return settlemint.smartContractSet.restart(id);
|
|
275037
|
-
}
|
|
275038
|
-
});
|
|
275039
|
-
}
|
|
275040
|
-
|
|
275041
274793
|
// src/commands/platform/storage/ipfs/restart.ts
|
|
275042
274794
|
function ipfsRestartCommand() {
|
|
275043
274795
|
return getRestartCommand({
|
|
@@ -275058,7 +274810,7 @@ function storageRestartCommand() {
|
|
|
275058
274810
|
|
|
275059
274811
|
// src/commands/platform/restart.ts
|
|
275060
274812
|
function restartCommand() {
|
|
275061
|
-
const cmd2 = new Command2("restart").description("Restart a resource in the SettleMint platform").addCommand(blockchainNetworkRestartCommand()).addCommand(customDeploymentRestartCommand()).addCommand(insightsRestartCommand()).addCommand(integrationToolRestartCommand()).addCommand(middlewareRestartCommand()).addCommand(privateKeyRestartCommand()).addCommand(
|
|
274813
|
+
const cmd2 = new Command2("restart").description("Restart a resource in the SettleMint platform").addCommand(blockchainNetworkRestartCommand()).addCommand(customDeploymentRestartCommand()).addCommand(insightsRestartCommand()).addCommand(integrationToolRestartCommand()).addCommand(middlewareRestartCommand()).addCommand(privateKeyRestartCommand()).addCommand(storageRestartCommand());
|
|
275062
274814
|
return cmd2;
|
|
275063
274815
|
}
|
|
275064
274816
|
|
|
@@ -275108,6 +274860,175 @@ function platformCommand() {
|
|
|
275108
274860
|
import { rmdir } from "node:fs/promises";
|
|
275109
274861
|
import { join as join7 } from "node:path";
|
|
275110
274862
|
|
|
274863
|
+
// src/constants/smart-contract-sets.ts
|
|
274864
|
+
var SMART_CONTRACT_SET_DETAILS = [
|
|
274865
|
+
{
|
|
274866
|
+
id: "solidity-empty",
|
|
274867
|
+
name: "Empty",
|
|
274868
|
+
image: {
|
|
274869
|
+
registry: "ghcr.io",
|
|
274870
|
+
repository: "settlemint/solidity-empty",
|
|
274871
|
+
tag: "7.7.7"
|
|
274872
|
+
}
|
|
274873
|
+
},
|
|
274874
|
+
{
|
|
274875
|
+
id: "solidity-token-erc20",
|
|
274876
|
+
name: "ERC20 token",
|
|
274877
|
+
image: {
|
|
274878
|
+
registry: "ghcr.io",
|
|
274879
|
+
repository: "settlemint/solidity-token-erc20",
|
|
274880
|
+
tag: "7.7.7"
|
|
274881
|
+
}
|
|
274882
|
+
},
|
|
274883
|
+
{
|
|
274884
|
+
id: "solidity-token-erc1155",
|
|
274885
|
+
name: "ERC1155 token",
|
|
274886
|
+
image: {
|
|
274887
|
+
registry: "ghcr.io",
|
|
274888
|
+
repository: "settlemint/solidity-token-erc1155",
|
|
274889
|
+
tag: "7.7.7"
|
|
274890
|
+
}
|
|
274891
|
+
},
|
|
274892
|
+
{
|
|
274893
|
+
id: "solidity-token-erc20-metatx",
|
|
274894
|
+
name: "ERC20 token with MetaTx",
|
|
274895
|
+
image: {
|
|
274896
|
+
registry: "ghcr.io",
|
|
274897
|
+
repository: "settlemint/solidity-token-erc20-metatx",
|
|
274898
|
+
tag: "7.7.7"
|
|
274899
|
+
}
|
|
274900
|
+
},
|
|
274901
|
+
{
|
|
274902
|
+
id: "solidity-supplychain",
|
|
274903
|
+
name: "Supplychain",
|
|
274904
|
+
image: {
|
|
274905
|
+
registry: "ghcr.io",
|
|
274906
|
+
repository: "settlemint/solidity-supplychain",
|
|
274907
|
+
tag: "7.7.7"
|
|
274908
|
+
}
|
|
274909
|
+
},
|
|
274910
|
+
{
|
|
274911
|
+
id: "chaincode-ts-empty",
|
|
274912
|
+
name: "Empty typescript",
|
|
274913
|
+
image: {
|
|
274914
|
+
registry: "ghcr.io",
|
|
274915
|
+
repository: "settlemint/chaincode-typescript-empty",
|
|
274916
|
+
tag: "7.0.13"
|
|
274917
|
+
}
|
|
274918
|
+
},
|
|
274919
|
+
{
|
|
274920
|
+
id: "chaincode-ts-empty-pdc",
|
|
274921
|
+
name: "Empty typescript with PDC",
|
|
274922
|
+
image: {
|
|
274923
|
+
registry: "ghcr.io",
|
|
274924
|
+
repository: "settlemint/chaincode-typescript-empty-pdc",
|
|
274925
|
+
tag: "7.0.1"
|
|
274926
|
+
}
|
|
274927
|
+
},
|
|
274928
|
+
{
|
|
274929
|
+
id: "chaincode-go-empty",
|
|
274930
|
+
name: "Empty go",
|
|
274931
|
+
image: {
|
|
274932
|
+
registry: "ghcr.io",
|
|
274933
|
+
repository: "settlemint/chaincode-go-empty",
|
|
274934
|
+
tag: "7.0.5"
|
|
274935
|
+
}
|
|
274936
|
+
},
|
|
274937
|
+
{
|
|
274938
|
+
id: "solidity-statemachine",
|
|
274939
|
+
name: "State Machine",
|
|
274940
|
+
image: {
|
|
274941
|
+
registry: "ghcr.io",
|
|
274942
|
+
repository: "settlemint/solidity-statemachine",
|
|
274943
|
+
tag: "7.7.7"
|
|
274944
|
+
}
|
|
274945
|
+
},
|
|
274946
|
+
{
|
|
274947
|
+
id: "solidity-token-erc20-crowdsale",
|
|
274948
|
+
name: "ERC20 token with crowdsale mechanism",
|
|
274949
|
+
image: {
|
|
274950
|
+
registry: "ghcr.io",
|
|
274951
|
+
repository: "settlemint/solidity-token-erc20-crowdsale",
|
|
274952
|
+
tag: "7.7.7"
|
|
274953
|
+
}
|
|
274954
|
+
},
|
|
274955
|
+
{
|
|
274956
|
+
id: "solidity-token-erc721",
|
|
274957
|
+
name: "ERC721",
|
|
274958
|
+
image: {
|
|
274959
|
+
registry: "ghcr.io",
|
|
274960
|
+
repository: "settlemint/solidity-token-erc721",
|
|
274961
|
+
tag: "7.7.7"
|
|
274962
|
+
}
|
|
274963
|
+
},
|
|
274964
|
+
{
|
|
274965
|
+
id: "solidity-token-erc721a",
|
|
274966
|
+
name: "ERC721a",
|
|
274967
|
+
image: {
|
|
274968
|
+
registry: "ghcr.io",
|
|
274969
|
+
repository: "settlemint/solidity-token-erc721a",
|
|
274970
|
+
tag: "7.7.7"
|
|
274971
|
+
}
|
|
274972
|
+
},
|
|
274973
|
+
{
|
|
274974
|
+
id: "solidity-token-erc721-generative-art",
|
|
274975
|
+
name: "ERC721 Generative Art",
|
|
274976
|
+
image: {
|
|
274977
|
+
registry: "ghcr.io",
|
|
274978
|
+
repository: "settlemint/solidity-token-erc721-generative-art",
|
|
274979
|
+
tag: "7.7.7"
|
|
274980
|
+
}
|
|
274981
|
+
},
|
|
274982
|
+
{
|
|
274983
|
+
id: "solidity-token-soulbound",
|
|
274984
|
+
name: "Soulbound Token",
|
|
274985
|
+
image: {
|
|
274986
|
+
registry: "ghcr.io",
|
|
274987
|
+
repository: "settlemint/solidity-token-soulbound",
|
|
274988
|
+
tag: "7.7.7"
|
|
274989
|
+
}
|
|
274990
|
+
},
|
|
274991
|
+
{
|
|
274992
|
+
id: "solidity-diamond-bond",
|
|
274993
|
+
name: "Diamond bond",
|
|
274994
|
+
image: {
|
|
274995
|
+
registry: "ghcr.io",
|
|
274996
|
+
repository: "settlemint/solidity-diamond-bond",
|
|
274997
|
+
tag: "7.7.7"
|
|
274998
|
+
}
|
|
274999
|
+
},
|
|
275000
|
+
{
|
|
275001
|
+
id: "solidity-attestation-service",
|
|
275002
|
+
name: "Attestation Service",
|
|
275003
|
+
image: {
|
|
275004
|
+
registry: "ghcr.io",
|
|
275005
|
+
repository: "settlemint/solidity-attestation-service",
|
|
275006
|
+
tag: "7.7.7"
|
|
275007
|
+
}
|
|
275008
|
+
},
|
|
275009
|
+
{
|
|
275010
|
+
id: "solidity-zeto",
|
|
275011
|
+
name: "Zeto",
|
|
275012
|
+
featureflagged: true,
|
|
275013
|
+
image: {
|
|
275014
|
+
registry: "ghcr.io",
|
|
275015
|
+
repository: "settlemint/solidity-zeto",
|
|
275016
|
+
tag: "7.7.7"
|
|
275017
|
+
}
|
|
275018
|
+
},
|
|
275019
|
+
{
|
|
275020
|
+
id: "solidity-starterkit",
|
|
275021
|
+
name: "Starterkit",
|
|
275022
|
+
featureflagged: true,
|
|
275023
|
+
image: {
|
|
275024
|
+
registry: "ghcr.io",
|
|
275025
|
+
repository: "settlemint/solidity-predeployed",
|
|
275026
|
+
tag: "7.7.7"
|
|
275027
|
+
}
|
|
275028
|
+
}
|
|
275029
|
+
];
|
|
275030
|
+
var SMART_CONTRACT_SETS = SMART_CONTRACT_SET_DETAILS.map((set) => set.id);
|
|
275031
|
+
|
|
275111
275032
|
// src/commands/smart-contract-set/prompts/use-case.prompt.ts
|
|
275112
275033
|
async function useCasePrompt(argument) {
|
|
275113
275034
|
if (SMART_CONTRACT_SETS.length === 0) {
|
|
@@ -275255,7 +275176,7 @@ async function addressPrompt({
|
|
|
275255
275176
|
hardhatConfig
|
|
275256
275177
|
}) {
|
|
275257
275178
|
const possiblePrivateKeys = node.privateKeys?.filter((privateKey) => privateKey.privateKeyType !== "HD_ECDSA_P256") ?? [];
|
|
275258
|
-
const defaultAddress = env2.
|
|
275179
|
+
const defaultAddress = env2.SETTLEMINT_SMART_CONTRACT_ADDRESS ?? hardhatConfig.networks?.btp?.from ?? possiblePrivateKeys[0]?.address;
|
|
275259
275180
|
const defaultPossible = accept && defaultAddress;
|
|
275260
275181
|
if (defaultPossible) {
|
|
275261
275182
|
return defaultAddress;
|
|
@@ -275271,10 +275192,10 @@ async function addressPrompt({
|
|
|
275271
275192
|
})),
|
|
275272
275193
|
default: defaultAddress ?? possiblePrivateKeys[0]?.address
|
|
275273
275194
|
});
|
|
275274
|
-
if (address && address !== env2.
|
|
275195
|
+
if (address && address !== env2.SETTLEMINT_SMART_CONTRACT_ADDRESS) {
|
|
275275
275196
|
await writeEnvSpinner(!!prod, {
|
|
275276
275197
|
...env2,
|
|
275277
|
-
|
|
275198
|
+
SETTLEMINT_SMART_CONTRACT_ADDRESS: address
|
|
275278
275199
|
});
|
|
275279
275200
|
}
|
|
275280
275201
|
return address;
|
|
@@ -275282,7 +275203,7 @@ async function addressPrompt({
|
|
|
275282
275203
|
|
|
275283
275204
|
// src/commands/smart-contract-set/prompts/deployment-id.prompt.ts
|
|
275284
275205
|
async function deploymentIdPrompt(env2, accept, prod) {
|
|
275285
|
-
const defaultDeploymentId = env2.
|
|
275206
|
+
const defaultDeploymentId = env2.SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID;
|
|
275286
275207
|
if (accept) {
|
|
275287
275208
|
return defaultDeploymentId;
|
|
275288
275209
|
}
|
|
@@ -275294,7 +275215,7 @@ async function deploymentIdPrompt(env2, accept, prod) {
|
|
|
275294
275215
|
if (deploymentId !== defaultDeploymentId) {
|
|
275295
275216
|
await writeEnvSpinner(!!prod, {
|
|
275296
275217
|
...env2,
|
|
275297
|
-
|
|
275218
|
+
SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: deploymentId
|
|
275298
275219
|
});
|
|
275299
275220
|
}
|
|
275300
275221
|
return deploymentId;
|
|
@@ -275816,4 +275737,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
275816
275737
|
cancel2(reason);
|
|
275817
275738
|
});
|
|
275818
275739
|
|
|
275819
|
-
//# debugId=
|
|
275740
|
+
//# debugId=D654673045686A5464756E2164756E21
|