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

Better checks for network mismatches #164

Open
haseebrabbani opened this issue May 9, 2022 · 0 comments
Open

Better checks for network mismatches #164

haseebrabbani opened this issue May 9, 2022 · 0 comments

Comments

@haseebrabbani
Copy link
Collaborator

I was just trying to run a transaction against my bot using npm run tx, but there was a cryptic error being thrown (ERROR: TypeError: Cannot read properties of null (reading 'blockNumber')). this was due to the fact that the transaction was on Polygon, but by default the CLI points to Ethereum mainnet. since the transaction hash didn't exist on Eth mainnet, it would throw the error. it took me some time to figure out that I needed to change my jsonRpcUrl config to point to Polygon. would have been nice if the CLI pointed this out for me by looking at the chainIds declared in package.json and warning me if there is a mismatch with the network of jsonRpcUrl. another improvement would be to check whether the fetched transaction receipt is null before using it in runHandlersOnTransaction

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