Onchain Storage
Networks
Irys operates two bundler networks for uploading data: mainnet for production use with real tokens, and devnet for testing with free faucet tokens. See Bundlers for the list of bundler endpoints and where each one seeds data.
Mainnet
Mainnet handles uploads paid with actual tokens. Upon mainnet L1 launch, all data uploaded to these bundlers will be processed on mainnet without transaction ID changes.
Connect to the mainnet bundler using Ethereum:
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;
};Note
This example uses Ethereum. Additional payment token examples are available in the SDK setup section.
Devnet
The devnet testing network uses free faucet tokens for uploads, with data retention lasting approximately 60 days before deletion. Devnet connections require additional configuration parameters.
import { Uploader } from "@irys/upload";
import { Ethereum } from "@irys/upload-ethereum";
const getIrysUploader = async () => {
const rpcURL = "";
const irysUploader = await Uploader(Ethereum)
.withWallet(process.env.PRIVATE_KEY)
.withRpc(rpcURL)
.devnet();
return irysUploader;
};Note
When using devnet, you must append
withRpc() and devnet() to the configuration. RPC URLs are mandatory for devnet operations. Find current RPC URLs at chainlist.org.L1 Testnet
An L1 testnet is also available for testing programmability features.