estimate_tx_rate

package
v0.0.0-...-8b20efb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BalancerHandler

func BalancerHandler(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)

BalancerHandler get estimate amountOut for give in

func BancorHandler

func BancorHandler(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)

BancorHandler get token exchange rate based on from amount

func CurveHandler

func CurveHandler(from, to string, amount *big.Int) (*types.ExchangePair, error)

CurveHandler get token exchange rate based on from amount https://github.com/curvefi/curve-vue/blob/master/src/docs/README.md

func DforceHandler

func DforceHandler(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)

DforceHandler get token exchange rate based on from amount

func GetBalancerBestPoolsAndOut

func GetBalancerBestPoolsAndOut(fromAddr, toAddr common.Address, amount *big.Int) ([]common.Address, *big.Int, error)

func GetFactory

func GetFactory(token1Addr, token2Addr common.Address) (string, error)

GetFactory return mooniswap token exchange factory addr

func KyberswapHandler

func KyberswapHandler(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)

KyberswapHandler get token exchange rate based on from amount

func MooniswapHandler

func MooniswapHandler(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)

MooniswapHandler get token exchange rate based on from amount

func OasisHandler

func OasisHandler(from, to string, amount *big.Int) (*types.ExchangePair, error)

OasisHandler get token exchange rate based on from amount

func OneInchHandler

func OneInchHandler(from, to string, amount *big.Int) (*types.ExchangePair, error)

OneInchHandler get token exchange rate based on from amount

func ParaswapHandler

func ParaswapHandler(from, to string, amount *big.Int) (*types.ExchangePair, error)

ParaswapHandler get token exchange rate based on from amount

func SushiswapHandler

func SushiswapHandler(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)

SushiswapHandler get token exchange rate based on from amount

func TokenlanHandler

func TokenlanHandler(c echo.Context) error

TokenlanHandler get token exchange rate based on from amount

func UniswapV2Handler

func UniswapV2Handler(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)

UniswapV2Handler get token exchange rate based on from amount

func ZeroXHandler

func ZeroXHandler(from, to string, amount *big.Int) (*types.ExchangePair, error)

ZeroXHandler get token exchange rate based on from amount

Types

type Handler

type Handler = func(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL