Skip to content

fix(cli): normalize null fallback ABI parameter lists - #2173

Open
yinbowen-dc wants to merge 1 commit into
graphprotocol:mainfrom
yinbowen-dc:codex/fix-1973-null-fallback-parameters
Open

yinbowen-dc wants to merge 1 commit into
graphprotocol:mainfrom
yinbowen-dc:codex/fix-1973-null-fallback-parameters

Conversation

@yinbowen-dc

Copy link
Copy Markdown

Fixes #1973.

Some block explorers return parameterless fallback entries with inputs: null and outputs: null. Immutable defaults only replace missing fields, so the null value reaches .map during call signature/type generation and aborts codegen. Normalize nullish fallback parameter arrays when loading the ABI, preserving ordinary named function parameters and the existing DefaultCall class naming.

Added tests for null, omitted and empty fallback arrays alongside a normal withdraw function. The null fixture fails on main. All four ABI/codegen tests pass after the change, the CLI source TypeScript build passes, and changed files pass ESLint/Prettier. Includes a patch changeset.

Prepared with AI assistance.

@changeset-bot

changeset-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0f18f99

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphprotocol/graph-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@yinbowen-dc
yinbowen-dc force-pushed the codex/fix-1973-null-fallback-parameters branch from a015f5a to 0f18f99 Compare November 18, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

graph codegen: fails with nameless fallback functions

1 participant