-
Notifications
You must be signed in to change notification settings - Fork 192
/
package.json
688 lines (686 loc) · 23.4 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
{
"name": "solidity",
"description": "Ethereum Solidity Language for Visual Studio Code",
"keywords": [
"solidity",
"ethereum",
"blockchain",
"compiler",
"solium",
"nethereum",
"solhint"
],
"version": "0.0.179",
"publisher": "JuanBlanco",
"license": "MIT",
"engines": {
"vscode": "^1.77.0"
},
"files": [
"/dist/cli"
],
"activationEvents": [],
"contributors": [
"Juan Blanco"
],
"bugs": {
"url": "https://github.com/juanfranblanco/vscode-solidity/issues"
},
"icon": "images/icon.png",
"repository": {
"type": "git",
"url": "https://github.com/juanfranblanco/vscode-solidity"
},
"categories": [
"Programming Languages",
"Snippets"
],
"main": "./out/src/extension",
"bin": {
"vscode-solidity-server": "./dist/cli/server.js"
},
"scripts": {
"vscode:prepublish": "npm run compile",
"package": "vsce package",
"prepublishOnly": "tsc --noEmit && npm run build:cli",
"build:cli": "tsup src/server.ts -d dist/cli && sh scripts/add_shebang.sh dist/cli/server.js",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"test": "nyc --require ts-node/register --require source-map-support/register mocha test/**/*.spec.ts"
},
"dependencies": {
"@iarna/toml": "^2.2.5",
"axios": "^1.4.0",
"fs-extra": "^4.0.3",
"glob": "^8.1.0",
"@vscode/vsce": "^2.23.0",
"nethereum-codegen-old": "npm:nethereum-codegen@^1.0.26",
"nethereum-codegen": "npm:nethereum-codegen@^2.0.3",
"prettier": "^3.2.4",
"prettier-plugin-solidity": "^1.3.1",
"solc": "^0.8.24",
"solhint": "^4.1.1",
"solium": "^1.2.5",
"solparse-exp-jb": "3.0.3",
"vscode-languageclient": "^8.1.0",
"vscode-languageserver": "^8.1.0",
"vscode-languageserver-textdocument": "^1.0.8",
"vscode-uri": "3.0.2",
"yaml-js": "0.2.3"
},
"devDependencies": {
"@types/node": "^11.15.3",
"@types/vscode": "^1.77.0",
"ts-node": "^7.0.1",
"tslint": "^5.20.1",
"tsup": "^7.1.0",
"typescript": "^5.0.4",
"vsce": "^2.12.0"
},
"nyc": {
"extension": [
".ts"
],
"include": [
"src/**/*.ts"
],
"exclude": [
"**/*.d.ts",
"out",
"dist"
],
"all": true
},
"contributes": {
"configuration": {
"type": "object",
"title": "Solidity configuration",
"properties": {
"solidity.nodemodulespackage": {
"type": "string",
"default": "solc",
"description": "The node modules package to find the solcjs compiler"
},
"solidity.compileUsingRemoteVersion": {
"type": "string",
"default": "latest",
"description": "Configuration to download a 'remote' solc (js) version binary file from 'https://binaries.soliditylang.org/', for example: 'latest' will always use the latest version, or a specific version like: 'v0.4.3+commit.2353da71', use the command 'Solidity: Get solidity releases' to list all versions available, or just right click in a solidity file and select either `Solidity: Change global compiler version (Remote)` or `Solidity: Change workspace compiler version (Remote)` to use the wizard to set the correct version or setting for either the current workspace or globally"
},
"solidity.compilerOptimization": {
"type": "number",
"default": 200,
"description": "Optimize for how many times you intend to run the code. Lower values will optimize more for initial deployment cost, higher values will optimize more for high-frequency usage."
},
"solidity.evmVersion": {
"type": "string",
"default": "",
"description": "Evm version, ie london, istanbul, petersburg, constantinople, byzantium, tangerineWhistle, spuriousDragon, homestead, frontier, or leave it blank for the default evm version"
},
"solidity.viaIR": {
"type": "boolean",
"default": false,
"description": "Compile using the intermediate representation (IR) instead of the AST"
},
"solidity.compileUsingLocalVersion": {
"type": "string",
"default": "",
"description": "Compile using a local solc (js) binary file, please include the path of the file if wanted: 'C://v0.4.3+commit.2353da71.js'"
},
"solidity.defaultCompiler": {
"type": "string",
"description": "Sets the default compiler and compiler configuration to use. Remote will use the configured compiler using the setting 'compileUsingRemoteVersion' downloaded from https://binaries.soliditylang.org/', `localFile` will use the solc file in the location configured in the setting: `compileUsingLocalVersion`, `localNodeModule` will attempt to find the solc file in the node_modules folder / package configured on 'nodemodulespackage' and 'embedded' which will use the solc version packaged with the extension. The default is 'remote' which is configured as 'latest'",
"enum": [
"remote",
"localFile",
"localNodeModule",
"embedded"
],
"default": "remote"
},
"solidity.linter": {
"type": "string",
"enum": [
"",
"solhint",
"solium"
],
"default": "solhint",
"description": "Enables linting using either solium (ethlint) or solhint. Possible options 'solhint' and 'solium', the default is solhint"
},
"solidity.solhintRules": {
"type": [
"object"
],
"default": null,
"description": "Solhint linting validation rules"
},
"solidity.formatter": {
"type": "string",
"default": "prettier",
"enum": [
"none",
"prettier",
"forge"
],
"description": "Enables / disables the solidity formatter prettier (default) or forge (note it needs to be installed)"
},
"solidity.soliumRules": {
"type": [
"object"
],
"default": {
"imports-on-top": 0,
"variable-declarations": 0,
"indentation": [
"off",
4
],
"quotes": [
"off",
"double"
]
},
"description": "Solium linting validation rules"
},
"solidity.enabledAsYouTypeCompilationErrorCheck": {
"type": "boolean",
"default": true,
"description": "Enables as you type compilation of the document and error highlighting"
},
"solidity.validationDelay": {
"type": "number",
"default": 1500,
"description": "Delay to trigger the validation of the changes of the current document (compilation, solium)"
},
"solidity.packageDefaultDependenciesDirectory": {
"type": [
"string",
"string[]"
],
"default": [
"node_modules",
"lib"
],
"description": "Default directory for Packages Dependencies, i.e: 'node_modules', 'lib'. This is used to avoid typing imports with that path prefix, multiple dependency paths can be set as an array: ['node_modules', 'lib'] "
},
"solidity.monoRepoSupport": {
"type": "boolean",
"default": true,
"description": "Enables mono repo support in the current workspace, a project folder will be signaled if a file is found on the current folder or above including: remappings.txt, truffle-config.js, brownie-config.yaml, foundry.toml, hardhat.config.js, hardhat.config.ts, dappfile"
},
"solidity.packageDefaultDependenciesContractsDirectory": {
"type": [
"string",
"string[]"
],
"default": ["src", "contracts", ""],
"description": "Default directory where the Package Dependency store its contracts, i.e: 'src', 'contracts', or just a blank string '', this is used to avoid typing imports with subfolder paths"
},
"solidity.remappings": {
"type": "array",
"default": [],
"description": "Remappings to resolve contracts to local files / directories, i.e: [\"@openzeppelin/=lib/openzeppelin-contracts\",\"ds-test/=lib/ds-test/src/\"]"
},
"solidity.remappingsWindows": {
"type": "array",
"default": [],
"description": "Windows Remappings to resolve contracts to local Windows files / directories (Note this overrides the generic remapping settings if the OS is Windows) , i.e: [\"@openzeppelin/=C:/lib/openzeppelin-contracts\",\"ds-test/=C:/lib/ds-test/src/\"]"
},
"solidity.remappingsUnix": {
"type": "array",
"default": [],
"description": "Unix Remappings to resolve contracts to local Unix files / directories (Note this overrides the generic remapping settings if the OS is Unix based), i.e: [\"@openzeppelin/=/opt/lib/openzeppelin-contracts\",\"ds-test/=/opt/lib/ds-test/src/\"]"
},
"solidity.explorer_etherscan_apikey": {
"type": "string",
"default": "YourApiKey",
"description": "Api key for downloading ethereum smart contracts from etherscan.io"
},
"solidity.explorer_etherscan_optimism_apikey": {
"type": "string",
"default": "YourApiKey",
"description": "Api key for downloading optimism smart contracts from api-optimistic.etherscan.io"
},
"solidity.explorer_bscscan_apikey": {
"type": "string",
"default": "YourApiKey",
"description": "Api key for downloading Binance smart chain smart contracts from api.bscscan.com"
},
"solidity.explorer_polygonscan_apikey": {
"type": "string",
"default": "YourApiKey",
"description": "Api key for downloading polygon smart contracts from api.polygonscan.com"
}
}
},
"languages": [
{
"id": "solidity",
"aliases": [
"Solidity",
"solidity"
],
"extensions": [
".sol"
],
"configuration": "./solidity.configuration.json"
},
{
"id": "solidity-markdown-injection"
},
{
"id": "json",
"aliases": ["JSON", "json"],
"extensions": [".nethereum-gen.multisettings"]
}
],
"configurationDefaults": {
"[json]": {
"files.associations": {
"nethereum-gen.multisettings": "json",
"nethereum-gen.settings": "json"
}
}
},
"commands": [
{
"command": "solidity.compile.active",
"title": "Solidity: Compile Contract"
},
{
"command": "solidity.compile.activeUsingRemote",
"title": "Solidity: Compile with configured Remote version"
},
{
"command": "solidity.compile.activeUsingLocalFile",
"title": "Solidity: Compile with configured Local solc file"
},
{
"command": "solidity.compile.activeUsingNodeModule",
"title": "Solidity: Compile with configured Node module"
},
{
"command": "solidity.compile",
"title": "Solidity: Compile All"
},
{
"command": "solidity.compilerInfo",
"title": "Solidity: Compiler Information"
},
{
"command": "solidity.solcReleases",
"title": "Solidity: Get solidity releases"
},
{
"command": "solidity.codegenNethereumCodeGenSettings",
"title": "Solidity: Create 'nethereum-gen.settings' with default values at root"
},
{
"command": "solidity.codegenCSharpProject",
"title": "Solidity: Code generate CSharp contract definition"
},
{
"command": "solidity.compileAndCodegenCSharpProject",
"title": "Solidity: Compile and Code generate CSharp contract definition"
},
{
"command": "solidity.codegenVbNetProject",
"title": "Solidity: Code generate VB.Net contract definition"
},
{
"command": "solidity.compileAndCodegenVbNetProject",
"title": "Solidity: Compile and Code generate VB.Net contract definition"
},
{
"command": "solidity.codegenFSharpProject",
"title": "Solidity: Code generate FSharp contract definition"
},
{
"command": "solidity.compileAndCodegenFSharpProject",
"title": "Solidity: Compile and Code generate FSharp contract definition"
},
{
"command": "solidity.codegenCSharpProjectAll",
"title": "Solidity: Code generate CSharp Project from all compiled files"
},
{
"command": "solidity.codegenVbNetProjectAll",
"title": "Solidity: Code generate VB.Net Project from all compiled files"
},
{
"command": "solidity.codegenFSharpProjectAll",
"title": "Solidity: Code generate FSharp Project from all compiled files"
},
{
"command": "solidity.codegenCSharpProjectAllAbiCurrent",
"title": "Solidity: Code generate CSharp Definitions for Abi files in current folder"
},
{
"command": "solidity.codegenVbNetProjectAllAbiCurrent",
"title": "Solidity: Code generate VB.Net Definitions for Abi files in current folder"
},
{
"command": "solidity.codegenFSharpProjectAllAbiCurrent",
"title": "Solidity: Code generate FSharp Definitions for Abi files in current folder"
},
{
"command": "solidity.codeGenFromNethereumGenAbisFile",
"title": "Solidity: Code generate Definitions for Abi files in selected 'nethereum-gen.multisettings'"
},
{
"command": "solidity.fixDocument",
"title": "Solidity: Fix document rules using Solium"
},
{
"command": "solidity.selectWorkspaceRemoteSolcVersion",
"title": "Solidity: Change workspace compiler version (Remote)"
},
{
"command": "solidity.selectGlobalRemoteSolcVersion",
"title": "Solidity: Change global compiler version (Remote)"
},
{
"command": "solidity.downloadRemoteSolcVersion",
"title": "Solidity: Download compiler"
},
{
"command": "solidity.downloadRemoteVersionAndSetLocalPathSetting",
"title": "Solidity: Download compiler and set workspace local Path"
},
{
"command": "solidity.changeDefaultCompilerType",
"title": "Solidity: Change the default workspace compiler to Remote, Local, NodeModule, Embedded"
},
{
"command": "solidity.downloadVerifiedSmartContractEtherscan",
"title": "Solidity: Download from Etherscan"
}
],
"submenus": [
{
"id": "solidity.codegen.submenu",
"label": "Solidity: Code Generation"
},
{
"id": "solidity.compilerSettings.submenu",
"label": "Solidity: Compiler Settings and Solc Versions"
},
{
"id": "solidity.downloadVerifiedContracts.submenu",
"label": "Solidity: Download smart contract source code / ABIs"
}],
"menus": {
"commandPalette": [
{
"when": "resourceExtname == .abi || resourceExtname == .json",
"command": "solidity.codegenCSharpProject"
},
{
"when": "resourceExtname == .abi || resourceExtname == .json",
"command": "solidity.codegenVbNetProject"
},
{
"when": "resourceExtname == .abi || resourceExtname == .json",
"command": "solidity.codegenFSharpProject"
},
{
"when": "resourceExtname == .sol",
"command": "solidity.compile.active"
},
{
"when": "explorerResourceIsFolder || resourceExtname == .sol || resourceExtname == .abi",
"command": "solidity.downloadVerifiedSmartContractEtherscan"
},
{
"when": "resourceExtname == .sol",
"command": "solidity.compile"
}
],
"solidity.codegen.submenu": [
{
"when": "editorLangId == 'solidity'",
"command": "solidity.codegenNethereumCodeGenSettings",
"group": "3_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compileAndCodegenCSharpProject",
"group": "3_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compileAndCodegenVbNetProject",
"group": "3_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compileAndCodegenFSharpProject",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenCSharpProject",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenVbNetProject",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenFSharpProject",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenCSharpProjectAllAbiCurrent",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenVbNetProjectAllAbiCurrent",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenFSharpProjectAllAbiCurrent",
"group": "3_solidity"
},
{
"when": "resourceFilename =~ /^(.*\\.)?nethereum-gen\\.multisettings$/",
"command": "solidity.codeGenFromNethereumGenAbisFile",
"group": "3_solidity"
}
],
"solidity.compilerSettings.submenu":[
{
"when": "editorLangId == 'solidity'",
"command": "solidity.changeDefaultCompilerType",
"group": "2_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.solcReleases",
"group": "2_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.selectGlobalRemoteSolcVersion",
"group": "2_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.selectWorkspaceRemoteSolcVersion",
"group": "2_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.downloadRemoteSolcVersion",
"group": "2_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.downloadRemoteVersionAndSetLocalPathSetting",
"group": "2_solidity"
}
],
"solidity.downloadVerifiedContracts.submenu":[
{
"when": "explorerResourceIsFolder || resourceExtname == .sol || resourceExtname == .abi",
"command": "solidity.downloadVerifiedSmartContractEtherscan",
"group": "2_solidity"
}
]
,
"editor/context": [
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compile.active",
"group": "1_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compile",
"group": "1_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compilerInfo",
"group": "1_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compile.activeUsingRemote",
"group": "1_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compile.activeUsingLocalFile",
"group": "1_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compile.activeUsingNodeModule",
"group": "1_solidity"
},
{
"when": "editorLangId == 'solidity'",
"submenu": "solidity.downloadVerifiedContracts.submenu",
"group": "4_solidity"
},
{
"when": "editorLangId == 'solidity'",
"submenu": "solidity.compilerSettings.submenu",
"group": "2_solidity"
},
{
"when": "editorLangId == 'solidity'",
"submenu": "solidity.codegen.submenu",
"group": "3_solidity"
},
{
"when": "resourceFilename =~ /^(.*\\.)?nethereum-gen\\.multisettings$/",
"command": "solidity.codeGenFromNethereumGenAbisFile",
"group": "3_solidity"
}
],
"explorer/context": [
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenCSharpProject",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenVbNetProject",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenFSharpProject",
"group": "3_solidity"
},
{
"when": "resourceExtname == .sol",
"command": "solidity.compile.active",
"group": "2_solidity"
},
{
"when": "resourceExtname == .sol",
"command": "solidity.compile",
"group": "2_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenCSharpProjectAllAbiCurrent",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenVbNetProjectAllAbiCurrent",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenFSharpProjectAllAbiCurrent",
"group": "3_solidity"
},
{
"when": "explorerResourceIsFolder || resourceExtname == .sol || resourceExtname == .abi",
"command": "solidity.downloadVerifiedSmartContractEtherscan",
"group": "2_solidity"
},
{
"when": "resourceFilename =~ /^(.*\\.)?nethereum-gen\\.multisettings$/",
"command": "solidity.codeGenFromNethereumGenAbisFile",
"group": "3_solidity"
}
]
},
"keybindings": [
{
"command": "solidity.compile.active",
"key": "f5",
"mac": "f5",
"when": "editorTextFocus && editorLangId == 'solidity'"
},
{
"command": "solidity.compile",
"key": "Ctrl+f5",
"mac": "Cmd+f5",
"when": "editorTextFocus && editorLangId == 'solidity'"
}
],
"snippets": [
{
"language": "solidity",
"path": "./snippets/solidity.json"
}
],
"grammars": [
{
"language": "solidity",
"scopeName": "source.solidity",
"path": "./syntaxes/solidity.json",
"balancedBracketScopes": [
"*"
],
"unbalancedBracketScopes": [
"meta.scope.case-pattern.solidity"
]
},
{
"language": "solidity-markdown-injection",
"scopeName": "markdown.solidity.codeblock",
"path": "./syntaxes/solidity-markdown-injection.json",
"injectTo": [
"text.html.markdown"
],
"embeddedLanguages": {
"meta.embedded.block.solidity": "solidity"
}
}
]
}
}