Build
ONCHAIN STORAGE
Networks

Networks

Irys has two networks:

  • Private Testnet: Uploads are paid for with real tokens. At mainnet launch, all data uploaded to testnet bundlers will be migrated to mainnet, with no changes to transaction IDs.
  • Devnet: Uploads are paid for with free faucet tokens. Data is deleted after ~60 days.

Connecting to Testnet

ℹ️

The following code is for using ethereum only, we also have examples covering all of the tokens we support for payment.

import { Uploader } from "@irys/upload";
import { Ethereum } from "@irys/upload-ethereum";
 
const getIrysUploader = async () => {
  const irysUploader = await Uploader(Ethereum).withWallet(process.env.PRIVATE_KEY);
  return irysUploader;
};

Connecting to Devnet

ℹ️

The following code is for using ethereum only, we also have examples covering all of the tokens we support for payment.

To connect to devnet, append the functions withRpc() and devnet(). RPC URLs are required when using devnet.

import { Uploader } from "@irys/upload";
import { Ethereum } from "@irys/upload-ethereum";
 
const getIrysUploader = async () => {
  // RPC URLs change often. Use a current one from https://chainlist.org/
  const rpcURL = ""; 
  const irysUploader = await Uploader(Ethereum)
    .withWallet(process.env.PRIVATE_KEY)
    .withRpc(rpcURL)
    .devnet();
 
  return irysUploader;
};