You can create your own project specific token list, use the Marswap default list or use a combination of both.
If you do not pass in the tokenList parameter then the widget defaults to the Marswap Aggregator token list.
If you specify your own token list then by default it will be combined with the Marswap Aggregator token list. To prevent this you can set useMarswapTokenList equal to false.
buyTokenOrSellTokenHasFeesmust be set to true if the token has taxes otherwise the transaction might fail.
<MarswapWidget
tokenList={[
{
chainId: 109,
address: '0xABbAF2746C46f8F269e0a252285ABE9d8D8CDf63',
symbol: 'MSWAPF',
name: 'MarSwap Farm',
decimals: 18,
buyTokenOrSellTokenHasFees: true,
logoURI: 'https://dex.marswap.exchange/images/tokens/MSWAP.png',
},
{
chainId: 25,
address: '0xaad00d36dbc8343c3505ba51418a43d3622d2964',
symbol: 'CLMRS',
name: 'Crolon Mars',
decimals: 18,
buyTokenOrSellTokenHasFees: true,
logoURI: 'https://assets.coingecko.com/coins/images/26385/standard/resized-image-Promo-removebg-preview.png?1696525462',
},
]}
useMarswapTokenList={true} //Set false to only use the token list above.
/>
Specify the default sell (TokenIn) and buy (TokenOut) tokens in the below format for each chain. If you do not specify a token, then the default tokens from the Marswap Aggregator will be used.