Documentation ¶
Index ¶
- func BalancerHandler(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)
- func BancorHandler(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)
- func CurveHandler(from, to string, amount *big.Int) (*types.ExchangePair, error)
- func DforceHandler(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)
- func GetBalancerBestPoolsAndOut(fromAddr, toAddr common.Address, amount *big.Int) ([]common.Address, *big.Int, error)
- func GetFactory(token1Addr, token2Addr common.Address) (string, error)
- func KyberswapHandler(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)
- func MooniswapHandler(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)
- func OasisHandler(from, to string, amount *big.Int) (*types.ExchangePair, error)
- func OneInchHandler(from, to string, amount *big.Int) (*types.ExchangePair, error)
- func ParaswapHandler(from, to string, amount *big.Int) (*types.ExchangePair, error)
- func SushiswapHandler(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)
- func TokenlanHandler(c echo.Context) error
- func UniswapV2Handler(from, to common.Address, fromDecimal, toDecimal int, amount *big.Int) (*types.ExchangePair, error)
- func ZeroXHandler(from, to string, amount *big.Int) (*types.ExchangePair, error)
- type Handler
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 ¶
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 GetFactory ¶
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 ¶
OasisHandler get token exchange rate based on from amount
func OneInchHandler ¶
OneInchHandler get token exchange rate based on from amount
func ParaswapHandler ¶
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 ¶
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 ¶
ZeroXHandler get token exchange rate based on from amount