Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uniswap-dex-controller

This repo contains uniswap dex controller for safle swap.

Get supported tokens

await getSupportedTokens()

This will give us the list of all tokens supported in uniswap.

Get Exchange Rate

await getExchangeRate({ toContractAddress, toContractDecimal, fromContractAddress, fromContractDecimal, fromQuantity, slippageTolerance })

This will give us the exchange rate of 2 tokens.
Amount of toContractAddress the user will receive for quantity of fromContractAddress.

Get Estimated gas

await getEstimatedGas({ toContractAddress, toContractDecimal, fromContractAddress, fromContractDecimal, fromQuantity, slippageTolerance })

This will give us the estimated amount of gas in BigNumber for the swap.

Get Raw Transaction

await getRawTransaction({ walletAddress, toContractAddress, toContractDecimal, fromContractAddress, fromContractDecimal, toQuantity, fromQuantity, slippageTolerance })

This will give us the raw transaction to swap the tokens on uniswap.

About

Uniswap controller for Safle Token Swap

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages