transaction

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

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	CreateSupplyBody(data *SupplyParameters, myAddress *address.Address) (*cell.Cell, error)
	CreateWithdrawBody(data *WithdrawParameters, myAddress *address.Address) (*cell.Cell, error)
	CreateLiquidationBody(data *LiquidationParameters, myAddress *address.Address) (*cell.Cell, error)
}

func NewBuilder

func NewBuilder(config *config.Config) Builder

type LiquidationBaseData

type LiquidationBaseData struct {
	BorrowerAddress     *address.Address
	LoanAsset           *big.Int
	CollateralAsset     *big.Int
	MinCollateralAmount *big.Int
	LiquidationAmount   *big.Int
}

type LiquidationParameters

type LiquidationParameters struct {
	*LiquidationBaseData
	PriceData            *cell.Cell
	QueryID              uint64
	ResponseAddress      *address.Address
	IncludeUserCode      bool
	Payload              *cell.Cell
	PayloadForwardAmount *big.Int
	ForwardAmount        *big.Int
}

func NewLiquidationParameters

func NewLiquidationParameters(liquidationBaseData *LiquidationBaseData, priceData *cell.Cell) *LiquidationParameters

func (*LiquidationParameters) SetForwardAmount

func (l *LiquidationParameters) SetForwardAmount(forwardAmount *big.Int) *LiquidationParameters

func (*LiquidationParameters) SetIncludeUserCode

func (l *LiquidationParameters) SetIncludeUserCode(b bool) *LiquidationParameters

func (*LiquidationParameters) SetPayload

func (l *LiquidationParameters) SetPayload(payload *cell.Cell, payloadForwardAmount *big.Int) *LiquidationParameters

func (*LiquidationParameters) SetQueryID

func (*LiquidationParameters) SetResponseAddress

func (l *LiquidationParameters) SetResponseAddress(responseAddress *address.Address) *LiquidationParameters

type SupplyParameters

type SupplyParameters struct {
	Asset            *big.Int
	QueryID          uint64
	IncludeUserCode  bool
	Amount           *big.Int
	AmountToTransfer *big.Int
	Payload          *cell.Cell
	ResponseAddress  *address.Address
	ForwardAmount    *big.Int
}

type Wallet

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

func NewWallet

func NewWallet(config *config.Config, wallet *wallet.Wallet, builder Builder) *Wallet

func (*Wallet) SendLiquidation

func (w *Wallet) SendLiquidation(ctx context.Context, data *LiquidationParameters, wait bool) error

func (*Wallet) SendSupply

func (w *Wallet) SendSupply(ctx context.Context, data *SupplyParameters, wait bool) error

func (*Wallet) SendWithdraw

func (w *Wallet) SendWithdraw(ctx context.Context, data *WithdrawParameters, wait bool) error

type WithdrawParameters

type WithdrawParameters struct {
	QueryID          uint64
	Asset            *big.Int
	Amount           *big.Int
	IncludeUserCode  bool
	AmountToTransfer *big.Int
	Payload          *cell.Cell
	PriceData        *cell.Cell
}

Jump to

Keyboard shortcuts

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