solforge 0.2.4 → 0.2.6
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/README.md +471 -79
- package/cli.cjs +106 -78
- package/package.json +1 -1
- package/scripts/install.sh +1 -1
- package/scripts/postinstall.cjs +69 -61
- package/server/lib/base58.ts +1 -1
- package/server/methods/account/get-account-info.ts +3 -7
- package/server/methods/account/get-balance.ts +3 -7
- package/server/methods/account/get-multiple-accounts.ts +2 -1
- package/server/methods/account/get-parsed-account-info.ts +3 -7
- package/server/methods/account/parsers/index.ts +2 -2
- package/server/methods/account/parsers/loader-upgradeable.ts +14 -1
- package/server/methods/account/parsers/spl-token.ts +29 -10
- package/server/methods/account/request-airdrop.ts +44 -31
- package/server/methods/block/get-block.ts +3 -7
- package/server/methods/block/get-blocks-with-limit.ts +3 -7
- package/server/methods/block/is-blockhash-valid.ts +3 -7
- package/server/methods/get-address-lookup-table.ts +3 -7
- package/server/methods/program/get-program-accounts.ts +9 -9
- package/server/methods/program/get-token-account-balance.ts +3 -7
- package/server/methods/program/get-token-accounts-by-delegate.ts +4 -3
- package/server/methods/program/get-token-accounts-by-owner.ts +61 -35
- package/server/methods/program/get-token-largest-accounts.ts +3 -2
- package/server/methods/program/get-token-supply.ts +3 -2
- package/server/methods/solforge/index.ts +9 -6
- package/server/methods/transaction/get-parsed-transaction.ts +3 -7
- package/server/methods/transaction/get-signature-statuses.ts +14 -7
- package/server/methods/transaction/get-signatures-for-address.ts +3 -7
- package/server/methods/transaction/get-transaction.ts +167 -81
- package/server/methods/transaction/send-transaction.ts +29 -16
- package/server/methods/transaction/simulate-transaction.ts +3 -2
- package/server/rpc-server.ts +47 -34
- package/server/types.ts +9 -6
- package/server/ws-server.ts +15 -8
- package/src/api-server-entry.ts +91 -91
- package/src/cli/commands/airdrop.ts +2 -2
- package/src/cli/commands/config.ts +2 -2
- package/src/cli/commands/mint.ts +3 -3
- package/src/cli/commands/program-clone.ts +9 -11
- package/src/cli/commands/program-load.ts +3 -3
- package/src/cli/commands/rpc-start.ts +8 -5
- package/src/cli/commands/token-adopt-authority.ts +1 -1
- package/src/cli/commands/token-clone.ts +5 -6
- package/src/cli/commands/token-create.ts +5 -5
- package/src/cli/main.ts +38 -37
- package/src/cli/run-solforge.ts +20 -6
- package/src/cli/setup-wizard.ts +8 -6
- package/src/commands/add-program.ts +324 -328
- package/src/commands/init.ts +106 -106
- package/src/commands/list.ts +125 -125
- package/src/commands/mint.ts +247 -248
- package/src/commands/start.ts +837 -833
- package/src/commands/status.ts +80 -80
- package/src/commands/stop.ts +381 -382
- package/src/config/index.ts +33 -17
- package/src/config/manager.ts +150 -150
- package/src/db/index.ts +2 -2
- package/src/db/tx-store.ts +12 -8
- package/src/gui/public/app.css +1556 -1
- package/src/gui/public/build/main.css +1569 -1
- package/src/gui/server.ts +21 -22
- package/src/gui/src/api.ts +1 -1
- package/src/gui/src/app.tsx +96 -45
- package/src/gui/src/components/airdrop-mint-form.tsx +49 -19
- package/src/gui/src/components/clone-program-modal.tsx +31 -12
- package/src/gui/src/components/clone-token-modal.tsx +32 -13
- package/src/gui/src/components/modal.tsx +18 -11
- package/src/gui/src/components/programs-panel.tsx +27 -15
- package/src/gui/src/components/status-panel.tsx +32 -18
- package/src/gui/src/components/tokens-panel.tsx +25 -19
- package/src/gui/src/index.css +491 -463
- package/src/index.ts +177 -149
- package/src/rpc/start.ts +1 -1
- package/src/services/api-server.ts +494 -475
- package/src/services/port-manager.ts +164 -167
- package/src/services/process-registry.ts +144 -145
- package/src/services/program-cloner.ts +312 -312
- package/src/services/token-cloner.ts +799 -797
- package/src/services/validator.ts +288 -290
- package/src/types/config.ts +72 -72
- package/src/utils/shell.ts +75 -75
- package/src/utils/token-loader.ts +78 -78
package/src/commands/mint.ts
CHANGED
|
@@ -1,288 +1,287 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import chalk from "chalk";
|
|
3
|
-
import { existsSync, readFileSync } from "fs";
|
|
4
|
-
import { join } from "path";
|
|
5
1
|
import { input, select } from "@inquirer/prompts";
|
|
2
|
+
import { PublicKey } from "@solana/web3.js";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import { Command } from "commander";
|
|
5
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
6
|
+
import type { TokenConfig } from "../types/config.js";
|
|
6
7
|
import { runCommand } from "../utils/shell";
|
|
7
|
-
import { Keypair, PublicKey } from "@solana/web3.js";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
type ClonedToken,
|
|
10
|
+
findTokenBySymbol,
|
|
11
|
+
loadClonedTokens,
|
|
12
12
|
} from "../utils/token-loader.js";
|
|
13
|
-
import type { TokenConfig } from "../types/config.js";
|
|
14
13
|
|
|
15
14
|
export const mintCommand = new Command()
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
.name("mint")
|
|
16
|
+
.description("Interactively mint tokens to any wallet address")
|
|
17
|
+
.option("--rpc-url <url>", "RPC URL to use", "http://127.0.0.1:8899")
|
|
18
|
+
.option("--symbol <symbol>", "Token symbol to mint")
|
|
19
|
+
.option("--wallet <address>", "Wallet address to mint to")
|
|
20
|
+
.option("--amount <amount>", "Amount to mint")
|
|
21
|
+
.action(async (options) => {
|
|
22
|
+
try {
|
|
23
|
+
console.log(chalk.blue("🪙 Interactive Token Minting"));
|
|
24
|
+
console.log(chalk.gray("Mint tokens to any wallet address\n"));
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
// Check if solforge data exists
|
|
27
|
+
const workDir = ".solforge";
|
|
28
|
+
if (!existsSync(workDir)) {
|
|
29
|
+
console.error(
|
|
30
|
+
chalk.red("❌ No solforge data found. Run 'solforge start' first."),
|
|
31
|
+
);
|
|
32
|
+
process.exit(1);
|
|
33
|
+
}
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
// Load available tokens
|
|
36
|
+
const tokens = await loadAvailableTokens(workDir);
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
if (tokens.length === 0) {
|
|
39
|
+
console.error(
|
|
40
|
+
chalk.red(
|
|
41
|
+
"❌ No tokens found. Run 'solforge start' first to clone tokens.",
|
|
42
|
+
),
|
|
43
|
+
);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
47
|
+
// Display available tokens
|
|
48
|
+
console.log(chalk.cyan("📋 Available Tokens:"));
|
|
49
|
+
tokens.forEach((token, index) => {
|
|
50
|
+
console.log(
|
|
51
|
+
chalk.gray(
|
|
52
|
+
` ${index + 1}. ${token.config.symbol} (${
|
|
53
|
+
token.config.mainnetMint
|
|
54
|
+
})`,
|
|
55
|
+
),
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
console.log();
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
60
|
+
// Select token (or use provided symbol)
|
|
61
|
+
let selectedToken: ClonedToken;
|
|
62
|
+
if (options.symbol) {
|
|
63
|
+
const token = findTokenBySymbol(tokens, options.symbol);
|
|
64
|
+
if (!token) {
|
|
65
|
+
console.error(
|
|
66
|
+
chalk.red(`❌ Token ${options.symbol} not found in cloned tokens`),
|
|
67
|
+
);
|
|
68
|
+
process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
selectedToken = token;
|
|
71
|
+
console.log(
|
|
72
|
+
chalk.gray(`Selected token: ${selectedToken.config.symbol}`),
|
|
73
|
+
);
|
|
74
|
+
} else {
|
|
75
|
+
selectedToken = await select({
|
|
76
|
+
message: "Select a token to mint:",
|
|
77
|
+
choices: tokens.map((token) => ({
|
|
78
|
+
name: `${token.config.symbol} (${token.config.mainnetMint})`,
|
|
79
|
+
value: token,
|
|
80
|
+
})),
|
|
81
|
+
});
|
|
82
|
+
}
|
|
84
83
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
84
|
+
// Get recipient address (or use provided wallet)
|
|
85
|
+
let recipientAddress: string;
|
|
86
|
+
if (options.wallet) {
|
|
87
|
+
recipientAddress = options.wallet;
|
|
88
|
+
// Validate wallet address
|
|
89
|
+
try {
|
|
90
|
+
new PublicKey(recipientAddress);
|
|
91
|
+
} catch {
|
|
92
|
+
console.error(chalk.red("❌ Invalid wallet address"));
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
95
|
+
console.log(chalk.gray(`Recipient wallet: ${recipientAddress}`));
|
|
96
|
+
} else {
|
|
97
|
+
recipientAddress = await input({
|
|
98
|
+
message: "Enter recipient wallet address:",
|
|
99
|
+
validate: (value: string) => {
|
|
100
|
+
if (!value.trim()) {
|
|
101
|
+
return "Please enter a valid address";
|
|
102
|
+
}
|
|
103
|
+
try {
|
|
104
|
+
new PublicKey(value.trim());
|
|
105
|
+
return true;
|
|
106
|
+
} catch {
|
|
107
|
+
return "Please enter a valid Solana address";
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
}
|
|
113
112
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
113
|
+
// Get amount to mint (or use provided amount)
|
|
114
|
+
let amount: string;
|
|
115
|
+
if (options.amount) {
|
|
116
|
+
const num = parseFloat(options.amount);
|
|
117
|
+
if (Number.isNaN(num) || num <= 0) {
|
|
118
|
+
console.error(chalk.red("❌ Invalid amount"));
|
|
119
|
+
process.exit(1);
|
|
120
|
+
}
|
|
121
|
+
amount = options.amount;
|
|
122
|
+
console.log(chalk.gray(`Amount to mint: ${amount}`));
|
|
123
|
+
} else {
|
|
124
|
+
amount = await input({
|
|
125
|
+
message: "Enter amount to mint:",
|
|
126
|
+
validate: (value: string) => {
|
|
127
|
+
const num = parseFloat(value);
|
|
128
|
+
if (Number.isNaN(num) || num <= 0) {
|
|
129
|
+
return "Please enter a valid positive number";
|
|
130
|
+
}
|
|
131
|
+
return true;
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
}
|
|
136
135
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
// Confirm minting if interactive
|
|
137
|
+
if (!options.symbol || !options.wallet || !options.amount) {
|
|
138
|
+
const confirm = await input({
|
|
139
|
+
message: `Confirm minting ${amount} ${selectedToken.config.symbol} to ${recipientAddress}? (y/N):`,
|
|
140
|
+
default: "N",
|
|
141
|
+
});
|
|
143
142
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
143
|
+
if (confirm.toLowerCase() !== "y" && confirm.toLowerCase() !== "yes") {
|
|
144
|
+
console.log(chalk.yellow("Minting cancelled."));
|
|
145
|
+
process.exit(0);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
149
148
|
|
|
150
|
-
|
|
149
|
+
console.log(chalk.blue("🚀 Starting mint..."));
|
|
151
150
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
151
|
+
// Execute mint
|
|
152
|
+
await mintTokenToWallet(
|
|
153
|
+
selectedToken,
|
|
154
|
+
recipientAddress,
|
|
155
|
+
parseFloat(amount),
|
|
156
|
+
options.rpcUrl,
|
|
157
|
+
);
|
|
159
158
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
159
|
+
console.log(
|
|
160
|
+
chalk.green(
|
|
161
|
+
`✅ Successfully minted ${amount} ${selectedToken.config.symbol} to ${recipientAddress}`,
|
|
162
|
+
),
|
|
163
|
+
);
|
|
164
|
+
} catch (error) {
|
|
165
|
+
console.error(chalk.red(`❌ Mint failed: ${error}`));
|
|
166
|
+
process.exit(1);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
170
169
|
|
|
171
170
|
async function loadAvailableTokens(workDir: string): Promise<ClonedToken[]> {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
171
|
+
try {
|
|
172
|
+
// Load token config from sf.config.json
|
|
173
|
+
const configPath = "sf.config.json";
|
|
174
|
+
if (!existsSync(configPath)) {
|
|
175
|
+
throw new Error("sf.config.json not found in current directory");
|
|
176
|
+
}
|
|
178
177
|
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
const config = JSON.parse(readFileSync(configPath, "utf8"));
|
|
179
|
+
const tokenConfigs: TokenConfig[] = config.tokens || [];
|
|
181
180
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
181
|
+
// Use the shared token loader
|
|
182
|
+
return await loadClonedTokens(tokenConfigs, workDir);
|
|
183
|
+
} catch (error) {
|
|
184
|
+
throw new Error(`Failed to load tokens: ${error}`);
|
|
185
|
+
}
|
|
187
186
|
}
|
|
188
187
|
|
|
189
188
|
export async function mintTokenToWallet(
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
token: ClonedToken,
|
|
190
|
+
walletAddress: string,
|
|
191
|
+
amount: number,
|
|
192
|
+
rpcUrl: string,
|
|
194
193
|
): Promise<void> {
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
// Check if associated token account already exists (same pattern as token-cloner.ts)
|
|
195
|
+
console.log(chalk.gray(`🔍 Checking for existing token account...`));
|
|
197
196
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
197
|
+
const checkAccountsResult = await runCommand(
|
|
198
|
+
"spl-token",
|
|
199
|
+
["accounts", "--owner", walletAddress, "--url", rpcUrl, "--output", "json"],
|
|
200
|
+
{ silent: true },
|
|
201
|
+
);
|
|
203
202
|
|
|
204
|
-
|
|
203
|
+
let tokenAccountAddress = "";
|
|
205
204
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
205
|
+
if (checkAccountsResult.success && checkAccountsResult.stdout) {
|
|
206
|
+
try {
|
|
207
|
+
const accountsData = JSON.parse(checkAccountsResult.stdout);
|
|
209
208
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
209
|
+
// Look for existing token account for this mint
|
|
210
|
+
for (const account of accountsData.accounts || []) {
|
|
211
|
+
if (account.mint === token.config.mainnetMint) {
|
|
212
|
+
tokenAccountAddress = account.address;
|
|
213
|
+
console.log(
|
|
214
|
+
chalk.gray(
|
|
215
|
+
`ℹ️ Found existing token account: ${tokenAccountAddress}`,
|
|
216
|
+
),
|
|
217
|
+
);
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
} catch (_error) {
|
|
222
|
+
// No existing accounts found or parsing error, will create new account
|
|
223
|
+
}
|
|
224
|
+
}
|
|
226
225
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
226
|
+
if (!tokenAccountAddress) {
|
|
227
|
+
// Account doesn't exist, create it (same pattern as token-cloner.ts)
|
|
228
|
+
console.log(chalk.gray(`🔧 Creating token account...`));
|
|
230
229
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
230
|
+
const createAccountResult = await runCommand(
|
|
231
|
+
"spl-token",
|
|
232
|
+
[
|
|
233
|
+
"create-account",
|
|
234
|
+
token.config.mainnetMint,
|
|
235
|
+
"--owner",
|
|
236
|
+
walletAddress,
|
|
237
|
+
"--fee-payer",
|
|
238
|
+
token.mintAuthorityPath,
|
|
239
|
+
"--url",
|
|
240
|
+
rpcUrl,
|
|
241
|
+
],
|
|
242
|
+
{ silent: false },
|
|
243
|
+
);
|
|
245
244
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
245
|
+
if (!createAccountResult.success) {
|
|
246
|
+
throw new Error(
|
|
247
|
+
`Failed to create token account: ${createAccountResult.stderr}`,
|
|
248
|
+
);
|
|
249
|
+
}
|
|
251
250
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
251
|
+
// Extract token account address from create-account output
|
|
252
|
+
const match = createAccountResult.stdout.match(/Creating account (\S+)/);
|
|
253
|
+
tokenAccountAddress = match?.[1] || "";
|
|
255
254
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
255
|
+
if (!tokenAccountAddress) {
|
|
256
|
+
throw new Error(
|
|
257
|
+
"Failed to determine token account address from create-account output",
|
|
258
|
+
);
|
|
259
|
+
}
|
|
261
260
|
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
console.log(chalk.gray(`✅ Created token account: ${tokenAccountAddress}`));
|
|
262
|
+
}
|
|
264
263
|
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
// Now mint to the token account (same pattern as token-cloner.ts)
|
|
265
|
+
console.log(chalk.gray(`💰 Minting ${amount} tokens...`));
|
|
267
266
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
267
|
+
const result = await runCommand(
|
|
268
|
+
"spl-token",
|
|
269
|
+
[
|
|
270
|
+
"mint",
|
|
271
|
+
token.config.mainnetMint,
|
|
272
|
+
amount.toString(),
|
|
273
|
+
tokenAccountAddress,
|
|
274
|
+
"--mint-authority",
|
|
275
|
+
token.mintAuthorityPath,
|
|
276
|
+
"--fee-payer",
|
|
277
|
+
token.mintAuthorityPath,
|
|
278
|
+
"--url",
|
|
279
|
+
rpcUrl,
|
|
280
|
+
],
|
|
281
|
+
{ silent: false },
|
|
282
|
+
);
|
|
284
283
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
284
|
+
if (!result.success) {
|
|
285
|
+
throw new Error(`Failed to mint tokens: ${result.stderr}`);
|
|
286
|
+
}
|
|
288
287
|
}
|