Documentation ¶
Index ¶
Constants ¶
const ArgsPerTransfer = 3
ArgsPerTransfer defines the number of arguments per transfer in multi transfer
const MinArgsForDCDTNFTTransfer = 4
MinArgsForDCDTNFTTransfer defines the minimum arguments needed for an nft transfer
const MinArgsForDCDTTransfer = 2
MinArgsForDCDTTransfer defines the minimum arguments needed for an dcdt transfer
const MinArgsForMultiDCDTNFTTransfer = 4
MinArgsForMultiDCDTNFTTransfer defines the minimum arguments needed for a multi transfer
Variables ¶
var ErrInvalidCode = errors.New("invalid code")
ErrInvalidCode signals an invalid Code
var ErrInvalidCodeMetadata = errors.New("invalid code metadata")
ErrInvalidCodeMetadata signals an invalid Code Metadata
var ErrInvalidDataString = errors.New("transaction data string is unevenly split")
ErrInvalidDataString signals that the transaction data string could not be split evenly
var ErrInvalidDeployArguments = errors.New("invalid deploy arguments")
ErrInvalidDeployArguments signals invalid deploy arguments
var ErrInvalidVMType = errors.New("invalid vm type")
ErrInvalidVMType signals an invalid VMType
var ErrNilFunction = errors.New("smart contract function is nil")
ErrNilFunction signals that the function name from transaction data is nil
var ErrNilMarshalizer = errors.New("nil marshaller")
ErrNilMarshalizer signals that marshaller is nil
var ErrNotDCDTTransferInput = errors.New("not an DCDT transfer input")
ErrNotDCDTTransferInput signals invalid DCDT transfer input error
var ErrNotEnoughArguments = errors.New("not enough arguments")
ErrNotEnoughArguments signals not enough arguments error
var ErrTokenizeFailed = errors.New("tokenize failed")
ErrTokenizeFailed signals that data splitting into arguments and code failed
Functions ¶
func NewCallArgsParser ¶
func NewCallArgsParser() *callArgsParser
NewCallArgsParser creates a new parser
func NewDCDTTransferParser ¶ added in v0.0.2
func NewDCDTTransferParser( marshaller vmcommon.Marshalizer, ) (*dcdtTransferParser, error)
NewDCDTTransferParser creates a new dcdt transfer parser
func NewDeployArgsParser ¶
func NewDeployArgsParser() *deployArgsParser
NewDeployArgsParser creates a new parser
func NewStorageUpdatesParser ¶
func NewStorageUpdatesParser() *storageUpdatesParser
NewStorageUpdatesParser creates a new parser
Types ¶
type DeployArgs ¶
type DeployArgs struct { Code []byte VMType []byte CodeMetadata vmcommon.CodeMetadata Arguments [][]byte }
DeployArgs represents the parsed deploy arguments