parsers

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: GPL-3.0 Imports: 9 Imported by: 10

Documentation

Index

Constants

View Source
const ArgsPerTransfer = 3

ArgsPerTransfer defines the number of arguments per transfer in multi transfer

View Source
const MinArgsForMECTNFTTransfer = 4

MinArgsForMECTNFTTransfer defines the minimum arguments needed for an nft transfer

View Source
const MinArgsForMECTTransfer = 2

MinArgsForMECTTransfer defines the minimum arguments needed for an mect transfer

View Source
const MinArgsForMultiMECTNFTTransfer = 4

MinArgsForMultiMECTNFTTransfer defines the minimum arguments needed for a multi transfer

Variables

View Source
var ErrInvalidCode = errors.New("invalid code")

ErrInvalidCode signals an invalid Code

View Source
var ErrInvalidCodeMetadata = errors.New("invalid code metadata")

ErrInvalidCodeMetadata signals an invalid Code Metadata

View Source
var ErrInvalidDataString = errors.New("transaction data string is unevenly split")

ErrInvalidDataString signals that the transaction data string could not be split evenly

View Source
var ErrInvalidDeployArguments = errors.New("invalid deploy arguments")

ErrInvalidDeployArguments signals invalid deploy arguments

View Source
var ErrInvalidVMType = errors.New("invalid vm type")

ErrInvalidVMType signals an invalid VMType

View Source
var ErrNilFunction = errors.New("smart contract function is nil")

ErrNilFunction signals that the function name from transaction data is nil

View Source
var ErrNilMarshalizer = errors.New("nil marshaller")

ErrNilMarshalizer signals that marshaller is nil

View Source
var ErrNotEnoughArguments = errors.New("not enough arguments")

ErrNotEnoughArguments signals not enough arguments error

View Source
var ErrNotMECTTransferInput = errors.New("not an MECT transfer input")

ErrNotMECTTransferInput signals invalid MECT transfer input error

View Source
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 NewDeployArgsParser

func NewDeployArgsParser() *deployArgsParser

NewDeployArgsParser creates a new parser

func NewMECTTransferParser

func NewMECTTransferParser(
	marshaller vmcommon.Marshalizer,
) (*mectTransferParser, error)

NewMECTTransferParser creates a new mect transfer 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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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