Giter Site home page Giter Site logo

pacelliv / block-explorer Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 17.27 MB

๐Ÿ”๐Ÿ” Solution to the project from Week 3 from Alchemy University.

Home Page: https://block-explorer-taupe.vercel.app

JavaScript 0.29% TypeScript 99.71%
alchemy-university alchemyapi blockexplorer ethereum ethersjs json-rpc luxon nextjs styled-components typescript react

block-explorer's Introduction

Week 3 project - Block Explorer ๐Ÿ”

Introduction ๐Ÿ‘ฉโ€๐Ÿซ๐Ÿ‘จโ€๐Ÿซ

From ethereum.org docs:

In order for a software application to interact with the Ethereum blockchain - either by reading blockchain data or sending transactions to the network - it must connect to an Ethereum node.

For this purpose, every Ethereum client implements a JSON-RPC specification, so there is a uniform set of methods that applications can rely on regardless of the specific node or client implementation.

JSON-RPC is a stateless, light-weight remote procedure call (RPC) protocol. It defines several data structures and the rules around their processing. It is transport agnostic in that the concepts can be used within the same process, over sockets, over HTTP, or in many various message passing environments. It uses JSON (RFC 4627) as data format.

Description ๐ŸŒŒ

This block explorer is a minimal replica of Etherscan that provides real-time insights into the blocks of the Ethereum blockchain. Leveraging a stack of powerful technologies including JSON-RPC API, CoinGecko API, TanStack Table, ethers v6, Next.js, luxon, TypeScript, and Styled Components, this project delivers an efficient and user-friendly platform for users to explore Ethereum blocks.

Features:

  1. Home Page: Showcases a table with the latest 50 Ethereum blocks, built with TanStack Table. Help users to view essential block data like block number, miner, gas usage, and timestamp.

  2. Block Page: Shows detailed information on individual blocks, including gas limits, receipts root, and transaction root. Luxon ensures time data is presented in a user-friendly format, enhancing comprehension.

  3. JSON-RPC API Integration: Used to interact with the Ethereum blockchain, fetching accurate and up-to-date block data.

  4. CoinGecko API: Fetch the current Ether price from CoinGecko API, offering context to transaction values and gas fees.

  5. Ethers v6 Library: Interact directly with Ethereum blockchain, to retrieve validator's ENS and to handle the units of numbers.

  6. Next.js and TypeScript: Enhance efficiency and maintainability with Next.js and TypeScript. Enjoy server-side rendering and improved page loading times.

  7. Styled Components: Used to create customizable React Components elements.

Quick Start ๐Ÿƒโ€โ™€๏ธ๐Ÿƒ

git clone https://github.com/pacelliv/block-explorer
cd block-explorer

To install the dependencies run:

npm install

Using the application ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

You will need a Alchemy API key, follow the instructions shown here in order to get one for free.

Then create a .env.local file in the root directory of the project and create the following environment variables:

NEXT_PUBLIC_MAINNET_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/your_api_key
NEXT_PUBLIC_MAINNET_ALCHEMY_API_KEY=your_api_key

Run dev mode:

npm run dev

Build the app with:

npm run build
npm run start

Open http://localhost:3000 with your browser to see the result.

Resources ๐Ÿ““๐Ÿ“”

block-explorer's People

Contributors

pacelliv avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.