solforge 0.1.7 â 0.2.0
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/.agi/agi.sqlite +0 -0
- package/.claude/settings.local.json +9 -0
- package/.github/workflows/release-binaries.yml +133 -0
- package/.tmp/.787ebcdbf7b8fde8-00000000.hm +0 -0
- package/.tmp/.bffe6efebdf8aedc-00000000.hm +0 -0
- package/AGENTS.md +271 -0
- package/CLAUDE.md +106 -0
- package/PROJECT_STRUCTURE.md +124 -0
- package/README.md +367 -393
- package/SOLANA_KIT_GUIDE.md +251 -0
- package/SOLFORGE.md +119 -0
- package/biome.json +34 -0
- package/bun.lock +743 -0
- package/docs/bun-single-file-executable.md +585 -0
- package/docs/cli-plan.md +154 -0
- package/docs/data-indexing-plan.md +214 -0
- package/docs/gui-roadmap.md +202 -0
- package/drizzle/0000_friendly_millenium_guard.sql +53 -0
- package/drizzle/0001_stale_sentinels.sql +2 -0
- package/drizzle/meta/0000_snapshot.json +329 -0
- package/drizzle/meta/0001_snapshot.json +345 -0
- package/drizzle/meta/_journal.json +20 -0
- package/drizzle.config.ts +12 -0
- package/index.ts +21 -0
- package/mint.sh +47 -0
- package/package.json +45 -69
- package/postcss.config.js +6 -0
- package/rpc-server.ts.backup +519 -0
- package/server/index.ts +5 -0
- package/server/lib/base58.ts +33 -0
- package/server/lib/faucet.ts +110 -0
- package/server/lib/spl-token.ts +57 -0
- package/server/methods/TEMPLATE.md +117 -0
- package/server/methods/account/get-account-info.ts +90 -0
- package/server/methods/account/get-balance.ts +27 -0
- package/server/methods/account/get-multiple-accounts.ts +83 -0
- package/server/methods/account/get-parsed-account-info.ts +21 -0
- package/server/methods/account/index.ts +12 -0
- package/server/methods/account/parsers/index.ts +52 -0
- package/server/methods/account/parsers/loader-upgradeable.ts +66 -0
- package/server/methods/account/parsers/spl-token.ts +237 -0
- package/server/methods/account/parsers/system.ts +4 -0
- package/server/methods/account/request-airdrop.ts +219 -0
- package/server/methods/admin/adopt-mint-authority.ts +94 -0
- package/server/methods/admin/clone-program-accounts.ts +55 -0
- package/server/methods/admin/clone-program.ts +152 -0
- package/server/methods/admin/clone-token-accounts.ts +117 -0
- package/server/methods/admin/clone-token-mint.ts +82 -0
- package/server/methods/admin/create-mint.ts +114 -0
- package/server/methods/admin/create-token-account.ts +137 -0
- package/server/methods/admin/helpers.ts +70 -0
- package/server/methods/admin/index.ts +10 -0
- package/server/methods/admin/list-mints.ts +21 -0
- package/server/methods/admin/load-program.ts +52 -0
- package/server/methods/admin/mint-to.ts +278 -0
- package/server/methods/block/get-block-height.ts +5 -0
- package/server/methods/block/get-block.ts +35 -0
- package/server/methods/block/get-blocks-with-limit.ts +23 -0
- package/server/methods/block/get-latest-blockhash.ts +12 -0
- package/server/methods/block/get-slot.ts +5 -0
- package/server/methods/block/index.ts +6 -0
- package/server/methods/block/is-blockhash-valid.ts +23 -0
- package/server/methods/epoch/get-cluster-nodes.ts +17 -0
- package/server/methods/epoch/get-epoch-info.ts +16 -0
- package/server/methods/epoch/get-epoch-schedule.ts +15 -0
- package/server/methods/epoch/get-highest-snapshot-slot.ts +9 -0
- package/server/methods/epoch/get-leader-schedule.ts +8 -0
- package/server/methods/epoch/get-max-retransmit-slot.ts +9 -0
- package/server/methods/epoch/get-max-shred-insert-slot.ts +9 -0
- package/server/methods/epoch/get-slot-leader.ts +6 -0
- package/server/methods/epoch/get-slot-leaders.ts +9 -0
- package/server/methods/epoch/get-stake-activation.ts +9 -0
- package/server/methods/epoch/get-stake-minimum-delegation.ts +9 -0
- package/server/methods/epoch/get-vote-accounts.ts +19 -0
- package/server/methods/epoch/index.ts +13 -0
- package/server/methods/epoch/minimum-ledger-slot.ts +5 -0
- package/server/methods/fee/get-fee-calculator-for-blockhash.ts +12 -0
- package/server/methods/fee/get-fee-for-message.ts +8 -0
- package/server/methods/fee/get-fee-rate-governor.ts +16 -0
- package/server/methods/fee/get-fees.ts +14 -0
- package/server/methods/fee/get-recent-prioritization-fees.ts +22 -0
- package/server/methods/fee/index.ts +5 -0
- package/server/methods/get-address-lookup-table.ts +31 -0
- package/server/methods/index.ts +265 -0
- package/server/methods/performance/get-recent-performance-samples.ts +25 -0
- package/server/methods/performance/get-transaction-count.ts +5 -0
- package/server/methods/performance/index.ts +2 -0
- package/server/methods/program/get-block-commitment.ts +9 -0
- package/server/methods/program/get-block-production.ts +14 -0
- package/server/methods/program/get-block-time.ts +21 -0
- package/server/methods/program/get-blocks.ts +11 -0
- package/server/methods/program/get-first-available-block.ts +9 -0
- package/server/methods/program/get-genesis-hash.ts +6 -0
- package/server/methods/program/get-identity.ts +6 -0
- package/server/methods/program/get-inflation-governor.ts +15 -0
- package/server/methods/program/get-inflation-rate.ts +10 -0
- package/server/methods/program/get-inflation-reward.ts +12 -0
- package/server/methods/program/get-largest-accounts.ts +8 -0
- package/server/methods/program/get-parsed-program-accounts.ts +12 -0
- package/server/methods/program/get-parsed-token-accounts-by-delegate.ts +12 -0
- package/server/methods/program/get-parsed-token-accounts-by-owner.ts +12 -0
- package/server/methods/program/get-program-accounts.ts +221 -0
- package/server/methods/program/get-supply.ts +13 -0
- package/server/methods/program/get-token-account-balance.ts +64 -0
- package/server/methods/program/get-token-accounts-by-delegate.ts +81 -0
- package/server/methods/program/get-token-accounts-by-owner.ts +390 -0
- package/server/methods/program/get-token-largest-accounts.ts +80 -0
- package/server/methods/program/get-token-supply.ts +38 -0
- package/server/methods/program/index.ts +21 -0
- package/server/methods/solforge/index.ts +155 -0
- package/server/methods/system/get-health.ts +5 -0
- package/server/methods/system/get-minimum-balance-for-rent-exemption.ts +13 -0
- package/server/methods/system/get-version.ts +9 -0
- package/server/methods/system/index.ts +3 -0
- package/server/methods/transaction/get-confirmed-transaction.ts +11 -0
- package/server/methods/transaction/get-parsed-transaction.ts +21 -0
- package/server/methods/transaction/get-signature-statuses.ts +72 -0
- package/server/methods/transaction/get-signatures-for-address.ts +45 -0
- package/server/methods/transaction/get-transaction.ts +428 -0
- package/server/methods/transaction/index.ts +7 -0
- package/server/methods/transaction/send-transaction.ts +232 -0
- package/server/methods/transaction/simulate-transaction.ts +56 -0
- package/server/rpc-server.ts +474 -0
- package/server/types.ts +74 -0
- package/server/ws-server.ts +171 -0
- package/sf.config.json +38 -0
- package/src/cli/bootstrap.ts +67 -0
- package/src/cli/commands/airdrop.ts +37 -0
- package/src/cli/commands/config.ts +39 -0
- package/src/cli/commands/mint.ts +187 -0
- package/src/cli/commands/program-clone.ts +124 -0
- package/src/cli/commands/program-load.ts +64 -0
- package/src/cli/commands/rpc-start.ts +46 -0
- package/src/cli/commands/token-adopt-authority.ts +37 -0
- package/src/cli/commands/token-clone.ts +113 -0
- package/src/cli/commands/token-create.ts +81 -0
- package/src/cli/main.ts +130 -0
- package/src/cli/run-solforge.ts +98 -0
- package/src/cli/setup-utils.ts +54 -0
- package/src/cli/setup-wizard.ts +256 -0
- package/src/cli/utils/args.ts +15 -0
- package/src/config/index.ts +130 -0
- package/src/db/index.ts +83 -0
- package/src/db/schema/accounts.ts +23 -0
- package/src/db/schema/address-signatures.ts +31 -0
- package/src/db/schema/index.ts +5 -0
- package/src/db/schema/meta-kv.ts +9 -0
- package/src/db/schema/transactions.ts +29 -0
- package/src/db/schema/tx-accounts.ts +33 -0
- package/src/db/tx-store.ts +229 -0
- package/src/gui/public/app.css +1 -0
- package/src/gui/public/index.html +19 -0
- package/src/gui/server.ts +297 -0
- package/src/gui/src/api.ts +127 -0
- package/src/gui/src/app.tsx +390 -0
- package/src/gui/src/components/airdrop-mint-form.tsx +216 -0
- package/src/gui/src/components/clone-program-modal.tsx +183 -0
- package/src/gui/src/components/clone-token-modal.tsx +211 -0
- package/src/gui/src/components/modal.tsx +127 -0
- package/src/gui/src/components/programs-panel.tsx +112 -0
- package/src/gui/src/components/status-panel.tsx +122 -0
- package/src/gui/src/components/tokens-panel.tsx +116 -0
- package/src/gui/src/hooks/use-interval.ts +17 -0
- package/src/gui/src/index.css +529 -0
- package/src/gui/src/main.tsx +17 -0
- package/src/migrations-bundled.ts +17 -0
- package/src/rpc/start.ts +44 -0
- package/tailwind.config.js +27 -0
- package/test-client.ts +120 -0
- package/tmp/inspect-html.ts +4 -0
- package/tmp/response-test.ts +5 -0
- package/tmp/test-html.ts +5 -0
- package/tmp/test-server.ts +13 -0
- package/tsconfig.json +24 -23
- package/LICENSE +0 -21
- package/scripts/postinstall.cjs +0 -103
- package/src/api-server-entry.ts +0 -109
- package/src/commands/add-program.ts +0 -337
- package/src/commands/init.ts +0 -122
- package/src/commands/list.ts +0 -136
- package/src/commands/mint.ts +0 -288
- package/src/commands/start.ts +0 -877
- package/src/commands/status.ts +0 -99
- package/src/commands/stop.ts +0 -406
- package/src/config/manager.ts +0 -157
- package/src/index.ts +0 -188
- package/src/services/api-server.ts +0 -485
- package/src/services/port-manager.ts +0 -177
- package/src/services/process-registry.ts +0 -154
- package/src/services/program-cloner.ts +0 -317
- package/src/services/token-cloner.ts +0 -809
- package/src/services/validator.ts +0 -295
- package/src/types/config.ts +0 -110
- package/src/utils/shell.ts +0 -110
- package/src/utils/token-loader.ts +0 -115
package/src/commands/mint.ts
DELETED
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import chalk from "chalk";
|
|
3
|
-
import { existsSync, readFileSync } from "fs";
|
|
4
|
-
import { join } from "path";
|
|
5
|
-
import { input, select } from "@inquirer/prompts";
|
|
6
|
-
import { runCommand } from "../utils/shell";
|
|
7
|
-
import { Keypair, PublicKey } from "@solana/web3.js";
|
|
8
|
-
import {
|
|
9
|
-
loadClonedTokens,
|
|
10
|
-
findTokenBySymbol,
|
|
11
|
-
type ClonedToken,
|
|
12
|
-
} from "../utils/token-loader.js";
|
|
13
|
-
import type { TokenConfig } from "../types/config.js";
|
|
14
|
-
|
|
15
|
-
export const mintCommand = new Command()
|
|
16
|
-
.name("mint")
|
|
17
|
-
.description("Interactively mint tokens to any wallet address")
|
|
18
|
-
.option("--rpc-url <url>", "RPC URL to use", "http://127.0.0.1:8899")
|
|
19
|
-
.option("--symbol <symbol>", "Token symbol to mint")
|
|
20
|
-
.option("--wallet <address>", "Wallet address to mint to")
|
|
21
|
-
.option("--amount <amount>", "Amount to mint")
|
|
22
|
-
.action(async (options) => {
|
|
23
|
-
try {
|
|
24
|
-
console.log(chalk.blue("đĒ Interactive Token Minting"));
|
|
25
|
-
console.log(chalk.gray("Mint tokens to any wallet address\n"));
|
|
26
|
-
|
|
27
|
-
// Check if solforge data exists
|
|
28
|
-
const workDir = ".solforge";
|
|
29
|
-
if (!existsSync(workDir)) {
|
|
30
|
-
console.error(
|
|
31
|
-
chalk.red("â No solforge data found. Run 'solforge start' first.")
|
|
32
|
-
);
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Load available tokens
|
|
37
|
-
const tokens = await loadAvailableTokens(workDir);
|
|
38
|
-
|
|
39
|
-
if (tokens.length === 0) {
|
|
40
|
-
console.error(
|
|
41
|
-
chalk.red(
|
|
42
|
-
"â No tokens found. Run 'solforge start' first to clone tokens."
|
|
43
|
-
)
|
|
44
|
-
);
|
|
45
|
-
process.exit(1);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Display available tokens
|
|
49
|
-
console.log(chalk.cyan("đ Available Tokens:"));
|
|
50
|
-
tokens.forEach((token, index) => {
|
|
51
|
-
console.log(
|
|
52
|
-
chalk.gray(
|
|
53
|
-
` ${index + 1}. ${token.config.symbol} (${
|
|
54
|
-
token.config.mainnetMint
|
|
55
|
-
})`
|
|
56
|
-
)
|
|
57
|
-
);
|
|
58
|
-
});
|
|
59
|
-
console.log();
|
|
60
|
-
|
|
61
|
-
// Select token (or use provided symbol)
|
|
62
|
-
let selectedToken: ClonedToken;
|
|
63
|
-
if (options.symbol) {
|
|
64
|
-
const token = findTokenBySymbol(tokens, options.symbol);
|
|
65
|
-
if (!token) {
|
|
66
|
-
console.error(
|
|
67
|
-
chalk.red(`â Token ${options.symbol} not found in cloned tokens`)
|
|
68
|
-
);
|
|
69
|
-
process.exit(1);
|
|
70
|
-
}
|
|
71
|
-
selectedToken = token;
|
|
72
|
-
console.log(
|
|
73
|
-
chalk.gray(`Selected token: ${selectedToken.config.symbol}`)
|
|
74
|
-
);
|
|
75
|
-
} else {
|
|
76
|
-
selectedToken = await select({
|
|
77
|
-
message: "Select a token to mint:",
|
|
78
|
-
choices: tokens.map((token) => ({
|
|
79
|
-
name: `${token.config.symbol} (${token.config.mainnetMint})`,
|
|
80
|
-
value: token,
|
|
81
|
-
})),
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Get recipient address (or use provided wallet)
|
|
86
|
-
let recipientAddress: string;
|
|
87
|
-
if (options.wallet) {
|
|
88
|
-
recipientAddress = options.wallet;
|
|
89
|
-
// Validate wallet address
|
|
90
|
-
try {
|
|
91
|
-
new PublicKey(recipientAddress);
|
|
92
|
-
} catch {
|
|
93
|
-
console.error(chalk.red("â Invalid wallet address"));
|
|
94
|
-
process.exit(1);
|
|
95
|
-
}
|
|
96
|
-
console.log(chalk.gray(`Recipient wallet: ${recipientAddress}`));
|
|
97
|
-
} else {
|
|
98
|
-
recipientAddress = await input({
|
|
99
|
-
message: "Enter recipient wallet address:",
|
|
100
|
-
validate: (value: string) => {
|
|
101
|
-
if (!value.trim()) {
|
|
102
|
-
return "Please enter a valid address";
|
|
103
|
-
}
|
|
104
|
-
try {
|
|
105
|
-
new PublicKey(value.trim());
|
|
106
|
-
return true;
|
|
107
|
-
} catch {
|
|
108
|
-
return "Please enter a valid Solana address";
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// Get amount to mint (or use provided amount)
|
|
115
|
-
let amount: string;
|
|
116
|
-
if (options.amount) {
|
|
117
|
-
const num = parseFloat(options.amount);
|
|
118
|
-
if (isNaN(num) || num <= 0) {
|
|
119
|
-
console.error(chalk.red("â Invalid amount"));
|
|
120
|
-
process.exit(1);
|
|
121
|
-
}
|
|
122
|
-
amount = options.amount;
|
|
123
|
-
console.log(chalk.gray(`Amount to mint: ${amount}`));
|
|
124
|
-
} else {
|
|
125
|
-
amount = await input({
|
|
126
|
-
message: "Enter amount to mint:",
|
|
127
|
-
validate: (value: string) => {
|
|
128
|
-
const num = parseFloat(value);
|
|
129
|
-
if (isNaN(num) || num <= 0) {
|
|
130
|
-
return "Please enter a valid positive number";
|
|
131
|
-
}
|
|
132
|
-
return true;
|
|
133
|
-
},
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// Confirm minting if interactive
|
|
138
|
-
if (!options.symbol || !options.wallet || !options.amount) {
|
|
139
|
-
const confirm = await input({
|
|
140
|
-
message: `Confirm minting ${amount} ${selectedToken.config.symbol} to ${recipientAddress}? (y/N):`,
|
|
141
|
-
default: "N",
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
if (confirm.toLowerCase() !== "y" && confirm.toLowerCase() !== "yes") {
|
|
145
|
-
console.log(chalk.yellow("Minting cancelled."));
|
|
146
|
-
process.exit(0);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
console.log(chalk.blue("đ Starting mint..."));
|
|
151
|
-
|
|
152
|
-
// Execute mint
|
|
153
|
-
await mintTokenToWallet(
|
|
154
|
-
selectedToken,
|
|
155
|
-
recipientAddress,
|
|
156
|
-
parseFloat(amount),
|
|
157
|
-
options.rpcUrl
|
|
158
|
-
);
|
|
159
|
-
|
|
160
|
-
console.log(
|
|
161
|
-
chalk.green(
|
|
162
|
-
`â
Successfully minted ${amount} ${selectedToken.config.symbol} to ${recipientAddress}`
|
|
163
|
-
)
|
|
164
|
-
);
|
|
165
|
-
} catch (error) {
|
|
166
|
-
console.error(chalk.red(`â Mint failed: ${error}`));
|
|
167
|
-
process.exit(1);
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
async function loadAvailableTokens(workDir: string): Promise<ClonedToken[]> {
|
|
172
|
-
try {
|
|
173
|
-
// Load token config from sf.config.json
|
|
174
|
-
const configPath = "sf.config.json";
|
|
175
|
-
if (!existsSync(configPath)) {
|
|
176
|
-
throw new Error("sf.config.json not found in current directory");
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
const config = JSON.parse(readFileSync(configPath, "utf8"));
|
|
180
|
-
const tokenConfigs: TokenConfig[] = config.tokens || [];
|
|
181
|
-
|
|
182
|
-
// Use the shared token loader
|
|
183
|
-
return await loadClonedTokens(tokenConfigs, workDir);
|
|
184
|
-
} catch (error) {
|
|
185
|
-
throw new Error(`Failed to load tokens: ${error}`);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export async function mintTokenToWallet(
|
|
190
|
-
token: ClonedToken,
|
|
191
|
-
walletAddress: string,
|
|
192
|
-
amount: number,
|
|
193
|
-
rpcUrl: string
|
|
194
|
-
): Promise<void> {
|
|
195
|
-
// Check if associated token account already exists (same pattern as token-cloner.ts)
|
|
196
|
-
console.log(chalk.gray(`đ Checking for existing token account...`));
|
|
197
|
-
|
|
198
|
-
const checkAccountsResult = await runCommand(
|
|
199
|
-
"spl-token",
|
|
200
|
-
["accounts", "--owner", walletAddress, "--url", rpcUrl, "--output", "json"],
|
|
201
|
-
{ silent: true }
|
|
202
|
-
);
|
|
203
|
-
|
|
204
|
-
let tokenAccountAddress = "";
|
|
205
|
-
|
|
206
|
-
if (checkAccountsResult.success && checkAccountsResult.stdout) {
|
|
207
|
-
try {
|
|
208
|
-
const accountsData = JSON.parse(checkAccountsResult.stdout);
|
|
209
|
-
|
|
210
|
-
// Look for existing token account for this mint
|
|
211
|
-
for (const account of accountsData.accounts || []) {
|
|
212
|
-
if (account.mint === token.config.mainnetMint) {
|
|
213
|
-
tokenAccountAddress = account.address;
|
|
214
|
-
console.log(
|
|
215
|
-
chalk.gray(
|
|
216
|
-
`âšī¸ Found existing token account: ${tokenAccountAddress}`
|
|
217
|
-
)
|
|
218
|
-
);
|
|
219
|
-
break;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
} catch (error) {
|
|
223
|
-
// No existing accounts found or parsing error, will create new account
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
if (!tokenAccountAddress) {
|
|
228
|
-
// Account doesn't exist, create it (same pattern as token-cloner.ts)
|
|
229
|
-
console.log(chalk.gray(`đ§ Creating token account...`));
|
|
230
|
-
|
|
231
|
-
const createAccountResult = await runCommand(
|
|
232
|
-
"spl-token",
|
|
233
|
-
[
|
|
234
|
-
"create-account",
|
|
235
|
-
token.config.mainnetMint,
|
|
236
|
-
"--owner",
|
|
237
|
-
walletAddress,
|
|
238
|
-
"--fee-payer",
|
|
239
|
-
token.mintAuthorityPath,
|
|
240
|
-
"--url",
|
|
241
|
-
rpcUrl,
|
|
242
|
-
],
|
|
243
|
-
{ silent: false }
|
|
244
|
-
);
|
|
245
|
-
|
|
246
|
-
if (!createAccountResult.success) {
|
|
247
|
-
throw new Error(
|
|
248
|
-
`Failed to create token account: ${createAccountResult.stderr}`
|
|
249
|
-
);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
// Extract token account address from create-account output
|
|
253
|
-
const match = createAccountResult.stdout.match(/Creating account (\S+)/);
|
|
254
|
-
tokenAccountAddress = match?.[1] || "";
|
|
255
|
-
|
|
256
|
-
if (!tokenAccountAddress) {
|
|
257
|
-
throw new Error(
|
|
258
|
-
"Failed to determine token account address from create-account output"
|
|
259
|
-
);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
console.log(chalk.gray(`â
Created token account: ${tokenAccountAddress}`));
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
// Now mint to the token account (same pattern as token-cloner.ts)
|
|
266
|
-
console.log(chalk.gray(`đ° Minting ${amount} tokens...`));
|
|
267
|
-
|
|
268
|
-
const result = await runCommand(
|
|
269
|
-
"spl-token",
|
|
270
|
-
[
|
|
271
|
-
"mint",
|
|
272
|
-
token.config.mainnetMint,
|
|
273
|
-
amount.toString(),
|
|
274
|
-
tokenAccountAddress,
|
|
275
|
-
"--mint-authority",
|
|
276
|
-
token.mintAuthorityPath,
|
|
277
|
-
"--fee-payer",
|
|
278
|
-
token.mintAuthorityPath,
|
|
279
|
-
"--url",
|
|
280
|
-
rpcUrl,
|
|
281
|
-
],
|
|
282
|
-
{ silent: false }
|
|
283
|
-
);
|
|
284
|
-
|
|
285
|
-
if (!result.success) {
|
|
286
|
-
throw new Error(`Failed to mint tokens: ${result.stderr}`);
|
|
287
|
-
}
|
|
288
|
-
}
|