GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - chainstacklabs/query-evm-nodes-javascript: Switch to retrieving historical data from an archive node when it's not available on the full one

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
.env.sample
.env.sample
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
index.js
index.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

Labs

Chainstack is the leading suite of services connecting developers with Web3 infrastructure

         

• Homepage • Supported protocols • Chainstack blog • Chainstack docs • Blockchain API reference • Start for free •

Querying full and archive EVM nodes with JavaScript

This project allows the retrieval of historical data from the blockchain programmatically, switching between a full and archive node provider when necessary.

See the full tutorial on the Chainstack blog:

  • Querying full and archive Ethereum nodes with JavaScript

Project details

This 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.

This tool queries the blockchain using the web3 and inquirer libraries for JavaScript.

Quick start

Clone this repository

git clone https://github.com/yieniggu/chainstack-full-vs-archive-query-js.git

Install dependencies

npm ci

Use npm ci to launch a clean install of the dependencies, this will install the same version as in the package.json file.

edit the .env.sample file

Add your RPC node URLs and rename the file to .env.

CHAINSTACK_FULL_NODE="CHAINSTACK_FULL_NODE_URL"
CHAINSTACK_ARCHIVE_NODE="CHAINSTACK_ARCHIVE_NODE_URL"

Run the program

npm run start

Prerequisites

  • Node.js: ^16.17.0— install Node
  • A full and archive node RPC endpoints.

Deploy a full and archive node with Chainstack:

  1. Sign up with Chainstack.
  2. Deploy a node.
  3. View node access and credentials.

Dependencies

  • dotenv: ^16.0.3
  • inquirer: ^8.2.4
  • web3.js: ^1.7.4

Install

Clone this repository:

git clone https://github.com/yieniggu/chainstack-full-vs-archive-query-js.git

Install the dependencies in the project's directory:

cd query-full-and-archive-nodes-javascript
npm ci

Use npm ci to launch a clean install of the dependencies, this will install the same version as in the package.json file.

About

Switch to retrieving historical data from an archive node when it's not available on the full one

chainstack.com/querying-full-and-archive-evm-nodes-with-javascript/

Topics

archiveerigonethereumevmgethjavascript

Resources

Readme
Activity
Custom properties

Stars

1 star

Watchers

3 watching

Forks

3 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.