forge-solana-sdk 2.2.1 → 2.2.2
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 +29 -0
- package/dist/cli.js +12 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/audit.d.ts +2 -0
- package/dist/commands/audit.d.ts.map +1 -0
- package/dist/commands/audit.js +243 -0
- package/dist/commands/audit.js.map +1 -0
- package/dist/commands/deploy.d.ts +3 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +78 -7
- package/dist/commands/deploy.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -51,9 +51,36 @@ forge generate-sdk ./my-sdk
|
|
|
51
51
|
|
|
52
52
|
### Deploy to Solana
|
|
53
53
|
```bash
|
|
54
|
+
# Deploy to devnet (default)
|
|
54
55
|
forge deploy
|
|
56
|
+
|
|
57
|
+
# Deploy to specific environment
|
|
58
|
+
forge deploy --env devnet
|
|
59
|
+
forge deploy --env mainnet-beta
|
|
60
|
+
|
|
61
|
+
# Deploy to local validator
|
|
62
|
+
forge deploy --env localnet
|
|
55
63
|
```
|
|
56
64
|
|
|
65
|
+
**Environment Support:**
|
|
66
|
+
- ✅ **devnet**: Development network (default)
|
|
67
|
+
- ✅ **mainnet-beta**: Production network with safety checks
|
|
68
|
+
- ✅ **localnet**: Local Solana validator
|
|
69
|
+
- ✅ Auto-updates Anchor.toml with environment RPC URLs
|
|
70
|
+
- ✅ Mainnet deployment requires explicit confirmation
|
|
71
|
+
|
|
72
|
+
### Security Audit
|
|
73
|
+
```bash
|
|
74
|
+
forge audit
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Comprehensive Security Checks:**
|
|
78
|
+
- 🔍 **Critical Issues**: Missing ownership validation, unsafe code
|
|
79
|
+
- ⚠️ **High Priority**: Improper PDA derivation, missing constraints
|
|
80
|
+
- 📊 **Performance**: Expensive operations, large account data
|
|
81
|
+
- 🛡️ **Access Control**: Signer constraints, PDA bumps
|
|
82
|
+
- 📋 **Configuration**: Wallet paths, cluster settings
|
|
83
|
+
|
|
57
84
|
### Update FORGE
|
|
58
85
|
```bash
|
|
59
86
|
forge update
|
|
@@ -80,6 +107,8 @@ FORGE transforms natural language intents into production-ready Solana programs.
|
|
|
80
107
|
|
|
81
108
|
### Core Features
|
|
82
109
|
- ✅ **Intent-Driven Generation**: `"transfer 100 tokens safely"` → Modern CPI code
|
|
110
|
+
- ✅ **Multi-Environment Deployment**: Deploy to devnet/mainnet/localnet with safety checks
|
|
111
|
+
- ✅ **Security Audit Tools**: Automated security analysis and best practices validation
|
|
83
112
|
- ✅ **Complete Anchor Workspace**: Ready-to-build projects with proper structure
|
|
84
113
|
- ✅ **Client SDK Generation**: Auto-generated TypeScript SDK for program interaction
|
|
85
114
|
- ✅ **Modern CPI Helpers**: `transfer_checked`, `mint_to`, PDA signers with `ctx.bumps`
|
package/dist/cli.js
CHANGED
|
@@ -7,11 +7,12 @@ const init_js_1 = require("./commands/init.js");
|
|
|
7
7
|
const deploy_js_1 = require("./commands/deploy.js");
|
|
8
8
|
const status_js_1 = require("./commands/status.js");
|
|
9
9
|
const generate_sdk_js_1 = require("./commands/generate-sdk.js");
|
|
10
|
+
const audit_js_1 = require("./commands/audit.js");
|
|
10
11
|
const program = new commander_1.Command();
|
|
11
12
|
program
|
|
12
13
|
.name('forge')
|
|
13
14
|
.description('FORGE - Intent-driven app assembly on Solana')
|
|
14
|
-
.version('2.2.
|
|
15
|
+
.version('2.2.1');
|
|
15
16
|
program
|
|
16
17
|
.command('init [projectName]')
|
|
17
18
|
.description('Initialize a new FORGE project')
|
|
@@ -23,8 +24,15 @@ program
|
|
|
23
24
|
program
|
|
24
25
|
.command('deploy')
|
|
25
26
|
.description('Deploy program to Solana')
|
|
27
|
+
.option('-e, --env <environment>', 'Target environment: localnet, devnet, mainnet-beta (default: devnet)', 'devnet')
|
|
28
|
+
.action(async (options) => {
|
|
29
|
+
await (0, deploy_js_1.deployCommand)(options.env);
|
|
30
|
+
});
|
|
31
|
+
program
|
|
32
|
+
.command('audit')
|
|
33
|
+
.description('Run security audit on Anchor program')
|
|
26
34
|
.action(async () => {
|
|
27
|
-
await (0,
|
|
35
|
+
await (0, audit_js_1.auditCommand)();
|
|
28
36
|
});
|
|
29
37
|
program
|
|
30
38
|
.command('generate-sdk [outputDir]')
|
|
@@ -49,10 +57,11 @@ program.on('--help', () => {
|
|
|
49
57
|
console.log(ascii_js_1.logo);
|
|
50
58
|
console.log('\nCommands:');
|
|
51
59
|
console.log(' init Create new Anchor projects');
|
|
60
|
+
console.log(' audit Run security audit on program');
|
|
61
|
+
console.log(' deploy Deploy to Solana network');
|
|
52
62
|
console.log(' generate-sdk Generate TypeScript SDK from program');
|
|
53
63
|
console.log(' status Check environment & versions');
|
|
54
64
|
console.log(' update Update FORGE to latest version');
|
|
55
|
-
console.log(' deploy Deploy to Solana network');
|
|
56
65
|
console.log('\nFORGE does not:');
|
|
57
66
|
console.log('- host your code');
|
|
58
67
|
console.log('- manage your keys');
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,yCAAkC;AAClC,gDAAiD;AACjD,oDAAqD;AACrD,oDAAoE;AACpE,gEAAgE;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,yCAAkC;AAClC,gDAAiD;AACjD,oDAAqD;AACrD,oDAAoE;AACpE,gEAAgE;AAChE,kDAAmD;AAEnD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,OAAO,CAAC;KACb,WAAW,CAAC,8CAA8C,CAAC;KAC3D,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,oBAAo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,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,IAAA,yBAAa,GAAE,CAAC;AACxB,CAAC,CAAC,CAAC;AAEL,oBAAoB;AACpB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;IACxB,OAAO,CAAC,GAAG,CAAC,eAAI,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC3B,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;IAC1D,OAAO,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;IACxD,OAAO,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC;IACpE,OAAO,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC;IAC5D,OAAO,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACjC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAChC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAClC,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;AAC/C,CAAC,CAAC,CAAC;AAEH,kBAAkB;AAClB,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/commands/audit.ts"],"names":[],"mappings":"AAWA,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAuClD"}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.auditCommand = auditCommand;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
async function auditCommand() {
|
|
6
|
+
console.log('🔍 Running FORGE Security Audit...\n');
|
|
7
|
+
const results = [];
|
|
8
|
+
try {
|
|
9
|
+
// Check if we're in an Anchor project
|
|
10
|
+
if (!(0, fs_1.existsSync)('Anchor.toml')) {
|
|
11
|
+
console.error('❌ Not in an Anchor project directory');
|
|
12
|
+
console.error('Run "forge init" first or cd into your project');
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
// Check if program exists
|
|
16
|
+
if (!(0, fs_1.existsSync)('programs')) {
|
|
17
|
+
console.error('❌ No programs directory found');
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
console.log('📋 Checking program structure...');
|
|
21
|
+
results.push(...await checkProgramStructure());
|
|
22
|
+
console.log('🔐 Analyzing security patterns...');
|
|
23
|
+
results.push(...await checkSecurityPatterns());
|
|
24
|
+
console.log('⚡ Checking performance optimizations...');
|
|
25
|
+
results.push(...await checkPerformanceIssues());
|
|
26
|
+
console.log('🛡️ Checking access control...');
|
|
27
|
+
results.push(...await checkAccessControl());
|
|
28
|
+
// Display results
|
|
29
|
+
displayResults(results);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
console.error('❌ Audit failed');
|
|
33
|
+
console.error(`Error: ${error.message}`);
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async function checkProgramStructure() {
|
|
38
|
+
const results = [];
|
|
39
|
+
try {
|
|
40
|
+
// Check Anchor.toml configuration
|
|
41
|
+
const anchorToml = (0, fs_1.readFileSync)('Anchor.toml', 'utf8');
|
|
42
|
+
// Check for wallet configuration
|
|
43
|
+
if (!anchorToml.includes('wallet')) {
|
|
44
|
+
results.push({
|
|
45
|
+
severity: 'medium',
|
|
46
|
+
title: 'Wallet Configuration Missing',
|
|
47
|
+
description: 'No wallet path specified in Anchor.toml',
|
|
48
|
+
recommendation: 'Add wallet = "~/.config/solana/id.json" to [provider] section'
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
// Check for proper cluster configuration
|
|
52
|
+
if (!anchorToml.includes('cluster =')) {
|
|
53
|
+
results.push({
|
|
54
|
+
severity: 'low',
|
|
55
|
+
title: 'Cluster Not Specified',
|
|
56
|
+
description: 'No cluster specified in Anchor.toml',
|
|
57
|
+
recommendation: 'Specify cluster = "devnet" or "mainnet-beta"'
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
results.push({
|
|
63
|
+
severity: 'medium',
|
|
64
|
+
title: 'Anchor.toml Read Error',
|
|
65
|
+
description: 'Could not read Anchor.toml configuration',
|
|
66
|
+
recommendation: 'Ensure Anchor.toml exists and is properly formatted'
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return results;
|
|
70
|
+
}
|
|
71
|
+
async function checkSecurityPatterns() {
|
|
72
|
+
const results = [];
|
|
73
|
+
try {
|
|
74
|
+
// Find Rust program files
|
|
75
|
+
const { glob } = require('glob');
|
|
76
|
+
const rustFiles = await glob('programs/**/*.rs');
|
|
77
|
+
for (const file of rustFiles) {
|
|
78
|
+
const content = (0, fs_1.readFileSync)(file, 'utf8');
|
|
79
|
+
// Check for unsafe code
|
|
80
|
+
if (content.includes('unsafe')) {
|
|
81
|
+
results.push({
|
|
82
|
+
severity: 'high',
|
|
83
|
+
title: 'Unsafe Code Detected',
|
|
84
|
+
description: 'Program contains unsafe Rust code',
|
|
85
|
+
location: file,
|
|
86
|
+
recommendation: 'Review all unsafe blocks for security implications'
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
// Check for missing ownership checks
|
|
90
|
+
if (content.includes('ctx.accounts.') && !content.includes('assert_eq!') && !content.includes('require!')) {
|
|
91
|
+
results.push({
|
|
92
|
+
severity: 'critical',
|
|
93
|
+
title: 'Missing Ownership Validation',
|
|
94
|
+
description: 'Account ownership not validated before use',
|
|
95
|
+
location: file,
|
|
96
|
+
recommendation: 'Add ownership checks: require!(account.owner == expected_owner)'
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
// Check for PDA derivation without seeds
|
|
100
|
+
if (content.includes('find_program_address') && !content.includes('&[')) {
|
|
101
|
+
results.push({
|
|
102
|
+
severity: 'high',
|
|
103
|
+
title: 'Improper PDA Derivation',
|
|
104
|
+
description: 'PDA derivation may be insecure',
|
|
105
|
+
location: file,
|
|
106
|
+
recommendation: 'Use proper seed arrays for PDA derivation'
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
// Check for integer overflow/underflow
|
|
110
|
+
if (content.includes('checked_') === false && (content.includes('+') || content.includes('-') || content.includes('*'))) {
|
|
111
|
+
results.push({
|
|
112
|
+
severity: 'medium',
|
|
113
|
+
title: 'Potential Integer Overflow',
|
|
114
|
+
description: 'Arithmetic operations without overflow checks',
|
|
115
|
+
location: file,
|
|
116
|
+
recommendation: 'Use checked_add, checked_sub, checked_mul for safe arithmetic'
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
results.push({
|
|
123
|
+
severity: 'low',
|
|
124
|
+
title: 'Code Analysis Error',
|
|
125
|
+
description: 'Could not analyze program source code',
|
|
126
|
+
recommendation: 'Ensure programs directory contains valid Rust files'
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
return results;
|
|
130
|
+
}
|
|
131
|
+
async function checkPerformanceIssues() {
|
|
132
|
+
const results = [];
|
|
133
|
+
try {
|
|
134
|
+
const { glob } = require('glob');
|
|
135
|
+
const rustFiles = await glob('programs/**/*.rs');
|
|
136
|
+
for (const file of rustFiles) {
|
|
137
|
+
const content = (0, fs_1.readFileSync)(file, 'utf8');
|
|
138
|
+
// Check for expensive operations in instruction handlers
|
|
139
|
+
if (content.includes('vec![') && content.includes('#[instruction]')) {
|
|
140
|
+
results.push({
|
|
141
|
+
severity: 'medium',
|
|
142
|
+
title: 'Vector Allocation in Instruction',
|
|
143
|
+
description: 'Vector allocation in instruction handler may be expensive',
|
|
144
|
+
location: file,
|
|
145
|
+
recommendation: 'Consider pre-allocating vectors or using arrays for fixed-size data'
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
// Check for large account data loads
|
|
149
|
+
if (content.includes('Account<') && content.includes('Vec<')) {
|
|
150
|
+
results.push({
|
|
151
|
+
severity: 'low',
|
|
152
|
+
title: 'Large Account Data',
|
|
153
|
+
description: 'Account contains large vector data that may impact performance',
|
|
154
|
+
location: file,
|
|
155
|
+
recommendation: 'Consider pagination or separate accounts for large datasets'
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
catch (error) {
|
|
161
|
+
// Ignore glob errors
|
|
162
|
+
}
|
|
163
|
+
return results;
|
|
164
|
+
}
|
|
165
|
+
async function checkAccessControl() {
|
|
166
|
+
const results = [];
|
|
167
|
+
try {
|
|
168
|
+
const { glob } = require('glob');
|
|
169
|
+
const rustFiles = await glob('programs/**/*.rs');
|
|
170
|
+
for (const file of rustFiles) {
|
|
171
|
+
const content = (0, fs_1.readFileSync)(file, 'utf8');
|
|
172
|
+
// Check for signer constraints
|
|
173
|
+
if (content.includes('#[account(') && !content.includes('signer') && !content.includes('mut')) {
|
|
174
|
+
results.push({
|
|
175
|
+
severity: 'medium',
|
|
176
|
+
title: 'Missing Signer Constraints',
|
|
177
|
+
description: 'Account constraint may allow unauthorized access',
|
|
178
|
+
location: file,
|
|
179
|
+
recommendation: 'Add signer constraints: #[account(signer)] for authorization accounts'
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
// Check for proper PDA constraints
|
|
183
|
+
if (content.includes('seeds') && !content.includes('bump')) {
|
|
184
|
+
results.push({
|
|
185
|
+
severity: 'high',
|
|
186
|
+
title: 'Missing PDA Bump',
|
|
187
|
+
description: 'PDA account missing bump field for validation',
|
|
188
|
+
location: file,
|
|
189
|
+
recommendation: 'Add bump field to PDA account constraints'
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
// Ignore glob errors
|
|
196
|
+
}
|
|
197
|
+
return results;
|
|
198
|
+
}
|
|
199
|
+
function displayResults(results) {
|
|
200
|
+
if (results.length === 0) {
|
|
201
|
+
console.log('\n✅ No security issues found!');
|
|
202
|
+
console.log('Your program appears to follow security best practices.');
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
console.log(`\n📊 Audit Results: ${results.length} issue(s) found\n`);
|
|
206
|
+
// Group by severity
|
|
207
|
+
const grouped = results.reduce((acc, result) => {
|
|
208
|
+
if (!acc[result.severity])
|
|
209
|
+
acc[result.severity] = [];
|
|
210
|
+
acc[result.severity].push(result);
|
|
211
|
+
return acc;
|
|
212
|
+
}, {});
|
|
213
|
+
const severityOrder = ['critical', 'high', 'medium', 'low'];
|
|
214
|
+
const severityColors = {
|
|
215
|
+
critical: '🔴',
|
|
216
|
+
high: '🟠',
|
|
217
|
+
medium: '🟡',
|
|
218
|
+
low: '🟢'
|
|
219
|
+
};
|
|
220
|
+
for (const severity of severityOrder) {
|
|
221
|
+
if (grouped[severity]) {
|
|
222
|
+
console.log(`${severityColors[severity]} ${severity.toUpperCase()} (${grouped[severity].length}):`);
|
|
223
|
+
grouped[severity].forEach((result, index) => {
|
|
224
|
+
console.log(` ${index + 1}. ${result.title}`);
|
|
225
|
+
console.log(` ${result.description}`);
|
|
226
|
+
if (result.location) {
|
|
227
|
+
console.log(` Location: ${result.location}`);
|
|
228
|
+
}
|
|
229
|
+
console.log(` 💡 ${result.recommendation}\n`);
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
// Summary
|
|
234
|
+
const criticalCount = grouped.critical?.length || 0;
|
|
235
|
+
const highCount = grouped.high?.length || 0;
|
|
236
|
+
if (criticalCount > 0 || highCount > 0) {
|
|
237
|
+
console.log('⚠️ CRITICAL/HIGH severity issues found. Address immediately before deployment!');
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
console.log('✅ No critical security issues found. Review medium/low issues for best practices.');
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
//# sourceMappingURL=audit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/commands/audit.ts"],"names":[],"mappings":";;AAWA,oCAuCC;AAlDD,2BAA8C;AAWvC,KAAK,UAAU,YAAY;IAChC,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IAEpD,MAAM,OAAO,GAAkB,EAAE,CAAC;IAElC,IAAI,CAAC;QACH,sCAAsC;QACtC,IAAI,CAAC,IAAA,eAAU,EAAC,aAAa,CAAC,EAAE,CAAC;YAC/B,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;YACtD,OAAO,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC;YAChE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,0BAA0B;QAC1B,IAAI,CAAC,IAAA,eAAU,EAAC,UAAU,CAAC,EAAE,CAAC;YAC5B,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;YAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,qBAAqB,EAAE,CAAC,CAAC;QAE/C,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,qBAAqB,EAAE,CAAC,CAAC;QAE/C,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;QACvD,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,sBAAsB,EAAE,CAAC,CAAC;QAEhD,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;QAC/C,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,kBAAkB,EAAE,CAAC,C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AAC;IACnG,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAIA,KAAK,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,cAAc,CAAC;AAwB1D,wBAAsB,aAAa,CAAC,GAAG,GAAE,WAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiE9E"}
|
package/dist/commands/deploy.js
CHANGED
|
@@ -2,8 +2,56 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.deployCommand = deployCommand;
|
|
4
4
|
const child_process_1 = require("child_process");
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const fs_1 = require("fs");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
const ENV_CONFIGS = {
|
|
8
|
+
localnet: {
|
|
9
|
+
cluster: 'Localnet',
|
|
10
|
+
rpcUrl: 'http://127.0.0.1:8899',
|
|
11
|
+
},
|
|
12
|
+
devnet: {
|
|
13
|
+
cluster: 'Devnet',
|
|
14
|
+
rpcUrl: 'https://api.devnet.solana.com',
|
|
15
|
+
faucet: 'https://faucet.solana.com',
|
|
16
|
+
},
|
|
17
|
+
'mainnet-beta': {
|
|
18
|
+
cluster: 'Mainnet',
|
|
19
|
+
rpcUrl: 'https://api.mainnet-beta.solana.com',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
async function deployCommand(env = 'devnet') {
|
|
23
|
+
console.log(`🚀 Deploying to Solana ${env}...\n`);
|
|
24
|
+
// Validate environment
|
|
25
|
+
if (!ENV_CONFIGS[env]) {
|
|
26
|
+
console.error(`❌ Invalid environment: ${env}`);
|
|
27
|
+
console.error('Valid options: localnet, devnet, mainnet-beta');
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
// Safety check for mainnet
|
|
31
|
+
if (env === 'mainnet-beta') {
|
|
32
|
+
console.log('⚠️ WARNING: Deploying to MAINNET-BETA!');
|
|
33
|
+
console.log('This will use real SOL and cannot be undone.');
|
|
34
|
+
console.log('Make sure you have:');
|
|
35
|
+
console.log('- Sufficient SOL for deployment (~2-5 SOL)');
|
|
36
|
+
console.log('- Backed up your wallet keypair');
|
|
37
|
+
console.log('- Tested thoroughly on devnet\n');
|
|
38
|
+
// Simple confirmation (in production, might want more robust confirmation)
|
|
39
|
+
const readline = require('readline');
|
|
40
|
+
const rl = readline.createInterface({
|
|
41
|
+
input: process.stdin,
|
|
42
|
+
output: process.stdout
|
|
43
|
+
});
|
|
44
|
+
await new Promise((resolve) => {
|
|
45
|
+
rl.question('Type "DEPLOY" to confirm: ', (answer) => {
|
|
46
|
+
if (answer !== 'DEPLOY') {
|
|
47
|
+
console.log('❌ Deployment cancelled');
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
50
|
+
rl.close();
|
|
51
|
+
resolve(null);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
}
|
|
7
55
|
try {
|
|
8
56
|
// Check if we're in an Anchor project
|
|
9
57
|
(0, child_process_1.execSync)('ls Anchor.toml', { stdio: 'pipe' });
|
|
@@ -14,15 +62,38 @@ async function deployCommand() {
|
|
|
14
62
|
process.exit(1);
|
|
15
63
|
}
|
|
16
64
|
try {
|
|
17
|
-
|
|
65
|
+
// Update Anchor.toml with environment-specific settings
|
|
66
|
+
await updateAnchorConfig(env);
|
|
67
|
+
console.log(`Building program for ${env}...`);
|
|
18
68
|
(0, child_process_1.execSync)('anchor build', { stdio: 'inherit' });
|
|
19
|
-
console.log(
|
|
20
|
-
(0, child_process_1.execSync)(
|
|
21
|
-
console.log(
|
|
69
|
+
console.log(`\nDeploying to ${env}...`);
|
|
70
|
+
(0, child_process_1.execSync)(`anchor deploy --provider.cluster ${env}`, { stdio: 'inherit' });
|
|
71
|
+
console.log(`\n✅ Deployment to ${env} successful!`);
|
|
72
|
+
console.log(`🌐 RPC: ${ENV_CONFIGS[env].rpcUrl}`);
|
|
22
73
|
}
|
|
23
74
|
catch (error) {
|
|
24
|
-
console.error(
|
|
75
|
+
console.error(`❌ Deployment to ${env} failed`);
|
|
76
|
+
console.error(`Error: ${error.message}`);
|
|
25
77
|
process.exit(1);
|
|
26
78
|
}
|
|
27
79
|
}
|
|
80
|
+
async function updateAnchorConfig(env) {
|
|
81
|
+
try {
|
|
82
|
+
const anchorTomlPath = (0, path_1.join)(process.cwd(), 'Anchor.toml');
|
|
83
|
+
let anchorToml = (0, fs_1.readFileSync)(anchorTomlPath, 'utf8');
|
|
84
|
+
const config = ENV_CONFIGS[env];
|
|
85
|
+
// Update cluster setting
|
|
86
|
+
anchorToml = anchorToml.replace(/\[provider\]\ncluster\s*=\s*".*"/, `[provider]\ncluster = "${env}"`);
|
|
87
|
+
// Update RPC URL if present
|
|
88
|
+
if (config.rpcUrl) {
|
|
89
|
+
anchorToml = anchorToml.replace(/rpc_url\s*=\s*".*"/, `rpc_url = "${config.rpcUrl}"`);
|
|
90
|
+
}
|
|
91
|
+
(0, fs_1.writeFileSync)(anchorTomlPath, anchorToml);
|
|
92
|
+
console.log(`📝 Updated Anchor.toml for ${env} deployment`);
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
console.warn(`⚠️ Could not update Anchor.toml: ${error}`);
|
|
96
|
+
console.log('Continuing with default configuration...');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
28
99
|
//# sourceMappingURL=deploy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":";;AA4BA,sCAiEC;AA7FD,iDAAyC;AACzC,2BAA6D;AAC7D,+BAA4B;AA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
+
"version": "2.2.2",
|
|
4
4
|
"description": "FORGE - Intent-driven app assembly on Solana",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://github.com/forge-protocol/forge#readme",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"commander": "^12.0.0"
|
|
37
|
+
"commander": "^12.0.0",
|
|
38
|
+
"glob": "^10.3.10"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@types/node": "^20",
|