📄️ Quick Start
This guide is designed to allow users with basic notions of Typescript to interact with the AgoraStableSwap contract. The complete examples are available on our GitHub repository.
📄️ Fetching All Pairs
Every AgoraStableSwapFactory keeps an on-chain registry of every pair it deploys. This guide shows how to query all available pairs using the wallet client created earlier.
📄️ Fetching Pair Reserves
Fetching live reserves is useful for knowing the liquidity on each side of the pair before you trade. The snippet below re-uses the wallet client you created in Quick Start, so no extra setup is needed.
📄️ Fetching Purchase Fees
The AgoraStableSwapPair contract stores the current purchase-fee rate (in 18-dec "fee precision" units) for each token direction:
📄️ Fetching Pair Price
AgoraStableSwapPair exposes two read functions for price discovery:
📄️ Getting Testnet Tokens
To try swaps end-to-end you'll need a balance of the demo tokens that live on Fuji.
🗃️ Executing a swap
2 items