genlayer 0.37.1 → 0.38.1
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 +8 -0
- package/dist/index.js +34 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -258,6 +258,14 @@ EXAMPLES:
|
|
|
258
258
|
genlayer appeal 0x1234... --bond 500gen
|
|
259
259
|
```
|
|
260
260
|
|
|
261
|
+
#### Transaction Trace
|
|
262
|
+
|
|
263
|
+
Inspect execution traces for debugging:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
genlayer transactions trace <txId> [--round N] [--rpc URL]
|
|
267
|
+
```
|
|
268
|
+
|
|
261
269
|
#### Account Management
|
|
262
270
|
|
|
263
271
|
View and manage your account.
|
package/dist/index.js
CHANGED
|
@@ -20078,7 +20078,7 @@ var require_cli_table3 = __commonJS({
|
|
|
20078
20078
|
import { program } from "commander";
|
|
20079
20079
|
|
|
20080
20080
|
// package.json
|
|
20081
|
-
var version = "0.
|
|
20081
|
+
var version = "0.38.1";
|
|
20082
20082
|
var package_default = {
|
|
20083
20083
|
name: "genlayer",
|
|
20084
20084
|
version,
|
|
@@ -55793,6 +55793,35 @@ var AppealAction = class extends BaseAction {
|
|
|
55793
55793
|
}
|
|
55794
55794
|
};
|
|
55795
55795
|
|
|
55796
|
+
// src/commands/transactions/trace.ts
|
|
55797
|
+
var TraceAction = class extends BaseAction {
|
|
55798
|
+
constructor() {
|
|
55799
|
+
super();
|
|
55800
|
+
}
|
|
55801
|
+
async trace({
|
|
55802
|
+
txId,
|
|
55803
|
+
round = 0,
|
|
55804
|
+
rpc
|
|
55805
|
+
}) {
|
|
55806
|
+
const client = await this.getClient(rpc, true);
|
|
55807
|
+
this.startSpinner(`Fetching execution trace for ${txId} (round: ${round})...`);
|
|
55808
|
+
try {
|
|
55809
|
+
const result = await client.request({
|
|
55810
|
+
method: "gen_dbg_traceTransaction",
|
|
55811
|
+
params: [{ txID: txId, round }]
|
|
55812
|
+
});
|
|
55813
|
+
const trace = result;
|
|
55814
|
+
if (!trace) {
|
|
55815
|
+
this.failSpinner("No trace found", `No execution trace found for transaction ${txId}`);
|
|
55816
|
+
return;
|
|
55817
|
+
}
|
|
55818
|
+
this.succeedSpinner("Execution trace retrieved", trace);
|
|
55819
|
+
} catch (error) {
|
|
55820
|
+
this.failSpinner("Error retrieving execution trace", error);
|
|
55821
|
+
}
|
|
55822
|
+
}
|
|
55823
|
+
};
|
|
55824
|
+
|
|
55796
55825
|
// src/commands/transactions/index.ts
|
|
55797
55826
|
function parseIntOption(value, fallback2) {
|
|
55798
55827
|
const parsed = parseInt(value, 10);
|
|
@@ -55812,6 +55841,10 @@ function initializeTransactionsCommands(program2) {
|
|
|
55812
55841
|
const appealAction = new AppealAction();
|
|
55813
55842
|
await appealAction.appealBond({ txId, ...options });
|
|
55814
55843
|
});
|
|
55844
|
+
program2.command("trace <txId>").description("Get execution trace for a transaction (return data, stdout, stderr, GenVM logs)").option("--round <round>", "Consensus round number (default: 0)", (value) => parseIntOption(value, 0), 0).option("--rpc <rpcUrl>", "RPC URL for the network").action(async (txId, options) => {
|
|
55845
|
+
const traceAction = new TraceAction();
|
|
55846
|
+
await traceAction.trace({ txId, ...options });
|
|
55847
|
+
});
|
|
55815
55848
|
return program2;
|
|
55816
55849
|
}
|
|
55817
55850
|
|