{"id":18794466,"url":"https://github.com/chainstacklabs/query-evm-nodes-javascript","last_synced_at":"2025-04-13T14:32:44.708Z","repository":{"id":47096064,"uuid":"515850354","full_name":"chainstacklabs/query-evm-nodes-javascript","owner":"chainstacklabs","description":"Switch to retrieving historical data from an archive node when it's not available on the full one","archived":false,"fork":false,"pushed_at":"2024-04-10T10:37:14.000Z","size":848,"stargazers_count":1,"open_issues_count":11,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-27T06:11:51.457Z","etag":null,"topics":["archive","erigon","ethereum","evm","geth","javascript"],"latest_commit_sha":null,"homepage":"https://chainstack.com/querying-full-and-archive-evm-nodes-with-javascript/","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/chainstacklabs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-20T05:49:39.000Z","updated_at":"2023-08-07T07:38:54.000Z","dependencies_parsed_at":"2025-01-19T19:34:50.196Z","dependency_job_id":null,"html_url":"https://github.com/chainstacklabs/query-evm-nodes-javascript","commit_stats":null,"previous_names":["chainstacklabs/query-evm-nodes-javascript","chainstacklabs/full-vs-archive-query-js"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fquery-evm-nodes-javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fquery-evm-nodes-javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fquery-evm-nodes-javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fquery-evm-nodes-javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chainstacklabs","download_url":"https://codeload.github.com/chainstacklabs/query-evm-nodes-javascript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248728224,"owners_count":21152180,"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":["archive","erigon","ethereum","evm","geth","javascript"],"created_at":"2024-11-07T21:29:31.094Z","updated_at":"2025-04-13T14:32:44.401Z","avatar_url":"https://github.com/chainstacklabs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"1200\" alt=\"Labs\" src=\"https://user-images.githubusercontent.com/99700157/213291931-5a822628-5b8a-4768-980d-65f324985d32.png\"\u003e\n\n\u003cp\u003e\n \u003ch3 align=\"center\"\u003eChainstack is the leading suite of services connecting developers with Web3 infrastructure\u003c/h3\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-ethereum/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Ethereum.svg\" /\u003e\u003c/a\u003e\u0026nbsp;  \n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-bnb-smart-chain/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/BNB.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-polygon/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Polygon.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-avalanche/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Avalanche.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-fantom/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Fantom.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  • \u003ca target=\"_blank\" href=\"https://chainstack.com/\"\u003eHomepage\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/protocols/\"\u003eSupported protocols\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/blog/\"\u003eChainstack blog\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://docs.chainstack.com/quickstart/\"\u003eChainstack docs\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://docs.chainstack.com/quickstart/\"\u003eBlockchain API reference\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://console.chainstack.com/user/account/create\"\u003eStart for free\u003c/a\u003e •\n\u003c/p\u003e\n\n# Querying full and archive EVM nodes with JavaScript\n\nThis project allows the retrieval of historical data from the blockchain programmatically, switching between a full and archive node provider when necessary.\n\nSee the full tutorial on the Chainstack blog:\n* [Querying full and archive Ethereum nodes with JavaScript](https://chainstack.com/querying-full-and-archive-evm-nodes-with-javascript/)\n\n## Project details\n\nThis repository holds the JavaScript version of a tool to query common state functions. Some essential functions include getting an address balance and storage at a given position, a contract bytecode, or even the whole transactions included on a given block.\n\nThis tool queries the blockchain using the web3 and inquirer libraries for JavaScript. \n\n## Quick start\n\n### Clone this repository\n\n```sh\ngit clone https://github.com/yieniggu/chainstack-full-vs-archive-query-js.git\n```\n\n### Install dependencies\n\n```sh\nnpm ci\n```\n\n\u003e Use `npm ci` to launch a `clean install` of the dependencies, this will install the same version as in the `package.json` file.\n\n### edit the .env.sample file\n\nAdd your RPC node URLs and rename the file to `.env`.\n\n```env\nCHAINSTACK_FULL_NODE=\"CHAINSTACK_FULL_NODE_URL\"\nCHAINSTACK_ARCHIVE_NODE=\"CHAINSTACK_ARCHIVE_NODE_URL\"\n```\n\n### Run the program\n\n```sh\nnpm run start\n```\n\n## Prerequisites\n\n* Node.js: ^16.17.0— [install Node](https://nodejs.org/en/download/)\n* A full and archive node RPC endpoints.\n\nDeploy a full and archive node with Chainstack:\n\n1. [Sign up with Chainstack](https://console.chainstack.com/user/account/create).  \n1. [Deploy a node](https://docs.chainstack.com/platform/join-a-public-network).  \n1. [View node access and credentials](https://docs.chainstack.com/platform/view-node-access-and-credentials). \n\n## Dependencies\n\n* dotenv: ^16.0.3\n* inquirer: ^8.2.4\n* web3.js: ^1.7.4\n\n## Install\n\nClone this repository:\n\n```sh\ngit clone https://github.com/yieniggu/chainstack-full-vs-archive-query-js.git\n```\n\nInstall the dependencies in the project's directory:\n\n```sh\ncd query-full-and-archive-nodes-javascript\n```\n\n```sh\nnpm ci\n```\n\u003e Use `npm ci` to launch a `clean install` of the dependencies, this will install the same version as in the `package.json` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainstacklabs%2Fquery-evm-nodes-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainstacklabs%2Fquery-evm-nodes-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainstacklabs%2Fquery-evm-nodes-javascript/lists"}