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

yield reserved word #1896

Closed
YaroShkvorets opened this issue Jan 10, 2025 Discussed in #1585 · 1 comment · Fixed by #1929
Closed

yield reserved word #1896

YaroShkvorets opened this issue Jan 10, 2025 Discussed in #1585 · 1 comment · Fixed by #1929
Labels
bug Something isn't working

Comments

@YaroShkvorets
Copy link
Collaborator

Discussed in #1585

Originally posted by 0xMySt1c February 14, 2024
because yield is a reserved word in es6 strict mode it causes build to fail when the topic of an event is yield

@matthewdarwin matthewdarwin added the bug Something isn't working label Jan 10, 2025
@YaroShkvorets
Copy link
Collaborator Author

YaroShkvorets commented Jan 28, 2025

Reproduce:

> graph init id id --abi=./id.json --from-contract=0xA4Eac7fe11a156b940127D922aD59fe4A7d688f1 --protocol=ethereum --start-block=0 --contract-name=Contract --index-events --skip-git --network=mainnet

with this id.json ABI:

[
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "yield",
        "type": "uint256"
      }
    ],
    "name": "NumberUpdated",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_number",
        "type": "uint256"
      }
    ],
    "name": "setNumber",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  }
]

then

> graph build

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

Successfully merging a pull request may close this issue.

2 participants