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

substreams init unable to provide local ABI file #554

Open
maoueh opened this issue Oct 22, 2024 · 0 comments
Open

substreams init unable to provide local ABI file #554

maoueh opened this issue Oct 22, 2024 · 0 comments

Comments

@maoueh
Copy link
Contributor

maoueh commented Oct 22, 2024

I tried to generate the ABI for a contract on Ethereum Mainnet for which the ABI isn't verified. This proposed me to either provider either the ABI in JSON or the path to the JSON file:

  Cannot fetch the ABI for contract "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640" (parsing Abi "Contract source code not verified": read abi: invalid character 'C' looking for beginning of value)

┃ Please paste the contract ABI or the full JSON ABI file path starting with file://fullpath/to/Abi.json: 

I provided /Users/maoueh/Downloads/uniswap-pool.abi.json but this fails with:

┃ Please paste the contract ABI or the full JSON ABI file path starting with file://fullpath/to/Abi.json: /Users/maoueh/Downloads/uniswap-pool.abi.json

  ABI "/Users/maoueh/Downloads/uniswap-pool.abi.json" isn't valid: "json: error calling MarshalJSON for type json.RawMessage: invalid character '/' looking for beginning of value"

I provided file:///Users/maoueh/Downloads/uniswap-pool.abi.json but this fails this time with a different message:

┃ Please paste the contract ABI or the full JSON ABI file path starting with file://fullpath/to/Abi.json: file:///Users/maoueh/Downloads/uniswap-pool.abi.json

  Cannot read the ABI file "/Users/maoueh/Downloads/uniswap-pool.abi.json": open /Users/maoueh/Downloads/uniswap-pool.abi.json: no such file or directory

On my disk the file is there and correct:

$ cat /Users/maoueh/Downloads/uniswap-pool.abi.json | jq '. | length'
36

Pasting the full JSON directly worked correctly.

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

No branches or pull requests

1 participant