Ethers v5
Parameters
Parameter
Type
Required
Description
Examples
Basic usage
import { createPublicProviderEthers5 } from '@manifoldxyz/client-sdk';
import { ethers } from 'ethers';
// Create providers for each network
const providers = {
1: new ethers.providers.JsonRpcProvider('YOUR_MAINNET_RPC_URL'),
8453: new ethers.providers.JsonRpcProvider('YOUR_BASE_RPC_URL'),
10: new ethers.providers.JsonRpcProvider('YOUR_OPTIMISM_RPC_URL')
};
// Create the public provider
const publicProvider = createPublicProviderEthers5(providers);
// Use with Manifold client
const client = createClient({ publicProvider });With fallback providers
Event Subscription
Last updated