testbinding

package
v0.0.0-...-3acd70f Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ArrayAdvanceID eggtypes.ID

4-byte function selector of ArrayAdvance

View Source
var BasicTypesAdvanceID eggtypes.ID

4-byte function selector of basicTypesAdvance

View Source
var EmptyAdvanceID eggtypes.ID

4-byte function selector of emptyAdvance

View Source
var InspectMessageID eggtypes.ID

4-byte function selector of inspectMessage

View Source
var MultiFieldAdvanceID eggtypes.ID

4-byte function selector of multiFieldAdvance

View Source
var ReportMessageID eggtypes.ID

4-byte function selector of reportMessage

View Source
var SimpleAdvanceID eggtypes.ID

4-byte function selector of simpleAdvance

View Source
var StructAdvanceID eggtypes.ID

4-byte function selector of structAdvance

Functions

func EncodeArrayAdvance

func EncodeArrayAdvance(
	Value []SimpleStruct,
) []byte

Encode ArrayAdvance into binary data.

func EncodeBasicTypesAdvance

func EncodeBasicTypesAdvance(
	Bool bool,
	Int *big.Int,
	Int8 int8,
	Int256 *big.Int,
	Uint *big.Int,
	Uint8 uint8,
	Uint256 *big.Int,
	Address common.Address,
	String string,
	Bytes []byte,
) []byte

Encode basicTypesAdvance into binary data.

func EncodeEmptyAdvance

func EncodeEmptyAdvance() []byte

Encode emptyAdvance into binary data.

func EncodeInspectMessage

func EncodeInspectMessage() []byte

Encode inspectMessage into binary data.

func EncodeMultiFieldAdvance

func EncodeMultiFieldAdvance(
	IntValue int64,
	BoolValue bool,
	StringValue string,
) []byte

Encode multiFieldAdvance into binary data.

func EncodeReportMessage

func EncodeReportMessage() []byte

Encode reportMessage into binary data.

func EncodeSimpleAdvance

func EncodeSimpleAdvance(
	Value int64,
) []byte

Encode simpleAdvance into binary data.

func EncodeStructAdvance

func EncodeStructAdvance(
	Value NestedStruct,
) []byte

Encode structAdvance into binary data.

func Roll

func Roll(contract iContract)

Types

type ArrayAdvance

type ArrayAdvance struct {
	Value []SimpleStruct
}

Advance with array value

func (ArrayAdvance) Encode

func (v ArrayAdvance) Encode() []byte

Encode ArrayAdvance into binary data.

type BasicTypesAdvance

type BasicTypesAdvance struct {
	Bool    bool
	Int     *big.Int
	Int8    int8
	Int256  *big.Int
	Uint    *big.Int
	Uint8   uint8
	Uint256 *big.Int
	Address common.Address
	String  string
	Bytes   []byte
}

Advance with basic types

func (BasicTypesAdvance) Encode

func (v BasicTypesAdvance) Encode() []byte

Encode basicTypesAdvance into binary data.

type EmptyAdvance

type EmptyAdvance struct {
}

Empty advance message With multi-line string documentation

func (EmptyAdvance) Encode

func (v EmptyAdvance) Encode() []byte

Encode emptyAdvance into binary data.

type InspectMessage

type InspectMessage struct {
}

Empty inspect message

func (InspectMessage) Encode

func (v InspectMessage) Encode() []byte

Encode inspectMessage into binary data.

type Middleware

type Middleware struct {
	// contains filtered or unexported fields
}

Middleware that implements the EggRoll Middleware interface. The middleware requires a high-level contract to work.

func (Middleware) Advance

func (m Middleware) Advance(env eggroll.Env, input []byte) error

func (Middleware) Inspect

func (m Middleware) Inspect(env eggroll.EnvReader, input []byte) error

type MultiFieldAdvance

type MultiFieldAdvance struct {
	IntValue    int64
	BoolValue   bool
	StringValue string
}

Advance with multiple fields

func (MultiFieldAdvance) Encode

func (v MultiFieldAdvance) Encode() []byte

Encode multiFieldAdvance into binary data.

type NestedStruct

type NestedStruct struct {
	Value SimpleStruct
}

Struct with another struct

type ReportMessage

type ReportMessage struct {
}

Empty report message

func (ReportMessage) Encode

func (v ReportMessage) Encode() []byte

Encode reportMessage into binary data.

type SimpleAdvance

type SimpleAdvance struct {
	// Integer value of 64 bits
	Value int64
}

Advance with a single field

func (SimpleAdvance) Encode

func (v SimpleAdvance) Encode() []byte

Encode simpleAdvance into binary data.

type SimpleStruct

type SimpleStruct struct {
	Value int64
}

Struct wit a single field

type StructAdvance

type StructAdvance struct {
	Value NestedStruct
}

Advance with struct value

func (StructAdvance) Encode

func (v StructAdvance) Encode() []byte

Encode structAdvance into binary data.

Jump to

Keyboard shortcuts

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