Skip to content

Libraries

Explore the key libraries for interacting with smart contracts on Polkadot-based networks. These libraries simplify contract calls, event listening, and transaction handling.

This section provides setup instructions, usage examples, and a comparison to help you select the right tool for your project.

Library Comparison

Consider the following features when choosing a library for your project:

Library Language Support Type Safety Performance Best For
Ethers.js JavaScript, TypeScript Limited Efficient, widely optimized General dApp development
Web3.js JavaScript, TypeScript Limited Older codebase, can be less performant Legacy projects, Web3.js users
viem TypeScript only Strong TypeScript support Lightweight, optimized for bundling TypeScript-heavy projects, modular workflows
Wagmi TypeScript, React Strong TypeScript support React hooks-based, efficient caching React applications, hook-based development
Web3.py Python Python typing support Standard Python performance Python-based blockchain applications

Warning

Web3.js has been sunset. You can find guides on using Ethers.js and viem in the Libraries section.

In This Section