EVM-C: document get_tx_context and get_block_has

This commit is contained in:
Alex Beregszaszi 2018-01-14 13:36:42 +00:00
parent 1b667d7b74
commit dd29128360
1 changed files with 18 additions and 0 deletions

View File

@ -107,9 +107,27 @@ struct evm_tx_context {
struct evm_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, typedef void (*evm_get_tx_context_fn)(struct evm_tx_context* result,
struct evm_context* context); 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, typedef void (*evm_get_block_hash_fn)(struct evm_uint256be* result,
struct evm_context* context, struct evm_context* context,
int64_t number); int64_t number);