Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graph codegen: fails with nameless fallback functions #1973

Open
YaroShkvorets opened this issue Feb 25, 2025 · 0 comments
Open

graph codegen: fails with nameless fallback functions #1973

YaroShkvorets opened this issue Feb 25, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@YaroShkvorets
Copy link
Collaborator

YaroShkvorets commented Feb 25, 2025

As reported by @marcusrein

Reproduce:

  • graph init with contract 0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701 on monad-testnet
  • graph codegen
- Load subgraph from subgraph.yaml
✖ Failed to load subgraph from subgraph.yaml: Cannot read properties of null (reading 'map')
error Command failed with exit code 1.

The issue is with fallback function that doesn't have a name.
Should assign some default name for such nameless functions or just filter them out from ABI.

Sample ABI:

[
  {
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "src",
        "type": "address"
      }
    ],
    "name": "Withdrawal",
    "outputs": null,
    "stateMutability": "",
    "type": "event"
  },
  {
    "inputs": null,
    "name": "",
    "outputs": null,
    "stateMutability": "payable",
    "type": "fallback"
  },
  {
    "inputs": [{ "internalType": "uint256", "name": "wad", "type": "uint256" }],
    "name": "withdraw",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  }
]

@YaroShkvorets YaroShkvorets self-assigned this Feb 25, 2025
@YaroShkvorets YaroShkvorets added the bug Something isn't working label Feb 25, 2025
YaroShkvorets added a commit that referenced this issue Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant