Network configuration
Everything an integration needs to talk to Plouto on Robinhood Chain.
Chain definition
import {defineChain} from 'viem'; export const ROBINHOOD_CHAIN_ID = 4663 as const;export const RPC_URL = 'https://rpc.mainnet.chain.robinhood.com';export const EXPLORER_URL = 'https://robinhoodchain.blockscout.com'; export const robinhoodChain = defineChain({ id: ROBINHOOD_CHAIN_ID, name: 'Robinhood Chain', nativeCurrency: {name: 'Ether', symbol: 'ETH', decimals: 18}, rpcUrls: {default: {http: [RPC_URL]}}, blockExplorers: { default: {name: 'Blockscout', url: EXPLORER_URL, apiUrl: `${EXPLORER_URL}/api`}, },});A public client
import {createPublicClient, http} from 'viem'; const client = createPublicClient({ chain: robinhoodChain, transport: http(RPC_URL),}); const chainId = await client.getChainId();if (chainId !== ROBINHOOD_CHAIN_ID) throw new Error(`wrong chain: ${chainId}`);Always assert the chain ID. Every script in this repository does, and BuybackExecutor does it on chain as well.
wagmi
import {createConfig, http} from 'wagmi';import {injected, walletConnect} from 'wagmi/connectors'; export const config = createConfig({ chains: [robinhoodChain], connectors: [ injected({shimDisconnect: true}), // WalletConnect is added only when a project id is configured. ], transports: {[robinhoodChain.id]: http(RPC_URL)}, ssr: true,});Robinhood Wallet connects through the standard injected EIP-1193 provider; no special connector is required.
Pons addresses
export const PONS = { factory: '0x7eD598BcEf8bd9Edd8C97A195C6d13f40801EC7e', memeHook: '0xE5e702641Ea86F4ae6cC3cDaeD2B886f976Be044', feeEscrow: '0xd3AFEB2a57f70eF218Aa82451c51B2fb0416Ac9e', buybackVault: '0x42df2a798f82289E177311362e8f5ccC45c1219c', launchLocker: '0x267444D099b10fB5Ed7c3Cc7B7c767AdcA574952', launchAndBuyRouter: '0xe33E9E479dF8802cb0866d5d05258bEc4cF62948', launchDeployer: '0x3711ceA4feaDE896C913C68F01Eda97Cb06D1A42', graduationExecutor: '0xC7819B64A1dAECD7eC19856d026cb14EfBd89046', graduationGuard: '0xf5695117b99B6f6401e67d4195BD653628176C6C', poolManager: '0x8366a39CC670B4001A1121B8F6A443A643e40951',} as const;Do not hardcode Plouto addresses
The one exception is the registry. Everything else — including the PLOUTO token itself — should be resolved from it:
const [router, staking, executor, reserve, token, curve, initialized] = await Promise.all([ client.readContract({address: registry, abi: ploutoRegistryAbi, functionName: 'revenueRouter'}), client.readContract({address: registry, abi: ploutoRegistryAbi, functionName: 'gravityStaking'}), client.readContract({address: registry, abi: ploutoRegistryAbi, functionName: 'buybackExecutor'}), client.readContract({address: registry, abi: ploutoRegistryAbi, functionName: 'reserve'}), client.readContract({address: registry, abi: ploutoRegistryAbi, functionName: 'ploutoToken'}), client.readContract({address: registry, abi: ploutoRegistryAbi, functionName: 'ploutoCurve'}), client.readContract({address: registry, abi: ploutoRegistryAbi, functionName: 'initialized'}),]);See frontend integration for why.