flashbots / flashbots/simple-arbitrage

Uniswap query lookup

Open
#22 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.1k
Forks
758
PR merge metrics
No merged PRs in 30d

Description

When the code reaches getPairsByIndexRange, I am getting the following error:
Error: Transaction reverted: function call to a non-contract account

I tried copying the same UniswapQuery code from Etherscan and pasting into my VSCode and running it as a separate contract and test with Hardhat but still getting the same error. But when I enter the 3 parameters in the Read Contract section on Etherscan I successfully get all the pairs.

Does this code from the repo only work on Mainnet or Mainnet-fork? Or should it still work on localhost (for example npx hardhat node)?

With the environment variable what does the Readme note below mean:
ETHEREUM_RPC_URL - Ethereum RPC endpoint. Can not be the same as FLASHBOTS_RPC_URL

I am using localhost:8545 as the ETHEREUM_RPC_URL (through npx hardhat node). But what is FLASHBOTS_RPC_URL? There is no such environment variable inside the code.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at getPairsByIndexRange and review the README's ETHEREUM_RPC_URL and FLASHBOTS_RPC_URL notes. Reproduce the call with the Hardhat localhost setup and compare it with the successful Etherscan Read Contract call; done means the required network and RPC configuration is documented or the error is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
24/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.