A Quick Start For Wallet & Terminal & Bot Developers

This page outlines the minimal steps to integrate with Flap for wallets, terminals and bots. Each step links to the detailed documentation.

  1. Find the Portal entrypoint. Our main protocol has a single entrypoint contract called Portal. Use the deployed addresses listed in Deployed Contract Addresses.

  2. Index tokens (recommended). To index tokens launched on Flap, listen to TokenCreated and related events emitted by Portal. See Index Token Created Events for the full event list and indexing strategy. The TokenCreated event only contains the IPFS CID of the metadata. To parse token metadata, follow Parse Token Meta.

  3. Skip indexing and query on demand (alternative). If you do not want to index, you can query token info directly from Portal with the getTokenV* methods. See Inspect A Token for details.

  4. Tax tokens: query dynamic info on-chain. Tax tokens have dynamic fields (e.g., accumulated stats) that are best retrieved on-chain. Use the Tax Token Helper as described in Inspect A Tax Token. For vault-specific data, see how to inspect a tax token's vault.

  5. Trade tokens. You can quote on-chain using quoteExactInput, or compute quotes off-chain and submit swaps using swapExactInput. See Trade Tokens for details.

Last updated