Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VmFactory ¶
type VmFactory struct {
// contains filtered or unexported fields
}
func NewVMwithInstance ¶ added in v0.1.2
func NewVMwithInstance(vm VmInterface) *VmFactory
func (*VmFactory) GetEvm ¶
func (v *VmFactory) GetEvm() VmInterface
func (*VmFactory) GetRealVm ¶
func (v *VmFactory) GetRealVm(code []byte, toPtr *common.Address) VmInterface
func (*VmFactory) GetWasm ¶
func (v *VmFactory) GetWasm() VmInterface
type VmInterface ¶
type VmInterface interface {
Reset(types.Message)
Cancel()
UTXOCall(caller types.ContractRef, addr, token common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, byteCodeGas uint64, err error)
Call(caller types.ContractRef, addr, token common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, byteCodeGas uint64, err error)
CallCode(caller types.ContractRef, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, byteCodeGas uint64, err error)
DelegateCall(caller types.ContractRef, addr common.Address, input []byte, gas uint64) (ret []byte, leftOverGas uint64, byteCodeGas uint64, err error)
StaticCall(caller types.ContractRef, addr common.Address, input []byte, gas uint64) (ret []byte, leftOverGas uint64, byteCodeGas uint64, err error)
Create(caller types.ContractRef, code []byte, gas uint64, value *big.Int) (ret []byte, contractAddr common.Address, leftOverGas uint64, err error)
Upgrade(caller types.ContractRef, addr common.Address, code []byte) error
// Interpreter() types.Interpreter
SetToken(addr common.Address)
GetCoinbase() common.Address
GetBlockNumber() *big.Int
GetTime() *big.Int
GasRate() uint64
GetStateDB() types.StateDB
GetOTxs() []types.BalanceRecord
AddOtx(br types.BalanceRecord)
RefundFee() uint64
RefundAllFee() uint64
}
Click to show internal directories.
Click to hide internal directories.