Documentation ¶
Index ¶
- Variables
- func CanTransfer(db vm.StateDB, addr common.Address, amount *big.Int) bool
- func GetHashFn(ref *types.Header, chain chainContext) func(uint64) common.Hash
- func GetRegisteredAddress(evm *vm.EVM, registryId common.Hash) (common.Address, error)
- func New(from common.Address, gasPrice *big.Int, header *types.Header, ...) vm.Context
- func NewEVMRunner(chain evmRunnerContext, header *types.Header, state vm.StateDB) vm.EVMRunner
- func TobinTransfer(evm *vm.EVM, sender, recipient common.Address, amount *big.Int)
- func Transfer(db vm.StateDB, sender, recipient common.Address, amount *big.Int)
- func VerifySealFn(ref *types.Header, chain chainContext) func(*types.Header) bool
- type SharedEVMRunner
- func (sev *SharedEVMRunner) Execute(recipient common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, err error)
- func (sev *SharedEVMRunner) ExecuteFrom(sender, recipient common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, err error)
- func (sev *SharedEVMRunner) Query(recipient common.Address, input []byte, gas uint64) (ret []byte, err error)
Constants ¶
This section is empty.
Variables ¶
var VMAddress = common.ZeroAddress
VMAddress is the address the VM uses to make internal calls to contracts
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 into account to make the transfer valid.
func GetRegisteredAddress ¶
func New ¶
func New(from common.Address, gasPrice *big.Int, header *types.Header, chain chainContext, txFeeRecipient *common.Address) vm.Context
New creates a new context for use in the EVM.
func NewEVMRunner ¶
func TobinTransfer ¶
TobinTransfer performs a transfer that may take a tax from the sent amount and give it to the reserve. If the calculation or transfer of the tax amount fails for any reason, the regular transfer goes ahead. NB: Gas is not charged or accounted for this calculation.
Types ¶
type SharedEVMRunner ¶
SharedEVMRunner is an evm runner that REUSES an evm This MUST NOT BE USED, but it's here for backward compatibility purposes