Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 778 Bytes

README.md

File metadata and controls

24 lines (18 loc) · 778 Bytes

Stargate Crosschain Swap

This repo contains Typescript code that allow you to make cross chain swaps using Stargate Finance.

You can learn more about how to use it by reading the thread on my Twitter

Setup

  1. Install dependencies, generate typechain types
npm i
npm run generate-typechain
  1. Create .env file and set private key there

How to Swap

Script takes fromNetwork, toNetwork, amount and token CLI args.

Here is example of calling script for initiating cross chain swap of 5 USDC from Fantom to Polygon

npx ts-node ./scripts/crossChainSwap.ts --fromNetwork=Fantom --toNetwork=Polygon --token=USDC --amount=5

Please, note: Currently, supports only USDC on Fantom, Polygon, BSC networks.