Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CallerPattern ¶
type CallerPattern interface { // IsMatch returns "True" if the patterns matches IsMatch(ctx PatternContext) bool }
CallerPattern checks if the caller matches the pattern.
type ExecutionPanic ¶
type ExecutionPanic struct {
// contains filtered or unexported fields
}
ExecutionPanic is used to abort vm execution with an exit code.
func (ExecutionPanic) Code ¶
func (p ExecutionPanic) Code() exitcode.ExitCode
Code is the code used to abort the execution (see: `Abort()`).
func (ExecutionPanic) String ¶
func (p ExecutionPanic) String() string
type ExtendedInvocationContext ¶
type ExtendedInvocationContext interface { InvocationContext NewActorAddress() address.Address // Create an actor in the state tree. // // This will allocate an ID address for the actor and call its `Constructor()` method. // // WARNING: May only be called by InitActor. CreateActor(codeID cid.Cid, addr address.Address) DeleteActor(beneficiary address.Address) }
ExtendedInvocationContext is a set of convenience functions built on top external ABI calls.
Actor code should not be using this interface directly.
Note: This interface is intended to document the full set of available operations and ensure the context implementation exposes them.
type InvocationContext ¶
type InvocationContext interface { // Runtime exposes some methods on the runtime to the actor. Runtime() Runtime // Store is the raw store for IPLD objects. // // Note: this is required for custom data structures. Store() rt5.Store // Message contains information available to the actor about the executing message. Message() rt5.Message // ValidateCaller validates the caller against a patter. // // All actor methods MUST call this method before returning. ValidateCaller(CallerPattern) // StateHandle handles access to the actor state. State() rt5.StateHandle // Send allows actors to invoke methods on other actors Send(toAddr address.Address, methodNum abi.MethodNum, params cbor.Marshaler, value abi.TokenAmount, out cbor.Er) exitcode.ExitCode // Balance is the current balance on the current actors account. // // Note: the value received for this invocation is already reflected on the balance. Balance() abi.TokenAmount }
InvocationContext is passed to the actors on each method call.
type PatternContext ¶
type PatternContext interface { CallerCode() cid.Cid CallerAddr() address.Address }
PatternContext is the context a pattern gets access to in order to determine if the caller matches.
Click to show internal directories.
Click to hide internal directories.