genlayer 0.38.12 → 0.38.14

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.38.14](https://github.com/genlayerlabs/genlayer-cli/compare/v0.38.13...v0.38.14) (2026-04-02)
4
+
5
+ ## 0.38.13 (2026-04-01)
6
+
3
7
  ## 0.38.12 (2026-04-01)
4
8
 
5
9
  ## 0.38.11 (2026-04-01)
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.38.12";
20081
+ var version = "0.38.14";
20082
20082
  var package_default = {
20083
20083
  name: "genlayer",
20084
20084
  version,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genlayer",
3
- "version": "0.38.12",
3
+ "version": "0.38.14",
4
4
  "description": "GenLayer Command Line Tool",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -1,8 +1,11 @@
1
1
  import {describe, it, expect, beforeAll} from "vitest";
2
- import {createClient, parseStakingAmount, formatStakingAmount, abi} from "genlayer-js";
2
+ import {execSync} from "child_process";
3
+ import path from "path";
4
+ import {createClient, parseStakingAmount, formatStakingAmount} from "genlayer-js";
3
5
  import {testnetAsimov, testnetBradbury} from "genlayer-js/chains";
4
6
  import type {Address, GenLayerChain} from "genlayer-js/types";
5
- import {createPublicClient, http} from "viem";
7
+
8
+ const CLI = path.resolve(__dirname, "../dist/index.js");
6
9
 
7
10
  const TIMEOUT = 30_000;
8
11
 
@@ -121,34 +124,13 @@ describe(`Testnet ${name} - CLI Staking Smoke Tests`, () => {
121
124
  }
122
125
  }, TIMEOUT);
123
126
 
124
- it("viem createPublicClient can call staking contract directly", async () => {
125
- const rpcUrl = chain.rpcUrls.default.http[0];
126
- const stakingAddress = chain.stakingContract?.address;
127
- if (!stakingAddress) return;
128
-
129
- // Use the same id-fix workaround as StakingAction (GenLayer RPC rejects id=0)
130
- const publicClient = createPublicClient({
131
- chain,
132
- transport: http(rpcUrl, {
133
- async fetchFn(url, init) {
134
- if (init?.body) {
135
- const body = JSON.parse(init.body as string);
136
- if (body.id === 0) body.id = 1;
137
- init = {...init, body: JSON.stringify(body)};
138
- }
139
- return fetch(url, init);
140
- },
141
- }),
142
- });
143
-
144
- const count = await publicClient.readContract({
145
- address: stakingAddress as `0x${string}`,
146
- abi: abi.STAKING_ABI,
147
- functionName: "activeValidatorsCount",
148
- });
149
-
150
- expect(typeof count).toBe("bigint");
151
- expect(count as bigint >= 0n).toBe(true);
127
+ it("CLI: genlayer staking validators lists validators", () => {
128
+ const output = execSync(
129
+ `node ${CLI} staking validators --network ${name === "Asimov" ? "testnet-asimov" : "testnet-bradbury"}`,
130
+ {encoding: "utf-8", timeout: TIMEOUT},
131
+ );
132
+ expect(output).toContain("active");
133
+ expect(output).toMatch(/Total: \d+ validators/);
152
134
  }, TIMEOUT);
153
135
 
154
136
  it("parseStakingAmount and formatStakingAmount round-trip", () => {