pkg

package
v0.4.0-RC1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: AGPL-3.0, AGPL-3.0-or-later Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChkErr

func ChkErr(err error)

func GetAuth

func GetAuth(ctx context.Context, client *ethclient.Client, pkHex string) *bind.TransactOpts

func GetExecutedTransactionsCount

func GetExecutedTransactionsCount() uint64

func SwapExactTokensForTokens

func SwapExactTokensForTokens(auth *bind.TransactOpts, client *ethclient.Client,
	factory *UniswapV2Factory.UniswapV2Factory, router *UniswapV2Router02.UniswapV2Router02,
	tokenA, tokenB common.Address, exactAmountIn *big.Int) []*types.Transaction

func SwapTokens

func SwapTokens(client *ethclient.Client, auth *bind.TransactOpts, deployments Deployments) []*types.Transaction

func WaitForTransactionAndIncrementNonce

func WaitForTransactionAndIncrementNonce(l2Client *ethclient.Client, auth *bind.TransactOpts, err error, ctx context.Context, tx *types.Transaction) error

Types

type Deployments

type Deployments struct {
	ACoin     *ERC20.ERC20
	ACoinAddr common.Address
	BCoin     *ERC20.ERC20
	BCoinAddr common.Address
	CCoin     *ERC20.ERC20
	CCoinAddr common.Address
	Router    *UniswapV2Router02.UniswapV2Router02
	Factory   *UniswapV2Factory.UniswapV2Factory
}

func DeployContractsAndAddLiquidity

func DeployContractsAndAddLiquidity(client *ethclient.Client, auth *bind.TransactOpts) Deployments

Jump to

Keyboard shortcuts

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