txDataBuilder

package
v1.8.7 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: GPL-3.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TxDataBuilder

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

TxDataBuilder constructs a string to be used for transaction arguments

func NewBuilder

func NewBuilder() *TxDataBuilder

NewBuilder creates a new txDataBuilder instance.

func (*TxDataBuilder) BigInt

func (builder *TxDataBuilder) BigInt(value *big.Int) *TxDataBuilder

BigInt appends the bytes of a big.Int to the data string.

func (*TxDataBuilder) Bool

func (builder *TxDataBuilder) Bool(value bool) *TxDataBuilder

Bool appends either "true" or "false" to the data string, depending on the `value` argument.

func (*TxDataBuilder) BurnESDT

func (builder *TxDataBuilder) BurnESDT(token string, value int64) *TxDataBuilder

BurnESDT appends to the data string all the elements required to burn ESDT tokens.

func (*TxDataBuilder) Byte

func (builder *TxDataBuilder) Byte(value byte) *TxDataBuilder

Byte appends a single byte to the data string.

func (*TxDataBuilder) Bytes

func (builder *TxDataBuilder) Bytes(bytes []byte) *TxDataBuilder

Bytes appends a slice of bytes to the data string.

func (*TxDataBuilder) CanAddSpecialRoles

func (builder *TxDataBuilder) CanAddSpecialRoles(prop bool) *TxDataBuilder

CanAddSpecialRoles appends "canAddSpecialRoles" followed by the provided boolean value.

func (*TxDataBuilder) CanBurn

func (builder *TxDataBuilder) CanBurn(prop bool) *TxDataBuilder

CanBurn appends "canBurn" followed by the provided boolean value.

func (*TxDataBuilder) CanFreeze

func (builder *TxDataBuilder) CanFreeze(prop bool) *TxDataBuilder

CanFreeze appends "canFreeze" followed by the provided boolean value.

func (*TxDataBuilder) CanMint

func (builder *TxDataBuilder) CanMint(prop bool) *TxDataBuilder

CanMint appends "canMint" followed by the provided boolean value.

func (*TxDataBuilder) CanPause

func (builder *TxDataBuilder) CanPause(prop bool) *TxDataBuilder

CanPause appends "canPause" followed by the provided boolean value.

func (*TxDataBuilder) CanTransferNFTCreateRole

func (builder *TxDataBuilder) CanTransferNFTCreateRole(prop bool) *TxDataBuilder

CanTransferNFTCreateRole appends "canTransferNFTCreateRole" followed by the provided boolean value.

func (*TxDataBuilder) CanWipe

func (builder *TxDataBuilder) CanWipe(prop bool) *TxDataBuilder

CanWipe appends "canWipe" followed by the provided boolean value.

func (*TxDataBuilder) Clear

func (builder *TxDataBuilder) Clear() *TxDataBuilder

Clear resets the internal state of the txDataBuilder, allowing a new data string to be built.

func (*TxDataBuilder) Elements

func (builder *TxDataBuilder) Elements() []string

Elements returns the individual elements added to the builder

func (*TxDataBuilder) ElementsAsBytes added in v1.6.0

func (builder *TxDataBuilder) ElementsAsBytes() [][]byte

ElementsAsBytes returns the individual elements added to the builder

func (*TxDataBuilder) False

func (builder *TxDataBuilder) False() *TxDataBuilder

False appends the string "false" to the data string.

func (*TxDataBuilder) Func

func (builder *TxDataBuilder) Func(function string) *TxDataBuilder

Func sets the function to be invoked by the data string.

func (*TxDataBuilder) Function added in v1.6.0

func (builder *TxDataBuilder) Function() string

Function returns the individual elements added to the builder

func (*TxDataBuilder) GetLast

func (builder *TxDataBuilder) GetLast() string

GetLast returns the currently last element.

func (*TxDataBuilder) Int

func (builder *TxDataBuilder) Int(value int) *TxDataBuilder

Int appends an integer to the data string.

func (*TxDataBuilder) Int64

func (builder *TxDataBuilder) Int64(value int64) *TxDataBuilder

Int64 appends an int64 to the data string.

func (*TxDataBuilder) IsInterfaceNil

func (builder *TxDataBuilder) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*TxDataBuilder) IssueESDT

func (builder *TxDataBuilder) IssueESDT(token string, ticker string, supply int64, numDecimals byte) *TxDataBuilder

IssueESDT appends to the data string all the elements required to request an ESDT issuing.

func (*TxDataBuilder) IssueESDTWithAsyncArgs added in v1.6.0

func (builder *TxDataBuilder) IssueESDTWithAsyncArgs(token string, ticker string, supply int64, numDecimals byte) *TxDataBuilder

IssueESDTWithAsyncArgs appends to the data string all the elements required to request an ESDT issuing.

func (*TxDataBuilder) LocalBurnESDT

func (builder *TxDataBuilder) LocalBurnESDT(token string, value int64) *TxDataBuilder

LocalBurnESDT appends to the data string all the elements required to local burn ESDT tokens.

func (*TxDataBuilder) LocalMintESDT added in v1.6.0

func (builder *TxDataBuilder) LocalMintESDT(token string, value int64) *TxDataBuilder

LocalMintESDT appends to the data string all the elements required to local burn ESDT tokens.

func (*TxDataBuilder) MultiTransferESDTNFT added in v1.7.0

func (builder *TxDataBuilder) MultiTransferESDTNFT(destinationAddress []byte, transfers []*vmcommon.ESDTTransfer) *TxDataBuilder

MultiTransferESDTNFT appends to the data string all the elements required to request an Multi ESDT NFT transfer.

func (*TxDataBuilder) SetLast

func (builder *TxDataBuilder) SetLast(element string)

SetLast replaces the last element with the provided one.

func (*TxDataBuilder) Str

func (builder *TxDataBuilder) Str(str string) *TxDataBuilder

Str appends a string to the data string.

func (*TxDataBuilder) ToBytes

func (builder *TxDataBuilder) ToBytes() []byte

ToBytes returns the data as a slice of bytes.

func (*TxDataBuilder) ToString

func (builder *TxDataBuilder) ToString() string

ToString returns the data as a string.

func (*TxDataBuilder) TransferESDT

func (builder *TxDataBuilder) TransferESDT(token string, value int64) *TxDataBuilder

TransferESDT appends to the data string all the elements required to request an ESDT transfer.

func (*TxDataBuilder) TransferESDTNFT

func (builder *TxDataBuilder) TransferESDTNFT(token string, nonce int, value int64) *TxDataBuilder

TransferESDTNFT appends to the data string all the elements required to request an ESDT NFT transfer.

func (*TxDataBuilder) TransferMultiESDT added in v1.6.0

func (builder *TxDataBuilder) TransferMultiESDT(destAddress []byte, args [][]byte) *TxDataBuilder

TransferMultiESDT appends to the data string all the elements required to request an multi ESDT transfer.

func (*TxDataBuilder) True

func (builder *TxDataBuilder) True() *TxDataBuilder

True appends the string "true" to the data string.

Jump to

Keyboard shortcuts

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