genlayer 0.35.1 → 0.35.2

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.
Files changed (2) hide show
  1. package/dist/index.js +22 -24
  2. package/package.json +2 -2
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.35.1";
20081
+ var version = "0.35.2";
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.21.0",
20159
+ "genlayer-js": "^0.21.2",
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-5KRGDGMO.js
33749
+ // node_modules/genlayer-js/dist/chunk-T3O6IXYQ.js
33750
33750
  var chains_exports = {};
33751
33751
  __export2(chains_exports, {
33752
33752
  localnet: () => localnet,
@@ -43249,8 +43249,7 @@ var STAKING_ABI = [
43249
43249
  outputs: [{ name: "", type: "address" }]
43250
43250
  }
43251
43251
  ];
43252
- var TESTNET_JSON_RPC_URL = "https://zksync-os-testnet-genlayer.zksync.dev";
43253
- var TESTNET_WS_URL = "wss://zksync-os-testnet-genlayer.zksync.dev/ws";
43252
+ var TESTNET_JSON_RPC_URL = "http://34.12.136.220:9151";
43254
43253
  var STAKING_CONTRACT = {
43255
43254
  address: "0x63Fa5E0bb10fb6fA98F44726C5518223F767687A",
43256
43255
  abi: STAKING_ABI
@@ -47232,8 +47231,7 @@ var testnetAsimov = defineChain({
47232
47231
  name: "Genlayer Asimov Testnet",
47233
47232
  rpcUrls: {
47234
47233
  default: {
47235
- http: [TESTNET_JSON_RPC_URL],
47236
- webSocket: [TESTNET_WS_URL]
47234
+ http: [TESTNET_JSON_RPC_URL]
47237
47235
  }
47238
47236
  },
47239
47237
  nativeCurrency: {
@@ -47254,8 +47252,7 @@ var testnetAsimov = defineChain({
47254
47252
  defaultNumberOfInitialValidators: 5,
47255
47253
  defaultConsensusMaxRotations: 3
47256
47254
  });
47257
- var TESTNET_JSON_RPC_URL2 = "https://zksync-os-testnet-genlayer.zksync.dev";
47258
- var TESTNET_WS_URL2 = "wss://zksync-os-testnet-genlayer.zksync.dev/ws";
47255
+ var TESTNET_JSON_RPC_URL2 = "http://34.91.102.53:9151";
47259
47256
  var STAKING_CONTRACT2 = {
47260
47257
  address: "0x4A4449E617F8D10FDeD0b461CadEf83939E821A5",
47261
47258
  abi: STAKING_ABI
@@ -50583,8 +50580,7 @@ var testnetBradbury = defineChain({
50583
50580
  name: "Genlayer Bradbury Testnet",
50584
50581
  rpcUrls: {
50585
50582
  default: {
50586
- http: [TESTNET_JSON_RPC_URL2],
50587
- webSocket: [TESTNET_WS_URL2]
50583
+ http: [TESTNET_JSON_RPC_URL2]
50588
50584
  }
50589
50585
  },
50590
50586
  nativeCurrency: {
@@ -51835,13 +51831,15 @@ var decodeInputData = (rlpEncodedAppData, recipient) => {
51835
51831
  }
51836
51832
  };
51837
51833
  var decodeTransaction = (tx) => {
51838
- const txDataDecoded = decodeInputData(tx.txData, tx.recipient);
51834
+ const txData = tx.txData ?? tx.txCalldata;
51835
+ const numOfInitialValidators = tx.numOfInitialValidators ?? tx.initialRotations;
51836
+ const txDataDecoded = decodeInputData(txData, tx.recipient);
51839
51837
  const decodedTx = {
51840
51838
  ...tx,
51841
- txData: tx.txData,
51839
+ txData,
51842
51840
  txDataDecoded,
51843
51841
  currentTimestamp: tx.currentTimestamp.toString(),
51844
- numOfInitialValidators: tx.numOfInitialValidators.toString(),
51842
+ numOfInitialValidators: numOfInitialValidators?.toString() ?? "0",
51845
51843
  txSlot: tx.txSlot.toString(),
51846
51844
  createdTimestamp: tx.createdTimestamp.toString(),
51847
51845
  lastVoteTimestamp: tx.lastVoteTimestamp.toString(),
@@ -51849,21 +51847,21 @@ var decodeTransaction = (tx) => {
51849
51847
  numOfRounds: tx.numOfRounds.toString(),
51850
51848
  readStateBlockRange: {
51851
51849
  ...tx.readStateBlockRange,
51852
- activationBlock: tx.readStateBlockRange.activationBlock.toString(),
51853
- processingBlock: tx.readStateBlockRange.processingBlock.toString(),
51854
- proposalBlock: tx.readStateBlockRange.proposalBlock.toString()
51850
+ activationBlock: tx.readStateBlockRange?.activationBlock?.toString() ?? "0",
51851
+ processingBlock: tx.readStateBlockRange?.processingBlock?.toString() ?? "0",
51852
+ proposalBlock: tx.readStateBlockRange?.proposalBlock?.toString() ?? "0"
51855
51853
  },
51856
51854
  statusName: transactionsStatusNumberToName[String(tx.status)],
51857
51855
  resultName: transactionResultNumberToName[String(tx.result)],
51858
51856
  lastRound: {
51859
51857
  ...tx.lastRound,
51860
- round: tx.lastRound.round.toString(),
51861
- leaderIndex: tx.lastRound.leaderIndex.toString(),
51862
- votesCommitted: tx.lastRound.votesCommitted.toString(),
51863
- votesRevealed: tx.lastRound.votesRevealed.toString(),
51864
- appealBond: tx.lastRound.appealBond.toString(),
51865
- rotationsLeft: tx.lastRound.rotationsLeft.toString(),
51866
- validatorVotesName: tx.lastRound.validatorVotes.map(
51858
+ round: tx.lastRound?.round?.toString() ?? "0",
51859
+ leaderIndex: tx.lastRound?.leaderIndex?.toString() ?? "0",
51860
+ votesCommitted: tx.lastRound?.votesCommitted?.toString() ?? "0",
51861
+ votesRevealed: tx.lastRound?.votesRevealed?.toString() ?? "0",
51862
+ appealBond: tx.lastRound?.appealBond?.toString() ?? "0",
51863
+ rotationsLeft: tx.lastRound?.rotationsLeft?.toString() ?? "0",
51864
+ validatorVotesName: (tx.lastRound?.validatorVotes ?? []).map(
51867
51865
  (vote) => voteTypeNumberToName[String(vote)]
51868
51866
  )
51869
51867
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genlayer",
3
- "version": "0.35.1",
3
+ "version": "0.35.2",
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.21.0",
78
+ "genlayer-js": "^0.21.2",
79
79
  "inquirer": "^12.0.0",
80
80
  "keytar": "^7.9.0",
81
81
  "node-fetch": "^3.0.0",