`toString` throws on any datum or output that holds an integer
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 22
- Fork
- 33
- Merge medio
- 21h 38m
- PR unite (30g)
- 55
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di IntersectMBO/evolution-sdk
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
IntersectMBO/evolution-sdk#696 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
IntersectMBO/evolution-sdk#694 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
IntersectMBO/evolution-sdk#559 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
IntersectMBO/evolution-sdk#557 ·
I maintainer di solito rispondono entro 1 giorno
-
txBuilder: committee cert redeemers are never resolved to a certificate indexForse già presa @emmanuel-musau l’ha presa 14 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
IntersectMBO/evolution-sdk#518 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di IntersectMBO/evolution-sdk
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
WalletConnect/walletconnect-monorepo#7392 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
fehler
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Azure/azure-functions-nodejs-extensions#180 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
laaielichter/Threesmith#28 ·
I maintainer di solito rispondono entro 1 giorno