Documentation ¶
Index ¶
- Variables
- type ActorCodeLoader
- type ActorMethodSignature
- type BlockMessagesInfo
- type FakeSyscalls
- type Interpreter
- type MessageMaker
- func (mm *MessageMaker) Addresses() []address.Address
- func (mm *MessageMaker) NewSignedMessage(from address.Address, nonce uint64) *types.SignedMessage
- func (mm *MessageMaker) NewUnsignedMessage(from address.Address, nonce uint64) *types.UnsignedMessage
- func (mm *MessageMaker) Signer() *types.MockSigner
- type MessageReceipt
- type ReceiptMaker
- type Storage
- type SyscallsImpl
- type SyscallsStateView
- type TestStorage
Constants ¶
This section is empty.
Variables ¶
var DefaultActors = builtin.DefaultActors
DefaultActors is a code loader with the built-in actors that come with the system.
Functions ¶
This section is empty.
Types ¶
type ActorCodeLoader ¶
type ActorCodeLoader = dispatch.CodeLoader
ActorCodeLoader allows yo to load an actor's code based on its id an epoch.
type ActorMethodSignature ¶
type ActorMethodSignature = dispatch.MethodSignature
ActorMethodSignature wraps a specific method and allows you to encode/decodes input/output bytes into concrete types.
type BlockMessagesInfo ¶
type BlockMessagesInfo = interpreter.BlockMessagesInfo
BlockMessagesInfo contains messages for one block in a tipset.
type FakeSyscalls ¶
type FakeSyscalls = vmcontext.FakeSyscalls
type Interpreter ¶
type Interpreter = interpreter.VMInterpreter
Interpreter is the VM.
func NewVM ¶
func NewVM(st state.Tree, store *storage.VMStorage, syscalls SyscallsImpl) Interpreter
NewVM creates a new VM interpreter.
type MessageMaker ¶
type MessageMaker struct { DefaultGasPrice types.AttoFIL DefaultGasUnits gas.Unit // contains filtered or unexported fields }
MessageMaker creates unique, signed messages for use in tests.
func NewMessageMaker ¶
func NewMessageMaker(t *testing.T, keys []crypto.KeyInfo) *MessageMaker
NewMessageMaker creates a new message maker with a set of signing keys.
func (*MessageMaker) Addresses ¶
func (mm *MessageMaker) Addresses() []address.Address
Addresses returns the addresses for which this maker can sign messages.
func (*MessageMaker) NewSignedMessage ¶
func (mm *MessageMaker) NewSignedMessage(from address.Address, nonce uint64) *types.SignedMessage
NewSignedMessage creates a new signed message.
func (*MessageMaker) NewUnsignedMessage ¶
func (mm *MessageMaker) NewUnsignedMessage(from address.Address, nonce uint64) *types.UnsignedMessage
NewUnsignedMessage creates a new message.
func (*MessageMaker) Signer ¶
func (mm *MessageMaker) Signer() *types.MockSigner
Signer returns the signer with which this maker signs messages.
type MessageReceipt ¶
MessageReceipt is what is returned by executing a message on the vm.
func EmptyReceipts ¶
func EmptyReceipts(n int) []*MessageReceipt
EmptyReceipts returns a slice of n empty receipts.
type ReceiptMaker ¶
type ReceiptMaker struct {
// contains filtered or unexported fields
}
ReceiptMaker generates unique receipts
func NewReceiptMaker ¶
func NewReceiptMaker() *ReceiptMaker
NewReceiptMaker creates a new receipt maker
func (*ReceiptMaker) NewReceipt ¶
func (rm *ReceiptMaker) NewReceipt() MessageReceipt
NewReceipt creates a new distinct receipt.
type Storage ¶
Storage is the raw storage for the VM.
func NewStorage ¶
func NewStorage(bs blockstore.Blockstore) Storage
NewStorage creates a new Storage for the VM.
type SyscallsImpl ¶
type SyscallsImpl = vmcontext.SyscallsImpl
type SyscallsStateView ¶
type SyscallsStateView = vmcontext.SyscallsStateView
type TestStorage ¶
type TestStorage struct {
// contains filtered or unexported fields
}
TestStorage is a fake storage used for testing.
func NewTestStorage ¶
func NewTestStorage(state interface{}) *TestStorage
NewTestStorage returns a new "TestStorage"
func (*TestStorage) CidOf ¶
func (ts *TestStorage) CidOf(obj interface{}) cid.Cid
CidOf returns the cid of the object.
func (*TestStorage) Get ¶
func (ts *TestStorage) Get(cid cid.Cid, obj specsruntime.CBORUnmarshaler) bool
Get implements runtime.Store.
func (*TestStorage) Put ¶
func (ts *TestStorage) Put(v specsruntime.CBORMarshaler) cid.Cid
Put implements runtime.Store.