txresult

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogsBloomBits  = 2048
	LogsBloomBytes = LogsBloomBits / 8
)
View Source
const (
	ExtensionFeeDetail = 1 << iota
	ExtensionDisableLogsBloom
)
View Source
const (
	EventLogICXTransfer = "ICXTransfer(Address,Address,int)"
)

Variables

View Source
var ReceiptType = reflect.TypeOf((*receipt)(nil))

Functions

func DecodeForJSONByType

func DecodeForJSONByType(t string, v []byte) (interface{}, error)

func DecomposeEventSignature

func DecomposeEventSignature(s string) (string, []string)

func EqualEventValue added in v1.4.0

func EqualEventValue(e, r any) bool

func EventDataStringToBytesByType

func EventDataStringToBytesByType(t string, v string) ([]byte, error)

func EventDataToBytesByType

func EventDataToBytesByType(t string, v interface{}) ([]byte, error)

func NewReceiptListFromHash

func NewReceiptListFromHash(database db.Database, h []byte) module.ReceiptList

func NewReceiptListFromSlice

func NewReceiptListFromSlice(database db.Database, list []Receipt) module.ReceiptList

func NewReceiptListWithBuilder

func NewReceiptListWithBuilder(builder merkle.Builder, h []byte) module.ReceiptList

Types

type LogsBloom

type LogsBloom struct {
	big.Int
}

logsBloom store blooms of logs.

func NewLogsBloom

func NewLogsBloom(bs []byte) *LogsBloom

func NewLogsBloomFromCompressed

func NewLogsBloomFromCompressed(bs []byte) *LogsBloom

func (*LogsBloom) AddAddressOfLog

func (lb *LogsBloom) AddAddressOfLog(addr module.Address)

func (*LogsBloom) AddIndexedOfLog

func (lb *LogsBloom) AddIndexedOfLog(i int, b []byte)

func (*LogsBloom) AddLog

func (lb *LogsBloom) AddLog(addr module.Address, log [][]byte)

func (*LogsBloom) CompressedBytes

func (lb *LogsBloom) CompressedBytes() []byte

func (*LogsBloom) Contain

func (lb *LogsBloom) Contain(mlb module.LogsBloom) bool

Contain checks whether it includes the bloom

func (*LogsBloom) Equal

func (lb *LogsBloom) Equal(mlb module.LogsBloom) bool

func (*LogsBloom) LogBytes

func (lb *LogsBloom) LogBytes() []byte

func (LogsBloom) MarshalJSON

func (lb LogsBloom) MarshalJSON() ([]byte, error)

func (*LogsBloom) Merge

func (lb *LogsBloom) Merge(lb2 module.LogsBloom)

Merge bloom

func (*LogsBloom) RLPDecodeSelf

func (lb *LogsBloom) RLPDecodeSelf(d codec.Decoder) error

func (*LogsBloom) RLPEncodeSelf

func (lb *LogsBloom) RLPEncodeSelf(e codec.Encoder) error

func (*LogsBloom) SetCompressedBytes

func (lb *LogsBloom) SetCompressedBytes(bs []byte) *big.Int

func (*LogsBloom) String

func (lb *LogsBloom) String() string

func (*LogsBloom) UnmarshalJSON

func (lb *LogsBloom) UnmarshalJSON(data []byte) error

type Receipt

type Receipt interface {
	module.Receipt
	AddLog(addr module.Address, indexed, data [][]byte)
	AddBTPMessages(messages list.List)
	// AddPayment adds payment information.
	// addr is payer. steps is total steps paid by the payer.
	// feeSteps is amount of steps for fee.
	// ( steps - feeSteps ) is virtual steps paid by the payer.
	// feeSteps can be nil if there is no steps for fee
	AddPayment(addr module.Address, steps *big.Int, feeSteps *big.Int)
	// FeeByEOA returns a fee paid by EOA (not including deposit).
	FeeByEOA() *big.Int
	// Fee returns total fee (excluding virtual steps).
	Fee() *big.Int
	DisableLogsBloom()
	SetCumulativeStepUsed(cumulativeUsed *big.Int)
	SetResult(status module.Status, used, price *big.Int, addr module.Address)
	SetReason(e error)
	Reason() error
	Flush() error
}

func NewReceipt

func NewReceipt(database db.Database, revision module.Revision, to module.Address) Receipt

func NewReceiptFromJSON

func NewReceiptFromJSON(database db.Database, revision module.Revision, bs []byte) (Receipt, error)

type TestEventLog added in v1.4.0

type TestEventLog struct {
	Address module.Address
	Indexed [][]byte
	Data    [][]byte
}

func (*TestEventLog) Assert added in v1.4.0

func (ev *TestEventLog) Assert(addr module.Address,
	signature string, indexed, data []any) error

func (*TestEventLog) DecodeParams added in v1.4.0

func (ev *TestEventLog) DecodeParams() (signature string, indexed []any, data []any, ret error)

type Version

type Version int
const (
	Version1 Version = iota
	Version2
	Version3
	ReservedVersion
	LastVersion = ReservedVersion - 1
)

Jump to

Keyboard shortcuts

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