`toString` throws on any datum or output that holds an integer
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- node.js, typescript
Rechercherichtung
Start with InlineDatum.ts and Inspectable.format, then compare the toJSON implementations in UTxO.ts, TxOut.ts, TransactionOutput.ts, and Redeemer.ts. Check how integers, byte strings, and maps are represented and whether the behavior is consistent across these classes. Done means toString and toJSON render data containing those values without throwing or losing their contents.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
new InlineDatum.InlineDatum({ data: Data.int(1n) }).toString() throws TypeError: Do not know how to serialize a BigInt. String(...), a template string and JSON.stringify on the same value throw it too, and so does toString() on a UTxO, TxOut, TransactionOutput or Redeemer whose data holds an integer anywhere. Every constructor holds one, since its index is a bigint, so an InlineDatum of Data.constr(0n, []) throws as well. Data without integers renders, but wrongly: the byte string ab shows as {"0": 171} and the map {1: 2} as {}. console.log works, because it prints through NodeInspectSymbol: { _tag: 'InlineDatum', data: 1n }.
InlineDatum.toJSON returns the data as it is (InlineDatum.ts:18-20), and toString passes that to Inspectable.format (InlineDatum.ts:26-27), which is JSON.stringify with no handling for bigint, Uint8Array or Map. UTxO.toJSON (UTxO.ts:32-46) and TxOut.toJSON (TxOut.ts:44-51) embed datumOption.toJSON(), BabbageTransactionOutput.toJSON embeds the datum object (TransactionOutput.ts:95-103), and Redeemer.toJSON returns data as it is (Redeemer.ts:93-101).
The failure does not depend on depth. Any integer or constructor anywhere in the data triggers it, so toString fails on every datum, UTxO, output or redeemer whose data uses a constructor. A log line or error message that puts one of these values in a template string throws a TypeError instead of printing. The behavior is the same before and after #677.
toString and toJSON on these classes should render any datum, with its integers, byte strings and maps.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 22
- Forks
- 33
- Ø Merge
- 21 Std. 38 Min.
- Gemergte PRs (30 T.)
- 55
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus IntersectMBO/evolution-sdk
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
IntersectMBO/evolution-sdk#696 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
IntersectMBO/evolution-sdk#694 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
IntersectMBO/evolution-sdk#559 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
IntersectMBO/evolution-sdk#557 ·
Maintainer antworten meist innerhalb von 1 Tag
-
txBuilder: committee cert redeemers are never resolved to a certificate indexEvtl. vergeben @emmanuel-musau hat das vor 15 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
IntersectMBO/evolution-sdk#518 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in IntersectMBO/evolution-sdk
Ähnliche Issues
-
Bug: Cloudflare Pages static _redirects identity rule causes RSC Flight to reload as HTMLEvtl. vergeben @Donvero hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Mantitup-Org/vista#210 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
simstudioai/sim#9831 ·
Maintainer antworten meist innerhalb von 1 Tag
-
status: waiting for maintainer
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
mui/material-ui#49751 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
diplodoc-platform/transform#1184 ·
Maintainer antworten meist innerhalb von 1 Tag