-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
235 lines (235 loc) · 7.92 KB
/
Copy pathpackage.json
File metadata and controls
235 lines (235 loc) · 7.92 KB
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
{
"name": "simbolik-komet",
"displayName": "Soroban Debugger (komet)",
"description": "Time-travel debugger for Stellar/Soroban smart contracts, backed by komet-node",
"version": "0.0.1",
"publisher": "runtimeverification",
"license": "BSD-3-Clause",
"engines": {
"vscode": "^1.85.0",
"node": ">=22"
},
"categories": [
"Debuggers"
],
"main": "./dist/extension.js",
"bin": {
"soroban-dap": "dist/dap-server.js",
"soroban-trace": "dist/trace.js"
},
"activationEvents": [
"onDebug"
],
"contributes": {
"configuration": {
"title": "Soroban Debugger (komet)",
"properties": {
"soroban.kometNode.path": {
"type": "string",
"default": "komet-node",
"markdownDescription": "Path to the `komet-node` executable. Defaults to `komet-node` found on your `PATH`; set an absolute path to override. A launch configuration's `node.command` takes precedence over this setting."
},
"soroban.stellar.path": {
"type": "string",
"default": "stellar",
"markdownDescription": "Path to the `stellar` CLI executable, used to build contracts (as `<stellar> contract build`). Defaults to `stellar` found on your `PATH`; set an absolute path to override. A launch configuration's `buildCommand` takes precedence over this setting."
}
}
},
"commands": [
{
"command": "soroban.debug",
"title": "Soroban: Debug Contract Function",
"category": "Soroban"
}
],
"breakpoints": [
{
"language": "rust"
}
],
"debuggers": [
{
"type": "soroban",
"label": "Soroban (komet)",
"languages": [
"rust"
],
"configurationAttributes": {
"launch": {
"required": [
"function"
],
"properties": {
"contract": {
"type": "string",
"description": "Path to the contract crate directory (containing Cargo.toml). Used to build the wasm.",
"default": "${workspaceFolder}"
},
"wasmPath": {
"type": "string",
"description": "Path to a prebuilt contract .wasm. Overrides building from `contract`."
},
"buildCommand": {
"type": "string",
"description": "Command used to build the contract wasm. Overrides the `soroban.stellar.path` setting. Defaults to `<soroban.stellar.path> contract build`."
},
"function": {
"type": "string",
"description": "Name of the contract function to invoke and debug."
},
"args": {
"type": "array",
"description": "Arguments to the function, each as { value, type }.",
"items": {
"type": "object",
"required": [
"value",
"type"
],
"properties": {
"value": {
"description": "The argument value (JSON)."
},
"type": {
"type": "string",
"description": "ScVal type.",
"enum": [
"bool",
"u32",
"i32",
"u64",
"i64",
"u128",
"i128",
"u256",
"i256",
"symbol",
"string",
"bytes",
"address",
"vec",
"map"
]
}
}
},
"default": []
},
"node": {
"type": "object",
"description": "komet-node connection / spawn settings.",
"properties": {
"attach": {
"type": "boolean",
"description": "Attach to an already-running komet-node instead of spawning one.",
"default": false
},
"host": {
"type": "string",
"default": "localhost"
},
"port": {
"type": "number",
"default": 8000
},
"command": {
"type": "string",
"description": "Path/command used to spawn komet-node. Overrides the `soroban.kometNode.path` setting (which defaults to `komet-node` on your PATH)."
},
"ioDir": {
"type": "string",
"description": "Directory for komet-node's I/O artifacts (--io-dir). Defaults to a fresh temp dir."
}
},
"default": {}
},
"sourceSecret": {
"type": "string",
"description": "Optional source account secret (S...). If omitted, a fresh account is seeded."
},
"rawTrace": {
"type": "string",
"description": "Attach mode: path to a precomputed JSONL trace file to replay (skips all RPC)."
},
"debugInfo": {
"type": "boolean",
"default": true,
"description": "Build the contract with DWARF debug info so the debugger can map execution to Rust source files and lines. Set false to build untouched and debug at the wasm level only."
}
}
}
},
"initialConfigurations": [
{
"type": "soroban",
"request": "launch",
"name": "Soroban: Debug add(1, 2)",
"contract": "${workspaceFolder}",
"function": "add",
"args": [
{
"value": 1,
"type": "u32"
},
{
"value": 2,
"type": "u32"
}
]
}
],
"configurationSnippets": [
{
"label": "Soroban: Debug contract function",
"description": "Build, deploy, and time-travel debug a Soroban contract function",
"body": {
"type": "soroban",
"request": "launch",
"name": "Soroban: Debug ${1:function}",
"contract": "^\"\\${workspaceFolder}\"",
"function": "${1:function}",
"args": []
}
}
]
}
]
},
"scripts": {
"vscode:prepublish": "npm run build -- --minify",
"build": "node esbuild.js",
"watch": "node esbuild.js --watch",
"check-types": "tsc --noEmit",
"lint": "eslint src --ext ts",
"pretest": "tsc -p tsconfig.test.json",
"test": "mocha",
"precoverage": "tsc -p tsconfig.test.json",
"coverage": "c8 mocha",
"precoverage:ci": "tsc -p tsconfig.test.json",
"coverage:ci": "c8 --check-coverage --lines 92 --branches 87 --functions 96 mocha",
"mutation": "stryker run"
},
"dependencies": {
"@stellar/stellar-sdk": "^13.3.0",
"@vscode/debugadapter": "^1.68.0",
"@vscode/debugprotocol": "^1.68.0",
"wasmparser": "^5.11.1"
},
"devDependencies": {
"@stryker-mutator/core": "^9.6.1",
"@stryker-mutator/mocha-runner": "^9.6.1",
"@types/mocha": "^10.0.7",
"@types/node": "^22.0.0",
"@types/vscode": "^1.85.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"@vscode/debugadapter-testsupport": "^1.68.0",
"c8": "^11.0.0",
"esbuild": "^0.23.0",
"eslint": "^8.57.0",
"fast-check": "^4.9.0",
"mocha": "^10.7.0",
"typescript": "^5.5.0"
}
}