`toString` throws on any datum or output that holds an integer
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 22
- Forks
- 33
- Merge medio
- 21 h 38 min
- PR fusionados (30 d)
- 55
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de IntersectMBO/evolution-sdk
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
IntersectMBO/evolution-sdk#696 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
IntersectMBO/evolution-sdk#694 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
IntersectMBO/evolution-sdk#559 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
IntersectMBO/evolution-sdk#557 ·
Los mantenedores suelen responder en 1 día
-
txBuilder: committee cert redeemers are never resolved to a certificate indexPosiblemente ocupada @emmanuel-musau la tomó hace 14 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
IntersectMBO/evolution-sdk#518 ·
Los mantenedores suelen responder en 1 día
Todos los issues de IntersectMBO/evolution-sdk
Issues similares
-
Runner API: GET /api/jobs/<id> returns branch: null; the branch only appears under input.branchAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
radiancelux/prgenie#204 ·
Los mantenedores suelen responder en 1 día
-
bug documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
cqframework/vscode-cql#198 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
WalletConnect/walletconnect-monorepo#7392 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
sandtable-ai/sandtable#550 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100