Skip to content

Configuration

Configuration object is consumed by Symphony SDK. You can partially or completely modify it to your needs.

Overview

Viem
const defaultConfig = {
  timeout: 10000,
  chainId: 1329,
  chainName: "sei",
  rpcUrl: "https://sei-rpc.publicnode.com",
  nativeAddress: "0x0",
  wrappedNativeAddress: "0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7",
  slippage: "0.5",
  publicClient: publicClient,
  tokens: TokenListByAddress,
  feeParams: {
    paramFee: "0",
    feeAddress: "0x0000000000000000000000000000000000000000",
    feeSharePercentage: "0",
  },
};

Parameters

timeout

  number

Timeout time for route calls

chainId

  string

Chain Id that Symphony operates on.

chainName

  string

Chain Name that Symphony operates on.

rpcUrl

  string

Rpc Url that Symphony uses to create public provider/client.

nativeAddress

  string

Address for Symphony to refer native token internally. Default is '0x0'.

slippage

  string | number

Slippage percentage Symphony uses internally. You can always override slippage amount while using 'swap'. Refer to 'slippage' section for details.

provider / publicClient

  string

Public Client / Provider Symphony uses to do read calls, transaction simulations

tokens

  array

Token list of Symphony Aggregator. Returns tokens depending on chainId.

feeParams

  object

feeParams structure for executeSwaps function of Symphony contract. Used for split fees.

  • paramFee - Custom fee amount that will override platform fees. Represents a percentage in bps and should be between 1 and 1000. 100% = 1000.
  • feeAddress - Receiver address of custom fee.
  • feeSharePercentage - Percentage of split between Symphony and user.

feeAddress being zero address disables custom fee behavior.