This flow is testnet only. The random tokens endpoint hands out throwaway test assets, so nothing here involves real funds.
/api/random_tokens provides you with a variety of test tokens, including Stellar Classic assets that can be wrapped and used by Soroban contracts.
Accessing Test Tokens
To access the test tokens, follow these steps:- Navigate to the API endpoint for random tokens:
https://api.soroswap.finance/api/random_tokens - The API will return a JSON object containing an array of tokens indexed by network. Tokens with only the
assetandsymbolkeys are Stellar Classic assets, whereas Soroban tokens will have additional information such asaddress,name, anddecimals. To test remember to select the tokens from the network you are on.
Testing Wrapping Functionality
To test the wrapping functionality with Stellar Classic assets:- From the API’s response, copy a Stellar Classic asset in the format
CODE:ISSUER. - Go to the Soroswap testnet interface.
- Paste the copied
CODE:ISSUERinto the search input from the Swap or Add liquidity pages, and select the asset from the results. - The interface will recognize that the asset is a Stellar Classic asset and offer you the option to wrap it so Soroban contracts can use it.

- Click on the asset, and a wrapping modal will appear, guiding you through the wrapping process.

- Once you initiate the wrapping process, you will be prompted to sign the transaction with your wallet.