evmc/structevmc__result.html
Documentation Bot 9b3a656372 Update docs
2020-01-07 15:35:10 +00:00

261 lines
16 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EVMC: evmc_result Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">EVMC
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('structevmc__result.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structevmc__result-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">evmc_result Struct Reference<div class="ingroups"><a class="el" href="group__EVMC.html">EVMC</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>The EVM code execution result.
<a href="structevmc__result.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="evmc_8h_source.html">evmc.h</a>&gt;</code></p>
<p>Inherited by <a class="el" href="classevmc_1_1result.html">evmc::result</a><code> [private]</code>.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a759c4aaa4a1c002f5a8be09ccb0b6a1c"><td class="memItemLeft" align="right" valign="top">enum <a class="el" href="group__EVMC.html#ga4c0be97f333c050ff45321fcaa34d920">evmc_status_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structevmc__result.html#a759c4aaa4a1c002f5a8be09ccb0b6a1c">status_code</a></td></tr>
<tr class="memdesc:a759c4aaa4a1c002f5a8be09ccb0b6a1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The execution status code. <a href="#a759c4aaa4a1c002f5a8be09ccb0b6a1c">More...</a><br /></td></tr>
<tr class="separator:a759c4aaa4a1c002f5a8be09ccb0b6a1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8478c93dbcc3cb2876037c5a5afd4c0"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structevmc__result.html#af8478c93dbcc3cb2876037c5a5afd4c0">gas_left</a></td></tr>
<tr class="memdesc:af8478c93dbcc3cb2876037c5a5afd4c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">The amount of gas left after the execution. <a href="#af8478c93dbcc3cb2876037c5a5afd4c0">More...</a><br /></td></tr>
<tr class="separator:af8478c93dbcc3cb2876037c5a5afd4c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61978e85f9d795a7b9695b9cbf1748d6"><td class="memItemLeft" align="right" valign="top">const uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structevmc__result.html#a61978e85f9d795a7b9695b9cbf1748d6">output_data</a></td></tr>
<tr class="memdesc:a61978e85f9d795a7b9695b9cbf1748d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">The reference to output data. <a href="#a61978e85f9d795a7b9695b9cbf1748d6">More...</a><br /></td></tr>
<tr class="separator:a61978e85f9d795a7b9695b9cbf1748d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93bb7419aff492cdef754421c6d74e26"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structevmc__result.html#a93bb7419aff492cdef754421c6d74e26">output_size</a></td></tr>
<tr class="memdesc:a93bb7419aff492cdef754421c6d74e26"><td class="mdescLeft">&#160;</td><td class="mdescRight">The size of the output data. <a href="#a93bb7419aff492cdef754421c6d74e26">More...</a><br /></td></tr>
<tr class="separator:a93bb7419aff492cdef754421c6d74e26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8727ff83d372ab0067bcf6656d30b0ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__EVMC.html#ga297c7c7ca966c82296a54683143157b1">evmc_release_result_fn</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structevmc__result.html#a8727ff83d372ab0067bcf6656d30b0ed">release</a></td></tr>
<tr class="memdesc:a8727ff83d372ab0067bcf6656d30b0ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">The method releasing all resources associated with the result object. <a href="#a8727ff83d372ab0067bcf6656d30b0ed">More...</a><br /></td></tr>
<tr class="separator:a8727ff83d372ab0067bcf6656d30b0ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7f37ff7c9cfa3b58af2c89f4d610522"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structevmc__address.html">evmc_address</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structevmc__result.html#ae7f37ff7c9cfa3b58af2c89f4d610522">create_address</a></td></tr>
<tr class="memdesc:ae7f37ff7c9cfa3b58af2c89f4d610522"><td class="mdescLeft">&#160;</td><td class="mdescRight">The address of the contract created by create instructions. <a href="#ae7f37ff7c9cfa3b58af2c89f4d610522">More...</a><br /></td></tr>
<tr class="separator:ae7f37ff7c9cfa3b58af2c89f4d610522"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa321f15701e9df26a9f58d60dcbd0ef9"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structevmc__result.html#aa321f15701e9df26a9f58d60dcbd0ef9">padding</a> [4]</td></tr>
<tr class="memdesc:aa321f15701e9df26a9f58d60dcbd0ef9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reserved data that MAY be used by a <a class="el" href="structevmc__result.html" title="The EVM code execution result. ">evmc_result</a> object creator. <a href="#aa321f15701e9df26a9f58d60dcbd0ef9">More...</a><br /></td></tr>
<tr class="separator:aa321f15701e9df26a9f58d60dcbd0ef9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The EVM code execution result. </p>
<p class="definition">Definition at line <a class="el" href="evmc_8h_source.html#l00340">340</a> of file <a class="el" href="evmc_8h_source.html">evmc.h</a>.</p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="ae7f37ff7c9cfa3b58af2c89f4d610522"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7f37ff7c9cfa3b58af2c89f4d610522">&#9670;&nbsp;</a></span>create_address</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structevmc__address.html">evmc_address</a> evmc_result::create_address</td>
</tr>
</table>
</div><div class="memdoc">
<p>The address of the contract created by create instructions. </p>
<p>This field has valid value only if:</p><ul>
<li>it is a result of the Host method <a class="el" href="structevmc__host__interface.html#a0acd6def9c08159acccfba9f9cbf9ca9" title="Call callback function. ">evmc_host_interface::call</a></li>
<li>and the result describes successful contract creation (<a class="el" href="structevmc__result.html#a759c4aaa4a1c002f5a8be09ccb0b6a1c" title="The execution status code. ">evmc_result::status_code</a> is <a class="el" href="group__EVMC.html#gga4c0be97f333c050ff45321fcaa34d920a4bc3069fec2bab2a55355a72b7db68b7" title="Execution finished with success. ">EVMC_SUCCESS</a>). In all other cases the address MUST be null bytes. </li>
</ul>
<p class="definition">Definition at line <a class="el" href="evmc_8h_source.html#l00403">403</a> of file <a class="el" href="evmc_8h_source.html">evmc.h</a>.</p>
</div>
</div>
<a id="af8478c93dbcc3cb2876037c5a5afd4c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8478c93dbcc3cb2876037c5a5afd4c0">&#9670;&nbsp;</a></span>gas_left</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int64_t evmc_result::gas_left</td>
</tr>
</table>
</div><div class="memdoc">
<p>The amount of gas left after the execution. </p>
<p>If <a class="el" href="structevmc__result.html#a759c4aaa4a1c002f5a8be09ccb0b6a1c" title="The execution status code. ">evmc_result::status_code</a> is neither <a class="el" href="group__EVMC.html#gga4c0be97f333c050ff45321fcaa34d920a4bc3069fec2bab2a55355a72b7db68b7" title="Execution finished with success. ">EVMC_SUCCESS</a> nor <a class="el" href="group__EVMC.html#gga4c0be97f333c050ff45321fcaa34d920aed708e84d49cc1270e54ec20b0ca0a05" title="Execution terminated with REVERT opcode. ">EVMC_REVERT</a> the value MUST be 0. </p>
<p class="definition">Definition at line <a class="el" href="evmc_8h_source.html#l00351">351</a> of file <a class="el" href="evmc_8h_source.html">evmc.h</a>.</p>
</div>
</div>
<a id="a61978e85f9d795a7b9695b9cbf1748d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a61978e85f9d795a7b9695b9cbf1748d6">&#9670;&nbsp;</a></span>output_data</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const uint8_t* evmc_result::output_data</td>
</tr>
</table>
</div><div class="memdoc">
<p>The reference to output data. </p>
<p>The output contains data coming from RETURN opcode (iff evmc_result::code field is <a class="el" href="group__EVMC.html#gga4c0be97f333c050ff45321fcaa34d920a4bc3069fec2bab2a55355a72b7db68b7" title="Execution finished with success. ">EVMC_SUCCESS</a>) or from REVERT opcode.</p>
<p>The memory containing the output data is owned by EVM and has to be freed with <a class="el" href="structevmc__result.html#a8727ff83d372ab0067bcf6656d30b0ed" title="The method releasing all resources associated with the result object. ">evmc_result::release()</a>.</p>
<p>This MAY be NULL. </p>
<p class="definition">Definition at line <a class="el" href="evmc_8h_source.html#l00364">364</a> of file <a class="el" href="evmc_8h_source.html">evmc.h</a>.</p>
</div>
</div>
<a id="a93bb7419aff492cdef754421c6d74e26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93bb7419aff492cdef754421c6d74e26">&#9670;&nbsp;</a></span>output_size</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t evmc_result::output_size</td>
</tr>
</table>
</div><div class="memdoc">
<p>The size of the output data. </p>
<p>If output_data is NULL this MUST be 0. </p>
<p class="definition">Definition at line <a class="el" href="evmc_8h_source.html#l00371">371</a> of file <a class="el" href="evmc_8h_source.html">evmc.h</a>.</p>
</div>
</div>
<a id="aa321f15701e9df26a9f58d60dcbd0ef9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa321f15701e9df26a9f58d60dcbd0ef9">&#9670;&nbsp;</a></span>padding</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t evmc_result::padding[4]</td>
</tr>
</table>
</div><div class="memdoc">
<p>Reserved data that MAY be used by a <a class="el" href="structevmc__result.html" title="The EVM code execution result. ">evmc_result</a> object creator. </p>
<p>This reserved 4 bytes together with 20 bytes from create_address form 24 bytes of memory called "optional data" within <a class="el" href="structevmc__result.html" title="The EVM code execution result. ">evmc_result</a> struct to be optionally used by the <a class="el" href="structevmc__result.html" title="The EVM code execution result. ">evmc_result</a> object creator.</p>
<dl class="section see"><dt>See also</dt><dd>evmc_result_optional_data, evmc_get_optional_data().</dd></dl>
<p>Also extends the size of the <a class="el" href="structevmc__result.html" title="The EVM code execution result. ">evmc_result</a> to 64 bytes (full cache line). </p>
<p class="definition">Definition at line <a class="el" href="evmc_8h_source.html#l00416">416</a> of file <a class="el" href="evmc_8h_source.html">evmc.h</a>.</p>
</div>
</div>
<a id="a8727ff83d372ab0067bcf6656d30b0ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8727ff83d372ab0067bcf6656d30b0ed">&#9670;&nbsp;</a></span>release</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__EVMC.html#ga297c7c7ca966c82296a54683143157b1">evmc_release_result_fn</a> evmc_result::release</td>
</tr>
</table>
</div><div class="memdoc">
<p>The method releasing all resources associated with the result object. </p>
<p>This method (function pointer) is optional (MAY be NULL) and MAY be set by the VM implementation. If set it MUST be called by the user once to release memory and other resources associated with the result object. Once the resources are released the result object MUST NOT be used again.</p>
<p>The suggested code pattern for releasing execution results: </p><div class="fragment"><div class="line"><span class="keyword">struct </span><a class="code" href="structevmc__result.html">evmc_result</a> result = ...;</div><div class="line"><span class="keywordflow">if</span> (result.<a class="code" href="structevmc__result.html#a8727ff83d372ab0067bcf6656d30b0ed">release</a>)</div><div class="line"> result.<a class="code" href="structevmc__result.html#a8727ff83d372ab0067bcf6656d30b0ed">release</a>(&amp;result);</div></div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>It works similarly to C++ virtual destructor. Attaching the release function to the result itself allows VM composition. </dd></dl>
<p class="definition">Definition at line <a class="el" href="evmc_8h_source.html#l00392">392</a> of file <a class="el" href="evmc_8h_source.html">evmc.h</a>.</p>
</div>
</div>
<a id="a759c4aaa4a1c002f5a8be09ccb0b6a1c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a759c4aaa4a1c002f5a8be09ccb0b6a1c">&#9670;&nbsp;</a></span>status_code</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group__EVMC.html#ga4c0be97f333c050ff45321fcaa34d920">evmc_status_code</a> evmc_result::status_code</td>
</tr>
</table>
</div><div class="memdoc">
<p>The execution status code. </p>
<p class="definition">Definition at line <a class="el" href="evmc_8h_source.html#l00343">343</a> of file <a class="el" href="evmc_8h_source.html">evmc.h</a>.</p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/evmc/<a class="el" href="evmc_8h_source.html">evmc.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="structevmc__result.html">evmc_result</a></li>
<li class="footer">Generated on Tue Jan 7 2020 15:35:10 for EVMC by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
</ul>
</div>
</body>
</html>