Skip to main content
Chain definitions are JSON files in internal/blockchains/, embedded into the binary at build time.
1

Add the definition

Drop a JSON file into internal/blockchains/. It describes the chain, the tokens the seeder should walk, and the DEX deployments to price against.
2

Wire up the RPC endpoint

Add the chain’s *_RPC_URL to the config struct and to your environment.
3

Rebuild

Definitions are embedded at build time, so a rebuild is required. Editing the JSON alone changes nothing in a running binary.
4

Re-seed

The seeder queries the v2 and v3 factories over RPC and persists the pools it finds. Mind the clean-database caveat: only the blockchains insert upserts.

Getting the DEX entry right

Each entry in dex carries the addresses uatu prices and encodes against. Which ones matter depends on the protocol version: v2FactoryAddress and v2RouterAddress for v2-style pools, v3FactoryAddress, v3RouterAddress and v3QuoterAddress for v3, plus universalRouterAddress, permit2Address and settlementAddress where the protocol uses them. A DEX slug only needs to be unique within its chain. The same protocol on two chains reuses the slug with different addresses.
Copy the shape from an existing definition on a chain running the same protocol, then swap in the deployment addresses for your network.

Verify

No pools usually means the seeder couldn’t reach the RPC endpoint, or that the token list produced no pairs the factories know about.