Primitive word is advertised as uint256 but lacks external ABI evidence

Aperta
#608 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
haskell
Ambito
compilers

Direzione di ricerca

Start by reading ContractDispatch.abiTypeOf and the standard library definitions for SigString, ABIEncode, and ABIDecode mentioned in the issue. Reproduce the failure with the provided contract using ABI output enabled, specialization disabled, and legacy typeclass resolution. Trace how word is handled in selectors and encoding/decoding, including derived ADT fields and type arguments; done means the compiler supports the advertised representation consistently or rejects it before writing misleading ABI metadata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

ABI metadata represents primitive word as uint256, but std lacks the instances needed to use it at the external ABI boundary. With ABI output enabled and specialization disabled, the frontend with legacy typeclass resolution writes the metadata and then rejects the generated dispatch.

import * from std;
import * from std.dispatch;
contract Repro {
  function echo(value: word) public returns (word) {
    return value;
  }
}

Actual: The compiler writes Repro.abi with uint256 input/output entries, then exits with an error:

error[SC0223]: cannot entail: ABIDecoder<word, CalldataWordReader>: ABIDecode<word>

ContractDispatch.abiTypeOf maps word to uint256, but std has no corresponding word: SigString, word: ABIEncode, or ABIDecoder<word, reader>: ABIDecode<word> instances. The gap also matters when word appears in a derived ADT's fields or type arguments.

Expected: Define a consistent external-ABI policy for primitive word. If the advertised uint256 representation is supported, provide the full selector/encode/decode evidence together. Otherwise reject the unsupported ABI type explicitly before emitting apparently usable metadata.

Lingua principale
Haskell
Stelle
115
Fork
11
Merge medio
20h 29m
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di argotorg/solcore

Tutte le issue di argotorg/solcore

Issue simili

Altre issue su Haskell

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.