tuweni / org.apache.tuweni.evm / EthereumVirtualMachine / execute

execute

suspend fun execute(sender: Address, destination: Address, value: Bytes, code: Bytes, inputData: Bytes, gas: Gas, gasPrice: Wei, currentCoinbase: Address, currentNumber: Long, currentTimestamp: Long, currentGasLimit: Long, currentDifficulty: UInt256, callKind: CallKind = CallKind.CALL, revision: HardFork = latestHardFork, depth: Int = 0): EVMResult (source)

Execute an operation in the EVM.

Parameters

sender - the sender of the transaction

destination - the destination of the transaction

code - the code to execute

inputData - the execution input

gas - the gas available for the operation

gasPrice - current gas price

currentCoinbase - the coinbase address to reward

currentNumber - current block number

currentTimestamp - current block timestamp

currentGasLimit - current gas limit

currentDifficulty - block current total difficulty

callKind - the type of call

revision - the hard fork revision in which to execute

Return
the result of the execution