diff --git a/include/evm.h b/include/evm.h index eb5864a..84fee65 100644 --- a/include/evm.h +++ b/include/evm.h @@ -107,9 +107,27 @@ struct evm_tx_context { struct evm_context; +/// Get transaction context callback function. +/// +/// This callback function is used by an EVM to retrieve the transaction and +/// block context. +/// +/// @param[out] result The returned transaction context. +/// @see ::evm_tx_context. +/// @param context The pointer to the Host execution context. +/// @see ::evm_context. typedef void (*evm_get_tx_context_fn)(struct evm_tx_context* result, struct evm_context* context); +/// Get block hash callback function.. +/// +/// This callback function is used by an EVM to query the block hash of +/// a given block. +/// +/// @param[out] result The returned block hash value. +/// @param context The pointer to the Host execution context. +/// @param number The block number. Must be a value between +// (and including) 0 and 255. typedef void (*evm_get_block_hash_fn)(struct evm_uint256be* result, struct evm_context* context, int64_t number);