Skip to main content

🖇 Overview

Easily port Ethereum blockchain information to your React frontend.

Used by:

These docs are for developers who are already familiar with the basics of Ethereum and React.

Key features of Eth-hooks V4

  • Designed for easy use without a need to understand what's under the hood
  • Choose how often a hook receives updates from the network
  • Easily use context with ethers and contracts
  • Typed contracts that make it easier to understand the contract interface
  • Allows different ways to pass in ethers provider or secondary providers
  • Network RPC calls are cached stopping unnecessary requests to the network
  • Typescript friendly
  • We use an MIT license

Advantages to using Eth-hooks

EthersAppContext

EthersAppContext allows you to access the current ethers.js context and information such as provider, signer, and account. This allows users to easily log into a web3 account using web3modal. You can also setup up overrides and multiple providers.

ContractAppContext

Gives you a contractContextFactory that allows you to easily set up typed contracts, load typed contracts, create connectors, and access them with hooks anywhere in your app.

Caching & optional updates

Caches the network RPC calls. This prevents unnecessary requests to the network. You can set up an update interval from every block, every (n) blocks, polling, onMount, onWindow focus, and other react-query update options.

How the hooks are subdivided

Ethers App Context

Network

Contracts

ERC Token Standard

Decentralized applications

Utility

API Documentation

Check out documentation at the eth-hooks website!