stylus-toolkit 0.1.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.
Files changed (78) hide show
  1. package/.claude/settings.local.json +20 -0
  2. package/CHANGELOG.md +30 -0
  3. package/CONTRIBUTING.md +50 -0
  4. package/LICENSE +21 -0
  5. package/README.md +132 -0
  6. package/dist/cli.d.ts +3 -0
  7. package/dist/cli.d.ts.map +1 -0
  8. package/dist/cli.js +62 -0
  9. package/dist/cli.js.map +1 -0
  10. package/dist/commands/benchmark.d.ts +3 -0
  11. package/dist/commands/benchmark.d.ts.map +1 -0
  12. package/dist/commands/benchmark.js +18 -0
  13. package/dist/commands/benchmark.js.map +1 -0
  14. package/dist/commands/config.d.ts +9 -0
  15. package/dist/commands/config.d.ts.map +1 -0
  16. package/dist/commands/config.js +63 -0
  17. package/dist/commands/config.js.map +1 -0
  18. package/dist/commands/init.d.ts +3 -0
  19. package/dist/commands/init.d.ts.map +1 -0
  20. package/dist/commands/init.js +115 -0
  21. package/dist/commands/init.js.map +1 -0
  22. package/dist/commands/profile.d.ts +3 -0
  23. package/dist/commands/profile.d.ts.map +1 -0
  24. package/dist/commands/profile.js +160 -0
  25. package/dist/commands/profile.js.map +1 -0
  26. package/dist/compiler/rust-compiler.d.ts +12 -0
  27. package/dist/compiler/rust-compiler.d.ts.map +1 -0
  28. package/dist/compiler/rust-compiler.js +141 -0
  29. package/dist/compiler/rust-compiler.js.map +1 -0
  30. package/dist/compiler/solidity-compiler.d.ts +10 -0
  31. package/dist/compiler/solidity-compiler.d.ts.map +1 -0
  32. package/dist/compiler/solidity-compiler.js +160 -0
  33. package/dist/compiler/solidity-compiler.js.map +1 -0
  34. package/dist/exporter/exporter.d.ts +13 -0
  35. package/dist/exporter/exporter.d.ts.map +1 -0
  36. package/dist/exporter/exporter.js +322 -0
  37. package/dist/exporter/exporter.js.map +1 -0
  38. package/dist/index.d.ts +11 -0
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/index.js +37 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/profiler/comparator.d.ts +10 -0
  43. package/dist/profiler/comparator.d.ts.map +1 -0
  44. package/dist/profiler/comparator.js +96 -0
  45. package/dist/profiler/comparator.js.map +1 -0
  46. package/dist/profiler/gas-profiler.d.ts +11 -0
  47. package/dist/profiler/gas-profiler.d.ts.map +1 -0
  48. package/dist/profiler/gas-profiler.js +143 -0
  49. package/dist/profiler/gas-profiler.js.map +1 -0
  50. package/dist/storage/results-store.d.ts +16 -0
  51. package/dist/storage/results-store.d.ts.map +1 -0
  52. package/dist/storage/results-store.js +107 -0
  53. package/dist/storage/results-store.js.map +1 -0
  54. package/dist/templates/generator.d.ts +11 -0
  55. package/dist/templates/generator.d.ts.map +1 -0
  56. package/dist/templates/generator.js +135 -0
  57. package/dist/templates/generator.js.map +1 -0
  58. package/dist/templates/templates.d.ts +2 -0
  59. package/dist/templates/templates.d.ts.map +1 -0
  60. package/dist/templates/templates.js +324 -0
  61. package/dist/templates/templates.js.map +1 -0
  62. package/dist/types/index.d.ts +115 -0
  63. package/dist/types/index.d.ts.map +1 -0
  64. package/dist/types/index.js +3 -0
  65. package/dist/types/index.js.map +1 -0
  66. package/dist/utils/config.d.ts +15 -0
  67. package/dist/utils/config.d.ts.map +1 -0
  68. package/dist/utils/config.js +77 -0
  69. package/dist/utils/config.js.map +1 -0
  70. package/dist/utils/file-system.d.ts +14 -0
  71. package/dist/utils/file-system.d.ts.map +1 -0
  72. package/dist/utils/file-system.js +84 -0
  73. package/dist/utils/file-system.js.map +1 -0
  74. package/dist/utils/logger.d.ts +20 -0
  75. package/dist/utils/logger.d.ts.map +1 -0
  76. package/dist/utils/logger.js +76 -0
  77. package/dist/utils/logger.js.map +1 -0
  78. package/package.json +75 -0
@@ -0,0 +1,324 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TEMPLATES = void 0;
4
+ exports.TEMPLATES = {
5
+ basic: {
6
+ name: 'Counter',
7
+ rust: `#![cfg_attr(not(feature = "export-abi"), no_main)]
8
+ extern crate alloc;
9
+
10
+ use stylus_sdk::{alloy_primitives::U256, prelude::*, storage::StorageU256};
11
+
12
+ #[storage]
13
+ #[entrypoint]
14
+ pub struct Counter {
15
+ count: StorageU256,
16
+ }
17
+
18
+ #[public]
19
+ impl Counter {
20
+ pub fn increment(&mut self) {
21
+ let count = self.count.get() + U256::from(1);
22
+ self.count.set(count);
23
+ }
24
+
25
+ pub fn get_count(&self) -> U256 {
26
+ self.count.get()
27
+ }
28
+
29
+ pub fn set_count(&mut self, count: U256) {
30
+ self.count.set(count);
31
+ }
32
+ }
33
+ `,
34
+ solidity: `// SPDX-License-Identifier: MIT
35
+ pragma solidity ^0.8.20;
36
+
37
+ contract Counter {
38
+ uint256 private count;
39
+
40
+ function increment() public {
41
+ count += 1;
42
+ }
43
+
44
+ function getCount() public view returns (uint256) {
45
+ return count;
46
+ }
47
+
48
+ function setCount(uint256 _count) public {
49
+ count = _count;
50
+ }
51
+ }
52
+ `,
53
+ },
54
+ erc20: {
55
+ name: 'ERC20Token',
56
+ rust: `#![cfg_attr(not(feature = "export-abi"), no_main)]
57
+ extern crate alloc;
58
+
59
+ use stylus_sdk::{
60
+ alloy_primitives::{Address, U256},
61
+ prelude::*,
62
+ storage::{StorageMap, StorageU256},
63
+ };
64
+
65
+ #[storage]
66
+ #[entrypoint]
67
+ pub struct ERC20 {
68
+ balances: StorageMap<Address, StorageU256>,
69
+ allowances: StorageMap<Address, StorageMap<Address, StorageU256>>,
70
+ total_supply: StorageU256,
71
+ }
72
+
73
+ #[public]
74
+ impl ERC20 {
75
+ pub fn balance_of(&self, account: Address) -> U256 {
76
+ self.balances.get(account)
77
+ }
78
+
79
+ pub fn total_supply(&self) -> U256 {
80
+ self.total_supply.get()
81
+ }
82
+
83
+ pub fn transfer(&mut self, to: Address, amount: U256) -> bool {
84
+ let sender = msg::sender();
85
+ let sender_balance = self.balances.get(sender);
86
+
87
+ if sender_balance < amount {
88
+ return false;
89
+ }
90
+
91
+ self.balances.setter(sender).sub(amount);
92
+ self.balances.setter(to).add(amount);
93
+
94
+ true
95
+ }
96
+
97
+ pub fn approve(&mut self, spender: Address, amount: U256) -> bool {
98
+ let owner = msg::sender();
99
+ self.allowances.setter(owner).setter(spender).set(amount);
100
+ true
101
+ }
102
+
103
+ pub fn allowance(&self, owner: Address, spender: Address) -> U256 {
104
+ self.allowances.get(owner).get(spender)
105
+ }
106
+ }
107
+ `,
108
+ solidity: `// SPDX-License-Identifier: MIT
109
+ pragma solidity ^0.8.20;
110
+
111
+ contract ERC20Token {
112
+ mapping(address => uint256) private balances;
113
+ mapping(address => mapping(address => uint256)) private allowances;
114
+ uint256 private totalSupply;
115
+
116
+ string public name = "MyToken";
117
+ string public symbol = "MTK";
118
+ uint8 public decimals = 18;
119
+
120
+ function balanceOf(address account) public view returns (uint256) {
121
+ return balances[account];
122
+ }
123
+
124
+ function transfer(address to, uint256 amount) public returns (bool) {
125
+ require(balances[msg.sender] >= amount, "Insufficient balance");
126
+
127
+ balances[msg.sender] -= amount;
128
+ balances[to] += amount;
129
+
130
+ return true;
131
+ }
132
+
133
+ function approve(address spender, uint256 amount) public returns (bool) {
134
+ allowances[msg.sender][spender] = amount;
135
+ return true;
136
+ }
137
+
138
+ function allowance(address owner, address spender) public view returns (uint256) {
139
+ return allowances[owner][spender];
140
+ }
141
+
142
+ function getTotalSupply() public view returns (uint256) {
143
+ return totalSupply;
144
+ }
145
+ }
146
+ `,
147
+ },
148
+ erc721: {
149
+ name: 'ERC721NFT',
150
+ rust: `#![cfg_attr(not(feature = "export-abi"), no_main)]
151
+ extern crate alloc;
152
+
153
+ use stylus_sdk::{
154
+ alloy_primitives::{Address, U256},
155
+ prelude::*,
156
+ storage::{StorageMap, StorageU256},
157
+ };
158
+
159
+ #[storage]
160
+ #[entrypoint]
161
+ pub struct ERC721 {
162
+ owners: StorageMap<U256, Address>,
163
+ balances: StorageMap<Address, StorageU256>,
164
+ token_approvals: StorageMap<U256, Address>,
165
+ next_token_id: StorageU256,
166
+ }
167
+
168
+ #[public]
169
+ impl ERC721 {
170
+ pub fn owner_of(&self, token_id: U256) -> Address {
171
+ self.owners.get(token_id)
172
+ }
173
+
174
+ pub fn balance_of(&self, owner: Address) -> U256 {
175
+ self.balances.get(owner)
176
+ }
177
+
178
+ pub fn mint(&mut self, to: Address) -> U256 {
179
+ let token_id = self.next_token_id.get();
180
+
181
+ self.owners.setter(token_id).set(to);
182
+ self.balances.setter(to).add(U256::from(1));
183
+ self.next_token_id.set(token_id + U256::from(1));
184
+
185
+ token_id
186
+ }
187
+
188
+ pub fn transfer_from(&mut self, from: Address, to: Address, token_id: U256) -> bool {
189
+ let owner = self.owners.get(token_id);
190
+
191
+ if owner != from {
192
+ return false;
193
+ }
194
+
195
+ self.owners.setter(token_id).set(to);
196
+ self.balances.setter(from).sub(U256::from(1));
197
+ self.balances.setter(to).add(U256::from(1));
198
+
199
+ true
200
+ }
201
+ }
202
+ `,
203
+ solidity: `// SPDX-License-Identifier: MIT
204
+ pragma solidity ^0.8.20;
205
+
206
+ contract ERC721NFT {
207
+ mapping(uint256 => address) private owners;
208
+ mapping(address => uint256) private balances;
209
+ mapping(uint256 => address) private tokenApprovals;
210
+
211
+ uint256 private nextTokenId;
212
+
213
+ function ownerOf(uint256 tokenId) public view returns (address) {
214
+ return owners[tokenId];
215
+ }
216
+
217
+ function balanceOf(address owner) public view returns (uint256) {
218
+ return balances[owner];
219
+ }
220
+
221
+ function mint(address to) public returns (uint256) {
222
+ uint256 tokenId = nextTokenId;
223
+
224
+ owners[tokenId] = to;
225
+ balances[to] += 1;
226
+ nextTokenId += 1;
227
+
228
+ return tokenId;
229
+ }
230
+
231
+ function transferFrom(address from, address to, uint256 tokenId) public returns (bool) {
232
+ require(owners[tokenId] == from, "Not owner");
233
+
234
+ owners[tokenId] = to;
235
+ balances[from] -= 1;
236
+ balances[to] += 1;
237
+
238
+ return true;
239
+ }
240
+ }
241
+ `,
242
+ },
243
+ defi: {
244
+ name: 'SimpleDEX',
245
+ rust: `#![cfg_attr(not(feature = "export-abi"), no_main)]
246
+ extern crate alloc;
247
+
248
+ use stylus_sdk::{
249
+ alloy_primitives::{Address, U256},
250
+ prelude::*,
251
+ storage::{StorageMap, StorageU256},
252
+ };
253
+
254
+ #[storage]
255
+ #[entrypoint]
256
+ pub struct SimpleDEX {
257
+ liquidity: StorageMap<Address, StorageU256>,
258
+ reserves: StorageU256,
259
+ }
260
+
261
+ #[public]
262
+ impl SimpleDEX {
263
+ pub fn add_liquidity(&mut self, amount: U256) {
264
+ let provider = msg::sender();
265
+ self.liquidity.setter(provider).add(amount);
266
+ self.reserves.set(self.reserves.get() + amount);
267
+ }
268
+
269
+ pub fn remove_liquidity(&mut self, amount: U256) -> bool {
270
+ let provider = msg::sender();
271
+ let current_liquidity = self.liquidity.get(provider);
272
+
273
+ if current_liquidity < amount {
274
+ return false;
275
+ }
276
+
277
+ self.liquidity.setter(provider).sub(amount);
278
+ self.reserves.set(self.reserves.get() - amount);
279
+
280
+ true
281
+ }
282
+
283
+ pub fn get_liquidity(&self, provider: Address) -> U256 {
284
+ self.liquidity.get(provider)
285
+ }
286
+
287
+ pub fn get_reserves(&self) -> U256 {
288
+ self.reserves.get()
289
+ }
290
+ }
291
+ `,
292
+ solidity: `// SPDX-License-Identifier: MIT
293
+ pragma solidity ^0.8.20;
294
+
295
+ contract SimpleDEX {
296
+ mapping(address => uint256) private liquidity;
297
+ uint256 private reserves;
298
+
299
+ function addLiquidity(uint256 amount) public {
300
+ liquidity[msg.sender] += amount;
301
+ reserves += amount;
302
+ }
303
+
304
+ function removeLiquidity(uint256 amount) public returns (bool) {
305
+ require(liquidity[msg.sender] >= amount, "Insufficient liquidity");
306
+
307
+ liquidity[msg.sender] -= amount;
308
+ reserves -= amount;
309
+
310
+ return true;
311
+ }
312
+
313
+ function getLiquidity(address provider) public view returns (uint256) {
314
+ return liquidity[provider];
315
+ }
316
+
317
+ function getReserves() public view returns (uint256) {
318
+ return reserves;
319
+ }
320
+ }
321
+ `,
322
+ },
323
+ };
324
+ //# sourceMappingURL=templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/templates/templates.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAwB;IAC5C,KAAK,EAAE;QACL,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BT;QACG,QAAQ,EAAE;;;;;;;;;;;;;;;;;;CAkBb;KACE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDT;QACG,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCb;KACE;IACD,MAAM,EAAE;QACN,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDT;QACG,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCb;KACE;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CT;QACG,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Bb;KACE;CACF,CAAC"}
@@ -0,0 +1,115 @@
1
+ export interface ProjectConfig {
2
+ name: string;
3
+ version: string;
4
+ template: string;
5
+ hasRust: boolean;
6
+ hasSolidity: boolean;
7
+ createdAt: string;
8
+ }
9
+ export interface CompilationResult {
10
+ success: boolean;
11
+ language: 'rust' | 'solidity';
12
+ contractName: string;
13
+ bytecode: string;
14
+ abi?: any[];
15
+ wasmSize?: number;
16
+ bytecodeSizeKb: number;
17
+ compilationTime: number;
18
+ errors?: string[];
19
+ warnings?: string[];
20
+ }
21
+ export interface GasProfile {
22
+ contractName: string;
23
+ language: 'rust' | 'solidity';
24
+ deploymentGas: number;
25
+ functionGas: Map<string, FunctionGasData>;
26
+ timestamp: string;
27
+ network: string;
28
+ blockNumber?: number;
29
+ }
30
+ export interface FunctionGasData {
31
+ functionName: string;
32
+ gasUsed: number;
33
+ executions: number;
34
+ avgGas: number;
35
+ minGas: number;
36
+ maxGas: number;
37
+ testCases: TestCase[];
38
+ }
39
+ export interface TestCase {
40
+ name: string;
41
+ inputs: any[];
42
+ gasUsed: number;
43
+ success: boolean;
44
+ error?: string;
45
+ }
46
+ export interface ComparisonResult {
47
+ contractName: string;
48
+ rustProfile: GasProfile;
49
+ solidityProfile: GasProfile;
50
+ savings: GasSavings;
51
+ timestamp: string;
52
+ }
53
+ export interface GasSavings {
54
+ deploymentSavings: {
55
+ absolute: number;
56
+ percentage: number;
57
+ };
58
+ functionSavings: Map<string, FunctionSavings>;
59
+ totalAvgSavings: {
60
+ absolute: number;
61
+ percentage: number;
62
+ };
63
+ }
64
+ export interface FunctionSavings {
65
+ functionName: string;
66
+ absolute: number;
67
+ percentage: number;
68
+ rustGas: number;
69
+ solidityGas: number;
70
+ }
71
+ export interface BenchmarkConfig {
72
+ iterations: number;
73
+ warmup: number;
74
+ timeout: number;
75
+ }
76
+ export interface NetworkConfig {
77
+ name: string;
78
+ rpcUrl: string;
79
+ chainId: number;
80
+ explorer?: string;
81
+ }
82
+ export interface ToolkitConfig {
83
+ defaultNetwork: string;
84
+ networks: Map<string, NetworkConfig>;
85
+ gasPrice: string;
86
+ privateKey?: string;
87
+ resultsDir: string;
88
+ }
89
+ export interface ExportOptions {
90
+ format: 'json' | 'csv' | 'html';
91
+ outputPath?: string;
92
+ includeRawData?: boolean;
93
+ }
94
+ export interface ProfileOptions {
95
+ contract?: string;
96
+ rpcUrl?: string;
97
+ network: string;
98
+ rustPath?: string;
99
+ solidityPath?: string;
100
+ export: string;
101
+ compile: boolean;
102
+ detailed: boolean;
103
+ }
104
+ export interface InitOptions {
105
+ name?: string;
106
+ template: string;
107
+ rustOnly: boolean;
108
+ solidityOnly: boolean;
109
+ }
110
+ export interface BenchmarkOptions {
111
+ contract?: string;
112
+ iterations: string;
113
+ export: string;
114
+ }
115
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE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;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import { ToolkitConfig, NetworkConfig } from '../types';
2
+ declare class ConfigManager {
3
+ private config;
4
+ constructor();
5
+ get(key: keyof ToolkitConfig): any;
6
+ set(key: keyof ToolkitConfig, value: any): void;
7
+ getNetwork(networkName: string): NetworkConfig | undefined;
8
+ addNetwork(name: string, network: NetworkConfig): void;
9
+ listNetworks(): string[];
10
+ reset(): void;
11
+ getAll(): ToolkitConfig;
12
+ }
13
+ export declare const config: ConfigManager;
14
+ export {};
15
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAsCxD,cAAM,aAAa;IACjB,OAAO,CAAC,MAAM,CAAsB;;IASpC,GAAG,CAAC,GAAG,EAAE,MAAM,aAAa,GAAG,GAAG;IAIlC,GAAG,CAAC,GAAG,EAAE,MAAM,aAAa,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAI/C,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAK1D,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI;IAMtD,YAAY,IAAI,MAAM,EAAE;IAKxB,KAAK,IAAI,IAAI;IAKb,MAAM,IAAI,aAAa;CAGxB;AAED,eAAO,MAAM,MAAM,eAAsB,CAAC"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.config = void 0;
7
+ const conf_1 = __importDefault(require("conf"));
8
+ const defaultNetworks = new Map([
9
+ [
10
+ 'local',
11
+ {
12
+ name: 'Local Stylus Testnet',
13
+ rpcUrl: 'http://localhost:8547',
14
+ chainId: 412346,
15
+ },
16
+ ],
17
+ [
18
+ 'arbitrum-sepolia',
19
+ {
20
+ name: 'Arbitrum Sepolia',
21
+ rpcUrl: 'https://sepolia-rollup.arbitrum.io/rpc',
22
+ chainId: 421614,
23
+ explorer: 'https://sepolia.arbiscan.io',
24
+ },
25
+ ],
26
+ [
27
+ 'arbitrum-one',
28
+ {
29
+ name: 'Arbitrum One',
30
+ rpcUrl: 'https://arb1.arbitrum.io/rpc',
31
+ chainId: 42161,
32
+ explorer: 'https://arbiscan.io',
33
+ },
34
+ ],
35
+ ]);
36
+ const defaultConfig = {
37
+ defaultNetwork: 'local',
38
+ networks: defaultNetworks,
39
+ gasPrice: 'auto',
40
+ resultsDir: '.stylus-toolkit/results',
41
+ };
42
+ class ConfigManager {
43
+ constructor() {
44
+ this.config = new conf_1.default({
45
+ projectName: 'stylus-toolkit',
46
+ defaults: defaultConfig,
47
+ });
48
+ }
49
+ get(key) {
50
+ return this.config.get(key);
51
+ }
52
+ set(key, value) {
53
+ this.config.set(key, value);
54
+ }
55
+ getNetwork(networkName) {
56
+ const networks = this.config.get('networks');
57
+ return networks[networkName];
58
+ }
59
+ addNetwork(name, network) {
60
+ const networks = this.config.get('networks');
61
+ networks[name] = network;
62
+ this.config.set('networks', networks);
63
+ }
64
+ listNetworks() {
65
+ const networks = this.config.get('networks');
66
+ return Object.keys(networks);
67
+ }
68
+ reset() {
69
+ this.config.clear();
70
+ this.config.set(defaultConfig);
71
+ }
72
+ getAll() {
73
+ return this.config.store;
74
+ }
75
+ }
76
+ exports.config = new ConfigManager();
77
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAGxB,MAAM,eAAe,GAA+B,IAAI,GAAG,CAAC;IAC1D;QACE,OAAO;QACP;YACE,IAAI,EAAE,sBAAsB;YAC5B,MAAM,EAAE,uBAAuB;YAC/B,OAAO,EAAE,MAAM;SAChB;KACF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;QACV,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAQ,CAAC;QACpD,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;IAED,KAAK;QACH,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,aAAoB,CAAC,CAAC;IACxC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,KAAsB,CAAC;IAC5C,CAAC;CACF;AAEY,QAAA,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC"}
@@ -0,0 +1,14 @@
1
+ export declare class FileSystem {
2
+ static ensureDir(dirPath: string): Promise<void>;
3
+ static writeFile(filePath: string, content: string): Promise<void>;
4
+ static readFile(filePath: string): Promise<string>;
5
+ static fileExists(filePath: string): Promise<boolean>;
6
+ static copyTemplate(templateDir: string, targetDir: string): Promise<void>;
7
+ static writeJson(filePath: string, data: any): Promise<void>;
8
+ static readJson(filePath: string): Promise<any>;
9
+ static getProjectRoot(): string;
10
+ static createProjectStructure(projectName: string, hasRust: boolean, hasSolidity: boolean): Promise<string>;
11
+ static findContract(contractName: string, language: 'rust' | 'solidity'): Promise<string | null>;
12
+ static listContracts(language: 'rust' | 'solidity'): Promise<string[]>;
13
+ }
14
+ //# sourceMappingURL=file-system.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-system.d.ts","sourceRoot":"","sources":["../../src/utils/file-system.ts"],"names":[],"mappings":"AAGA,qBAAa,UAAU;WACR,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;WAIzC,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;WAI3D,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;WAI3C,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;WAI9C,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;WAInE,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;WAIrD,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIrD,MAAM,CAAC,cAAc,IAAI,MAAM;WAIlB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;WAqBpG,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;WAoBzF,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAmB7E"}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.FileSystem = void 0;
7
+ const fs_extra_1 = __importDefault(require("fs-extra"));
8
+ const path_1 = __importDefault(require("path"));
9
+ class FileSystem {
10
+ static async ensureDir(dirPath) {
11
+ await fs_extra_1.default.ensureDir(dirPath);
12
+ }
13
+ static async writeFile(filePath, content) {
14
+ await fs_extra_1.default.writeFile(filePath, content, 'utf-8');
15
+ }
16
+ static async readFile(filePath) {
17
+ return await fs_extra_1.default.readFile(filePath, 'utf-8');
18
+ }
19
+ static async fileExists(filePath) {
20
+ return await fs_extra_1.default.pathExists(filePath);
21
+ }
22
+ static async copyTemplate(templateDir, targetDir) {
23
+ await fs_extra_1.default.copy(templateDir, targetDir);
24
+ }
25
+ static async writeJson(filePath, data) {
26
+ await fs_extra_1.default.writeJson(filePath, data, { spaces: 2 });
27
+ }
28
+ static async readJson(filePath) {
29
+ return await fs_extra_1.default.readJson(filePath);
30
+ }
31
+ static getProjectRoot() {
32
+ return process.cwd();
33
+ }
34
+ static async createProjectStructure(projectName, hasRust, hasSolidity) {
35
+ const projectPath = path_1.default.join(this.getProjectRoot(), projectName);
36
+ await this.ensureDir(projectPath);
37
+ if (hasRust) {
38
+ await this.ensureDir(path_1.default.join(projectPath, 'contracts-rust'));
39
+ await this.ensureDir(path_1.default.join(projectPath, 'contracts-rust', 'src'));
40
+ }
41
+ if (hasSolidity) {
42
+ await this.ensureDir(path_1.default.join(projectPath, 'contracts-solidity'));
43
+ }
44
+ await this.ensureDir(path_1.default.join(projectPath, 'test'));
45
+ await this.ensureDir(path_1.default.join(projectPath, 'scripts'));
46
+ await this.ensureDir(path_1.default.join(projectPath, '.stylus-toolkit'));
47
+ return projectPath;
48
+ }
49
+ static async findContract(contractName, language) {
50
+ const root = this.getProjectRoot();
51
+ const searchDirs = language === 'rust'
52
+ ? ['contracts-rust/src', 'src', 'contracts']
53
+ : ['contracts-solidity', 'contracts', 'solidity'];
54
+ for (const dir of searchDirs) {
55
+ const fullPath = path_1.default.join(root, dir);
56
+ if (await this.fileExists(fullPath)) {
57
+ const ext = language === 'rust' ? '.rs' : '.sol';
58
+ const contractPath = path_1.default.join(fullPath, `${contractName}${ext}`);
59
+ if (await this.fileExists(contractPath)) {
60
+ return contractPath;
61
+ }
62
+ }
63
+ }
64
+ return null;
65
+ }
66
+ static async listContracts(language) {
67
+ const root = this.getProjectRoot();
68
+ const searchDirs = language === 'rust'
69
+ ? ['contracts-rust/src', 'src', 'contracts']
70
+ : ['contracts-solidity', 'contracts', 'solidity'];
71
+ const contracts = [];
72
+ for (const dir of searchDirs) {
73
+ const fullPath = path_1.default.join(root, dir);
74
+ if (await this.fileExists(fullPath)) {
75
+ const ext = language === 'rust' ? '.rs' : '.sol';
76
+ const files = await fs_extra_1.default.readdir(fullPath);
77
+ contracts.push(...files.filter(f => f.endsWith(ext)).map(f => f.replace(ext, '')));
78
+ }
79
+ }
80
+ return [...new Set(contracts)];
81
+ }
82
+ }
83
+ exports.FileSystem = FileSystem;
84
+ //# sourceMappingURL=file-system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-system.js","sourceRoot":"","sources":["../../src/utils/file-system.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA0B;AAC1B,gDAAwB;AAExB,MAAa,UAAU;IACrB,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,OAAe;QACpC,MAAM,kBAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,QAAgB,EAAE,OAAe;QACtD,MAAM,kBAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAgB;QACpC,OAAO,MAAM,kBAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,QAAgB;QACtC,OAAO,MAAM,kBAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,WAAmB,EAAE,SAAiB;QAC9D,MAAM,kBAAE,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IACxC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,QAAgB,EAAE,IAAS;QAChD,MAAM,kBAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,QAAQ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