Documentation ¶
Index ¶
- Constants
- Variables
- func Copy(from, to blockstore.Blockstore, root cid.Cid) error
- func DecodeParams(b []byte, out interface{}) error
- func DumpActorState(code cid.Cid, b []byte) (interface{}, error)
- func MiningReward(remainingReward types.BigInt) types.BigInt
- func NewBLSAccountActor(st *state.StateTree, addr address.Address) (*types.Actor, aerrors.ActorError)
- func NewInvoker() *invoker
- func NewSecp256k1AccountActor(st *state.StateTree, addr address.Address) (*types.Actor, aerrors.ActorError)
- func ResolveToKeyAddr(state types.StateTree, cst *hamt.CborIpldStore, addr address.Address) (address.Address, aerrors.ActorError)
- func Syscalls(verifier sectorbuilder.Verifier) *types.VMSyscalls
- func Transfer(from, to *types.Actor, amt types.BigInt) error
- func TryCreateAccountActor(st *state.StateTree, addr address.Address) (*types.Actor, aerrors.ActorError)
- type ApplyRet
- type Invokee
- type Rand
- type VM
- func (vm *VM) ActorBalance(addr address.Address) (types.BigInt, aerrors.ActorError)
- func (vm *VM) ApplyMessage(ctx context.Context, msg *types.Message) (*ApplyRet, error)
- func (vm *VM) Flush(ctx context.Context) (cid.Cid, error)
- func (vm *VM) Invoke(act *types.Actor, vmctx *VMContext, method uint64, params []byte) ([]byte, aerrors.ActorError)
- func (vm *VM) SetBlockHeight(h uint64)
- func (vm *VM) SetBlockMiner(m address.Address)
- func (vm *VM) SetInvoker(i *invoker)
- func (vm *VM) StateTree() types.StateTree
- type VMContext
- func (vmc *VMContext) BlockHeight() uint64
- func (vmc *VMContext) ChargeGas(amount uint64) aerrors.ActorError
- func (vmc *VMContext) Commit(oldh, newh cid.Cid) aerrors.ActorError
- func (vmctx *VMContext) Context() context.Context
- func (vmc *VMContext) GasUsed() types.BigInt
- func (vmc *VMContext) Get(c cid.Cid, out cbg.CBORUnmarshaler) aerrors.ActorError
- func (vmctx *VMContext) GetBalance(a address.Address) (types.BigInt, aerrors.ActorError)
- func (vmc *VMContext) GetHead() cid.Cid
- func (vmc *VMContext) GetRandomness(height uint64) ([]byte, aerrors.ActorError)
- func (vmc *VMContext) Ipld() *hamt.CborIpldStore
- func (vmc *VMContext) Message() *types.Message
- func (vmc *VMContext) Origin() address.Address
- func (vmc *VMContext) Put(i cbg.CBORMarshaler) (cid.Cid, aerrors.ActorError)
- func (vmc *VMContext) Send(to address.Address, method uint64, value types.BigInt, params []byte) ([]byte, aerrors.ActorError)
- func (vmc *VMContext) StateTree() (types.StateTree, aerrors.ActorError)
- func (vmc *VMContext) Storage() types.Storage
- func (vmc *VMContext) Sys() *types.VMSyscalls
- func (vmctx *VMContext) VerifySignature(sig *types.Signature, act address.Address, data []byte) aerrors.ActorError
Constants ¶
View Source
const GasVerifySignature = 50
Variables ¶
View Source
var EmptyObjectCid cid.Cid
Functions ¶
func Copy ¶
func Copy(from, to blockstore.Blockstore, root cid.Cid) error
func DecodeParams ¶
func DumpActorState ¶
func MiningReward ¶
MiningReward returns correct mining reward
coffer is amount of FIL in NetworkAddress
func NewBLSAccountActor ¶
func NewInvoker ¶ added in v0.2.8
func NewInvoker() *invoker
func ResolveToKeyAddr ¶
func ResolveToKeyAddr(state types.StateTree, cst *hamt.CborIpldStore, addr address.Address) (address.Address, aerrors.ActorError)
func Syscalls ¶ added in v0.2.1
func Syscalls(verifier sectorbuilder.Verifier) *types.VMSyscalls
func TryCreateAccountActor ¶
Types ¶
type ApplyRet ¶
type ApplyRet struct { types.MessageReceipt ActorErr aerrors.ActorError }
type VM ¶
type VM struct { Syscalls *types.VMSyscalls // contains filtered or unexported fields }
func NewVM ¶
func NewVM(base cid.Cid, height uint64, r Rand, maddr address.Address, cbs blockstore.Blockstore, syscalls *types.VMSyscalls) (*VM, error)
func (*VM) ActorBalance ¶
func (vm *VM) ActorBalance(addr address.Address) (types.BigInt, aerrors.ActorError)
func (*VM) ApplyMessage ¶
func (*VM) SetBlockHeight ¶
func (*VM) SetBlockMiner ¶
func (vm *VM) SetBlockMiner(m address.Address)
func (*VM) SetInvoker ¶ added in v0.2.8
func (vm *VM) SetInvoker(i *invoker)
type VMContext ¶
type VMContext struct {
// contains filtered or unexported fields
}
func (*VMContext) BlockHeight ¶
BlockHeight returns the height of the block this message was added to the chain in
func (*VMContext) Get ¶
func (vmc *VMContext) Get(c cid.Cid, out cbg.CBORUnmarshaler) aerrors.ActorError
func (*VMContext) GetBalance ¶
func (vmctx *VMContext) GetBalance(a address.Address) (types.BigInt, aerrors.ActorError)
func (*VMContext) GetRandomness ¶
func (vmc *VMContext) GetRandomness(height uint64) ([]byte, aerrors.ActorError)
func (*VMContext) Ipld ¶
func (vmc *VMContext) Ipld() *hamt.CborIpldStore
func (*VMContext) Put ¶
func (vmc *VMContext) Put(i cbg.CBORMarshaler) (cid.Cid, aerrors.ActorError)
func (*VMContext) Send ¶
func (vmc *VMContext) Send(to address.Address, method uint64, value types.BigInt, params []byte) ([]byte, aerrors.ActorError)
Send allows the current execution context to invoke methods on other actors in the system
func (*VMContext) StateTree ¶
func (vmc *VMContext) StateTree() (types.StateTree, aerrors.ActorError)
func (*VMContext) Sys ¶
func (vmc *VMContext) Sys() *types.VMSyscalls
func (*VMContext) VerifySignature ¶
Click to show internal directories.
Click to hide internal directories.