Transaction.toString throws on governance transactions

未關閉
#737 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

這個 Issue 還沒有評估資料。

描述

bug

A Conway transaction carrying votes or proposals cannot be printed: tx.toString(), a template string or JSON.stringify(tx) throws Do not know how to serialize a BigInt. The transaction decodes, signs and submits normally; only rendering fails.

The toJSON of these body fields still returns bigints:

  • votingProcedures: govActionIndex
  • proposalProcedures: governanceAction.govActionId.govActionIndex, protocolVersion.major, protocolParamUpdate.costModels.*.costs, threshold.numerator

Measured on 528 recent mainnet transactions (80 votes, 110 proposals, the rest ordinary): toString throws on 98, all of them for one of the fields above (80 on govActionIndex in votes, 18 in proposals). Same on main and with #727, which fixes the Plutus data case and does not touch these classes.

To reproduce, decode any mainnet vote transaction with Transaction.fromCBORHex and call toString().

主要語言
TypeScript
星號
22
分支
34
平均合併
16 小時 53 分鐘
30 天內合併 PR
10

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

IntersectMBO/evolution-sdk 的其他 Issue

查看 IntersectMBO/evolution-sdk 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。