For developers / Start here
Connect a wallet
LiveSix values, and the four ways you are most likely to want them. The coins here have no value, so you can try anything without risk.
The six values
| Field | Value |
|---|---|
| Network name | Pickle Chain Testnet |
| RPC URL | https://rpc.picklechain.xyz |
| Chain ID | 782700x131be |
| Currency symbol | ETH |
| Block explorer | https://explorer.picklechain.xyz |
| WebSocket | wss://rpc.picklechain.xyz/ws/the trailing slash is part of it |
Test coins only
Test ETH and test PKL have no monetary value and are not redeemable for anything. Chain state may be reset without notice during Phase 0, which deletes balances, contracts and history. Mainnet will use chain ID 78271, which is reserved and not live - anything asking you to send real funds to a Pickle address today is a scam.
Adding it by hand
MetaMask, Rainbow and anything else EIP-1193 will take the values above through their "add network" form. The project site also has a button that does it for you. From your own page, the request is the standard one:
await window.ethereum.request({
method: "wallet_addEthereumChain",
params: [{
chainId: "0x131be",
chainName: "Pickle Chain Testnet",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: ["https://rpc.picklechain.xyz"],
blockExplorerUrls: ["https://explorer.picklechain.xyz"],
}],
});The wallet dials the RPC from outside your page, so a relative path - the thing a same-origin proxy mount would give you - is not usable here. This is the one place the absolute endpoint is required rather than optional.
viem
There is no Pickle entry in viem/chains, so define it. Nothing about the chain needs special handling at this layer:
import { defineChain, createPublicClient, http } from "viem";
export const pickleTestnet = defineChain({
id: 78270,
name: "Pickle Chain Testnet",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: { http: ["https://rpc.picklechain.xyz"], webSocket: ["wss://rpc.picklechain.xyz/ws/"] },
},
blockExplorers: {
default: { name: "Pickle Explorer", url: "https://explorer.picklechain.xyz" },
},
testnet: true,
});
const client = createPublicClient({ chain: pickleTestnet, transport: http() });
console.log(await client.getChainId()); // 78270multicall is not configured above because no multicall3 deployment is published for this chain - leave it unset rather than pointing it at a guess, or every batched read will call an address with no code and succeed while returning nothing.
Revert decoding will not give you a named error. error.data is never populated on this chain, so viem surfaces the raw message instead of a decoded custom error - see deviations.
ethers
import { JsonRpcProvider, Network } from "ethers";
const network = new Network("Pickle Chain Testnet", 78270);
const provider = new JsonRpcProvider("https://rpc.picklechain.xyz", network, {
// The chain id never changes under this provider, so let ethers skip the
// per-call network check.
staticNetwork: network,
});
console.log(await provider.getBlockNumber());For subscriptions use a WebSocketProvider against wss://rpc.picklechain.xyz/ws/ instead. The socket is a different server on a different port from the HTTP listener, and it is the only place subscriptions exist - the subscriptions page covers what that changes.
Foundry
Nothing unusual is needed. Cancun is the pinned execution spec, so name it rather than letting a newer forge default to something later:
[profile.default] src = "src" out = "out" solc = "0.8.24" evm_version = "cancun" [rpc_endpoints] pickle = "https://rpc.picklechain.xyz"
forge script script/Deploy.s.sol \ --rpc-url pickle --broadcast --private-key $PRIVATE_KEY
The node reports mixHash on its Cancun-shaped headers specifically because revm-based clients - forge script among them - reject a header without it with header validation error: prevrandao not set, and would not simulate at all. There is a regression test for that header field for exactly this reason.
Hardhat
module.exports = {
solidity: { version: "0.8.24", settings: { evmVersion: "cancun" } },
networks: {
pickle: {
url: "https://rpc.picklechain.xyz",
chainId: 78270,
// Gas is priced at 1 wei and the base fee is zero, so there is no fee
// market to estimate against.
gasPrice: 1,
},
},
};Hardhat's own gas estimation is fine, but be aware that eth_estimateGas here ignores the gas, gasPrice and block parameters you send it and always simulates at the 30,000,000 block limit against latest state.