`toString` throws on any datum or output that holds an integer
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 55/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- node.js, typescript
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 22
- Forks
- 33
- Merge médio
- 21h 38min
- PRs com merge (30d)
- 55
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de IntersectMBO/evolution-sdk
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
IntersectMBO/evolution-sdk#696 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
IntersectMBO/evolution-sdk#694 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
IntersectMBO/evolution-sdk#559 ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
IntersectMBO/evolution-sdk#557 ·
Mantenedores costumam responder em até 1 dia
-
txBuilder: committee cert redeemers are never resolved to a certificate indexTalvez já em andamento @emmanuel-musau assumiu há 15 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
IntersectMBO/evolution-sdk#518 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de IntersectMBO/evolution-sdk
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
mcp: create_app refuses the Assistant Inbox spec as 'looks like an API key' (nesting deeper than 8)Abertaagent:claude agent:ready dogfood type:bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
opennextjs/opennextjs-cloudflare#1485 ·
Mantenedores costumam responder em até 1 dia
-
enhancement lane: fast tier: should-stable
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
unicef/adt-studio#1078 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
WenyuChiou/agent-board#1283 ·
Mantenedores costumam responder em até 1 dia