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
blockchains insert upserts.Getting the DEX entry right
Each entry index 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.