data

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

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

Go to latest
Published: Dec 13, 2021 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Client     *ethclient.Client
	SyrupPools []SyrupPool
	Tokens     []Token
)

Functions

func GetAmountsOut

func GetAmountsOut(fromSymbol, toSymbol, amount string) (float64, string)

func GetTokenPrice

func GetTokenPrice(token string) float64

func PairsPrice

func PairsPrice(path []common.Address) float64

func SlippageAmount

func SlippageAmount(amountsOut *big.Int, swapToDecimals uint8, err error) float64

func StartRefreshPrices

func StartRefreshPrices()

func Swap

func Swap(fromSymbol, toSymbol, amount, PrivateKey string) string

func SyrupPoolCheckReward

func SyrupPoolCheckReward(fromAddresss string, pancakeStakePool *pancake.Pancake, decimals uint8) (string, string)

func TokenPrice

func TokenPrice(token string, client *ethclient.Client) float64

Types

type SyrupPool

type SyrupPool struct {
	Client      *ethclient.Client
	PoolName    string
	PoolAddress string

	//Total       float64
	Total      binding.String
	Reward     binding.String
	RewardUsdt binding.String
	Stake      binding.String
	Apy        binding.String
	Price      binding.String
	Estimation binding.String
}

func (*SyrupPool) CakeAutoSyrupPool

func (tp *SyrupPool) CakeAutoSyrupPool()

func (*SyrupPool) CakeSyrupPool

func (tp *SyrupPool) CakeSyrupPool()

func (*SyrupPool) IsActive

func (tp *SyrupPool) IsActive() bool

func (*SyrupPool) OtherSyrupPool

func (tp *SyrupPool) OtherSyrupPool()

func (*SyrupPool) Start

func (tp *SyrupPool) Start()

func (*SyrupPool) Update

func (tp *SyrupPool) Update()

type Token

type Token struct {
	Client      *ethclient.Client
	Symbol      string
	Address     string
	Amount      float64
	Balance     binding.String
	BalanceUsdt binding.String
	Price       binding.String
}

func (*Token) Start

func (tp *Token) Start()

func (*Token) Update

func (tp *Token) Update()

Jump to

Keyboard shortcuts

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