genlayer 0.37.0 → 0.38.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.
- package/README.md +8 -0
- package/dist/index.js +61 -6
- package/package.json +2 -2
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.0";
|
|
20082
20082
|
var package_default = {
|
|
20083
20083
|
name: "genlayer",
|
|
20084
20084
|
version,
|
|
@@ -20156,7 +20156,7 @@ var package_default = {
|
|
|
20156
20156
|
dotenv: "^17.0.0",
|
|
20157
20157
|
ethers: "^6.13.4",
|
|
20158
20158
|
"fs-extra": "^11.3.0",
|
|
20159
|
-
"genlayer-js": "^0.
|
|
20159
|
+
"genlayer-js": "^0.23.0",
|
|
20160
20160
|
inquirer: "^12.0.0",
|
|
20161
20161
|
keytar: "^7.9.0",
|
|
20162
20162
|
"node-fetch": "^3.0.0",
|
|
@@ -33746,7 +33746,7 @@ init_toHex();
|
|
|
33746
33746
|
init_keccak256();
|
|
33747
33747
|
init_formatEther();
|
|
33748
33748
|
|
|
33749
|
-
// node_modules/genlayer-js/dist/chunk-
|
|
33749
|
+
// node_modules/genlayer-js/dist/chunk-C4Z24PT6.js
|
|
33750
33750
|
var chains_exports = {};
|
|
33751
33751
|
__export2(chains_exports, {
|
|
33752
33752
|
localnet: () => localnet,
|
|
@@ -43231,6 +43231,20 @@ var STAKING_ABI = [
|
|
|
43231
43231
|
inputs: [{ name: "_validator", type: "address" }],
|
|
43232
43232
|
outputs: [{ name: "", type: "uint256" }]
|
|
43233
43233
|
},
|
|
43234
|
+
{
|
|
43235
|
+
name: "validatorMinStake",
|
|
43236
|
+
type: "function",
|
|
43237
|
+
stateMutability: "view",
|
|
43238
|
+
inputs: [],
|
|
43239
|
+
outputs: [{ name: "", type: "uint256" }]
|
|
43240
|
+
},
|
|
43241
|
+
{
|
|
43242
|
+
name: "delegatorMinStake",
|
|
43243
|
+
type: "function",
|
|
43244
|
+
stateMutability: "view",
|
|
43245
|
+
inputs: [],
|
|
43246
|
+
outputs: [{ name: "", type: "uint256" }]
|
|
43247
|
+
},
|
|
43234
43248
|
{
|
|
43235
43249
|
name: "validatorsCount",
|
|
43236
43250
|
type: "function",
|
|
@@ -52730,7 +52744,9 @@ var stakingActions = (client, publicClient) => {
|
|
|
52730
52744
|
epochMinDuration,
|
|
52731
52745
|
epochZeroMinDuration,
|
|
52732
52746
|
epochOdd,
|
|
52733
|
-
epochEven
|
|
52747
|
+
epochEven,
|
|
52748
|
+
valMinStake,
|
|
52749
|
+
delMinStake
|
|
52734
52750
|
] = await Promise.all([
|
|
52735
52751
|
contract.read.epoch(),
|
|
52736
52752
|
contract.read.finalized(),
|
|
@@ -52738,7 +52754,9 @@ var stakingActions = (client, publicClient) => {
|
|
|
52738
52754
|
contract.read.epochMinDuration(),
|
|
52739
52755
|
contract.read.epochZeroMinDuration(),
|
|
52740
52756
|
contract.read.epochOdd(),
|
|
52741
|
-
contract.read.epochEven()
|
|
52757
|
+
contract.read.epochEven(),
|
|
52758
|
+
contract.read.validatorMinStake(),
|
|
52759
|
+
contract.read.delegatorMinStake()
|
|
52742
52760
|
]);
|
|
52743
52761
|
const raw = epoch % 2n === 0n ? epochEven : epochOdd;
|
|
52744
52762
|
const currentEpochData = {
|
|
@@ -52766,7 +52784,11 @@ var stakingActions = (client, publicClient) => {
|
|
|
52766
52784
|
lastFinalizedEpoch: finalized,
|
|
52767
52785
|
activeValidatorsCount: activeCount,
|
|
52768
52786
|
epochMinDuration,
|
|
52769
|
-
nextEpochEstimate
|
|
52787
|
+
nextEpochEstimate,
|
|
52788
|
+
validatorMinStake: formatStakingAmount(valMinStake),
|
|
52789
|
+
validatorMinStakeRaw: valMinStake,
|
|
52790
|
+
delegatorMinStake: formatStakingAmount(delMinStake),
|
|
52791
|
+
delegatorMinStakeRaw: delMinStake
|
|
52770
52792
|
};
|
|
52771
52793
|
},
|
|
52772
52794
|
getEpochData: async (epochNumber) => {
|
|
@@ -55771,6 +55793,35 @@ var AppealAction = class extends BaseAction {
|
|
|
55771
55793
|
}
|
|
55772
55794
|
};
|
|
55773
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
|
+
|
|
55774
55825
|
// src/commands/transactions/index.ts
|
|
55775
55826
|
function parseIntOption(value, fallback2) {
|
|
55776
55827
|
const parsed = parseInt(value, 10);
|
|
@@ -55790,6 +55841,10 @@ function initializeTransactionsCommands(program2) {
|
|
|
55790
55841
|
const appealAction = new AppealAction();
|
|
55791
55842
|
await appealAction.appealBond({ txId, ...options });
|
|
55792
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
|
+
});
|
|
55793
55848
|
return program2;
|
|
55794
55849
|
}
|
|
55795
55850
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genlayer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "GenLayer Command Line Tool",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"dotenv": "^17.0.0",
|
|
76
76
|
"ethers": "^6.13.4",
|
|
77
77
|
"fs-extra": "^11.3.0",
|
|
78
|
-
"genlayer-js": "^0.
|
|
78
|
+
"genlayer-js": "^0.23.0",
|
|
79
79
|
"inquirer": "^12.0.0",
|
|
80
80
|
"keytar": "^7.9.0",
|
|
81
81
|
"node-fetch": "^3.0.0",
|