Contract ABIs
Every ABI used by the interface and the scripts lives in one generated module, lib-ts/abi.ts. Nothing is hand-written except where a contract is unverified on chain.
Regenerating
forge build && node scripts/gen-abis.mjsThat script does two things:
- Reads the Foundry artifacts in
out/for the five Plouto contracts. - Fetches the Pons ABIs live from Blockscout, so they cannot drift from what is deployed.
Provenance
| ABI | Source |
|---|---|
ploutoRegistryAbi | Foundry artifact |
ploutoRevenueRouterAbi | Foundry artifact |
gravityStakingAbi | Foundry artifact |
buybackExecutorAbi | Foundry artifact |
ploutoReserveAbi | Foundry artifact |
ponsFactoryAbi | Blockscout, verified source |
ponsFeeEscrowAbi | Blockscout, verified source |
ponsLaunchDeployerAbi | Blockscout, verified source |
ponsCurveAbi | Recovered from deployed bytecode — see below |
erc20Abi | Minimal hand-written subset |
The curve ABI
Per-launch Pons curves are deployed as unverified instances. There is no verified source to fetch.
The ABI was therefore recovered by extracting the dispatcher selectors from deployed bytecode and resolving them against the public 4-byte database. The one function Plouto actually calls was confirmed directly:
buy(uint256,uint256,address) = 0x59a87bc1 ← present in deployed curve bytecodescripts/prepare-pons-launch.ts re-checks that selector against a live curve before any launch, and refuses to continue if it is absent.
Solidity interfaces
The on-chain side keeps its own transcriptions in src/interfaces/:
IPonsV2.sol— factory, escrow, curve, launch deployer, plus thePonsLaunchedTokenandPonsLaunchConfigstructs.IUniswapV4.sol— the minimalPoolManagersurface,PoolKey,SwapParamsandIUnlockCallback.IPlouto.sol— the small internal interfaces the contracts use to call each other.
These are transcribed from verified ABIs, not invented. The file header records the provenance for each.
Type safety
lib-ts/abi.ts exports every ABI as const, so viem and wagmi infer argument and return types from the ABI itself. A typo in a function name is a compile error rather than a runtime revert.