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 |
---|---|
Base | 🚧 |
Base Sepolia | Chains.baseSepolia |
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]
})