Documentation ¶
Index ¶
- Variables
- func CanTransfer(db vm.VMState, addr crypto.CommonAddress, amount *big.Int) bool
- func GetHashFn(ref *types.BlockHeader, chain ChainContext) func(n uint64) crypto.Hash
- func NewEVMContext(msg *types.Transaction, header *types.BlockHeader, ...) vm.Context
- func Transfer(db vm.VMState, sender, to crypto.CommonAddress, amount *big.Int)
- type ChainContext
- type EvmService
- func (evmService *EvmService) Api() []app.API
- func (evmService *EvmService) Call(database store.StoreInterface, tx *types.Transaction, ...) (ret []byte, err error)
- func (evmService *EvmService) CommandFlags() ([]cli.Command, []cli.Flag)
- func (evmService *EvmService) DefaultConfig(netType params.NetType) *vm.VMConfig
- func (evmService *EvmService) Eval(state vm.VMState, tx *types.Transaction, header *types.BlockHeader, gas uint64, ...) (ret []byte, gasUsed uint64, contractAddr crypto.CommonAddress, failed bool, ...)
- func (evmService *EvmService) Init(executeContext *app.ExecuteContext) error
- func (evmService *EvmService) Name() string
- func (evmService *EvmService) P2pMessages() map[int]interface{}
- func (evmService *EvmService) Receive(context actor.Context)
- func (evmService *EvmService) Start(executeContext *app.ExecuteContext) error
- func (evmService *EvmService) Stop(executeContext *app.ExecuteContext) error
- type Vm
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CanTransfer ¶
CanTransfer checks whether there are enough funds in the address' account to make a transfer. This does not take the necessary gas in to account to make the transfer valid.
func GetHashFn ¶
func GetHashFn(ref *types.BlockHeader, chain ChainContext) func(n uint64) crypto.Hash
GetHashFn returns a GetHashFunc which retrieves header hashes by number
func NewEVMContext ¶
func NewEVMContext(msg *types.Transaction, header *types.BlockHeader, sender *crypto.CommonAddress) vm.Context
NewEVMContext creates a new context for use in the EVM.
Types ¶
type ChainContext ¶
type ChainContext interface { // GetHeader returns the hash corresponding to their hash. GetHeader(crypto.Hash, uint64) *types.BlockHeader }
ChainContext supports retrieving headers and consensus parameters from the current blockchain to be used during transaction processing.
type EvmService ¶
type EvmService struct { Config *vm.VMConfig //Chain chain.ChainServiceInterface `service:"chain"` DatabaseService *database.DatabaseService `service:"database"` }
func (*EvmService) Api ¶
func (evmService *EvmService) Api() []app.API
func (*EvmService) Call ¶
func (evmService *EvmService) Call(database store.StoreInterface, tx *types.Transaction, header *types.BlockHeader) (ret []byte, err error)
func (*EvmService) CommandFlags ¶
func (evmService *EvmService) CommandFlags() ([]cli.Command, []cli.Flag)
func (*EvmService) DefaultConfig ¶
func (evmService *EvmService) DefaultConfig(netType params.NetType) *vm.VMConfig
func (*EvmService) Eval ¶
func (evmService *EvmService) Eval(state vm.VMState, tx *types.Transaction, header *types.BlockHeader, gas uint64, value *big.Int) (ret []byte, gasUsed uint64, contractAddr crypto.CommonAddress, failed bool, err error)
func (*EvmService) Init ¶
func (evmService *EvmService) Init(executeContext *app.ExecuteContext) error
func (*EvmService) Name ¶
func (evmService *EvmService) Name() string
func (*EvmService) P2pMessages ¶
func (evmService *EvmService) P2pMessages() map[int]interface{}
func (*EvmService) Receive ¶
func (evmService *EvmService) Receive(context actor.Context)
func (*EvmService) Start ¶
func (evmService *EvmService) Start(executeContext *app.ExecuteContext) error
func (*EvmService) Stop ¶
func (evmService *EvmService) Stop(executeContext *app.ExecuteContext) error
Click to show internal directories.
Click to hide internal directories.