Configure Chains & Tokens

Create configuration rules that specify what tokens are allowed to be sent and received through your dApp.

The default configuration for all integrations allows users to send any token on any chain and receive any token on any chain. See all supported chains and tokens

Create a rule

  1. Click on the button in the top right corner to create a new rule.
  2. Under the section titled "What can users send?" on the left-hand side, choose which blockchains you want to permit by selecting them from the list of available chains.
  3. By default, all tokens are selected on the send side.
  4. To select specific tokens per blockchain, click the “All tokens” button and select the token(s) you want to allow to send.
  5. Under the section titled “ What can users receive?” on the right-hand side, choose which blockchains you want to permit by selecting them from the list of available chains.
  6. By default, all tokens are selected on the receive side.
  7. To select specific tokens per blockchain, click the “All tokens” button and select the token(s) you want to allow to send.
Create a rule

If you want to allow sending or receiving from any blockchain select “all blockchains”.

Below is an example of how to create a rule. Lets setup the following:

Send side:

  • Blockchains: Ethereum, Avalanche, Optimism, BSC
  • Tokens: All tokens

Receive side:

  • Blockchains: Polygon
  • Tokens: MATIC, AAVE

Update a rule

  1. Click on any rule you want to update
  2. Update your Send and/or Receive selections
  3. Save updates

Delete a rule

The default rule cannot be deleted. It will automatically be disabled if you create a custom rule.

  1. Click on the three dots on the right side of the rule
  2. Select “delete rule”
Delete a rule

Set up a default pair for Swing Widget

By default, the Swing widget initializes with a source chain network that the wallet is connected to and any other EVM chain as the destination chain.

If you have a particular chain and token pair that you would prefer your widget to initialize with, here's how you can do that:

  1. First, create a set of rules that allows users to send and recieve specific tokens/chains within your project. Follow the steps in Create a rule
  2. Then, create a new rule that will be used as a default rule.
  3. Under the section titled "What can users send?" on the left-hand side, select "All chains/All tokens".
  4. Under the section titled "What can users receive?" on the right-hand side, select a single blockchain and a token that you want to be displayed as the destination on your widget.
  5. Finally, at the bottom right section of the modal, toggle the "Set as the default rule" switch to mark your rule as the default rule.
Create default platform rule

Try your configuration

Once you have created your rules to configure chains and tokens, try it out by clicking the “Try Configuration” button in the top right. This will open a panel where you can try your configuration using the Swing Widget.

Try your configuration