notifees

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMxNotifee

func NewMxNotifee(args ArgsMxNotifee) (*mxNotifee, error)

NewMxNotifee will create a new instance of mxNotifee

Types

type ArgsMxNotifee

type ArgsMxNotifee struct {
	Proxy           Proxy
	TxBuilder       TxBuilder
	TxNonceHandler  TransactionNonceHandler
	ContractAddress core.AddressHandler
	CryptoHolder    core.CryptoComponentsHolder
	BaseGasLimit    uint64
	GasLimitForEach uint64
}

ArgsMxNotifee is the argument DTO for the NewMxNotifee function

type Proxy

type Proxy interface {
	GetNetworkConfig(ctx context.Context) (*data.NetworkConfig, error)
	GetAccount(ctx context.Context, address core.AddressHandler) (*data.Account, error)
	SendTransaction(ctx context.Context, tx *transaction.FrontendTransaction) (string, error)
	SendTransactions(ctx context.Context, txs []*transaction.FrontendTransaction) ([]string, error)
	IsInterfaceNil() bool
}

Proxy holds the primitive functions that the multiversx proxy engine supports & implements dependency inversion: blockchain package is considered inner business logic, this package is considered "plugin"

type TransactionNonceHandler

type TransactionNonceHandler interface {
	ApplyNonceAndGasPrice(ctx context.Context, address core.AddressHandler, tx *transaction.FrontendTransaction) error
	SendTransaction(ctx context.Context, tx *transaction.FrontendTransaction) (string, error)
	IsInterfaceNil() bool
}

TransactionNonceHandler defines the component able to apply nonce for a given FrontendTransaction

type TxBuilder

type TxBuilder interface {
	ApplyUserSignature(cryptoHolder core.CryptoComponentsHolder, tx *transaction.FrontendTransaction) error
	IsInterfaceNil() bool
}

TxBuilder defines the component able to build & sign a transaction

Jump to

Keyboard shortcuts

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