solforge 0.2.12 → 0.2.14
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/package.json +1 -5
- package/start.cjs +19 -23
- package/docs/API.md +0 -379
- package/docs/CONFIGURATION.md +0 -407
- package/docs/bun-single-file-executable.md +0 -585
- package/docs/cli-plan.md +0 -154
- package/docs/data-indexing-plan.md +0 -214
- package/docs/gui-roadmap.md +0 -202
- package/scripts/decode-b58.ts +0 -10
- package/scripts/install.sh +0 -112
- package/server/index.ts +0 -5
- package/server/lib/base58.ts +0 -33
- package/server/lib/faucet.ts +0 -110
- package/server/lib/instruction-parser.ts +0 -328
- package/server/lib/parsers/spl-associated-token-account.ts +0 -50
- package/server/lib/parsers/spl-token.ts +0 -340
- package/server/lib/spl-token.ts +0 -57
- package/server/methods/TEMPLATE.md +0 -117
- package/server/methods/account/get-account-info.ts +0 -86
- package/server/methods/account/get-balance.ts +0 -23
- package/server/methods/account/get-multiple-accounts.ts +0 -84
- package/server/methods/account/get-parsed-account-info.ts +0 -17
- package/server/methods/account/index.ts +0 -12
- package/server/methods/account/parsers/index.ts +0 -52
- package/server/methods/account/parsers/loader-upgradeable.ts +0 -79
- package/server/methods/account/parsers/spl-token.ts +0 -256
- package/server/methods/account/parsers/system.ts +0 -4
- package/server/methods/account/request-airdrop.ts +0 -271
- package/server/methods/admin/adopt-mint-authority.ts +0 -94
- package/server/methods/admin/clone-program-accounts.ts +0 -55
- package/server/methods/admin/clone-program.ts +0 -152
- package/server/methods/admin/clone-token-accounts.ts +0 -117
- package/server/methods/admin/clone-token-mint.ts +0 -82
- package/server/methods/admin/create-mint.ts +0 -114
- package/server/methods/admin/create-token-account.ts +0 -137
- package/server/methods/admin/helpers.ts +0 -70
- package/server/methods/admin/index.ts +0 -10
- package/server/methods/admin/list-mints.ts +0 -21
- package/server/methods/admin/load-program.ts +0 -52
- package/server/methods/admin/mint-to.ts +0 -266
- package/server/methods/block/get-block-height.ts +0 -5
- package/server/methods/block/get-block.ts +0 -31
- package/server/methods/block/get-blocks-with-limit.ts +0 -19
- package/server/methods/block/get-latest-blockhash.ts +0 -12
- package/server/methods/block/get-slot.ts +0 -5
- package/server/methods/block/index.ts +0 -6
- package/server/methods/block/is-blockhash-valid.ts +0 -19
- package/server/methods/epoch/get-cluster-nodes.ts +0 -17
- package/server/methods/epoch/get-epoch-info.ts +0 -16
- package/server/methods/epoch/get-epoch-schedule.ts +0 -15
- package/server/methods/epoch/get-highest-snapshot-slot.ts +0 -9
- package/server/methods/epoch/get-leader-schedule.ts +0 -8
- package/server/methods/epoch/get-max-retransmit-slot.ts +0 -9
- package/server/methods/epoch/get-max-shred-insert-slot.ts +0 -9
- package/server/methods/epoch/get-slot-leader.ts +0 -6
- package/server/methods/epoch/get-slot-leaders.ts +0 -9
- package/server/methods/epoch/get-stake-activation.ts +0 -9
- package/server/methods/epoch/get-stake-minimum-delegation.ts +0 -9
- package/server/methods/epoch/get-vote-accounts.ts +0 -19
- package/server/methods/epoch/index.ts +0 -13
- package/server/methods/epoch/minimum-ledger-slot.ts +0 -5
- package/server/methods/fee/get-fee-calculator-for-blockhash.ts +0 -12
- package/server/methods/fee/get-fee-for-message.ts +0 -8
- package/server/methods/fee/get-fee-rate-governor.ts +0 -16
- package/server/methods/fee/get-fees.ts +0 -14
- package/server/methods/fee/get-recent-prioritization-fees.ts +0 -22
- package/server/methods/fee/index.ts +0 -5
- package/server/methods/get-address-lookup-table.ts +0 -27
- package/server/methods/index.ts +0 -265
- package/server/methods/performance/get-recent-performance-samples.ts +0 -25
- package/server/methods/performance/get-transaction-count.ts +0 -5
- package/server/methods/performance/index.ts +0 -2
- package/server/methods/program/get-block-commitment.ts +0 -9
- package/server/methods/program/get-block-production.ts +0 -14
- package/server/methods/program/get-block-time.ts +0 -21
- package/server/methods/program/get-blocks.ts +0 -11
- package/server/methods/program/get-first-available-block.ts +0 -9
- package/server/methods/program/get-genesis-hash.ts +0 -6
- package/server/methods/program/get-identity.ts +0 -6
- package/server/methods/program/get-inflation-governor.ts +0 -15
- package/server/methods/program/get-inflation-rate.ts +0 -10
- package/server/methods/program/get-inflation-reward.ts +0 -12
- package/server/methods/program/get-largest-accounts.ts +0 -8
- package/server/methods/program/get-parsed-program-accounts.ts +0 -12
- package/server/methods/program/get-parsed-token-accounts-by-delegate.ts +0 -12
- package/server/methods/program/get-parsed-token-accounts-by-owner.ts +0 -12
- package/server/methods/program/get-program-accounts.ts +0 -221
- package/server/methods/program/get-supply.ts +0 -13
- package/server/methods/program/get-token-account-balance.ts +0 -60
- package/server/methods/program/get-token-accounts-by-delegate.ts +0 -82
- package/server/methods/program/get-token-accounts-by-owner.ts +0 -416
- package/server/methods/program/get-token-largest-accounts.ts +0 -81
- package/server/methods/program/get-token-supply.ts +0 -39
- package/server/methods/program/index.ts +0 -21
- package/server/methods/solforge/index.ts +0 -158
- package/server/methods/system/get-health.ts +0 -5
- package/server/methods/system/get-minimum-balance-for-rent-exemption.ts +0 -13
- package/server/methods/system/get-version.ts +0 -9
- package/server/methods/system/index.ts +0 -3
- package/server/methods/transaction/get-confirmed-transaction.ts +0 -11
- package/server/methods/transaction/get-parsed-transaction.ts +0 -17
- package/server/methods/transaction/get-signature-statuses.ts +0 -79
- package/server/methods/transaction/get-signatures-for-address.ts +0 -41
- package/server/methods/transaction/get-transaction.ts +0 -639
- package/server/methods/transaction/index.ts +0 -7
- package/server/methods/transaction/inner-instructions.test.ts +0 -104
- package/server/methods/transaction/send-transaction.ts +0 -469
- package/server/methods/transaction/simulate-transaction.ts +0 -57
- package/server/rpc-server.ts +0 -521
- package/server/types.ts +0 -109
- package/server/ws-server.ts +0 -178
- package/src/api-server-entry.ts +0 -109
- package/src/cli/bootstrap.ts +0 -67
- package/src/cli/commands/airdrop.ts +0 -37
- package/src/cli/commands/config.ts +0 -39
- package/src/cli/commands/mint.ts +0 -187
- package/src/cli/commands/program-clone.ts +0 -122
- package/src/cli/commands/program-load.ts +0 -64
- package/src/cli/commands/rpc-start.ts +0 -49
- package/src/cli/commands/token-adopt-authority.ts +0 -37
- package/src/cli/commands/token-clone.ts +0 -112
- package/src/cli/commands/token-create.ts +0 -81
- package/src/cli/main.ts +0 -158
- package/src/cli/run-solforge.ts +0 -112
- package/src/cli/setup-utils.ts +0 -54
- package/src/cli/setup-wizard.ts +0 -258
- package/src/cli/utils/args.ts +0 -15
- package/src/commands/add-program.ts +0 -333
- package/src/commands/init.ts +0 -122
- package/src/commands/list.ts +0 -136
- package/src/commands/mint.ts +0 -287
- package/src/commands/start.ts +0 -881
- package/src/commands/status.ts +0 -99
- package/src/commands/stop.ts +0 -405
- package/src/config/index.ts +0 -146
- package/src/config/manager.ts +0 -157
- package/src/db/index.ts +0 -83
- package/src/db/schema/accounts.ts +0 -23
- package/src/db/schema/address-signatures.ts +0 -31
- package/src/db/schema/index.ts +0 -6
- package/src/db/schema/meta-kv.ts +0 -9
- package/src/db/schema/transactions.ts +0 -36
- package/src/db/schema/tx-account-states.ts +0 -23
- package/src/db/schema/tx-accounts.ts +0 -33
- package/src/db/tx-store.ts +0 -264
- package/src/gui/public/app.css +0 -1556
- package/src/gui/public/build/main.css +0 -1569
- package/src/gui/public/build/main.js +0 -303
- package/src/gui/public/build/main.js.txt +0 -231
- package/src/gui/public/index.html +0 -19
- package/src/gui/server.ts +0 -296
- package/src/gui/src/api.ts +0 -127
- package/src/gui/src/app.tsx +0 -441
- package/src/gui/src/components/airdrop-mint-form.tsx +0 -246
- package/src/gui/src/components/clone-program-modal.tsx +0 -202
- package/src/gui/src/components/clone-token-modal.tsx +0 -230
- package/src/gui/src/components/modal.tsx +0 -134
- package/src/gui/src/components/programs-panel.tsx +0 -124
- package/src/gui/src/components/status-panel.tsx +0 -136
- package/src/gui/src/components/tokens-panel.tsx +0 -122
- package/src/gui/src/hooks/use-interval.ts +0 -17
- package/src/gui/src/index.css +0 -557
- package/src/gui/src/main.tsx +0 -17
- package/src/index.ts +0 -216
- package/src/migrations-bundled.ts +0 -23
- package/src/rpc/start.ts +0 -44
- package/src/services/api-server.ts +0 -504
- package/src/services/port-manager.ts +0 -174
- package/src/services/process-registry.ts +0 -153
- package/src/services/program-cloner.ts +0 -317
- package/src/services/token-cloner.ts +0 -811
- package/src/services/validator.ts +0 -293
- package/src/types/config.ts +0 -110
- package/src/utils/shell.ts +0 -110
- package/src/utils/token-loader.ts +0 -115
package/docs/CONFIGURATION.md
DELETED
|
@@ -1,407 +0,0 @@
|
|
|
1
|
-
# Configuration Guide
|
|
2
|
-
|
|
3
|
-
This guide covers all configuration options available in SolForge's `sf.config.json` file.
|
|
4
|
-
|
|
5
|
-
## Configuration File Structure
|
|
6
|
-
|
|
7
|
-
```json
|
|
8
|
-
{
|
|
9
|
-
"name": "string",
|
|
10
|
-
"description": "string (optional)",
|
|
11
|
-
"tokens": [
|
|
12
|
-
/* TokenConfig[] */
|
|
13
|
-
],
|
|
14
|
-
"programs": [
|
|
15
|
-
/* ProgramConfig[] */
|
|
16
|
-
],
|
|
17
|
-
"localnet": {
|
|
18
|
-
/* LocalnetConfig */
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Root Configuration
|
|
24
|
-
|
|
25
|
-
### `name` (required)
|
|
26
|
-
|
|
27
|
-
- **Type**: `string`
|
|
28
|
-
- **Default**: `"solforge-localnet"`
|
|
29
|
-
- **Description**: Name identifier for your localnet configuration
|
|
30
|
-
|
|
31
|
-
### `description` (optional)
|
|
32
|
-
|
|
33
|
-
- **Type**: `string`
|
|
34
|
-
- **Description**: Human-readable description of your setup
|
|
35
|
-
|
|
36
|
-
### `tokens` (optional)
|
|
37
|
-
|
|
38
|
-
- **Type**: `TokenConfig[]`
|
|
39
|
-
- **Default**: `[]`
|
|
40
|
-
- **Description**: Array of tokens to clone from mainnet
|
|
41
|
-
|
|
42
|
-
### `programs` (optional)
|
|
43
|
-
|
|
44
|
-
- **Type**: `ProgramConfig[]`
|
|
45
|
-
- **Default**: `[]`
|
|
46
|
-
- **Description**: Array of programs to clone from mainnet
|
|
47
|
-
|
|
48
|
-
### `localnet` (optional)
|
|
49
|
-
|
|
50
|
-
- **Type**: `LocalnetConfig`
|
|
51
|
-
- **Description**: Validator configuration options
|
|
52
|
-
|
|
53
|
-
## Token Configuration (`TokenConfig`)
|
|
54
|
-
|
|
55
|
-
### `symbol` (required)
|
|
56
|
-
|
|
57
|
-
- **Type**: `string`
|
|
58
|
-
- **Description**: Token symbol (e.g., "USDC", "SOL")
|
|
59
|
-
- **Example**: `"USDC"`
|
|
60
|
-
|
|
61
|
-
### `mainnetMint` (required)
|
|
62
|
-
|
|
63
|
-
- **Type**: `string`
|
|
64
|
-
- **Description**: Mainnet mint address to clone
|
|
65
|
-
- **Example**: `"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"`
|
|
66
|
-
|
|
67
|
-
### `mintAuthority` (optional)
|
|
68
|
-
|
|
69
|
-
- **Type**: `string`
|
|
70
|
-
- **Description**: Path to keypair file for mint authority
|
|
71
|
-
- **Example**: `"./keypairs/mint-authority.json"`
|
|
72
|
-
- **Note**: If not provided, a new keypair will be generated
|
|
73
|
-
|
|
74
|
-
### `mintAmount` (optional)
|
|
75
|
-
|
|
76
|
-
- **Type**: `number`
|
|
77
|
-
- **Default**: `1000000`
|
|
78
|
-
- **Description**: Amount to mint to the mint authority
|
|
79
|
-
- **Note**: Amount is in token's base units (considering decimals)
|
|
80
|
-
|
|
81
|
-
### `cloneMetadata` (optional)
|
|
82
|
-
|
|
83
|
-
- **Type**: `boolean`
|
|
84
|
-
- **Default**: `true`
|
|
85
|
-
- **Description**: Whether to clone token metadata from mainnet
|
|
86
|
-
|
|
87
|
-
### `recipients` (optional)
|
|
88
|
-
|
|
89
|
-
- **Type**: `RecipientConfig[]`
|
|
90
|
-
- **Default**: `[]`
|
|
91
|
-
- **Description**: List of wallets to receive tokens after minting
|
|
92
|
-
|
|
93
|
-
#### `RecipientConfig`
|
|
94
|
-
|
|
95
|
-
```json
|
|
96
|
-
{
|
|
97
|
-
"wallet": "string (required)",
|
|
98
|
-
"amount": "number (required)"
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
- `wallet`: Public key of recipient wallet
|
|
103
|
-
- `amount`: Amount to transfer (in token's base units)
|
|
104
|
-
|
|
105
|
-
### Example Token Configuration
|
|
106
|
-
|
|
107
|
-
```json
|
|
108
|
-
{
|
|
109
|
-
"symbol": "USDC",
|
|
110
|
-
"mainnetMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
111
|
-
"mintAuthority": "./keypairs/usdc-mint.json",
|
|
112
|
-
"mintAmount": 10000000000,
|
|
113
|
-
"cloneMetadata": true,
|
|
114
|
-
"recipients": [
|
|
115
|
-
{
|
|
116
|
-
"wallet": "YourWalletPublicKeyHere",
|
|
117
|
-
"amount": 1000000000
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"wallet": "AnotherWalletPublicKeyHere",
|
|
121
|
-
"amount": 500000000
|
|
122
|
-
}
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## Program Configuration (`ProgramConfig`)
|
|
128
|
-
|
|
129
|
-
### `name` (optional)
|
|
130
|
-
|
|
131
|
-
- **Type**: `string`
|
|
132
|
-
- **Description**: Friendly name for the program
|
|
133
|
-
- **Example**: `"Jupiter Aggregator"`
|
|
134
|
-
|
|
135
|
-
### `mainnetProgramId` (required)
|
|
136
|
-
|
|
137
|
-
- **Type**: `string`
|
|
138
|
-
- **Description**: Mainnet program ID to clone
|
|
139
|
-
- **Example**: `"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"`
|
|
140
|
-
|
|
141
|
-
### `deployPath` (optional)
|
|
142
|
-
|
|
143
|
-
- **Type**: `string`
|
|
144
|
-
- **Description**: Path to local .so file to deploy instead of cloning
|
|
145
|
-
- **Example**: `"./target/deploy/my_program.so"`
|
|
146
|
-
|
|
147
|
-
### `upgradeable` (optional)
|
|
148
|
-
|
|
149
|
-
- **Type**: `boolean`
|
|
150
|
-
- **Default**: `false`
|
|
151
|
-
- **Description**: Whether the program should be deployed as upgradeable
|
|
152
|
-
|
|
153
|
-
### `cluster` (optional)
|
|
154
|
-
|
|
155
|
-
- **Type**: `"mainnet-beta" | "devnet" | "testnet"`
|
|
156
|
-
- **Default**: `"mainnet-beta"`
|
|
157
|
-
- **Description**: Source cluster to clone the program from
|
|
158
|
-
|
|
159
|
-
### `dependencies` (optional)
|
|
160
|
-
|
|
161
|
-
- **Type**: `string[]`
|
|
162
|
-
- **Default**: `[]`
|
|
163
|
-
- **Description**: Array of program IDs this program depends on
|
|
164
|
-
- **Note**: Dependencies will be deployed before this program
|
|
165
|
-
|
|
166
|
-
### Example Program Configuration
|
|
167
|
-
|
|
168
|
-
```json
|
|
169
|
-
{
|
|
170
|
-
"name": "Jupiter Aggregator",
|
|
171
|
-
"mainnetProgramId": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4",
|
|
172
|
-
"cluster": "mainnet-beta",
|
|
173
|
-
"upgradeable": false,
|
|
174
|
-
"dependencies": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"]
|
|
175
|
-
}
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
## Localnet Configuration (`LocalnetConfig`)
|
|
179
|
-
|
|
180
|
-
### `airdropAmount` (optional)
|
|
181
|
-
|
|
182
|
-
- **Type**: `number`
|
|
183
|
-
- **Default**: `100`
|
|
184
|
-
- **Description**: SOL amount for initial airdrops
|
|
185
|
-
- **Unit**: SOL
|
|
186
|
-
|
|
187
|
-
### `faucetAccounts` (optional)
|
|
188
|
-
|
|
189
|
-
- **Type**: `string[]`
|
|
190
|
-
- **Default**: `[]`
|
|
191
|
-
- **Description**: Public keys to receive initial SOL airdrops
|
|
192
|
-
|
|
193
|
-
### `port` (optional)
|
|
194
|
-
|
|
195
|
-
- **Type**: `number`
|
|
196
|
-
- **Default**: `8899`
|
|
197
|
-
- **Range**: `1000-65535`
|
|
198
|
-
- **Description**: RPC port for the validator
|
|
199
|
-
|
|
200
|
-
### `faucetPort` (optional)
|
|
201
|
-
|
|
202
|
-
- **Type**: `number`
|
|
203
|
-
- **Default**: `9900`
|
|
204
|
-
- **Range**: `1000-65535`
|
|
205
|
-
- **Description**: Faucet port for the validator
|
|
206
|
-
|
|
207
|
-
### `reset` (optional)
|
|
208
|
-
|
|
209
|
-
- **Type**: `boolean`
|
|
210
|
-
- **Default**: `false`
|
|
211
|
-
- **Description**: Whether to reset the ledger on startup
|
|
212
|
-
|
|
213
|
-
### `logLevel` (optional)
|
|
214
|
-
|
|
215
|
-
- **Type**: `"trace" | "debug" | "info" | "warn" | "error"`
|
|
216
|
-
- **Default**: `"info"`
|
|
217
|
-
- **Description**: Validator log level
|
|
218
|
-
|
|
219
|
-
### `quiet` (optional)
|
|
220
|
-
|
|
221
|
-
- **Type**: `boolean`
|
|
222
|
-
- **Default**: `false`
|
|
223
|
-
- **Description**: Suppress validator output
|
|
224
|
-
|
|
225
|
-
### `ledgerPath` (optional)
|
|
226
|
-
|
|
227
|
-
- **Type**: `string`
|
|
228
|
-
- **Description**: Custom path for ledger data
|
|
229
|
-
- **Note**: If not specified, uses default location
|
|
230
|
-
|
|
231
|
-
### `bindAddress` (optional)
|
|
232
|
-
|
|
233
|
-
- **Type**: `string`
|
|
234
|
-
- **Default**: `"127.0.0.1"`
|
|
235
|
-
- **Description**: IP address to bind the validator to
|
|
236
|
-
|
|
237
|
-
### `limitLedgerSize` (optional)
|
|
238
|
-
|
|
239
|
-
- **Type**: `number`
|
|
240
|
-
- **Default**: `100000`
|
|
241
|
-
- **Description**: Maximum ledger size in slots
|
|
242
|
-
|
|
243
|
-
### `rpc` (optional)
|
|
244
|
-
|
|
245
|
-
- **Type**: `string` (URL)
|
|
246
|
-
- **Default**: `"https://api.mainnet-beta.solana.com"`
|
|
247
|
-
- **Description**: RPC URL for cloning data from mainnet
|
|
248
|
-
|
|
249
|
-
### Example Localnet Configuration
|
|
250
|
-
|
|
251
|
-
```json
|
|
252
|
-
{
|
|
253
|
-
"airdropAmount": 1000,
|
|
254
|
-
"faucetAccounts": ["YourWalletPublicKeyHere", "AnotherWalletPublicKeyHere"],
|
|
255
|
-
"port": 8899,
|
|
256
|
-
"faucetPort": 9900,
|
|
257
|
-
"reset": false,
|
|
258
|
-
"logLevel": "debug",
|
|
259
|
-
"quiet": false,
|
|
260
|
-
"bindAddress": "0.0.0.0",
|
|
261
|
-
"limitLedgerSize": 50000,
|
|
262
|
-
"rpc": "https://mainnet.helius-rpc.com/?api-key=your-key"
|
|
263
|
-
}
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
## Complete Example Configuration
|
|
267
|
-
|
|
268
|
-
```json
|
|
269
|
-
{
|
|
270
|
-
"name": "defi-development",
|
|
271
|
-
"description": "DeFi development environment with popular tokens and DEX programs",
|
|
272
|
-
"tokens": [
|
|
273
|
-
{
|
|
274
|
-
"symbol": "USDC",
|
|
275
|
-
"mainnetMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
276
|
-
"mintAmount": 10000000000,
|
|
277
|
-
"cloneMetadata": true,
|
|
278
|
-
"recipients": [
|
|
279
|
-
{
|
|
280
|
-
"wallet": "YourWalletPublicKeyHere",
|
|
281
|
-
"amount": 1000000000
|
|
282
|
-
}
|
|
283
|
-
]
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
"symbol": "USDT",
|
|
287
|
-
"mainnetMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
|
|
288
|
-
"mintAmount": 10000000000,
|
|
289
|
-
"cloneMetadata": true,
|
|
290
|
-
"recipients": [
|
|
291
|
-
{
|
|
292
|
-
"wallet": "YourWalletPublicKeyHere",
|
|
293
|
-
"amount": 1000000000
|
|
294
|
-
}
|
|
295
|
-
]
|
|
296
|
-
}
|
|
297
|
-
],
|
|
298
|
-
"programs": [
|
|
299
|
-
{
|
|
300
|
-
"name": "Jupiter Aggregator",
|
|
301
|
-
"mainnetProgramId": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4",
|
|
302
|
-
"cluster": "mainnet-beta"
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
"name": "Orca",
|
|
306
|
-
"mainnetProgramId": "9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP",
|
|
307
|
-
"cluster": "mainnet-beta"
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
"name": "Token Metadata",
|
|
311
|
-
"mainnetProgramId": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",
|
|
312
|
-
"cluster": "mainnet-beta"
|
|
313
|
-
}
|
|
314
|
-
],
|
|
315
|
-
"localnet": {
|
|
316
|
-
"airdropAmount": 1000,
|
|
317
|
-
"faucetAccounts": ["YourWalletPublicKeyHere"],
|
|
318
|
-
"port": 8899,
|
|
319
|
-
"faucetPort": 9900,
|
|
320
|
-
"reset": false,
|
|
321
|
-
"logLevel": "info",
|
|
322
|
-
"bindAddress": "127.0.0.1",
|
|
323
|
-
"limitLedgerSize": 100000,
|
|
324
|
-
"rpc": "https://api.mainnet-beta.solana.com"
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
## Configuration Validation
|
|
330
|
-
|
|
331
|
-
SolForge validates your configuration file using Zod schemas. Common validation errors:
|
|
332
|
-
|
|
333
|
-
### Invalid Token Configuration
|
|
334
|
-
|
|
335
|
-
```
|
|
336
|
-
❌ Token symbol is required
|
|
337
|
-
❌ Mainnet mint address is required
|
|
338
|
-
❌ Mint amount must be positive
|
|
339
|
-
❌ Wallet address is required for recipients
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
### Invalid Program Configuration
|
|
343
|
-
|
|
344
|
-
```
|
|
345
|
-
❌ Program ID is required
|
|
346
|
-
❌ Invalid cluster (must be mainnet-beta, devnet, or testnet)
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
### Invalid Localnet Configuration
|
|
350
|
-
|
|
351
|
-
```
|
|
352
|
-
❌ Port must be between 1000 and 65535
|
|
353
|
-
❌ RPC must be a valid URL
|
|
354
|
-
❌ Log level must be one of: trace, debug, info, warn, error
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
## Best Practices
|
|
358
|
-
|
|
359
|
-
1. **Use descriptive names**: Make your configuration name and description clear
|
|
360
|
-
2. **Start small**: Begin with a few tokens/programs and add more as needed
|
|
361
|
-
3. **Use custom RPC**: Consider using a dedicated RPC endpoint for better performance
|
|
362
|
-
4. **Manage keypairs**: Store mint authority keypairs securely
|
|
363
|
-
5. **Port management**: Use different ports for multiple environments
|
|
364
|
-
6. **Reset wisely**: Use `reset: true` for clean starts, `false` for persistent data
|
|
365
|
-
7. **Log levels**: Use `debug` for development, `info` for production
|
|
366
|
-
|
|
367
|
-
## Environment-Specific Configurations
|
|
368
|
-
|
|
369
|
-
### Development Environment
|
|
370
|
-
|
|
371
|
-
```json
|
|
372
|
-
{
|
|
373
|
-
"name": "dev-environment",
|
|
374
|
-
"localnet": {
|
|
375
|
-
"reset": true,
|
|
376
|
-
"logLevel": "debug",
|
|
377
|
-
"airdropAmount": 1000
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
### Testing Environment
|
|
383
|
-
|
|
384
|
-
```json
|
|
385
|
-
{
|
|
386
|
-
"name": "test-environment",
|
|
387
|
-
"localnet": {
|
|
388
|
-
"reset": false,
|
|
389
|
-
"logLevel": "warn",
|
|
390
|
-
"quiet": true
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
### Production-like Environment
|
|
396
|
-
|
|
397
|
-
```json
|
|
398
|
-
{
|
|
399
|
-
"name": "prod-like-environment",
|
|
400
|
-
"localnet": {
|
|
401
|
-
"reset": false,
|
|
402
|
-
"logLevel": "error",
|
|
403
|
-
"limitLedgerSize": 1000000,
|
|
404
|
-
"rpc": "https://your-premium-rpc-endpoint.com"
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
```
|