{"id":18732524,"url":"https://github.com/gsscoder/chainquery","last_synced_at":"2025-11-13T11:30:14.802Z","repository":{"id":48725946,"uuid":"514834355","full_name":"gsscoder/chainquery","owner":"gsscoder","description":"Queries pairs  and tokens data directly on chain","archived":false,"fork":false,"pushed_at":"2022-10-15T04:50:41.000Z","size":217,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-28T15:34:09.852Z","etag":null,"topics":["blockchain"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gsscoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-17T12:15:15.000Z","updated_at":"2022-08-02T16:30:15.000Z","dependencies_parsed_at":"2023-01-20T03:04:26.139Z","dependency_job_id":null,"html_url":"https://github.com/gsscoder/chainquery","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsscoder%2Fchainquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsscoder%2Fchainquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsscoder%2Fchainquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsscoder%2Fchainquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gsscoder","download_url":"https://codeload.github.com/gsscoder/chainquery/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239605123,"owners_count":19666998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain"],"created_at":"2024-11-07T15:06:32.148Z","updated_at":"2025-11-13T11:30:14.742Z","avatar_url":"https://github.com/gsscoder.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chainquery\n\nUtilities to get data directly on chain using [UniswapV2Query](contracts/UniswapV2Query.sol) contract.\n\n## Configuration\n\nChoose a consistent network name across the two configuration files.\n\n### .env\n\n```text\nPROVIDER_URL_POLYGON=\"https://polygon-mainnet.g.alchemy.com/v2/...\"\nACCOUNT_KEY=\"5fa...9f39\"\nUV2QUERY_ADDRESS_POLYGON=\"0x460...7e67\"\n```\n\n### appconfigs.json\n\n```json\n{\n  \"network\": \"polygon\",\n  \"dex\": \"quickswap\",\n  \"pairsChunkSize\": 500,\n  \"cooldownMs\": 2000,\n  \"cooldownAfterFailSec\": 3,\n  \"tokensChunkSize\": 10,\n  \"quickswapFactoryPolygon\": \"0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32\",\n  \"outputPath\": \"./output\"\n}\n```\n\n## Usage\n\n- Deploy the contract: `npx hardhat run .\\scripts\\deploy.js --network polygon`.\n\n- Set all needed configuration values.\n\n- Use [querypairs](scripts/query/querypairs.js) to get token pairs data from the configured DEX.\n\n- Use [querytokens](scripts/query/querytokens.js) to get tokens data using querypairs output.\n\n- Use [jointokensfiles](scripts/postproc/jointokensfiles.js) to join querytokens output into a single file.\n\n- Use [addtokenstopairs](scripts/postproc/addtokenstopairs.js) to add token data to pairs file and normalize reserves.\n\n- Use [refinepairs](scripts/refine/refinepairsjs) to remove not meaningful pairs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsscoder%2Fchainquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgsscoder%2Fchainquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsscoder%2Fchainquery/lists"}