contract

package
v0.0.0-...-a9b3359 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	Api() *api.Api
	Transactor() *api.ApiTransactor
	Caller() *api.ApiCaller
	Filterer() *api.ApiFilterer
}

type Api

type Api interface {
	Address() string
	Api() API
}

type Contract

type Contract struct {
	bind.SignerFn
	// contains filtered or unexported fields
}

func New

func New(addr string, ap *api.Api) (
	out *Contract,
	err error,
)

func (*Contract) Address

func (ca *Contract) Address() string

func (*Contract) Api

func (ca *Contract) Api() API

type FlashArbContract

type FlashArbContract struct {
	// contains filtered or unexported fields
}

func NewFlashArbContract

func NewFlashArbContract(
	api *Contract,
	pairs []entities.TradePair,
) (
	contract *FlashArbContract,
)

func (*FlashArbContract) AddPair

func (fc *FlashArbContract) AddPair(
	ctx c.Context,
	pair entities.TradePair,
) (
	err error,
)

func (*FlashArbContract) Address

func (fc *FlashArbContract) Address() (
	out string,
)

func (*FlashArbContract) Api

func (fc *FlashArbContract) Api() (
	out API,
)

func (*FlashArbContract) ClearPairs

func (fc *FlashArbContract) ClearPairs(
	ctx c.Context,
)

func (*FlashArbContract) GetPair

func (fc *FlashArbContract) GetPair(
	ctx c.Context,
	pool0, pool1 string,
) (
	pair entities.TradePair,
	err error,
)

func (*FlashArbContract) GetPairs

func (fc *FlashArbContract) GetPairs(
	ctx c.Context,
	protocol entities.SwapProtocol,
	tokens entities.TokenPair,
) (
	out []entities.TradePair,
	ok bool,
)

func (*FlashArbContract) ListPairs

func (fc *FlashArbContract) ListPairs(
	ctx c.Context,
) (
	vals []entities.TradePair,
)

func (*FlashArbContract) RemovePair

func (fc *FlashArbContract) RemovePair(
	ctx c.Context,
	pool0, pool1 string,
) (
	err error,
)

func (*FlashArbContract) SetPairs

func (fc *FlashArbContract) SetPairs(
	ctx c.Context,
	pairs []entities.TradePair,
) (
	err error,
)

Jump to

Keyboard shortcuts

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