solforge 0.2.17 → 0.2.19
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 +8 -48
- package/start.cjs +11 -3
- package/LICENSE +0 -21
- package/README.md +0 -482
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solforge",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"private": false,
|
|
3
|
+
"version": "0.2.19",
|
|
4
|
+
"description": "SolForge CLI installer",
|
|
5
|
+
"license": "MIT",
|
|
7
6
|
"repository": {
|
|
8
7
|
"type": "git",
|
|
9
8
|
"url": "git+https://github.com/nitishxyz/solforge.git"
|
|
@@ -13,54 +12,15 @@
|
|
|
13
12
|
"url": "https://github.com/nitishxyz/solforge/issues"
|
|
14
13
|
},
|
|
15
14
|
"bin": {
|
|
16
|
-
"solforge": "start.cjs"
|
|
15
|
+
"solforge": "./start.cjs"
|
|
17
16
|
},
|
|
18
17
|
"files": [
|
|
19
|
-
"start.cjs"
|
|
20
|
-
"README.md",
|
|
21
|
-
"LICENSE"
|
|
18
|
+
"start.cjs"
|
|
22
19
|
],
|
|
23
20
|
"scripts": {
|
|
24
|
-
"
|
|
25
|
-
"build:bin": "bun run build:css && bun run build:gui && bun build --compile src/cli/main.ts --outfile dist/solforge",
|
|
26
|
-
"build:bin:all": "bun run build:bin:darwin-arm64 && bun run build:bin:darwin-x64 && bun run build:bin:linux-x64 && bun run build:bin:linux-arm64 && bun run build:bin:windows-x64",
|
|
27
|
-
"build:bin:darwin-arm64": "bun run build:css && bun run build:gui && bun build --compile --target=bun-darwin-arm64 src/cli/main.ts --outfile dist/solforge-darwin-arm64",
|
|
28
|
-
"build:bin:darwin-x64": "bun run build:css && bun run build:gui && bun build --compile --target=bun-darwin-x64 src/cli/main.ts --outfile dist/solforge-darwin-x64",
|
|
29
|
-
"build:bin:linux-arm64": "bun run build:css && bun run build:gui && bun build --compile --target=bun-linux-arm64 src/cli/main.ts --outfile dist/solforge-linux-arm64",
|
|
30
|
-
"build:bin:linux-x64": "bun run build:css && bun run build:gui && bun build --compile --target=bun-linux-x64 src/cli/main.ts --outfile dist/solforge-linux-x64",
|
|
31
|
-
"build:bin:windows-x64": "bun run build:css && bun run build:gui && bun build --compile --target=bun-windows-x64 src/cli/main.ts --outfile dist/solforge-windows-x64.exe",
|
|
32
|
-
"build:css": "bunx tailwindcss -i src/gui/src/index.css -o src/gui/public/app.css --minify",
|
|
33
|
-
"build:gui": "bun build src/gui/src/main.tsx --outdir src/gui/public/build --target=browser --minify",
|
|
34
|
-
"cli": "bun src/cli/main.ts",
|
|
35
|
-
"lint": "biome check",
|
|
36
|
-
"prepack": "chmod +x start.cjs || true"
|
|
21
|
+
"prepublishOnly": "cd ../.. && bun run --filter @solforge/cli build:bin:all"
|
|
37
22
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"@types/aws-lambda": "8.10.152",
|
|
41
|
-
"@types/bun": "latest",
|
|
42
|
-
"@types/react": "^19.1.13",
|
|
43
|
-
"@types/react-dom": "^19.1.9",
|
|
44
|
-
"autoprefixer": "^10.4.21",
|
|
45
|
-
"drizzle-kit": "^0.31.4",
|
|
46
|
-
"postcss": "^8.5.6",
|
|
47
|
-
"tailwindcss": "3"
|
|
48
|
-
},
|
|
49
|
-
"peerDependencies": {
|
|
50
|
-
"typescript": "^5"
|
|
51
|
-
},
|
|
52
|
-
"dependencies": {
|
|
53
|
-
"@clack/prompts": "^0.11.0",
|
|
54
|
-
"@solana-program/compute-budget": "^0.9.0",
|
|
55
|
-
"@solana-program/memo": "^0.8.0",
|
|
56
|
-
"@solana-program/system": "^0.8.0",
|
|
57
|
-
"@solana-program/token": "^0.6.0",
|
|
58
|
-
"@solana/kit": "^3.0.3",
|
|
59
|
-
"@solana/spl-token": "^0.4.14",
|
|
60
|
-
"drizzle-orm": "^0.44.5",
|
|
61
|
-
"litesvm": "^0.3.3",
|
|
62
|
-
"react": "^19.1.1",
|
|
63
|
-
"react-dom": "^19.1.1",
|
|
64
|
-
"sst": "3.17.13"
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
65
25
|
}
|
|
66
26
|
}
|
package/start.cjs
CHANGED
|
@@ -21,9 +21,10 @@ function pkg() {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
function isInWorkspace() {
|
|
24
|
+
const root = path.resolve(__dirname, "..", "..");
|
|
24
25
|
return (
|
|
25
|
-
fs.existsSync(path.join(
|
|
26
|
-
fs.existsSync(path.join(
|
|
26
|
+
fs.existsSync(path.join(root, "apps", "cli", "src")) &&
|
|
27
|
+
fs.existsSync(path.join(root, "package.json"))
|
|
27
28
|
);
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -253,7 +254,14 @@ Options:
|
|
|
253
254
|
|
|
254
255
|
if (isInWorkspace()) {
|
|
255
256
|
const bun = process.env.SOLFORGE_BUN || "bun";
|
|
256
|
-
const entry = path.join(
|
|
257
|
+
const entry = path.join(
|
|
258
|
+
path.resolve(__dirname, "..", ".."),
|
|
259
|
+
"apps",
|
|
260
|
+
"cli",
|
|
261
|
+
"src",
|
|
262
|
+
"cli",
|
|
263
|
+
"main.ts",
|
|
264
|
+
);
|
|
257
265
|
const code = await run(bun, [entry, ...process.argv.slice(2)]);
|
|
258
266
|
process.exit(code);
|
|
259
267
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024-2025 nitishxyz
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/README.md
DELETED
|
@@ -1,482 +0,0 @@
|
|
|
1
|
-
# 🔥 SolForge
|
|
2
|
-
|
|
3
|
-
> **Lightning-fast Solana localnet for developers** ⚡
|
|
4
|
-
> Drop-in replacement for `solana-test-validator` with sub-second startup and minimal memory footprint.
|
|
5
|
-
|
|
6
|
-
[](https://github.com/nitishxyz/solforge)
|
|
7
|
-
[](LICENSE)
|
|
8
|
-
[](https://github.com/litesvm/litesvm)
|
|
9
|
-
|
|
10
|
-
## ✨ Features
|
|
11
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
## 🚀 Quick Install
|
|
21
|
-
|
|
22
|
-
### One-Liner Install (Recommended)
|
|
23
|
-
|
|
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
|
|
196
|
-
|
|
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 | `[]` |
|
|
210
|
-
|
|
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"
|
|
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
|
-
|
|
265
|
-
const rpc = createSolanaRpc("http://127.0.0.1:8899");
|
|
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>
|