Getting Testnet Tokens
If you want to run this example, be sure that you have followed the steps here to configure your Wallet Client.
To try swaps end-to-end you’ll need a balance of the demo tokens that live on Sepolia.
Agora provides faucet contracts that mint small amounts of each asset to any address on request.
Prerequisite
Make sure your wallet already holds a little Sepolia ETH for gas (see Wallet Setup). A single transaction costs only a few gwei, but the transaction will fail if your balance is zero.
Faucet addresses
Helper function to request tokens
With the previously mentioned viem wallet client running, you should just need to use this helper function to call our contract and request testnet tokens.
Full Example
Output
You can check the status of the returned transaction hash in the Sepolia explorer. Here is the transaction from the example above.
The Sepolia explorer shows that the transaction was successful so there should now be 10,000 AUSD in the configured wallet’s balance.

