Swing Points Program is Live 🚀 Learn More →

Choose an environment

The (environment) property configures which Swing API environment is used.

Testnet

The testnet environment integrates with contracts deployed to testnets. Using this environment is great for local development and testing. You can use all of the features of the widget, without needing to use real funds. Check available routes

Production

The production environment integrates with contracts deployed on mainnet. This is the default environment.

Setup

Add the environment property to the widget component with the value of either testnet or production. If the environment property is omitted, the production environment will be used.

React Comonents

<Swap projectId="swing-project-id" environment='production' />
<Stake projectId="swing-project-id" environment='production' />
<Withdraw projectId="swing-project-id" environment='production' />
<Gas projectId="swing-project-id" environment='production' />

Web Components

<swing-swap projectId="example-project" environment='production'></swing-swap>
<swing-stake projectId="example-project" environment='production'></swing-stake>
<swing-withdraw projectId="example-project" environment='production'></swing-withdraw>
<swing-gas projectId="example-project" environment='production'></swing-gas>