inbox

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 11 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufAndLengthToBytes added in v0.8.0

func BufAndLengthToBytes(sizeInt *big.Int, contents *value.Buffer) ([]byte, error)

func ByteArrayToBytes added in v0.8.0

func ByteArrayToBytes(val value.Value) ([]byte, error)

func BytesToByteStack

func BytesToByteStack(val []byte) *value.TupleValue

func ListToStackValue

func ListToStackValue(vals []value.Value) *value.TupleValue

func NewAddressFromInt

func NewAddressFromInt(val value.IntValue) common.Address

func NewIntFromAddress

func NewIntFromAddress(address common.Address) value.IntValue

func StackValueToList

func StackValueToList(val value.Value) ([]value.Value, error)

func TestVectorJSON

func TestVectorJSON(inbox []InboxMessage, logs []value.Value, sends [][]byte) ([]byte, error)

Types

type ChainTime

type ChainTime struct {
	BlockNum  *common.TimeBlocks
	Timestamp *big.Int
}

func NewRandomChainTime

func NewRandomChainTime() ChainTime

type InboxMessage

type InboxMessage struct {
	Kind        Type
	Sender      common.Address
	InboxSeqNum *big.Int
	GasPrice    *big.Int
	Data        []byte
	ChainTime   ChainTime
}

func LoadTestVector

func LoadTestVector(data []byte) ([]InboxMessage, []value.Value, [][]byte, error)

func NewInboxMessageFromData added in v0.8.0

func NewInboxMessageFromData(data []byte) (InboxMessage, error)

func NewInboxMessageFromValue

func NewInboxMessageFromValue(val value.Value) (InboxMessage, error)

func NewRandomInboxMessage

func NewRandomInboxMessage() InboxMessage

func (InboxMessage) AsValue

func (im InboxMessage) AsValue() value.Value

func (InboxMessage) CommitmentHash

func (im InboxMessage) CommitmentHash() common.Hash

func (InboxMessage) Equals

func (im InboxMessage) Equals(o InboxMessage) bool

func (InboxMessage) String

func (im InboxMessage) String() string

func (InboxMessage) ToBytes added in v0.8.0

func (im InboxMessage) ToBytes() []byte

type JSONValue

type JSONValue struct {
	Tuple  *[]JSONValue `json:"Tuple,omitempty"`
	Int    *string      `json:"Int,omitempty"`
	Buffer *string      `json:"Buffer,omitempty"`
}

type TestVector

type TestVector struct {
	Version int         `json:"format_version"`
	Inbox   []JSONValue `json:"inbox"`
	Logs    []JSONValue `json:"logs"`
	Sends   []string    `json:"sends"`
}

type Type

type Type uint8

Jump to

Keyboard shortcuts

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