pancake_swap

package
v0.0.0-...-0b7b9bf Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//MyAddr    = common.HexToAddress("0xfCaAe259B4E9940B09cafD502B694961963A75Cc")
	WBNBAddr   = common.HexToAddress("0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c")
	RouterAddr = common.HexToAddress("0x10ED43C718714eb63d5aA57B78B54704E256024E")
)

Functions

func EthToWei

func EthToWei(val *big.Float) *big.Int

func WeiToEth

func WeiToEth(val *big.Int) *big.Float

Types

type Client

type Client struct {
	ChainID *big.Int
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, privateKey string) (*Client, error)

func (*Client) Buy

func (c *Client) Buy(ctx context.Context, contractAddress common.Address, amount *big.Int) error

func (*Client) Close

func (c *Client) Close()

func (*Client) ListenToPairCreated

func (c *Client) ListenToPairCreated(ctx context.Context, contractAddr string) (event.Subscription, <-chan *contract.IPancakeFactoryPairCreated, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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