load.network
  • Load Network
  • Quickstart
  • About Load Network
    • Overview
    • Network Releases Nomenclature
    • Load Network Alphanets
    • Key Features
    • ELI5
  • Using Load Network
    • Compatibility & Performance
    • Network configurations
    • Load Network Bundler
    • 0xbabe2: Large Data Uploads
    • Load Network Bundler Gateways
    • Load Network Precompiles
    • LN-Native JSON-RPC Methods
    • load:// Data Protocol
    • Self-Hosted RPC Proxies
      • Rust Proxy
      • JavaScript Proxy
    • Code & Integrations Examples
      • ethers (etherjs)
      • Deploying an ERC20 Token
  • Load Network Cloud Platform
    • Cloud Platform (LNCP)
    • Load S3 Protocol
    • load0 data layer
  • Load Network for evm chains
    • Ledger Archiver (any chain)
    • Ledger Archivers: State Reconstruction
    • DA ExEx (Reth-only)
    • Deploying OP-Stack Rollups
  • Load Network ExEx
    • About ExExes
    • ExEx.rs
    • Load Network ExExes
      • Google BigQuery ETL
      • Borsh Serializer
      • Arweave Data Uploader
      • Load Network DA ExEx
      • Load Network WeaveDrive ExEx
  • Load Network Arweave Data Protocols
    • LN-ExEx Data Protocol
    • Load Network Precompiles Data Protocol
  • DA Integrations
    • LN-EigenDA Proxy Server
    • LN-Dymension: DA client for RollAP
  • load hyperbeam
    • About Load HyperBEAM
Powered by GitBook
On this page
Export as PDF
  1. Using Load Network
  2. Code & Integrations Examples

ethers (etherjs)

Use Load Network with etherjs

PreviousCode & Integrations ExamplesNextDeploying an ERC20 Token

Last updated 2 months ago

In this example we will use the First of all, install the package:

npm i ethers

Code Example: Retrieve Address Balance

import { ethers } from "ethers";

const provider = new ethers.providers.JsonRpcProvider("https://alphanet.load.network");
const address = "0x544836c1d127B0d5ed6586EAb297947dE7e38a78";

async function getBalance() {
    const balance = await provider.getBalance(address);
    console.log(`Balance: ${ethers.utils.formatEther(balance)} tLOAD`);
}

getBalance();
ethers npm package.