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/README.md
CHANGED
|
@@ -1,90 +1,482 @@
|
|
|
1
|
-
# SolForge
|
|
1
|
+
# 🔥 SolForge
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Lightning-fast Solana localnet for developers** ⚡
|
|
4
|
+
> Drop-in replacement for `solana-test-validator` with sub-second startup and minimal memory footprint.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
|
|
8
|
-
- Unlimited faucet airdrops, simple persistence, WS subscriptions
|
|
9
|
-
- 90+ JSON‑RPC methods implemented (common dev flows covered)
|
|
10
|
-
- Built‑in GUI: airdrops, SPL mints, quick status
|
|
6
|
+
[](https://github.com/nitishxyz/solforge)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
[](https://github.com/litesvm/litesvm)
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
- One‑liner: curl -fsSL https://install.solforge.sh | sh
|
|
14
|
-
- Manual: download a release binary from GitHub and put it on PATH
|
|
10
|
+
## ✨ Features
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
- GUI
|
|
12
|
+
- **⚡ Blazing Fast**: Sub-second startup, ~50MB memory (vs 500MB+ for test-validator)
|
|
13
|
+
- **🔌 Drop-in Compatible**: Works with Solana CLI, Anchor, web3.js, and @solana/kit
|
|
14
|
+
- **💰 Unlimited Airdrops**: Built-in faucet with no rate limits
|
|
15
|
+
- **🎨 Web GUI**: Interactive dashboard for airdrops, minting, and monitoring
|
|
16
|
+
- **📦 Program Cloning**: Import programs and accounts from mainnet
|
|
17
|
+
- **🔄 WebSocket Support**: Real-time transaction subscriptions (in the works)
|
|
18
|
+
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
- Help: `solforge --help`
|
|
23
|
-
- Version: `solforge --version`
|
|
20
|
+
## 🚀 Quick Install
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
- `start` / `rpc start`: Start RPC (and WS, GUI)
|
|
27
|
-
- `config init|get|set`: Manage `sf.config.json`
|
|
28
|
-
- `airdrop --to <pubkey> --sol <amount>`: Faucet airdrop
|
|
29
|
-
- `mint`: Interactive SPL minting helper
|
|
30
|
-
- `token clone|create|adopt-authority`: SPL token tools
|
|
31
|
-
- `program clone|load|accounts clone`: Program + account helpers
|
|
22
|
+
### One-Liner Install (Recommended)
|
|
32
23
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
```bash
|
|
25
|
+
curl -fsSL https://install.solforge.sh | sh
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Manual Install
|
|
29
|
+
|
|
30
|
+
Download the latest binary from [GitHub Releases](https://github.com/nitishxyz/solforge/releases) and add to your PATH.
|
|
31
|
+
|
|
32
|
+
### NPM/Bun Install
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Using npm
|
|
36
|
+
npm install -g solforge
|
|
37
|
+
|
|
38
|
+
# Using bun
|
|
39
|
+
bun install -g solforge
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## 🎯 Quick Start
|
|
43
|
+
|
|
44
|
+
### 1️⃣ Start the Localnet
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
solforge
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
This starts:
|
|
51
|
+
|
|
52
|
+
- 🌐 **RPC Server**: `http://127.0.0.1:8899`
|
|
53
|
+
- 📡 **WebSocket**: `ws://127.0.0.1:8900`
|
|
54
|
+
- 🎨 **Web GUI**: `http://127.0.0.1:42069`
|
|
55
|
+
|
|
56
|
+
### 2️⃣ Configure Solana CLI
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
solana config set -u http://127.0.0.1:8899
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 3️⃣ Get Some SOL
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Using Solana CLI
|
|
66
|
+
solana airdrop 1000
|
|
67
|
+
|
|
68
|
+
# Using SolForge CLI
|
|
69
|
+
solforge airdrop --to <PUBKEY> --sol 100
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 📚 Command Reference
|
|
73
|
+
|
|
74
|
+
### 🔧 Server Commands
|
|
75
|
+
|
|
76
|
+
#### Start Server
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Basic start
|
|
80
|
+
solforge start
|
|
81
|
+
|
|
82
|
+
# Custom ports
|
|
83
|
+
solforge start --port 8899 --ws-port 8900
|
|
84
|
+
|
|
85
|
+
# Bind to 0.0.0.0 for LAN access
|
|
86
|
+
solforge start --network
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 💰 Airdrop Commands
|
|
90
|
+
|
|
91
|
+
#### Send SOL
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Airdrop to specific address
|
|
95
|
+
solforge airdrop --to <PUBKEY> --sol 100
|
|
96
|
+
|
|
97
|
+
# Interactive mode
|
|
98
|
+
solforge airdrop
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### 🪙 Token Commands
|
|
102
|
+
|
|
103
|
+
#### Create Token
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Interactive token creation
|
|
107
|
+
solforge mint
|
|
108
|
+
|
|
109
|
+
# Create new token
|
|
110
|
+
solforge token create --decimals 9 --supply 1000000
|
|
111
|
+
|
|
112
|
+
# Clone from mainnet
|
|
113
|
+
solforge token clone <MINT_ADDRESS>
|
|
114
|
+
|
|
115
|
+
# Adopt mint authority
|
|
116
|
+
solforge token adopt-authority <MINT_ADDRESS>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 📦 Program Commands
|
|
120
|
+
|
|
121
|
+
#### Clone Program
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Clone program from mainnet
|
|
125
|
+
solforge program clone <PROGRAM_ID>
|
|
126
|
+
|
|
127
|
+
# Clone with accounts
|
|
128
|
+
solforge program clone <PROGRAM_ID> --with-accounts
|
|
129
|
+
|
|
130
|
+
# Clone specific accounts
|
|
131
|
+
solforge program accounts clone <PROGRAM_ID> --limit 100
|
|
132
|
+
|
|
133
|
+
# Load local program
|
|
134
|
+
solforge program load --file ./program.so --id <PROGRAM_ID>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### ⚙️ Configuration Commands
|
|
138
|
+
|
|
139
|
+
#### Initialize Config
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Create default config
|
|
143
|
+
solforge config init
|
|
144
|
+
|
|
145
|
+
# Get config value
|
|
146
|
+
solforge config get server.rpcPort
|
|
147
|
+
|
|
148
|
+
# Set config value
|
|
149
|
+
solforge config set server.rpcPort 9999
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## 📝 Configuration File
|
|
153
|
+
|
|
154
|
+
Create `sf.config.json` in your project root:
|
|
155
|
+
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"server": {
|
|
159
|
+
"rpcPort": 8899,
|
|
160
|
+
"wsPort": 8900,
|
|
161
|
+
},
|
|
162
|
+
"svm": {
|
|
163
|
+
"initialLamports": "1000000000000000",
|
|
164
|
+
"faucetSOL": 1000
|
|
165
|
+
},
|
|
166
|
+
"clone": {
|
|
167
|
+
"endpoint": "https://api.mainnet-beta.solana.com",
|
|
168
|
+
"programs": [
|
|
169
|
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
|
|
170
|
+
"11111111111111111111111111111111"
|
|
171
|
+
],
|
|
172
|
+
"tokens": ["So11111111111111111111111111111111111111112"],
|
|
173
|
+
"programAccounts": [
|
|
174
|
+
{
|
|
175
|
+
"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
|
|
176
|
+
"limit": 10
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
"gui": {
|
|
181
|
+
"enabled": true,
|
|
182
|
+
"port": 42069
|
|
183
|
+
},
|
|
184
|
+
"bootstrap": {
|
|
185
|
+
"airdrops": [
|
|
186
|
+
{
|
|
187
|
+
"address": "YOUR_WALLET_ADDRESS",
|
|
188
|
+
"amountSol": 100
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### 🔑 Configuration Options
|
|
37
196
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
197
|
+
| Option | Description | Default |
|
|
198
|
+
| --------------------- | ------------------------------------------- | ------------------------------------- |
|
|
199
|
+
| `server.rpcPort` | HTTP RPC port | `8899` |
|
|
200
|
+
| `server.wsPort` | WebSocket port | `8900` |
|
|
201
|
+
| `server.network` | Bind to `0.0.0.0` for LAN access | `false` |
|
|
202
|
+
| `svm.initialLamports` | Initial lamports for accounts | `1000000000000000` |
|
|
203
|
+
| `svm.faucetSOL` | SOL amount per airdrop | `1000` |
|
|
204
|
+
| `clone.endpoint` | RPC endpoint for cloning | `https://api.mainnet-beta.solana.com` |
|
|
205
|
+
| `clone.programs` | Program IDs to clone on startup | `[]` |
|
|
206
|
+
| `clone.tokens` | Token mints to clone on startup | `[]` |
|
|
207
|
+
| `gui.enabled` | Enable web GUI | `true` |
|
|
208
|
+
| `gui.port` | GUI port | `42069` |
|
|
209
|
+
| `bootstrap.airdrops` | Auto-airdrops on startup | `[]` |
|
|
41
210
|
|
|
42
|
-
|
|
211
|
+
## 🌍 Environment Variables
|
|
212
|
+
|
|
213
|
+
Override configuration with environment variables:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
# Server settings
|
|
217
|
+
export RPC_PORT=8899
|
|
218
|
+
export SOLFORGE_GUI_PORT=3000
|
|
219
|
+
|
|
220
|
+
# Debug mode
|
|
221
|
+
export DEBUG_RPC_LOG=1 # Log all RPC calls
|
|
222
|
+
|
|
223
|
+
# Start with env vars
|
|
224
|
+
solforge start
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## 🔌 Integration Examples
|
|
228
|
+
|
|
229
|
+
### Anchor Framework
|
|
230
|
+
|
|
231
|
+
Configure `Anchor.toml`:
|
|
232
|
+
|
|
233
|
+
```toml
|
|
234
|
+
[provider]
|
|
235
|
+
cluster = "http://127.0.0.1:8899"
|
|
236
|
+
wallet = "~/.config/solana/id.json"
|
|
237
|
+
|
|
238
|
+
[scripts]
|
|
239
|
+
test = "solforge start && anchor test --skip-local-validator"
|
|
43
240
|
```
|
|
241
|
+
|
|
242
|
+
### @solana/web3.js
|
|
243
|
+
|
|
244
|
+
```javascript
|
|
245
|
+
import { Connection, LAMPORTS_PER_SOL, PublicKey } from "@solana/web3.js";
|
|
246
|
+
|
|
247
|
+
const connection = new Connection("http://127.0.0.1:8899", "confirmed");
|
|
248
|
+
|
|
249
|
+
// Request airdrop
|
|
250
|
+
const signature = await connection.requestAirdrop(
|
|
251
|
+
new PublicKey("YOUR_WALLET"),
|
|
252
|
+
100 * LAMPORTS_PER_SOL,
|
|
253
|
+
);
|
|
254
|
+
|
|
255
|
+
// Get balance
|
|
256
|
+
const balance = await connection.getBalance(publicKey);
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### @solana/kit (Recommended)
|
|
260
|
+
|
|
261
|
+
```typescript
|
|
262
|
+
import { createSolanaRpc } from "@solana/kit";
|
|
263
|
+
import { address, lamports } from "@solana/web3.js";
|
|
264
|
+
|
|
44
265
|
const rpc = createSolanaRpc("http://127.0.0.1:8899");
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
266
|
+
|
|
267
|
+
// Request airdrop
|
|
268
|
+
await rpc
|
|
269
|
+
.requestAirdrop(address("YOUR_WALLET"), lamports(1_000_000_000n))
|
|
270
|
+
.send();
|
|
271
|
+
|
|
272
|
+
// Get balance
|
|
273
|
+
const balance = await rpc.getBalance(address("YOUR_WALLET")).send();
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
## 🎨 Web GUI
|
|
277
|
+
|
|
278
|
+
The built-in GUI provides:
|
|
279
|
+
|
|
280
|
+
- **📊 Dashboard**: Current slot, block height, recent transactions
|
|
281
|
+
- **💸 Airdrop Tool**: Quick SOL distribution interface
|
|
282
|
+
- **🪙 Token Minter**: Create and mint SPL tokens
|
|
283
|
+
- **📈 Status Monitor**: Real-time localnet statistics
|
|
284
|
+
|
|
285
|
+
Access at: `http://127.0.0.1:42069`
|
|
286
|
+
|
|
287
|
+
## 🏗️ Building from Source
|
|
288
|
+
|
|
289
|
+
### Prerequisites
|
|
290
|
+
|
|
291
|
+
- [Bun](https://bun.sh) runtime installed
|
|
292
|
+
|
|
293
|
+
### Build Steps
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
# Clone repository
|
|
297
|
+
git clone https://github.com/nitishxyz/solforge.git
|
|
298
|
+
cd solforge
|
|
299
|
+
|
|
300
|
+
# Install dependencies
|
|
301
|
+
bun install
|
|
302
|
+
|
|
303
|
+
# Run from source
|
|
304
|
+
bun src/cli/main.ts start
|
|
305
|
+
|
|
306
|
+
# Build binary
|
|
307
|
+
bun run build:bin
|
|
308
|
+
|
|
309
|
+
# Build for all platforms
|
|
310
|
+
bun run build:bin:all
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Platform-Specific Builds
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
# macOS (Apple Silicon)
|
|
317
|
+
bun run build:bin:darwin-arm64
|
|
318
|
+
|
|
319
|
+
# macOS (Intel)
|
|
320
|
+
bun run build:bin:darwin-x64
|
|
321
|
+
|
|
322
|
+
# Linux x64
|
|
323
|
+
bun run build:bin:linux-x64
|
|
324
|
+
|
|
325
|
+
# Linux ARM64
|
|
326
|
+
bun run build:bin:linux-arm64
|
|
327
|
+
|
|
328
|
+
# Windows
|
|
329
|
+
bun run build:bin:windows-x64
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
## 🗂️ Project Structure
|
|
333
|
+
|
|
334
|
+
```
|
|
335
|
+
solforge/
|
|
336
|
+
├── src/
|
|
337
|
+
│ ├── cli/ # CLI commands and routing
|
|
338
|
+
│ ├── config/ # Configuration management
|
|
339
|
+
│ ├── db/ # Database schemas and operations
|
|
340
|
+
│ ├── rpc/ # RPC server bootstrap
|
|
341
|
+
│ └── gui/ # Web GUI (React)
|
|
342
|
+
├── server/
|
|
343
|
+
│ ├── methods/ # RPC method implementations
|
|
344
|
+
│ ├── lib/ # Shared utilities
|
|
345
|
+
│ └── types.ts # TypeScript definitions
|
|
346
|
+
├── scripts/ # Build and setup scripts
|
|
347
|
+
└── sf.config.json # Configuration file
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
## 🔍 Troubleshooting
|
|
351
|
+
|
|
352
|
+
### Port Already in Use
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
# Use different port
|
|
356
|
+
solforge start --port 9999
|
|
357
|
+
|
|
358
|
+
# Or update config
|
|
359
|
+
solforge config set server.rpcPort 9999
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### GUI Not Loading
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
# Check if port is available
|
|
366
|
+
lsof -i :42069
|
|
367
|
+
|
|
368
|
+
# Use different GUI port
|
|
369
|
+
export SOLFORGE_GUI_PORT=3000
|
|
370
|
+
solforge start
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
### Connection Refused
|
|
376
|
+
|
|
377
|
+
```bash
|
|
378
|
+
# Verify server is running
|
|
379
|
+
curl http://127.0.0.1:8899/health
|
|
380
|
+
|
|
381
|
+
# Check logs with debug mode
|
|
382
|
+
DEBUG_RPC_LOG=1 solforge start
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
## 📊 Performance Comparison
|
|
386
|
+
|
|
387
|
+
| Metric | SolForge | solana-test-validator |
|
|
388
|
+
| ---------------- | -------- | --------------------- |
|
|
389
|
+
| Startup Time | < 1s | 10-30s |
|
|
390
|
+
| Memory Usage | ~50MB | 500MB+ |
|
|
391
|
+
| CPU Usage (idle) | < 1% | 5-10% |
|
|
392
|
+
| Airdrop Speed | Instant | Rate limited |
|
|
393
|
+
| Program Deploy | < 100ms | 1-2s |
|
|
394
|
+
|
|
395
|
+
## 🤝 Contributing
|
|
396
|
+
|
|
397
|
+
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
398
|
+
|
|
399
|
+
### Development Workflow
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
# Run tests
|
|
403
|
+
bun test
|
|
404
|
+
|
|
405
|
+
# Lint code
|
|
406
|
+
bun run lint
|
|
407
|
+
|
|
408
|
+
# Format code
|
|
409
|
+
bun run format
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
## 📚 API Coverage
|
|
413
|
+
|
|
414
|
+
### ✅ Fully Implemented (90+ methods)
|
|
415
|
+
|
|
416
|
+
- Account operations
|
|
417
|
+
- Transaction submission/simulation
|
|
418
|
+
- Block/slot queries
|
|
419
|
+
- Token operations
|
|
420
|
+
- Program deployment
|
|
421
|
+
- WebSocket subscriptions (signatures)
|
|
422
|
+
|
|
423
|
+
### 🚧 Partial Support
|
|
424
|
+
|
|
425
|
+
- Stake operations
|
|
426
|
+
- Vote accounts
|
|
427
|
+
- Advanced subscriptions
|
|
428
|
+
|
|
429
|
+
### 📋 Planned
|
|
430
|
+
|
|
431
|
+
- Snapshot/restore
|
|
432
|
+
- Time-travel debugging
|
|
433
|
+
- Multi-tenant support
|
|
434
|
+
|
|
435
|
+
## 🛠️ Advanced Usage
|
|
436
|
+
|
|
437
|
+
### Custom Program Development
|
|
438
|
+
|
|
439
|
+
```bash
|
|
440
|
+
# Deploy custom program
|
|
441
|
+
solana program deploy ./my-program.so
|
|
442
|
+
|
|
443
|
+
# Clone and modify existing program
|
|
444
|
+
solforge program clone <PROGRAM_ID>
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
### CI/CD Integration
|
|
448
|
+
|
|
449
|
+
```yaml
|
|
450
|
+
# GitHub Actions example
|
|
451
|
+
- name: Setup SolForge
|
|
452
|
+
run: |
|
|
453
|
+
curl -fsSL https://install.solforge.sh | sh
|
|
454
|
+
solforge start &
|
|
455
|
+
sleep 2
|
|
456
|
+
|
|
457
|
+
- name: Run Tests
|
|
458
|
+
run: |
|
|
459
|
+
anchor test --skip-local-validator
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
## 📄 License
|
|
463
|
+
|
|
464
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
465
|
+
|
|
466
|
+
## 🔗 Links
|
|
467
|
+
|
|
468
|
+
- **GitHub**: [github.com/nitishxyz/solforge](https://github.com/nitishxyz/solforge)
|
|
469
|
+
- **Issues**: [Report bugs or request features](https://github.com/nitishxyz/solforge/issues)
|
|
470
|
+
- **Discord**: [Join our community](#) _(coming soon)_
|
|
471
|
+
|
|
472
|
+
## 🙏 Acknowledgments
|
|
473
|
+
|
|
474
|
+
- Built on [LiteSVM](https://github.com/litesvm/litesvm) - Fast SVM implementation
|
|
475
|
+
- Powered by [Bun](https://bun.sh) - All-in-one JavaScript runtime
|
|
476
|
+
- Inspired by the Solana developer community
|
|
477
|
+
|
|
478
|
+
---
|
|
479
|
+
|
|
480
|
+
<p align="center">
|
|
481
|
+
Made with ❤️ for Solana developers
|
|
482
|
+
</p>
|