Skip to content

bug: --stdout with multiple contracts produces invalid output #2

@satoshai-dev

Description

@satoshai-dev

Description

When --stdout is used with multiple contracts, all outputs are written consecutively to stdout with no delimiter. For JSON format this produces invalid JSON (two concatenated objects). For TypeScript format it produces duplicate export const abi = declarations — also invalid.

Location

src/commands/fetch.ts — the loop calls process.stdout.write(output) for each contract.

Expected behavior

For TypeScript: each contract should get a uniquely named export (e.g., export const nftTraitAbi = ...).
For JSON: output should be a JSON array or use newline-delimited JSON (NDJSON).

Alternatively, error if --stdout + multiple contracts and no clear output strategy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions