apitypes

package
v0.0.0-...-0056550 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WARN = "WARNING"
	CRIT = "CRITICAL"
	INFO = "Info"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SendTxArgs

type SendTxArgs struct {
	From                 common.MixedcaseAddress  `json:"from"`
	To                   *common.MixedcaseAddress `json:"to"`
	Gas                  hexutil.Uint64           `json:"gas"`
	GasPrice             *hexutil.Big             `json:"gasPrice"`
	MaxFeePerGas         *hexutil.Big             `json:"maxFeePerGas"`
	MaxPriorityFeePerGas *hexutil.Big             `json:"maxPriorityFeePerGas"`
	Value                hexutil.Big              `json:"value"`
	Nonce                hexutil.Uint64           `json:"nonce"`

	// We accept "data" and "input" for backwards-compatibility reasons.
	// "input" is the newer name and should be preferred by clients.
	// Issue detail: https://github.com/SMartchaindev92/Smartchain/issues/15628
	Data  *hexutil.Bytes `json:"data"`
	Input *hexutil.Bytes `json:"input,omitempty"`

	// For non-legacy transactions
	AccessList *types.AccessList `json:"accessList,omitempty"`
	ChainID    *hexutil.Big      `json:"chainId,omitempty"`
}

SendTxArgs represents the arguments to submit a transaction This struct is identical to ethapi.TransactionArgs, except for the usage of common.MixedcaseAddress in From and To

func (SendTxArgs) String

func (args SendTxArgs) String() string

func (*SendTxArgs) ToTransaction

func (args *SendTxArgs) ToTransaction() *types.Transaction

ToTransaction converts the arguments to a transaction.

type ValidationInfo

type ValidationInfo struct {
	Typ     string `json:"type"`
	Message string `json:"message"`
}

type ValidationMessages

type ValidationMessages struct {
	Messages []ValidationInfo
}

func (*ValidationMessages) Crit

func (vs *ValidationMessages) Crit(msg string)

func (*ValidationMessages) GetWarnings

func (v *ValidationMessages) GetWarnings() error

/ getWarnings returns an error with all messages of type WARN of above, or nil if no warnings were present

func (*ValidationMessages) Info

func (vs *ValidationMessages) Info(msg string)

func (*ValidationMessages) Warn

func (vs *ValidationMessages) Warn(msg string)

Jump to

Keyboard shortcuts

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