Skip to content

Web3 Libraries

WorldLand is an Ethereum-compatible blockchain network, allowing the utilization of standard dApp libraries commonly used in Ethereum. Developers can leverage these frameworks to build and develop dApps on the WorldLand network.

These frameworks offer powerful functionalities such as smart contract interaction, event subscriptions, and blockchain data retrieval, enabling the creation of sophisticated dApps on the WorldLand platform.

Ethers.js

Ethers.js provides comprehensive access to the Ethereum blockchain, enabling tasks such as:

  • Querying blocks and wallets
  • Resolving ENS addresses
  • Establishing direct connections to nodes
  • Interacting with smart contracts

With its extensive capabilities, Ethers.js has become the go-to choice for over 18,000 Web3 projects on GitHub.

Quick Start with Ethers.js

javascript
import { ethers } from 'ethers';

// Connect to WorldLand Seoul Mainnet
const provider = new ethers.JsonRpcProvider('https://seoul.worldland.foundation/');

// Get the latest block number
const blockNumber = await provider.getBlockNumber();
console.log('Latest block:', blockNumber);

// Get account balance
const balance = await provider.getBalance('0xYOUR_ADDRESS');
console.log('Balance:', ethers.formatEther(balance), 'WL');

Web3.js

Web3.js is a widely-used TypeScript/JavaScript library that facilitates interaction between dApps and the blockchain. Key features include:

  • Seamless smart contract interaction (treating contracts as JavaScript objects)
  • Subscription to on-chain events
  • Direct retrieval of block states from nodes
  • Plugin support (introduced in v4)

With over 500,000 weekly downloads, Web3.js is trusted by industry-leading projects including Truffle.

Quick Start with Web3.js

javascript
const Web3 = require('web3');

// Connect to WorldLand Seoul Mainnet
const web3 = new Web3('https://seoul.worldland.foundation/');

// Get chain ID
const chainId = await web3.eth.getChainId();
console.log('Chain ID:', chainId); // 103

// Get balance
const balance = await web3.eth.getBalance('0xYOUR_ADDRESS');
console.log('Balance:', web3.utils.fromWei(balance, 'ether'), 'WL');

Web3.py

Web3.py is a Python library designed for connecting dApps with the blockchain. It empowers developers to:

  • Send transactions
  • Interact with smart contracts
  • Retrieve block data

Derived from the Web3.js JavaScript API, Web3.py is tailored for Python developers.

Quick Start with Web3.py

python
from web3 import Web3

# Connect to WorldLand Seoul Mainnet
w3 = Web3(Web3.HTTPProvider('https://seoul.worldland.foundation/'))

# Check connection
print('Connected:', w3.is_connected())

# Get latest block
block = w3.eth.get_block('latest')
print('Latest block:', block.number)

# Get balance
balance = w3.eth.get_balance('0xYOUR_ADDRESS')
print('Balance:', w3.from_wei(balance, 'ether'), 'WL')

Choosing a Library

FeatureEthers.jsWeb3.jsWeb3.py
LanguageJavaScript/TypeScriptJavaScript/TypeScriptPython
Bundle SizeSmallLargeN/A
Provider Abstraction
ENS Support
TypeScript SupportNativev4+N/A
Recommended ForFrontend dAppsLegacy projectsBackend / scripts

Decentralized GPU Infrastructure for the AI Era