Utilities to get data from from a blockchain using UniswapV2Query contract.
Choose a consistent network name across the two configuration files.
PROVIDER_URL_MUMBAI="https://polygon-mumbai.g.alchemy.com/v2/..."
ACCOUNT_KEY="5fa...9f39"
UV2QUERY_ADDRESS_MUMBAI="0x460...7e67"
{
"network": "mumbai",
"dex": "quickswap",
"pairsChunkSize": 1000,
"cooldownMs": 1000,
"tokensChunkSize": 10,
"quickswapFactoryMumbai": "0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",
"outputPath": "./output"
}
-
Deploy the contract:
npx hardhat run .\scripts\deploy.js --network mumbai
. -
Set all needed configuration values.
-
Run querypairs script to get token pairs from the configured DEX.
-
Run querytokens to get tokens data using querypairs output.
After running the querytokens
script, the querypairs
output file will be updated with tokens data.