WEEDSWAP
WeedSwap Docs

ABIs

Solidity source compiled with the repository’s exact compiler version is the ABI source of truth.

#Source priority

Use current contracts first, then Foundry build artifacts. A hand-maintained TypeScript ABI is a client convenience and must be checked against compiler output before enabling a write or interpreting a return value.

#Current ABI package

The @weedswap/abis package currently exposes a minimal ERC-20 interface, a QuoterV2 quote interface, and a partial Chef interface for frontend work. It does not cover every contract or event.

ts
import { chefAbi, erc20Abi, quoterV2Abi } from "@weedswap/abis";

// Verify these helpers against current compiler output before live use.

#Known interface difference

This documentation pass records the conflict instead of silently reconciling it. Public live mode remains disconnected, so the mismatch cannot fall back to fabricated data.

#Recommended generation flow

  1. Compile contracts with the exact Solidity version in foundry.toml.
  2. Extract ABI JSON from Foundry artifacts for the reviewed source revision.
  3. Generate typed client bindings or immutable ABI constants.
  4. Test read and write encodings against local deployed contracts.
  5. Pin the artifact revision used by the web and indexer packages.

#Current phase

ABI coverage is sufficient for disabled interface scaffolding and local tests, not for a complete production integration. Address, bytecode, source revision, and ABI must all match before any action is enabled.