-
Notifications
You must be signed in to change notification settings - Fork 214
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 add
errors with getaddrinfo ENOTFOUND api-localhost.etherscan.io
on localhost
#1748
Comments
This works:
But the command never exits. |
Hi @schmidsi, The error comes from the default case of the const getEtherscanLikeAPIUrl = (network: string) => {
switch (network) {
case 'mainnet':
return `https://mainnet.abi.pinax.network/api`;
[...]
default:
return `https://api-${network}.etherscan.io/api`; // `localhost` falls into the default case
}
}; Obviously, this isn't right. ABI should be provided (or asked if missing) in the case of After that, the To solve this, would you mind clarifying what you're trying to achieve ? If I understand correctly, your goal is to keep the network set to |
The command will now skip Etherscan lookups if detecting the network as `localhost`. User will be prompted to enter all relevant information. Closes graphprotocol#1748
To answer your questions:
What you are referring to would be if I run a local mainnet fork. In that case, I would set the network to |
Thanks for the feedback @schmidsi.
This method needs the transaction hash where the contract is created (which is what the Etherscan lookup returns) and then makes an RPC call for fetching the start block. So it could work fully locally if the user provides the correct Regarding your answers, the implementation that will be available in the next release should be able to cover your use case. Feel free to open new issues if that's not the case. |
Steps to reproduce:
network: localhost
insubgraph.yaml
graph add 0x5FbDB2315678afecb367f032d93F642f64180aa3
(or any other address)Result:
Expected result:
The text was updated successfully, but these errors were encountered: