Chains
Porto chains are re-exported from Viem.
Usage
import { Chains } from 'porto'
const chain = Chains.baseSepolia
Supported Chains
Porto currently supports the following chains:
Chain | Value |
---|---|
Arbitrum One | Chains.arbitrum |
Arbitrum Sepolia | Chains.arbitrumSepolia |
Base | Chains.base |
Base Sepolia | Chains.baseSepolia |
BNB Smart Chain | Chains.bsc |
Celo | Chains.celo |
Ethereum | Chains.mainnet |
OP Mainnet | Chains.optimism |
OP Sepolia | Chains.optimismSepolia |
Polygon | Chains.polygon |
Sepolia | Chains.sepolia |
Wagmi Usage
Chains can be directly used with Wagmi's Config
import { Chains } from 'porto'
import { porto } from 'porto/wagmi'
import { createConfig, http } from 'wagmi'
export const config = createConfig({
chains: [Chains.baseSepolia],
connectors: [porto()],
transports: {
[Chains.baseSepolia.id]: http()
}
})
Vanilla Usage
Chains can be used directly with the Porto.create
method.
import { Porto, Chains } from 'porto'
// Create a Porto instance that uses Base Sepolia
const porto = Porto.create({
chains: [Chains.baseSepolia]
})