Open-source web3 development platform

Frontend, backend, and onchain tools to build complete web3 apps — on every EVM chain.

Open-source web3 development platform

Frontend, backend, and onchain tools to build complete web3 apps — on every EVM chain.

Open-source web3 development platform

Frontend, backend, and onchain tools to build complete web3 apps — on every EVM chain.

Connect

Client SDKs to connect users to web3

Onboard every user, connect to any wallet, and build apps that anyone can use — with in-app wallets, account abstraction, and fiat & crypto payments.

Connect

Client SDKs to connect users to web3

Onboard every user, connect to any wallet, and build apps that anyone can use — with in-app wallets, account abstraction, and fiat & crypto payments.

Connect

Client SDKs to connect users to web3

Onboard every user, connect to any wallet, and build apps that anyone can use — with in-app wallets, account abstraction, and fiat & crypto payments.

Contracts

End-to-end tools for smart contracts

Trusted and modular smart contracts that can be deployed securely on any EVM chain.

Contracts

End-to-end tools for smart contracts

Trusted and modular smart contracts that can be deployed securely on any EVM chain.

Contracts

End-to-end tools for smart contracts

Trusted and modular smart contracts that can be deployed securely on any EVM chain.

Engine

Dedicated APIs for web3 apps & games

Scalable smart contract APIs backed by secure wallets, with automatic nonce queuing & gas-optimized retries.

Engine

Dedicated APIs for web3 apps & games

Scalable smart contract APIs backed by secure wallets, with automatic nonce queuing & gas-optimized retries.

Engine

Dedicated APIs for web3 apps & games

Scalable smart contract APIs backed by secure wallets, with automatic nonce queuing & gas-optimized retries.

Trusted by The Best

Powering web3 apps across verticals — from onchain games to creator platforms.

Pixels

Building a web3 game with a thriving ecosystem — with VIP memberships, in-game tokens, and digital assets that users own, on the blockchain.

Mirror

Empowering creators to build engaged audiences with 'Subscribe to Mint' NFTs — rewarding loyal fans for subscribing to their publication.

Coinbase

Bringing onchain experiences to the real world — with seamless NFT creation, delivery, & transaction management via the Coinbase Wallet app.

Trusted by The Best

Powering web3 apps across verticals — from onchain games to creator platforms.

Pixels

Building a web3 game with a thriving ecosystem — with VIP memberships, in-game tokens, and digital assets that users own, on the blockchain.

Mirror

Empowering creators to build engaged audiences with 'Subscribe to Mint' NFTs — rewarding loyal fans for subscribing to their publication.

Coinbase

Bringing onchain experiences to the real world — with seamless NFT creation, delivery, & transaction management via the Coinbase Wallet app.

Trusted by The Best

Powering web3 apps across verticals — from onchain games to creator platforms.

Pixels

Building a web3 game with a thriving ecosystem — with VIP memberships, in-game tokens, and digital assets that users own, on the blockchain.

Mirror

Empowering creators to build engaged audiences with 'Subscribe to Mint' NFTs — rewarding loyal fans for subscribing to their publication.

Coinbase

Bringing onchain experiences to the real world — with seamless NFT creation, delivery, & transaction management via the Coinbase Wallet app.

Web3 made easy.

Without thirdweb (88 lines of code)

// Fetch all nfts from a erc721 contract on polygon.

import { ethers, BigNumberish, BigNumber } from "ethers";

const provider = ethers.providers.getDefaultProvider(
  "https://polygon-rpc.com/"
);
const contractAddress = "0x...";

// copy pasted from etherscan or contract project
const contractAbi = [ ... ];

const contract = new ethers.Contract(contractAddress, contractAbi, provider);

async function ownerOf(tokenId: BigNumberish): Promise<string> {
  return await contract.ownerOf(tokenId);
}

async function fetchTokenMetadata(tokenId: BigNumberish, tokenUri: string) {
  const parsedUri = tokenUri.replace(
    "{id}",
    ethers.utils.hexZeroPad(BigNumber.from(tokenId).toHexString(), 32).slice(2)
  );
  let jsonMetadata;
  try {
    const res = await fetch(
      `https://ipfs.io/ipfs/${parsedUri.replace("ipfs://", "")}`
    );
    jsonMetadata = await res.json();
  } catch (err) {
    const unparsedTokenIdUri = tokenUri.replace(
      "{id}",
      BigNumber.from(tokenId).toString()
    );
    try {
      const res = await fetch(
        `https://ipfs.io/ipfs/${unparsedTokenIdUri.replace("ipfs://", "")}`
      );
      jsonMetadata = await res.json();
    } catch (e: any) {
      console.warn(
        `failed to get token metadata: ${JSON.stringify({
          tokenId: tokenId.toString(),
          tokenUri,
        })} -- falling back to default metadata`
      );
      jsonMetadata = {};
    }
  }

  return {
    ...jsonMetadata,
    id: BigNumber.from(tokenId).toString(),
    uri: tokenUri,
  };
}

async function getTokenMetadata(tokenId: BigNumberish) {
  const tokenUri = await contract.tokenURI(tokenId);
  if (!tokenUri) {
    throw new Error("no token URI");
  }
  return fetchTokenMetadata(tokenId, tokenUri);
}

async function get(tokenId: BigNumberish) {
  const [owner, metadata] = await Promise.all([
    ownerOf(tokenId).catch(() => ethers.constants.AddressZero),
    getTokenMetadata(tokenId).catch(() => ({
      id: tokenId.toString(),
      uri: "",
    })),
  ]);
  return { owner, metadata, type: "ERC721", supply: 1 };
}

async function getAll(paginationStart?: number, pageCount?: number) {
  const start = BigNumber.from(paginationStart || 0).toNumber();
  const count = BigNumber.from(pageCount || 1000).toNumber();

  const maxSupply = await contract.totalSupply();
  const maxId = Math.min(maxSupply.toNumber(), start + count);
  return await Promise.all(
    [...Array(maxId - start).keys()].map((i) => get((start + i).toString()))
  );
}

const nfts = await getAll();

With thirdweb (7 lines of code)

// Fetch all nfts from a erc721 contract on polygon.
import { createThirdwebClient, getContract } from "thirdweb";
import { polygon } from "thirdweb/chains";
import { getNFTs } from "thirdweb/extensions/erc721";

const client = createThirdwebClient({ clientId });
const contract = getContract({ client, chain: polygon, address: "0x..." });
const nfts = await getNFTs({ contract });

Web3 made easy.

Without thirdweb (88 lines of code)

// Fetch all nfts from a erc721 contract on polygon.

import { ethers, BigNumberish, BigNumber } from "ethers";

const provider = ethers.providers.getDefaultProvider(
  "https://polygon-rpc.com/"
);
const contractAddress = "0x...";

// copy pasted from etherscan or contract project
const contractAbi = [ ... ];

const contract = new ethers.Contract(contractAddress, contractAbi, provider);

async function ownerOf(tokenId: BigNumberish): Promise<string> {
  return await contract.ownerOf(tokenId);
}

async function fetchTokenMetadata(tokenId: BigNumberish, tokenUri: string) {
  const parsedUri = tokenUri.replace(
    "{id}",
    ethers.utils.hexZeroPad(BigNumber.from(tokenId).toHexString(), 32).slice(2)
  );
  let jsonMetadata;
  try {
    const res = await fetch(
      `https://ipfs.io/ipfs/${parsedUri.replace("ipfs://", "")}`
    );
    jsonMetadata = await res.json();
  } catch (err) {
    const unparsedTokenIdUri = tokenUri.replace(
      "{id}",
      BigNumber.from(tokenId).toString()
    );
    try {
      const res = await fetch(
        `https://ipfs.io/ipfs/${unparsedTokenIdUri.replace("ipfs://", "")}`
      );
      jsonMetadata = await res.json();
    } catch (e: any) {
      console.warn(
        `failed to get token metadata: ${JSON.stringify({
          tokenId: tokenId.toString(),
          tokenUri,
        })} -- falling back to default metadata`
      );
      jsonMetadata = {};
    }
  }

  return {
    ...jsonMetadata,
    id: BigNumber.from(tokenId).toString(),
    uri: tokenUri,
  };
}

async function getTokenMetadata(tokenId: BigNumberish) {
  const tokenUri = await contract.tokenURI(tokenId);
  if (!tokenUri) {
    throw new Error("no token URI");
  }
  return fetchTokenMetadata(tokenId, tokenUri);
}

async function get(tokenId: BigNumberish) {
  const [owner, metadata] = await Promise.all([
    ownerOf(tokenId).catch(() => ethers.constants.AddressZero),
    getTokenMetadata(tokenId).catch(() => ({
      id: tokenId.toString(),
      uri: "",
    })),
  ]);
  return { owner, metadata, type: "ERC721", supply: 1 };
}

async function getAll(paginationStart?: number, pageCount?: number) {
  const start = BigNumber.from(paginationStart || 0).toNumber();
  const count = BigNumber.from(pageCount || 1000).toNumber();

  const maxSupply = await contract.totalSupply();
  const maxId = Math.min(maxSupply.toNumber(), start + count);
  return await Promise.all(
    [...Array(maxId - start).keys()].map((i) => get((start + i).toString()))
  );
}

const nfts = await getAll();

With thirdweb (7 lines of code)

// Fetch all nfts from a erc721 contract on polygon.
import { createThirdwebClient, getContract } from "thirdweb";
import { polygon } from "thirdweb/chains";
import { getNFTs } from "thirdweb/extensions/erc721";

const client = createThirdwebClient({ clientId });
const contract = getContract({ client, chain: polygon, address: "0x..." });
const nfts = await getNFTs({ contract });

Web3 made easy.

Without thirdweb (88 lines of code)

// Fetch all nfts from a erc721 contract on polygon.

import { ethers, BigNumberish, BigNumber } from "ethers";

const provider = ethers.providers.getDefaultProvider(
  "https://polygon-rpc.com/"
);
const contractAddress = "0x...";

// copy pasted from etherscan or contract project
const contractAbi = [ ... ];

const contract = new ethers.Contract(contractAddress, contractAbi, provider);

async function ownerOf(tokenId: BigNumberish): Promise<string> {
  return await contract.ownerOf(tokenId);
}

async function fetchTokenMetadata(tokenId: BigNumberish, tokenUri: string) {
  const parsedUri = tokenUri.replace(
    "{id}",
    ethers.utils.hexZeroPad(BigNumber.from(tokenId).toHexString(), 32).slice(2)
  );
  let jsonMetadata;
  try {
    const res = await fetch(
      `https://ipfs.io/ipfs/${parsedUri.replace("ipfs://", "")}`
    );
    jsonMetadata = await res.json();
  } catch (err) {
    const unparsedTokenIdUri = tokenUri.replace(
      "{id}",
      BigNumber.from(tokenId).toString()
    );
    try {
      const res = await fetch(
        `https://ipfs.io/ipfs/${unparsedTokenIdUri.replace("ipfs://", "")}`
      );
      jsonMetadata = await res.json();
    } catch (e: any) {
      console.warn(
        `failed to get token metadata: ${JSON.stringify({
          tokenId: tokenId.toString(),
          tokenUri,
        })} -- falling back to default metadata`
      );
      jsonMetadata = {};
    }
  }

  return {
    ...jsonMetadata,
    id: BigNumber.from(tokenId).toString(),
    uri: tokenUri,
  };
}

async function getTokenMetadata(tokenId: BigNumberish) {
  const tokenUri = await contract.tokenURI(tokenId);
  if (!tokenUri) {
    throw new Error("no token URI");
  }
  return fetchTokenMetadata(tokenId, tokenUri);
}

async function get(tokenId: BigNumberish) {
  const [owner, metadata] = await Promise.all([
    ownerOf(tokenId).catch(() => ethers.constants.AddressZero),
    getTokenMetadata(tokenId).catch(() => ({
      id: tokenId.toString(),
      uri: "",
    })),
  ]);
  return { owner, metadata, type: "ERC721", supply: 1 };
}

async function getAll(paginationStart?: number, pageCount?: number) {
  const start = BigNumber.from(paginationStart || 0).toNumber();
  const count = BigNumber.from(pageCount || 1000).toNumber();

  const maxSupply = await contract.totalSupply();
  const maxId = Math.min(maxSupply.toNumber(), start + count);
  return await Promise.all(
    [...Array(maxId - start).keys()].map((i) => get((start + i).toString()))
  );
}

const nfts = await getAll();

With thirdweb (7 lines of code)

// Fetch all nfts from a erc721 contract on polygon.
import { createThirdwebClient, getContract } from "thirdweb";
import { polygon } from "thirdweb/chains";
import { getNFTs } from "thirdweb/extensions/erc721";

const client = createThirdwebClient({ clientId });
const contract = getContract({ client, chain: polygon, address: "0x..." });
const nfts = await getNFTs({ contract });

In any language.

Typescript

React

React Native

Unity

app/api/beta.js

import { createThirdwebClient, getContract } from "thirdweb";
import { sepolia } from "thirdweb/chains";

// initialize the client
const client = createThirdwebClient({ clientId });

// connect to your smart contract
const contract = getContract({ client, chain: sepolia, address: "0x..." });

// get all NFTs
const nfts = await getNFTs({ contract });

console.info(nfts);

In any language.

Typescript

React

React Native

Unity

app/api/beta.js

import { createThirdwebClient, getContract } from "thirdweb";
import { sepolia } from "thirdweb/chains";

// initialize the client
const client = createThirdwebClient({ clientId });

// connect to your smart contract
const contract = getContract({ client, chain: sepolia, address: "0x..." });

// get all NFTs
const nfts = await getNFTs({ contract });

console.info(nfts);

In any language.

app/api/beta.js

import { createThirdwebClient, getContract } from "thirdweb";
import { sepolia } from "thirdweb/chains";

// initialize the client
const client = createThirdwebClient({ clientId });

// connect to your smart contract
const contract = getContract({ client, chain: sepolia, address: "0x..." });

// get all NFTs
const nfts = await getNFTs({ contract });

console.info(nfts);

Build on 2,000+ EVM chains

Our tools work with any contract deployed on any EVM-compatible chain.

Build on 2,000+ EVM chains

Our tools work with any contract deployed on any EVM-compatible chain.

Build on 2,000+ EVM chains

Our tools work with any contract deployed on any EVM-compatible chain.

Simple, transparent & flexiblepricing for every team.

Learn more about pricing plans.

Starter

Ideal for hobbyists who require basic features.

$0

/ month

1,000 monthly active wallets

Web, Mobile & Gaming SDKs

Contract & Wallet APIs

Audited smart contracts

Community Support

Blockchain infra (RPC, IPFS)

Growth

Ideal for production-grade applications. Text goes here.

$99

$0

/ month

Everything in Starter, plus:

10,000 monthly active wallets

Production Grade Infrastructure

Prioritized Support

Custom Branding

User Analytics

Advanced Paymaster Rules

Pro

Ideal for teams that require more customization, SLAs, and support.

Custom

Everything in Growth, plus:

Custom rate limits for APIs & Infra

Dedicated support channel

Guaranteed support response time

Direct access to solutions team

Direct access to engineering team

Enterprise grade SLAs

Simple, transparent & flexiblepricing for every team.

Learn more about pricing plans.

Starter

Ideal for hobbyists who require basic features.

$0

/ month

1,000 monthly active wallets

Web, Mobile & Gaming SDKs

Contract & Wallet APIs

Audited smart contracts

Community Support

Blockchain infra (RPC, IPFS)

Growth

Ideal for production-grade applications. Text goes here.

$99

$0

/ month

Everything in Starter, plus:

10,000 monthly active wallets

Production Grade Infrastructure

Prioritized Support

Custom Branding

User Analytics

Advanced Paymaster Rules

Pro

Ideal for teams that require more customization, SLAs, and support.

Custom

Everything in Growth, plus:

Custom rate limits for APIs & Infra

Dedicated support channel

Guaranteed support response time

Direct access to solutions team

Direct access to engineering team

Enterprise grade SLAs

Simple, transparent & flexiblepricing for every team.

Learn more about pricing plans.

Starter

Ideal for hobbyists who require basic features.

$0

/ month

1,000 monthly active wallets

Web, Mobile & Gaming SDKs

Contract & Wallet APIs

Audited smart contracts

Community Support

Blockchain infra (RPC, IPFS)

Growth

Ideal for production-grade applications. Text goes here.

$99

$0

/ month

Everything in Starter, plus:

10,000 monthly active wallets

Production Grade Infrastructure

Prioritized Support

Custom Branding

User Analytics

Advanced Paymaster Rules

Pro

Ideal for teams that require more customization, SLAs, and support.

Custom

Everything in Growth, plus:

Custom rate limits for APIs & Infra

Dedicated support channel

Guaranteed support response time

Direct access to solutions team

Direct access to engineering team

Enterprise grade SLAs

Start with thirdweb.

Build web3 apps with ease. Get instant access.

Start with thirdweb.

Build web3 apps with ease. Get instant access.

Start with thirdweb.