Skip to content

Commit 4647299

Browse files
committed
Updated README.md file
1 parent 3540ea7 commit 4647299

File tree

1 file changed

+35
-11
lines changed

1 file changed

+35
-11
lines changed

README.md

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,39 @@
1-
# Basic Sample Hardhat Project
1+
# chainquery
22

3-
This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, a sample script that deploys that contract, and an example of a task implementation, which simply lists the available accounts.
3+
Utilities to get data from from a blockchain using [UniswapV2Query](contracts/UniswapV2Query.sol) contract.
44

5-
Try running some of the following tasks:
5+
## Configuration
66

7-
```shell
8-
npx hardhat accounts
9-
npx hardhat compile
10-
npx hardhat clean
11-
npx hardhat test
12-
npx hardhat node
13-
node scripts/sample-script.js
14-
npx hardhat help
7+
Choose a consistent network name across the two configuration files.
8+
9+
### .env
10+
11+
```text
12+
PROVIDER_URL_MUMBAI="https://polygon-mumbai.g.alchemy.com/v2/..."
13+
ACCOUNT_KEY="5fa...9f39"
14+
UV2QUERY_ADDRESS_MUMBAI="0x460...7e67"
15+
```
16+
17+
### appconfigs.json
18+
19+
```json
20+
{
21+
"network": "mumbai",
22+
"dex": "quickswap",
23+
"pairsChunkSize": 1000,
24+
"cooldownMs": 1000,
25+
"tokensChunkSize": 10,
26+
"quickswapFactoryMumbai": "0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",
27+
"outputPath": "./output"
28+
}
1529
```
30+
31+
## Usage
32+
33+
- Deploy the contract: `npx hardhat run .\scripts\deploy.js --network mumbai`.
34+
35+
- Set all needed configuration values.
36+
37+
- Run [querypairs](scripts/querypairs.js) script to get token pairs from the configured DEX.
38+
39+
- Run [querytokens](scripts/querytokens.js) to get tokens data using querypairs output.

0 commit comments

Comments
 (0)