Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actor ¶
type Actor struct{}
The init actor uniquely has the power to create new actors. It maintains a table resolving pubkey and temporary actor addresses to the canonical ID-addresses.
func (Actor) Constructor ¶
func (a Actor) Constructor(rt runtime.Runtime, params *ConstructorParams) *abi.EmptyValue
func (Actor) Exec ¶
func (a Actor) Exec(rt runtime.Runtime, params *ExecParams) *ExecReturn
func (Actor) IsSingleton ¶
type ConstructorParams ¶
type ConstructorParams = init0.ConstructorParams
type ConstructorParams struct { NetworkName string }
type ExecParams ¶
type ExecParams = init0.ExecParams
type ExecParams struct { CodeCID cid.Cid `checked:"true"` // invalid CIDs won't get committed to the state tree ConstructorParams []byte }
type ExecReturn ¶
type ExecReturn = init0.ExecReturn
type ExecReturn struct { IDAddress addr.Address // The canonical ID-based address for the actor. RobustAddress addr.Address // A more expensive but re-org-safe address for the newly created actor. }
type State ¶
type State struct { AddressMap cid.Cid // HAMT[addr.Address]abi.ActorID NextID abi.ActorID NetworkName string }
func (*State) MapAddressToNewID ¶
Allocates a new ID address and stores a mapping of the argument address to it. Returns the newly-allocated address.
func (*State) ResolveAddress ¶
ResolveAddress resolves an address to an ID-address, if possible. If the provided address is an ID address, it is returned as-is. This means that mapped ID-addresses (which should only appear as values, not keys) and singleton actor addresses (which are not in the map) pass through unchanged.
Returns an ID-address and `true` if the address was already an ID-address or was resolved in the mapping. Returns an undefined address and `false` if the address was not an ID-address and not found in the mapping. Returns an error only if state was inconsistent.
type StateSummary ¶
func CheckStateInvariants ¶
func CheckStateInvariants(st *State, store adt.Store) (*StateSummary, *builtin.MessageAccumulator)
Checks internal invariants of init state.