Skip to content

Uniswap query lookup #22

@mtangular

Description

@mtangular

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions