puppet

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MethodsPuppet = struct {
	Constructor                          abi.MethodNum
	Send                                 abi.MethodNum
	SendMarshalCBORFailure               abi.MethodNum
	ReturnMarshalCBORFailure             abi.MethodNum
	RuntimeTransactionMarshalCBORFailure abi.MethodNum
}{builtin.MethodConstructor, 2, 3, 4, 5}
View Source
var PuppetActorCodeID cid.Cid

The actor code ID & Methods

Functions

This section is empty.

Types

type Actor

type Actor struct{}

The Puppet Actor exists to aid testing the runtime and environment in which it's embedded. It provides direct access to the runtime methods, including sending arbitrary messages to other actors, without any preconditions or invariants to get in the way.

func (Actor) Constructor

func (a Actor) Constructor(rt runtime.Runtime, _ *adt.EmptyValue) *adt.EmptyValue

func (Actor) Exports

func (a Actor) Exports() []interface{}

func (Actor) ReturnMarshalCBORFailure added in v0.5.4

func (a Actor) ReturnMarshalCBORFailure(rt runtime.Runtime, _ *adt.EmptyValue) *FailToMarshalCBOR

func (Actor) RuntimeTransactionMarshalCBORFailure added in v0.5.5

func (a Actor) RuntimeTransactionMarshalCBORFailure(rt runtime.Runtime, _ *adt.EmptyValue) *adt.EmptyValue

func (Actor) Send

func (a Actor) Send(rt runtime.Runtime, params *SendParams) *SendReturn

func (Actor) SendMarshalCBORFailure

func (a Actor) SendMarshalCBORFailure(rt runtime.Runtime, params *SendParams) *SendReturn

type FailToMarshalCBOR

type FailToMarshalCBOR struct{}

func (*FailToMarshalCBOR) MarshalCBOR

func (t *FailToMarshalCBOR) MarshalCBOR(w io.Writer) error

func (*FailToMarshalCBOR) UnmarshalCBOR added in v0.5.5

func (t *FailToMarshalCBOR) UnmarshalCBOR(io.Reader) error

type SendParams

type SendParams struct {
	To     addr.Address
	Value  abi.TokenAmount
	Method abi.MethodNum
	Params []byte
}

func (*SendParams) MarshalCBOR

func (t *SendParams) MarshalCBOR(w io.Writer) error

func (*SendParams) UnmarshalCBOR

func (t *SendParams) UnmarshalCBOR(r io.Reader) error

type SendReturn

type SendReturn struct {
	Return runtime.CBORBytes
	Code   exitcode.ExitCode
}

func (*SendReturn) MarshalCBOR

func (t *SendReturn) MarshalCBOR(w io.Writer) error

func (*SendReturn) UnmarshalCBOR

func (t *SendReturn) UnmarshalCBOR(r io.Reader) error

type State

type State struct {
	// OptFailToMarshalCBOR is to be used as an Option<T> or Maybe<T>, with T
	// specialized to *FailToMarshalCBOR. If the slice contains no values, the
	// State struct will encode as CBOR without issue. If the slice contains
	// more than zero values, the CBOR encoding will fail.
	OptFailToMarshalCBOR []*FailToMarshalCBOR
}

func (*State) MarshalCBOR

func (t *State) MarshalCBOR(w io.Writer) error

func (*State) UnmarshalCBOR

func (t *State) UnmarshalCBOR(r io.Reader) error

Jump to

Keyboard shortcuts

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