Documentation ¶
Index ¶
- Constants
- Variables
- func ApproveErc20(fromPrivateKey string, spender string, contractAddr string, amount float64, ...) string
- func ApproveErc20AndAwait(fromPrivateKey string, spender string, contractAddr string, amount float64, ...) string
- func CalculatePath(swapFromToken string, swapToToken string, router string, ...) ([]common.Address, error)
- func Erc20Balance(arg, contract string, Client *ethclient.Client) (string, string)
- func Erc20Token(contractAddr string, Client *ethclient.Client) *erc20.Erc20
- func EstimateClient(chain string) *ethclient.Client
- func EstimateWsClient(chain string) *ethclient.Client
- func EthBalance(arg string, Client *ethclient.Client) string
- func GenerateOneAccount(wallet *hdwallet.Wallet, i int) (string, string, string)
- func GenerateOnePrivteKey() (string, string)
- func GetAmountsOut(router string, path []common.Address, amountIn *big.Int, ...) *big.Int
- func GetFactoryAddress(router string, client *ethclient.Client) common.Address
- func GetPoolPair(router string, token0, token1 common.Address, client *ethclient.Client) (*uniswapV2Pair.UniswapV2Pair, *common.Address, error)
- func GetUni2router2(router string, client *ethclient.Client) *uniswapv2router02.Uniswapv2router02
- func PriceFromSwap(router string, path []common.Address, amountIn *big.Int, ...) float64
- func SendAllEth(fromAddresss string, toAddressS string, hexkey string, gas uint64, ...) string
- func SendErc20(fromPrivateKey string, toAddressS string, contractAddr string, amount float64, ...) string
- func SendErc20All(fromPrivateKey string, toAddressS string, contractAddr string, gas uint64, ...) string
- func SendErc20Batch(fromPrivateKey string, toAddressS string, contractAddr string, amount float64, ...) string
- func SendEth(fromPrivateKey string, toAddressS string, amount float64, gas uint64, ...) string
- func SendEthBatch(fromPrivateKey string, toAddressS string, amount float64, gas uint64, ...) string
- func Str2Float(amount string) float64
- func Str2Int(amount string) int64
- func ToDecimal(ivalue interface{}, decimals int) decimal.Decimal
- func ToWei(iamount interface{}, decimals int) *big.Int
- func WaitForTxFinish(hex common.Hash, client *ethclient.Client) (bool, error)
Constants ¶
View Source
const EthUnit = 1000000000000000000
View Source
const GweiUnit = 1000000000
var Client *ethclient.Client
View Source
const WeiUnit6 = 1000000
View Source
const WeiUnit8 = 100000000
Variables ¶
View Source
var DefaultCallOpts = &bind.CallOpts{}
Functions ¶
func ApproveErc20 ¶
func ApproveErc20AndAwait ¶
func CalculatePath ¶
func Erc20Balance ¶
func EstimateClient ¶
func EstimateWsClient ¶
func GenerateOneAccount ¶
func GenerateOnePrivteKey ¶
func GetAmountsOut ¶
func GetFactoryAddress ¶
func GetPoolPair ¶
func GetPoolPair(router string, token0, token1 common.Address, client *ethclient.Client) (*uniswapV2Pair.UniswapV2Pair, *common.Address, error)
func GetUni2router2 ¶
func GetUni2router2(router string, client *ethclient.Client) *uniswapv2router02.Uniswapv2router02
func PriceFromSwap ¶
func SendAllEth ¶
func SendErc20All ¶
func SendErc20Batch ¶
func SendEthBatch ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.