Documentation
¶
Index ¶
- type VM
- func (vm *VM) DecodeModuleBytes(moduleBytes []byte) ([]byte, error)
- func (vm *VM) DecodeMoveResource(kvStore api.KVStore, structTag types.StructTag, resourceBytes []byte) ([]byte, error)
- func (vm *VM) DecodeScriptBytes(scriptBytes []byte) ([]byte, error)
- func (vm *VM) Destroy()
- func (vm *VM) ExecuteEntryFunction(kvStore api.KVStore, goApi api.GoAPI, gasLimit uint64, txHash []byte, ...) (uint64, []types.ContractEvent, []types.SizeDelta, []types.StakingDelta, error)
- func (vm *VM) ExecuteScript(kvStore api.KVStore, goApi api.GoAPI, gasLimit uint64, txHash []byte, ...) (uint64, []types.ContractEvent, []types.SizeDelta, []types.StakingDelta, error)
- func (vm *VM) Initialize(kvStore api.KVStore, goApi api.GoAPI, moduleBundle types.ModuleBundle) error
- func (vm *VM) PublishModuleBundle(kvStore api.KVStore, goApi api.GoAPI, gasLimit uint64, txHash []byte, ...) (uint64, []types.ContractEvent, []types.SizeDelta, []types.StakingDelta, error)
- func (vm *VM) QueryEntryFunction(kvStore api.KVStore, goApi api.GoAPI, gasLimit uint64, ...) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
VM struct is the core of initiavm.
func (*VM) DecodeModuleBytes ¶
DecodeModuleBytes decode module bytes to MoveModule instance and return as jSON string
func (*VM) DecodeMoveResource ¶
func (vm *VM) DecodeMoveResource( kvStore api.KVStore, structTag types.StructTag, resourceBytes []byte, ) ([]byte, error)
DecodeMoveResource decode resource bytes to move resource instance and return as jSON string
func (*VM) DecodeScriptBytes ¶
DecodeScriptBytes decode script bytes to MoveFunction instance and return as jSON string
func (*VM) ExecuteEntryFunction ¶
func (vm *VM) ExecuteEntryFunction( kvStore api.KVStore, goApi api.GoAPI, gasLimit uint64, txHash []byte, sender types.AccountAddress, payload types.EntryFunction, ) (uint64, []types.ContractEvent, []types.SizeDelta, []types.StakingDelta, error)
Execute calls a given contract. TODO: add params and returns
func (*VM) ExecuteScript ¶
func (vm *VM) ExecuteScript( kvStore api.KVStore, goApi api.GoAPI, gasLimit uint64, txHash []byte, sender types.AccountAddress, payload types.Script, ) (uint64, []types.ContractEvent, []types.SizeDelta, []types.StakingDelta, error)
Execute calls a given contract. TODO: add params and returns
func (*VM) Initialize ¶
func (vm *VM) Initialize( kvStore api.KVStore, goApi api.GoAPI, moduleBundle types.ModuleBundle, ) error
Initialize deploys std libs and move libs for bootstrapping genesis
func (*VM) PublishModuleBundle ¶
func (vm *VM) PublishModuleBundle( kvStore api.KVStore, goApi api.GoAPI, gasLimit uint64, txHash []byte, sender types.AccountAddress, moduleBundle types.ModuleBundle, ) (uint64, []types.ContractEvent, []types.SizeDelta, []types.StakingDelta, error)
PublishModuleBundle will publish a given module.
Click to show internal directories.
Click to hide internal directories.