<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Ethereum Improvement Proposals - Withdrawn</title>
    <subtitle>Ethereum Improvement Proposals (EIPs &amp; ERCs) describe standards for the Ethereum platform, such as core protocol changes and application-level standards.</subtitle>
    <link href="https://wg-eips.ritovision.com/status/withdrawn/atom.xml" rel="self" type="application/atom+xml"/>
    <link rel="alternate" type="text/html" href="https://wg-eips.ritovision.com/status/withdrawn/"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-02-11T14:49:28+00:00</updated>
    <id>https://wg-eips.ritovision.com/status/withdrawn/atom.xml</id>
    <entry xml:lang="en">
        <title>Ed25519 transaction support</title>
        <published>2025-06-25T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>James Kempton</name><uri>https://github.com/SirSpudlington</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/7980/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-7980-adding-ed25519-as-a-signature-scheme-to-test-eip-7932/24663" />
        

        <id>https://wg-eips.ritovision.com/7980/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        

        
        <category
            term="tag:eip:7980"
            label="EIP-7980" />
        

        
        

        
        <summary type="html">Adds an EIP-7932 algorithm type for Ed25519 support of type `0x0`</summary>
        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/7980/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP adds a new &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;7932&#x2F;&quot;&gt;EIP-7932&lt;&#x2F;a&gt; algorithm of type &lt;code&gt;0x0&lt;&#x2F;code&gt; for supporting Ed25519 signatures.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;Ed25519 is one of the most widely used forms of Elliptic Curve Cryptography and is one of the defaults for SSH keys,
this makes it a good contender to be able to sign transactions with. It also provides an algorithm to write test
cases against during the implementation phase of &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;7932&#x2F;&quot;&gt;EIP-7932&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP defines a new &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;7932&#x2F;&quot;&gt;EIP-7932&lt;&#x2F;a&gt; algorithmic type with the following parameters:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Constant&lt;&#x2F;th&gt;&lt;th&gt;Value&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ALG_TYPE&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;Bytes1(0x0)&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;GAS_PENALTY&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;1000&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;MAX_SIZE&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;96&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;def&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; verify&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt;signature_info&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; bytes&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; payload_hash&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt; Hash32&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; ExecutionAddress&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  assert&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;len&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;signature_info&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 96&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  signature&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; signature_info&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;64&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  public_key&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; signature_info&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;64&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; This is the `Verify` function described in [RFC 8032 Section 5.1.7](https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;html&#x2F;rfc8032#section-5.1.7),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; This MUST be processed as raw `Ed25519` and not `Ed25519ctx` or `Ed25519ph`&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  assert&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;ed25519_verify&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;signature&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; public_key&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; payload_hash&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  return&lt;&#x2F;span&gt;&lt;span&gt; keccak256&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;public_key&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;20&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;additional-1000-gas-penalty&quot;&gt;Additional 1000 gas penalty&lt;&#x2F;h3&gt;
&lt;p&gt;The gas penalty discourages people from attempting to migrate off current secp256k1 accounts, and also covers the additional overhead (in regards to hashing) that the ed25519 curve applies.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;why-ed25519&quot;&gt;Why Ed25519?&lt;&#x2F;h3&gt;
&lt;p&gt;Ed25519 has significant tooling backing it, this makes it a good candidate for using as a &quot;dummy&quot; algorithm.
This allows it to be an algorithm for client teams to easily test &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;7932&#x2F;&quot;&gt;EIP-7932&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;It may also be useful for signing in Hardware security modules in server environments designed for serving
as &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4337&#x2F;&quot;&gt;ERC-4337&lt;&#x2F;a&gt; bundlers. It may also improve interoperability with other components such as TPM chips.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;appending-the-public-key-to-the-signature&quot;&gt;Appending the public key to the signature&lt;&#x2F;h3&gt;
&lt;p&gt;Currently, without changing the algorithm itself, it is impossible to efficiently recover the public key
from a signature and message.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;No backward compatibility issues found.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;Needs discussion.&lt;&#x2F;p&gt;
&lt;!-- TODO --&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Dynamic target blob count</title>
        <published>2024-10-15T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:28+00:00</updated>
	
	
	<author>
		<name>Marc Harvey-Hill</name><uri>https://github.com/Marchhill</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/7788/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-7788-dynamic-target-blob-count/21399" />
        

        <id>https://wg-eips.ritovision.com/7788/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        

        
        <category
            term="tag:eip:7788"
            label="EIP-7788" />
        

        
        

        
        <summary type="html">Target blob count changes dynamically to aim for constant blob costs</summary>
        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/7788/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP proposes to make the target blob count adjust dynamically up to a safe maximum target. This adjustment will target a constant price in ETH for blobs, aiming for consistent costs of L2 transactions.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;Ethereum currently uses a target of 50% capacity for blob count, with &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1559&#x2F;&quot;&gt;EIP-1559&lt;&#x2F;a&gt; smoothing out short-term spikes and pushing average throughput towards the target. A dynamic target is orthogonal to EIP-1559, tweaking the target itself over a longer timescale to aim for some desired blob cost.&lt;&#x2F;p&gt;
&lt;p&gt;With static targeting the target may be higher than the actual demand, causing the protocol to undercharge for blobspace. This decreases the amount of fees burned, negatively affecting the price of ETH and total network security.&lt;&#x2F;p&gt;
&lt;p&gt;As an example, consider what would happen if there was a large increase in max blob count due to DAS implementation but the target remained at 50%. It is unlikely that demand would immediately jump to anywhere near the target, and so for months or years the protocol would effectively charge nothing for L2 transactions. With a dynamic target, the target blob count would drop until the cost of blobspace for an L2 transaction approximated some affordable constant value. In this way, some fees are still burned by the protocol, but new L2s are not discouraged from using Ethereum blobspace, knowing that the target will increase in response to an increase in demand and blob fees will remain reasonably consistent.&lt;&#x2F;p&gt;
&lt;p&gt;While the max blob count and max target are hard constraints based on resource utilisation limits, setting the target itself is far more subjective. A dynamic target can optimise for constant and affordable L2 transaction costs without requiring regular intervention by core developers to make tweaks based on changes in demand.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;parameters&quot;&gt;Parameters&lt;&#x2F;h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Parameter&lt;&#x2F;th&gt;&lt;th&gt;Value&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;FORK_TIMESTAMP&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;TBD&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;TARGET_BLOB_COUNT_CHANGE_RATE&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;1&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;MIN_TARGET_BLOB_COUNT&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;1&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;MAX_TARGET_BLOB_COUNT&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;3&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;BLOB_COST_CHANGE_MARGIN&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;2^48&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;TARGET_BLOB_COST&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;2^49&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h3 id=&quot;dynamic-targeting&quot;&gt;Dynamic targeting&lt;&#x2F;h3&gt;
&lt;p&gt;The target blob count changes each epoch based on the mean blob cost over the previous epoch. If the average cost exceeds the desired amount beyond some margin then the target is increased; likewise if it is below the desired amount by some margin the target will decrease. The target can increase up to &lt;code&gt;MAX_TARGET_BLOB_COUNT&lt;&#x2F;code&gt;, which is deemed to be a safe average throughput for the network, and down to a minimum of &lt;code&gt;MIN_TARGET_BLOB_COUNT&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Calculating targets:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;blob_cost_diff&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; mean_blob_cost&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; TARGET_BLOB_COST&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;target_change_direction&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;1&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; if&lt;&#x2F;span&gt;&lt;span&gt; blob_cost_diff&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;BLOB_COST_CHANGE_MARGIN&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; else&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;1&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; if&lt;&#x2F;span&gt;&lt;span&gt; blob_cost_diff&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; BLOB_COST_CHANGE_MARGIN&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; else&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;next_epoch_blob_count&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; max&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;min&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;MAX_TARGET_BLOB_COUNT&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; previous_epoch_blob_count&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span&gt;target_change_direction&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; *&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; TARGET_BLOB_COUNT_CHANGE_RATE&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; MIN_TARGET_BLOB_COUNT&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;engine-api-change&quot;&gt;Engine API change&lt;&#x2F;h3&gt;
&lt;p&gt;The Engine API is extended to provide the &lt;code&gt;mean_blob_cost&lt;&#x2F;code&gt; for the current epoch when the CL requests it from the EL. The CL requests this at the end of an epoch to set the target for the next epoch (depends on &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;7742&#x2F;&quot;&gt;EIP-7742&lt;&#x2F;a&gt;).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;constant-blob-cost-target&quot;&gt;Constant blob cost target&lt;&#x2F;h3&gt;
&lt;p&gt;A constant blob cost target can keep L2 transaction costs affordable for end users. Volatility in the price of ETH would affect affordability, but is unlikely to be significant compared to normal fluctuations in blob gas costs due to spikes in activity. In future the costs could be adjusted in the case of changes in the order of magnitude of ETH price.&lt;&#x2F;p&gt;
&lt;p&gt;An alternative approach would be to track a target blob cost in fiat. However, choosing a specific fiat currency is not credibly neutral, and introducing exchange rate oracles into the protocol could be an attack vector.&lt;&#x2F;p&gt;
&lt;p&gt;Yet another alternative is to have validators vote on the target blob cost, but they may have conflicts of interest (for example if they operate a rollup) so again this is not credibly neutral.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;target-block-gas&quot;&gt;Target block gas&lt;&#x2F;h3&gt;
&lt;p&gt;The same logic could be applied to the target block gas, but generally blockspace is in high demand so arguably gas costs are never too low. The target should be set to the maximum average throughput that the network can safely handle, a dynamic target is not necessary.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;parameter-choices&quot;&gt;Parameter choices&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;code&gt;TARGET_BLOB_COST&lt;&#x2F;code&gt; is chosen so that the system targets affordable L2 transactions. Assuming that the theoretical compressed size of a simple transfer is 23 bytes, this gives a blobspace cost for L2 transactions of:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;(23 &#x2F; 125000) * TARGET_BLOB_COST ≈ 104 gWei&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;At today’s prices, $1 would cover blobspace for around 3700 simple transfers on L2. The blob cost target should be chosen with extensive community involvement. Note that this is the cost of blobspace for an L2 transaction; the total cost will be more due to rollup execution costs.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;TARGET_BLOB_COUNT_CHANGE_RATE&lt;&#x2F;code&gt; is chosen as a compromise between the system being reactive to changes in demand, and not having large jumps in average throughput. &lt;code&gt;BLOB_COST_CHANGE_MARGIN&lt;&#x2F;code&gt; is set such that target blob count will stay static when blob costs are within a range ±50% of &lt;code&gt;TARGET_BLOB_COST&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;MAX_TARGET_BLOB_COUNT&lt;&#x2F;code&gt; is set to &lt;code&gt;3&lt;&#x2F;code&gt; to match the current static target. This value should be increased in future when it is deemed to be safe to increase average blob throughput.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;N&#x2F;A&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;p&gt;N&#x2F;A&lt;&#x2F;p&gt;
&lt;h2 id=&quot;reference-implementation&quot;&gt;Reference Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;N&#x2F;A&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;!-- TODO --&gt;
&lt;p&gt;Needs discussion.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Wallet-Linked Services for Smart Accounts</title>
        <published>2024-04-15T00:00:00+00:00</published>
        <updated>2026-02-11T14:48:25+00:00</updated>
	
	
	<author>
		<name>Francesco Sullo</name><uri>https://github.com/sullof</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/7897/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/generalized-wallet-linked-services-for-erc-4337-wallets/23028" />
        

        <id>https://wg-eips.ritovision.com/7897/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="erc"
                label="ERC" />
            
        

        
        <category
            term="tag:eip:7897"
            label="ERC-7897" />
        

        
        

        
        <summary type="html">Define a registry for modular services linked to ERC-4337 wallets.</summary>
        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/7897/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;This proposal defines a registry for generic services linked to smart accounts, with a special focus on &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4337&#x2F;&quot;&gt;ERC-4337&lt;&#x2F;a&gt; wallets, where services are  contracts extending a wallet&#x27;s functionality, owned by the wallet itself. It leverages &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1167&#x2F;&quot;&gt;ERC-1167&lt;&#x2F;a&gt; minimal proxies and deterministic addressing to enable permissionless innovation while maintaining backward compatibility with existing &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4337&#x2F;&quot;&gt;ERC-4337&lt;&#x2F;a&gt; wallets. To reach its goal, it takes the concept introduced with &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;6551&#x2F;&quot;&gt;ERC-6551&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;7656&#x2F;&quot;&gt;ERC-7656&lt;&#x2F;a&gt; standards that work for NFTs, and applies it to wallets.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Note: This proposal is not needed anymore since the same functionality can be achieved using &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;7656&#x2F;&quot;&gt;ERC-7656&lt;&#x2F;a&gt; standard.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4337&#x2F;&quot;&gt;ERC-4337&lt;&#x2F;a&gt; (Account Abstraction) introduces programmable smart accounts. Existing proposals to extend wallet functionalities (e.g., &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;6900&#x2F;&quot;&gt;ERC-6900&lt;&#x2F;a&gt;) focus on internal modules. This proposal generalizes the concept of service binding, allowing any &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4337&#x2F;&quot;&gt;ERC-4337&lt;&#x2F;a&gt; wallet to attach external services (e.g., recovery, automation, compliance) without requiring changes to the wallet&#x27;s core logic.&lt;&#x2F;p&gt;
&lt;p&gt;By enabling modular, non-invasive extensions, this standard fosters an open ecosystem of wallet-linked services while ensuring backward compatibility with existing &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4337&#x2F;&quot;&gt;ERC-4337&lt;&#x2F;a&gt; wallets.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;NOT RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be interpreted as described in RFC 2119 and RFC 8174.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;registry-interface&quot;&gt;Registry Interface&lt;&#x2F;h3&gt;
&lt;p&gt;The interface &lt;code&gt;IERC7897Registry&lt;&#x2F;code&gt; is defined as follows:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;solidity&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;interface&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; IERC7897Registry&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;    &#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;     * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Emitted when a wallet-linked service is successfully deployed.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; deployedService&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The address of the deployed contract&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; serviceImplementation&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The address of the implementation contract&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; salt&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The salt used for the CREATE2 operation&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; chainId&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The chain ID where the contract is deployed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; wallet&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The address of the ERC-4337 wallet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    event&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; ServiceDeployed&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; deployedService&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        address&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; serviceImplementation&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; salt&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; chainId&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        address&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; wallet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    )&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;    &#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;     * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Thrown when the CREATE2 operation fails to deploy the contract.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    error&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; DeployFailed&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;    &#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;     * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Deploys a wallet-linked service for an ERC-4337 wallet.  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * If the service already exists, returns its address without calling CREATE2.  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; serviceImplementation&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The address of the implementation contract  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; salt&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The salt used for the CREATE2 operation  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; wallet&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The address of the ERC-4337 wallet  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * Emits a {ServiceDeployed} event.  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@return&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; service&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The address of the wallet-linked service  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; deployService&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; serviceImplementation&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; salt&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; wallet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    )&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; service&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;    &#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;     * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Computes the expected wallet-linked service address for an ERC-4337 wallet  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * without deploying it.  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; serviceImplementation&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The address of the implementation contract  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; salt&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The salt used for the CREATE2 operation  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; chainId&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The chain ID where the service would be deployed  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; wallet&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The address of the ERC-4337 wallet  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@return&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; service&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The computed address of the wallet-linked service  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;       *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; serviceAddress&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; serviceImplementation&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; salt&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; chainId&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; wallet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    )&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; view&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; service&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;deployment-requirements&quot;&gt;Deployment Requirements&lt;&#x2F;h3&gt;
&lt;p&gt;The registry MUST deploy each wallet-linked service as an &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1167&#x2F;&quot;&gt;ERC-1167&lt;&#x2F;a&gt; minimal proxy with immutable constant data appended to the bytecode.&lt;&#x2F;p&gt;
&lt;p&gt;The deployed bytecode of each wallet-linked service MUST have the following structure:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ERC-1167 Header                      (10 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;serviceImplementation (address)&amp;gt;    (20 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ERC-1167 Footer                      (15 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;salt (bytes32)&amp;gt;                     (32 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;chainId (uint256)&amp;gt;                  (32 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;wallet (address)&amp;gt;                   (20 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;recommended-service-interface&quot;&gt;Recommended Service Interface&lt;&#x2F;h3&gt;
&lt;p&gt;Any contract created using an &lt;code&gt;ERC7897Registry&lt;&#x2F;code&gt; SHOULD implement the &lt;code&gt;IERC7897Service&lt;&#x2F;code&gt; interface:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;solidity&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;interface&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; IERC7897Service&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Returns the wallet linked to the contract&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@return&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; chainId&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The chainId of the wallet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  * &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;@return&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; wallet&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The address of the [ERC-4337](.&#x2F;04337.md) wallet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; wallet&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; view&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; chainId&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; wallet&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;access-control&quot;&gt;Access Control&lt;&#x2F;h3&gt;
&lt;p&gt;Services SHOULD implement access control to restrict critical operations to the wallet owner. For example:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;solidity&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; owner&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; public&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; view&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; address&lt;&#x2F;span&gt;&lt;span&gt; wallet&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; IERC7897Service&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-language&quot;&gt;this&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;wallet&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  return&lt;&#x2F;span&gt;&lt;span&gt; wallet&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;modifier&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; onlyOwner&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-language&quot;&gt;msg.sender&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; owner&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &amp;quot;Unauthorized&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-constant&quot;&gt;  _&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;The technical foundation of &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;7897&#x2F;&quot;&gt;ERC-7897&lt;&#x2F;a&gt; centers on the extension and generalization of contract types that can be associated with &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4337&#x2F;&quot;&gt;ERC-4337&lt;&#x2F;a&gt; wallets. Key decisions include:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Flexibility: Enables any &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4337&#x2F;&quot;&gt;ERC-4337&lt;&#x2F;a&gt; wallet to attach external services without modifying its core logic.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Permissionless Innovation: Developers can deploy services for any wallet, fostering an open ecosystem.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Backward Compatibility: Works with existing &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4337&#x2F;&quot;&gt;ERC-4337&lt;&#x2F;a&gt; wallets, including Safe, Argent, and Biconomy.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Deterministic Addressing: Uses CREATE2 + salt&#x2F;chainId&#x2F;wallet for predictable service deployments.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;reference-implementation&quot;&gt;Reference Implementation&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;&#x2F; This implementation is a variation of the ERC6551Registry contract written by Jayden Windle @jaydenwindle and Vectorized @vectorized&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;contract ERC7897Registry is IERC7897Registry {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  function deployService(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    address serviceImplementation,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    bytes32 salt,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    address wallet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ) external override returns (address) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; solhint-disable-next-line no-inline-assembly&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    assembly {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; Memory Layout:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; ----&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; 0x00   0xff                           (1 byte)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; 0x01   registry (address)             (20 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; 0x15   salt (bytes32)                 (32 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; 0x35   Bytecode Hash (bytes32)        (32 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; ----&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; 0x55   ERC-1167 Constructor + Header  (20 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; 0x69   implementation (address)       (20 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; 0x5D   ERC-1167 Footer                (15 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; 0x8C   salt (uint256)                 (32 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; 0xAC   chainId (uint256)              (32 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; 0xCC   wallet (address)               (20 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; Copy bytecode + constant data to memory&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x8c, salt) &#x2F;&#x2F; salt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0xac, chainid()) &#x2F;&#x2F; chainId&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0xcc, wallet) &#x2F;&#x2F; wallet address (20 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x6c, 0x5af43d82803e903d91602b57fd5bf3) &#x2F;&#x2F; ERC-1167 footer&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x5d, serviceImplementation) &#x2F;&#x2F; implementation&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x49, 0x3d60ad80600a3d3981f3363d3d373d3d3d363d73) &#x2F;&#x2F; ERC-1167 constructor + header&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; Copy create2 computation data to memory&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore8(0x00, 0xff) &#x2F;&#x2F; 0xFF&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x35, keccak256(0x55, 0x8b)) &#x2F;&#x2F; keccak256(bytecode) - 0x8b = 139 bytes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x01, shl(96, address())) &#x2F;&#x2F; registry address&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x15, salt) &#x2F;&#x2F; salt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; Compute service address&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      let computed := keccak256(0x00, 0x55)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; If the service has not yet been deployed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      if iszero(extcodesize(computed)) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F; Deploy service contract&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        let deployed := create2(0, 0x55, 0x8b, salt) &#x2F;&#x2F; 0x8b = 139 bytes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F; Revert if the deployment fails&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        if iszero(deployed) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          mstore(0x00, 0xd786d393) &#x2F;&#x2F; `DeployFailed()`&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          revert(0x1c, 0x04)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F; Emit the ServiceDeployed event&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        mstore(0x00, deployed) &#x2F;&#x2F; deployedService&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        mstore(0x20, serviceImplementation) &#x2F;&#x2F; serviceImplementation&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        mstore(0x40, salt) &#x2F;&#x2F; salt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        mstore(0x60, chainid()) &#x2F;&#x2F; chainId&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        mstore(0x80, wallet) &#x2F;&#x2F; wallet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        log4(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          0x00, &#x2F;&#x2F; Start of data&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          0xa0, &#x2F;&#x2F; Data length (160 bytes: deployed + implementation + salt + chainId + wallet)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          0x2f82bd0c129ea2d065cf394fb7760031982c6278372c89e1a059f2478ddf4763, &#x2F;&#x2F; Event signature hash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          deployed, &#x2F;&#x2F; indexed deployedService&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          serviceImplementation, &#x2F;&#x2F; indexed serviceImplementation&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          salt, &#x2F;&#x2F; salt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          chainid(), &#x2F;&#x2F; chainId&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          wallet &#x2F;&#x2F; indexed wallet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F; Return the service address&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        return(0x00, 0x20)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; Otherwise, return the computed service address&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x00, computed)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      return(0x00, 0x20)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  function serviceAddress(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    address serviceImplementation,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    bytes32 salt,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    uint256 chainId,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    address wallet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ) external view override returns (address) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; solhint-disable-next-line no-inline-assembly&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    assembly {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; Copy bytecode + constant data to memory&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x8c, salt) &#x2F;&#x2F; salt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0xac, chainId) &#x2F;&#x2F; chainId&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0xcc, wallet) &#x2F;&#x2F; wallet address (20 bytes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x6c, 0x5af43d82803e903d91602b57fd5bf3) &#x2F;&#x2F; ERC-1167 footer&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x5d, serviceImplementation) &#x2F;&#x2F; implementation&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x49, 0x3d60ad80600a3d3981f3363d3d373d3d3d363d73) &#x2F;&#x2F; ERC-1167 constructor + header&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; Copy create2 computation data to memory&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore8(0x00, 0xff) &#x2F;&#x2F; 0xFF&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x35, keccak256(0x55, 0x8b)) &#x2F;&#x2F; keccak256(bytecode) - 0x8b = 139 bytes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x01, shl(96, address())) &#x2F;&#x2F; registry address&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x15, salt) &#x2F;&#x2F; salt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; Compute and return the service address&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      mstore(0x00, keccak256(0x00, 0x55))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      return(0x00, 0x20)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;ownership-and-control&quot;&gt;Ownership and Control&lt;&#x2F;h3&gt;
&lt;p&gt;Wallet-linked services MUST be controlled by the &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4337&#x2F;&quot;&gt;ERC-4337&lt;&#x2F;a&gt; wallet owner to prevent unauthorized access. Implementers SHOULD include safeguards against malicious or unverified implementations.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;upgradeability-risks&quot;&gt;Upgradeability Risks&lt;&#x2F;h3&gt;
&lt;p&gt;If a service is upgradable, ensure secure upgrade mechanisms to prevent unauthorized changes. For example:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The owner of the service SHOULD be the wallet itself.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Only the wallet SHOULD be able to upgrade the implementation of the service.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Implement versioning to ensure backward compatibility between upgrades.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Use a timelock or multisig for critical upgrades to reduce the risk of malicious changes.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;reentrancy-and-cross-contract-interactions&quot;&gt;Reentrancy and Cross-Contract Interactions&lt;&#x2F;h3&gt;
&lt;p&gt;Services interacting with external protocols SHOULD follow best practices to prevent reentrancy attacks.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;user-education&quot;&gt;User Education&lt;&#x2F;h3&gt;
&lt;p&gt;Clear user interfaces and warnings SHOULD be provided to reduce phishing and social engineering risks.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;testing&quot;&gt;Testing&lt;&#x2F;h3&gt;
&lt;p&gt;Implementers SHOULD thoroughly test the registry and services on testnets to ensure correctness and security before deploying to mainnet.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Retroactively Included EIPs</title>
        <published>2024-04-04T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Tim Beiko</name><uri>https://github.com/timbeiko</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/7675/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-7675-retroactively-included-eips/19541" />
        

        <id>https://wg-eips.ritovision.com/7675/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="meta"
                label="Meta" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        

        
        <category
            term="tag:eip:7675"
            label="EIP-7675" />
        

        
        

        
        <summary type="html">Core EIPs activated independently of an Ethereum hard fork.</summary>
        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/7675/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;This Meta EIP lists Core EIPs introducing changes to Ethereum&#x27;s consensus which were activated independently of an Ethereum hard fork due to their backward compatible nature. These EIPs generally introduce constraints to underspecified protocol rules  or clarify how certain edge cases should be handled.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;To maintain consensus across all nodes, backward incompatible changes to Ethereum must be activated synchronously. Given the coordination required for this, changes are usually bundled together in network upgrades. A Meta EIP is typically used to list the changes included in a network upgrade, as well as its activation time.&lt;&#x2F;p&gt;
&lt;p&gt;However, backward compatible consensus changes do not require a network upgrade to be activated. For example, if a consensus rule is underspecified, an EIP can propose a constraint to bound it. If the constraint was never broken in Ethereum&#x27;s history and is unlikely to be broken in the future, the EIP can be considered backward compatible. It could then be &quot;retroactively activated&quot;, as both nodes which support the change and those which do not would agree on the current network state and history.&lt;&#x2F;p&gt;
&lt;p&gt;This Meta EIP lists all such EIPs which core developers have retroactively included as part of the Ethereum protocol specification.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;retroactively-activated-eips&quot;&gt;Retroactively Activated EIPs&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2681&#x2F;&quot;&gt;EIP-2681&lt;&#x2F;a&gt;: Limit account nonce to 2^64-1&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;3607&#x2F;&quot;&gt;EIP-3607&lt;&#x2F;a&gt;: Reject transactions from senders with deployed code&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4803&#x2F;&quot;&gt;EIP-4803&lt;&#x2F;a&gt;: Limit transaction gas to a maximum of 2^63-1&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;7523&#x2F;&quot;&gt;EIP-7523&lt;&#x2F;a&gt;: Empty accounts deprecation&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;7610&#x2F;&quot;&gt;EIP-7610&lt;&#x2F;a&gt;: Revert creation in case of non-empty storage&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;activation&quot;&gt;Activation&lt;&#x2F;h3&gt;
&lt;p&gt;All EIPs listed above are considered activated as of Ethereum&#x27;s genesis block. Note that EIP-7523 distinguishes pre- and post-merge behavior on the Ethereum mainnet.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;This Meta EIP provides a global view of all changes included in the Ethereum protocol without an explicit network upgrade, as well as links to full specification.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;No backward compatibility issues found.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;None.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Access-Key opcode</title>
        <published>2024-03-27T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Diederik Loerakker</name><uri>https://github.com/protolambda</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/7664/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/access-key-opcode/19395" />
        

        <id>https://wg-eips.ritovision.com/7664/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        

        
        <category
            term="tag:eip:7664"
            label="EIP-7664" />
        

        
        

        
        <summary type="html">The access-key opcode enables contracts to read inputs that are statically declared in access-lists.</summary>
        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/7664/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP introduces a new opcode to inspect the access-list keys of the executing address.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP serves as a substitute of top-level-call detection to enable a smart-contract to
enforce static declaration of attributes.&lt;&#x2F;p&gt;
&lt;p&gt;Previously, application-layer contracts, against common advice from account-abstraction proponents, used to rely
on the &lt;code&gt;tx.origin&lt;&#x2F;code&gt; to enforce a top-level call, such that the contract inputs are encoded as transaction input.&lt;&#x2F;p&gt;
&lt;p&gt;While the access-list of transactions directly affects the execution, it only affects the gas-costs.
This EIP enhances the access-list feature to provide the property of statically-defined contract-inputs,
without relying on top-level calls, the &lt;code&gt;tx.origin&lt;&#x2F;code&gt; behavior, or gas introspection.&lt;&#x2F;p&gt;
&lt;p&gt;This enables smart contracts to reliably enforce static declaration of inputs.&lt;&#x2F;p&gt;
&lt;p&gt;This is a step towards fulfilling the purposes as described in the Motivation of &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2930&#x2F;&quot;&gt;EIP-2930&lt;&#x2F;a&gt;:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Introduces the access list format and the logic for handling the format.
This logic can later be repurposed for many other purposes, including block-wide witnesses,
use in ReGenesis, moving toward static state access over time, and more.&quot;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;parameters&quot;&gt;Parameters&lt;&#x2F;h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Constant&lt;&#x2F;th&gt;&lt;th&gt;Value&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ACCESS_KEY_OPCODE_GAS&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;3&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ACCESS_KEY_OPCODE_BYTE&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;0x4B&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h3 id=&quot;opcode&quot;&gt;Opcode&lt;&#x2F;h3&gt;
&lt;p&gt;We add an instruction &lt;code&gt;ACCESS_KEY&lt;&#x2F;code&gt; (with opcode &lt;code&gt;ACCESS_KEY_OPCODE_BYTE&lt;&#x2F;code&gt;) which pops &lt;code&gt;index&lt;&#x2F;code&gt; from the top
of the stack as big-endian &lt;code&gt;uint256&lt;&#x2F;code&gt;, and pushes &lt;code&gt;tx.access_list[address][index]&lt;&#x2F;code&gt; back on the stack,
if &lt;code&gt;address&lt;&#x2F;code&gt; is present in the &lt;code&gt;tx.access_list&lt;&#x2F;code&gt; and &lt;code&gt;index &amp;lt; len(tx.access_list[address])&lt;&#x2F;code&gt;,
and otherwise pushes a zeroed &lt;code&gt;bytes32&lt;&#x2F;code&gt; value.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;gas-costs&quot;&gt;Gas costs&lt;&#x2F;h3&gt;
&lt;p&gt;The opcode has a fixed gas cost of &lt;code&gt;ACCESS_KEY_OPCODE_GAS&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The intrinsic gas costs of the access-list contents of the transaction itself do not change.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;static-analysis-of-transactions&quot;&gt;Static analysis of transactions&lt;&#x2F;h3&gt;
&lt;p&gt;Static declaration of contract-inputs enables advanced layer-two constructions and block-building techniques:
data is available without EVM introspection, and contracts can reliably tell if the executing transaction
declared critical properties to the block builder and verifying nodes.&lt;&#x2F;p&gt;
&lt;p&gt;Static-declaration of contract inputs is now independent of account-abstraction related changes,
such as transaction bundlers, as well as in-protocol with 3074.&lt;&#x2F;p&gt;
&lt;!-- EIP link&#x2F;requires omitted due to Walidator EIP status bug --&gt;
&lt;h3 id=&quot;global-read-only-values&quot;&gt;Global read-only values&lt;&#x2F;h3&gt;
&lt;p&gt;Akin to &lt;code&gt;TLOAD&lt;&#x2F;code&gt;, as described in &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1153&#x2F;&quot;&gt;EIP-1153&lt;&#x2F;a&gt;,
the &lt;code&gt;ACCESS_KEY&lt;&#x2F;code&gt; opcode provides contracts with a view that is global
to the message-execution of the transaction in the EVM.&lt;&#x2F;p&gt;
&lt;p&gt;However, with &lt;code&gt;ACCESS_KEY&lt;&#x2F;code&gt; it is guaranteed to be read-only, and cannot change during the execution of a transaction.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;access-list-utility&quot;&gt;Access-list utility&lt;&#x2F;h3&gt;
&lt;p&gt;Access-lists are under-utilized today:
very few users utilize this to warm-up storage interactions for reduced gas costs.
Generally the gas cost savings achieved with EIP-2930 are not applicable in as many use-cases.&lt;&#x2F;p&gt;
&lt;p&gt;With this EIP, the utility of the access-list functionality increases,
without requiring additional resources from the EVM.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;witness-data&quot;&gt;Witness data&lt;&#x2F;h3&gt;
&lt;p&gt;This EIP supports the transformation of applications to reduce statefulness,
by supporting read-only application state to be provided to contracts without
requiring the contract caller to support forwarding of data.&lt;&#x2F;p&gt;
&lt;p&gt;The access-list contents may contain witness-data, which the contract can verify and utilize statelessness.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;gas-costs-1&quot;&gt;Gas costs&lt;&#x2F;h3&gt;
&lt;p&gt;The gas cost of &lt;code&gt;ACCESS_KEY_OPCODE_GAS&lt;&#x2F;code&gt; gas matches that of similar operations,
specifically the &lt;code&gt;BLOBHASH&lt;&#x2F;code&gt; opcode of &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4844&#x2F;&quot;&gt;EIP-4844&lt;&#x2F;a&gt;:
this opcode also pop an index-like EVM word from the stack,
and pushes a full 32 byte EVM word back on the stack, based on a list of hashes embedded in the transaction.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;code&gt;BLOBHASH&lt;&#x2F;code&gt; functionality of &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4844&#x2F;&quot;&gt;EIP-4844&lt;&#x2F;a&gt; is not re-usable for the purposes of this EIP however,
as the intention is to have access to just the statically declared hash, and not the cost of a blob.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;naming-of-access-key&quot;&gt;Naming of &lt;code&gt;ACCESS_KEY&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Access-lists currently only support a list of access-keys.
The list is not enforced to be sorted, and thus supports indexed lookups.&lt;&#x2F;p&gt;
&lt;p&gt;This is not a &lt;code&gt;LOAD&lt;&#x2F;code&gt; opcode, as &lt;code&gt;SLOAD&lt;&#x2F;code&gt; or &lt;code&gt;TLOAD&lt;&#x2F;code&gt; are, since the opcode returns a key.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;no-transaction-type-changes&quot;&gt;No transaction-type changes&lt;&#x2F;h3&gt;
&lt;p&gt;This enhancement of access-lists utility does not affect the access-list encoding,
or the existing transaction types that support access-lists.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;minimal-impact-on-evm-transaction-context&quot;&gt;Minimal impact on EVM transaction-context&lt;&#x2F;h3&gt;
&lt;p&gt;With EIP-2930, the access-list contents are already readily available in the transaction-context during EVM execution,
and the RPC methods that trigger said execution.&lt;&#x2F;p&gt;
&lt;p&gt;This EIP thus does not require significant changes to the construction of the EVM context,
nor any changes to RPC methods.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;p&gt;The block fee-recipient, and any other warmed-up attributes not declared statically in the transaction access-list,
must not be considered to be part of the access-list.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;The access-list attributes are already gas-metered in EIP-2930,
and readily accessible in the EVM to determine storage gas-costs. In terms of denial-of-service risks,
this EIP introduces no new significant data or data-processing costs.&lt;&#x2F;p&gt;
&lt;p&gt;The access-list is read-only, and thus forms a minimal risk to application-developers.&lt;&#x2F;p&gt;
&lt;p&gt;The access is scoped strictly to the contract that would otherwise perform a warm &lt;code&gt;SLOAD&lt;&#x2F;code&gt;,
and thus storage-layout abstractions do not leak between different smart contract applications.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Extension of EIP-778 for &quot;client&quot; ENR Entry</title>
        <published>2024-02-25T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>James Kempton</name><uri>https://github.com/SirSpudlington</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/7636/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip7636-extension-of-eip-778-for-client-enr-entry/18935" />
        

        <id>https://wg-eips.ritovision.com/7636/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="networking"
                label="Networking" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        

        
        <category
            term="tag:eip:7636"
            label="EIP-7636" />
        

        
        

        
        <summary type="html">Add additional ENR entry to specify client information such as name and version number.</summary>
        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/7636/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;The Ethereum network consists of nodes running various client implementations. Each client has its own set of features, optimizations, and unique behaviors. Introducing a standardized way to identify client software and its version in the ENR allows for more effective network analysis, compatibility checks, and troubleshooting. This EIP proposes the addition of a &quot;client&quot; field to the ENR.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;Understanding the landscape of client software in the Ethereum network is crucial for developers, nodes, and network health assessment. Currently, there is no standardized method for nodes to announce their software identity and version, which can lead to compatibility issues or difficulty in diagnosing network-wide problems. Adding this to the ENR allows clients to audit network health only using discv5, and additionally track discv5 adoption across different services.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;NOT RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be interpreted as described in RFC 2119 and RFC 8174.&lt;&#x2F;p&gt;
&lt;p&gt;The &quot;client&quot; entry is proposed to be added to the ENR following the specifications in &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;778&#x2F;&quot;&gt;EIP-778&lt;&#x2F;a&gt;. This entry is OPTIONAL and can be omitted by clients that choose not to disclose such information. The key for this entry is &lt;code&gt;&quot;client&quot;&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;All elements MUST be encoded as a string using the ASCII standard as described in &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.rfc-editor.org&#x2F;rfc&#x2F;rfc20&quot;&gt;RFC 20&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The value for this entry MUST be an RLP list:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[ClientName, Version, (BuildVersion)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ClientName&lt;&#x2F;code&gt;: A string identifier for the client software. It SHOULD be concise, free of spaces, and representative of the client application.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;Version&lt;&#x2F;code&gt;: A string representing the version of the client software in a human-readable format. It is RECOMMENDED to follow semantic versioning.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;BuildVersion&lt;&#x2F;code&gt;: An OPTIONAL string representing the build or commit version of the client software. This can be used to identify specific builds or development versions.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;One key was chosen over using many keys to make efficient use of space. The use of one string, however, does not align with other EIPs of similar purpose and as such the RLP list was decided as the best encoding.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP is fully backwards compatible as it extends the ENR specification by adding an optional entry. Existing implementations that do not recognize the &quot;client&quot; entry will ignore it without any adverse effects on ENR processing or network behavior.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;p&gt;A node running Geth version 1.10.0 on the mainnet might have an ENR &lt;code&gt;client&lt;&#x2F;code&gt; entry like:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&amp;quot;Geth&amp;quot;, &amp;quot;1.10.0&amp;quot;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;A node running an experimental build of Nethermind might include:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&amp;quot;Nethermind&amp;quot;, &amp;quot;1.9.53&amp;quot;, &amp;quot;7fcb567&amp;quot;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;and an ENR of&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;enr:-MO4QBn4OF-y-dqULg4WOIlc8gQAt-arldNFe0_YQ4HNX28jDtg41xjDyKfCXGfZaPN97I-MCfogeK91TyqmWTpb0_AChmNsaWVudNqKTmV0aGVybWluZIYxLjkuNTOHN2ZjYjU2N4JpZIJ2NIJpcIR_AAABg2lwNpAAAAAAAAAAAAAAAAAAAAABiXNlY3AyNTZrMaECn-TTdCwfZP4XgJyq8Lxoj-SgEoIFgDLVBEUqQk4HnAqDdWRwgiMshHVkcDaCIyw&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;which can be decoded to yield normal data such as &lt;code&gt;seq&lt;&#x2F;code&gt;, &lt;code&gt;signature&lt;&#x2F;code&gt;, &lt;code&gt;id&lt;&#x2F;code&gt; and &lt;code&gt;secp256k1&lt;&#x2F;code&gt;. Additionally, it would yield the client value of &lt;code&gt;[&quot;0x4e65746865726d696e64&quot;,&quot;0x312e392e3533&quot;,&quot;0x37666362353637&quot;]&lt;&#x2F;code&gt; or &lt;code&gt;[&quot;Nethermind&quot;, &quot;1.9.53&quot;, &quot;7fcb567&quot;]&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;Introducing identifiable client information could potentially be used for targeted attacks against specific versions or builds known to have vulnerabilities. It is crucial for clients implementing this EIP to consider the implications of disclosing their identity and version. Users or operators should have the ability to opt-out or anonymize this information if desired.&lt;&#x2F;p&gt;
&lt;p&gt;Additionally, as this information is self proclaimed, this data &lt;em&gt;&lt;strong&gt;MUST NOT&lt;&#x2F;strong&gt;&lt;&#x2F;em&gt; be used for anything that requires it to be reliable.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>eth&#x2F;70 - available-blocks-extended protocol</title>
        <published>2023-10-21T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Ahmad Bitar</name><uri>https://github.com/smartprogrammer93</uri><email>smartprogrammer@windowslive.com</email>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/7542/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-eth-70-available-blocks-extended-protocol-handshake/16188" />
        

        <id>https://wg-eips.ritovision.com/7542/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="networking"
                label="Networking" />
            
        

        
        <category
            term="tag:eip:7542"
            label="EIP-7542" />
        

        
        

        
        <summary type="html">Adds more info in the handshake about available block range and adds message types to request block ranges and the send them</summary>
        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/7542/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;The purpose of this EIP is to introduce a method that allows an Ethereum node to communicate the range of blocks it has available. By knowing the block range a node can serve, peers can make more informed decisions when choosing whom to request blocks from or whom to connect to, especially when looking for specific block ranges. This can lead to more efficient network behavior.&lt;&#x2F;p&gt;
&lt;p&gt;This EIP proposes extending the Ethereum wire protocol (&lt;code&gt;eth&lt;&#x2F;code&gt;) handshake, introducing a new version, &lt;code&gt;eth&#x2F;70&lt;&#x2F;code&gt;, which will contain information regarding the block range a node can serve. Furthermore, it extends the protocol with two new message types to share the updated block ranges when requested.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;In a first stage of &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4444&#x2F;&quot;&gt;EIP-4444&lt;&#x2F;a&gt;, some nodes will still need to serve the historical data of the chain and others might be interested in starting to prune it. Currently, nodes need to connect to peers and request specific blocks to determine if a peer has the requested data. This can be inefficient, leading to unnecessary data requests and wasting both bandwidth and time. Consequently, this change empowers nodes that still want to retrieve historical data from the network to do so efficiently.&lt;&#x2F;p&gt;
&lt;p&gt;As a bonus, This change enhances the efficiency of synchronization by allowing a node to determine if a peer, potentially still in the process of syncing, has the necessary blocks available, thereby avoiding unnecessary block requests and potential empty responses.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Advertise a new &lt;code&gt;eth&lt;&#x2F;code&gt; protocol capability (version) at &lt;code&gt;eth&#x2F;70&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;The old &lt;code&gt;eth&#x2F;69&lt;&#x2F;code&gt; protocol should still be kept alive side-by-side, until &lt;code&gt;eth&#x2F;70&lt;&#x2F;code&gt; is sufficiently adopted by implementors.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Modify the &lt;code&gt;Status (0x00)&lt;&#x2F;code&gt; message for &lt;code&gt;eth&#x2F;70&lt;&#x2F;code&gt; to add an additional &lt;code&gt;blockRange&lt;&#x2F;code&gt; field right after the &lt;code&gt;forkid&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Current packet for &lt;code&gt;eth&#x2F;69&lt;&#x2F;code&gt;: &lt;code&gt;[version: P, networkid: P, blockhash: B_32, genesis: B_32, forkid]&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;New packet for &lt;code&gt;eth&#x2F;70&lt;&#x2F;code&gt;: &lt;code&gt;[version: P, networkid: P, blockhash: B_32, genesis: B_32, forkid blockRange]&lt;&#x2F;code&gt;,
where &lt;code&gt;blockRange&lt;&#x2F;code&gt; is &lt;code&gt;[startBlock: uint64, endBlock: uint64]&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Introduce two new message types:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;RequestBlockRange (0x0b)&lt;&#x2F;code&gt; - A message from a node to request the current block range of a peer.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;SendBlockRange (0x0c): [startBlock: uint64, endBlock: uint64]&lt;&#x2F;code&gt; - The response to &lt;code&gt;RequestBlockRange&lt;&#x2F;code&gt;, informing the requesting node of the current available block range of the peer.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Upon connecting using &lt;code&gt;eth&#x2F;70&lt;&#x2F;code&gt;, nodes should exchange the &lt;code&gt;Status&lt;&#x2F;code&gt; message. Afterwards, they can use the &lt;code&gt;RequestBlockRange&lt;&#x2F;code&gt; and &lt;code&gt;SendBlockRange&lt;&#x2F;code&gt; messages to keep informed about peer block range changes.&lt;&#x2F;p&gt;
&lt;p&gt;Nodes must retain connections regardless of a peer&#x27;s available block range, with an exception, if a node&#x27;s peer slots are full and it lacks connections to peers with the necessary block range, it may disconnect to seek such peers.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;Including the available block range in the &lt;code&gt;eth&lt;&#x2F;code&gt; handshake allows for immediate understanding of peer capabilities. This can lead to more efficient networking as nodes can prioritize connections based on the data they need.
The new message types are introduced to allow nodes to request updated available block range from other nodes since the range can change by the node syncing or pruning blocks.
Maintaining connections with peers that don&#x27;t have the desired range ensures network resilience, while the exception facilitates efficient block sync under full peer capacity.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP extends the &lt;code&gt;eth&lt;&#x2F;code&gt; protocol handshake in a backwards incompatible manner and proposes the introduction of a new version, &lt;code&gt;eth&#x2F;70&lt;&#x2F;code&gt;. However, &lt;code&gt;devp2p&lt;&#x2F;code&gt; allows for multiple versions of the same wire protocol to run concurrently. Hence, nodes that have not been updated can continue using older versions like &lt;code&gt;eth&#x2F;69&lt;&#x2F;code&gt;, &lt;code&gt;eth&#x2F;68&lt;&#x2F;code&gt; or &lt;code&gt;eth&#x2F;67&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;This EIP doesn&#x27;t affect the consensus engine and doesn&#x27;t necessitate a hard fork.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;p&gt;Testing will involve ensuring that nodes can correctly communicate and understand the block range information during the handshake. Additionally, it will involve ensuring nodes can correctly request and share updated block range when requested.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;This change is not a standardization of not storing and serving historical blocks before the implementation of alternative historical blocks storage solutions.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Linter Scope</title>
        <published>2023-06-20T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Zainan Victor Zhou</name><uri>https://github.com/xinbenlv</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/7199/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/proposal-eipw-should-only-complain-about-changing-lines/14762" />
        

        <id>https://wg-eips.ritovision.com/7199/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="meta"
                label="Meta" />
            
        

        
        <category
            term="tag:eip:7199"
            label="EIP-7199" />
        

        
        

        
        <summary type="html">Relax the policy for updating EIP.</summary>
        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/7199/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;Currently in practice EIP linter tools (EIPW, for example) will block a Pull Request for lint errors even if that lint errors was not introduced in that Pull Request.
This EIP make it explicit that lint errors for untouched lines shall be considered ignorable except for status change.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be interpreted as described in RFC 2119.&lt;&#x2F;p&gt;
&lt;p&gt;In an update to an EIP, A Pull Request SHOULD NOT be required to fix linter errors in untouched lines unless it&#x27;s changing the Status of the EIP.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;This policy allows micro contributions for anyone who just want to fix a typo or change a section of a section in a large EIP.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;None&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>SETCODE instruction</title>
        <published>2023-04-20T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>William Morriss</name><uri>https://github.com/wjmelements</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/6913/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-6913-setcode-instruction/13898" />
        

        <id>https://wg-eips.ritovision.com/6913/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        

        
        <category
            term="tag:eip:6913"
            label="EIP-6913" />
        

        
        

        
        <summary type="html">new instruction to replace code in-place</summary>
        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/6913/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;Introduce the &lt;code&gt;SETCODE&lt;&#x2F;code&gt; (&lt;code&gt;0xfc&lt;&#x2F;code&gt;) instruction, which replaces the code of the executing account from memory.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;Many contracts are upgradeable in order to facilitate improvement or defer decisions without migrating to a new address.
Contracts presently do this in several ways:&lt;&#x2F;p&gt;
&lt;p&gt;The oldest method uses &lt;code&gt;CALL&lt;&#x2F;code&gt;.
The limitation of this method is that internal state must be modifiable by all future implementations.&lt;&#x2F;p&gt;
&lt;p&gt;Second, &lt;code&gt;DELEGATECALL&lt;&#x2F;code&gt; can proxy the implementation.
Some proxies are minimal while others branch to many separate implementation accounts.
This method can also bypass account code size limits.&lt;&#x2F;p&gt;
&lt;p&gt;A third method uses &lt;code&gt;SELFDESTRUCT&lt;&#x2F;code&gt; and &lt;code&gt;CREATE2&lt;&#x2F;code&gt; to replace code in-place.
This method improves upon the prior methods by removing the need to call into external contracts.
One limitation of this method is that any internal state is removed by &lt;code&gt;SELFDESTRUCT&lt;&#x2F;code&gt;.
Another limitation is that &lt;code&gt;SELFDESTRUCT&lt;&#x2F;code&gt; does not remove code until the end of the transaction, sacrificing availability until &lt;code&gt;CREATE2&lt;&#x2F;code&gt; can complete the upgrade.&lt;&#x2F;p&gt;
&lt;p&gt;Given the upcoming deprecation of &lt;code&gt;SELFDESTRUCT&lt;&#x2F;code&gt;, &lt;code&gt;SETCODE&lt;&#x2F;code&gt; introduces a better method for replacing code in-place.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;When within a read-only execution scope like the recursive kind created by &lt;code&gt;STATICCALL&lt;&#x2F;code&gt;, &lt;code&gt;SETCODE&lt;&#x2F;code&gt; causes an exceptional abort.&lt;&#x2F;p&gt;
&lt;p&gt;When the currently executing code does not equal the code of the executing account, such as can happen inside of &lt;code&gt;DELEGATECALL&lt;&#x2F;code&gt; or &lt;code&gt;CREATE&lt;&#x2F;code&gt;, &lt;code&gt;SETCODE&lt;&#x2F;code&gt; causes an exceptional abort.&lt;&#x2F;p&gt;
&lt;p&gt;Otherwise, &lt;code&gt;SETCODE&lt;&#x2F;code&gt; consumes two words from the stack: offset and length.
These specify a range of memory containing the new code.
Any validations that would be performed on the result of &lt;code&gt;CREATE&lt;&#x2F;code&gt; or &lt;code&gt;CREATE2&lt;&#x2F;code&gt; occur immediately, potentially causing failure with exceptional abort.
The operations &lt;code&gt;EXTCODESIZE&lt;&#x2F;code&gt; and &lt;code&gt;EXTCODECOPY&lt;&#x2F;code&gt; now query the updated code, and message-calls such as &lt;code&gt;DELEGATECALL&lt;&#x2F;code&gt;, &lt;code&gt;CALLCODE&lt;&#x2F;code&gt;, &lt;code&gt;CALL&lt;&#x2F;code&gt;, and &lt;code&gt;STATICCALL&lt;&#x2F;code&gt; now execute the updated code.
Any execution scopes already executing replaced code, including the one that &lt;code&gt;SETCODE&lt;&#x2F;code&gt;, will continue executing the prior code.
Inside such scopes, &lt;code&gt;CODESIZE&lt;&#x2F;code&gt; and &lt;code&gt;CODECOPY&lt;&#x2F;code&gt; continue to query the executing code.&lt;&#x2F;p&gt;
&lt;p&gt;Like &lt;code&gt;SSTORE&lt;&#x2F;code&gt;, this account modification will be reverted if the current scope or any parent scope reverts or aborts.&lt;&#x2F;p&gt;
&lt;p&gt;Unlike &lt;code&gt;SELFDESTRUCT&lt;&#x2F;code&gt;, &lt;code&gt;SETCODE&lt;&#x2F;code&gt; does not clear account balance, nonce, or storage.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;gas&quot;&gt;Gas&lt;&#x2F;h3&gt;
&lt;p&gt;The gas cost of this operation is the sum of &lt;code&gt;Gselfdestruct&lt;&#x2F;code&gt; and the product of &lt;code&gt;Gcodedeposit&lt;&#x2F;code&gt; and the number of bytes in the new code.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;The behavior of &lt;code&gt;CODECOPY&lt;&#x2F;code&gt;, &lt;code&gt;CODESIZE&lt;&#x2F;code&gt;, &lt;code&gt;EXTCODESIZE&lt;&#x2F;code&gt;, and &lt;code&gt;EXTCODECOPY&lt;&#x2F;code&gt; match the behavior of &lt;code&gt;DELEGATECALL&lt;&#x2F;code&gt; and &lt;code&gt;CREATE&lt;&#x2F;code&gt;, where it is also possible for executing code to differ from the code of the executing account.&lt;&#x2F;p&gt;
&lt;p&gt;The gas cost of &lt;code&gt;SETCODE&lt;&#x2F;code&gt; is comparable to &lt;code&gt;CREATE&lt;&#x2F;code&gt; but excludes &lt;code&gt;Gcreate&lt;&#x2F;code&gt; because no execution context is created, nor any new account.
Other account modification costs are accounted for outside of execution gas.&lt;&#x2F;p&gt;
&lt;p&gt;Unlike &lt;code&gt;SELFDESTRUCT&lt;&#x2F;code&gt;, execution proceeds normally after &lt;code&gt;SETCODE&lt;&#x2F;code&gt; in order to allow validation and return data.
Post-update validation can undo a &lt;code&gt;SETCODE&lt;&#x2F;code&gt; operation with &lt;code&gt;REVERT&lt;&#x2F;code&gt;, or with a recursive &lt;code&gt;SETCODE&lt;&#x2F;code&gt;, but &lt;code&gt;REVERT&lt;&#x2F;code&gt; uses less gas.&lt;&#x2F;p&gt;
&lt;p&gt;Preventing &lt;code&gt;SETCODE&lt;&#x2F;code&gt; within most &lt;code&gt;DELEGATECALL&lt;&#x2F;code&gt; allows static analysis to easily identify mutable code.
Account code not containing the &lt;code&gt;SETCODE&lt;&#x2F;code&gt; operation can be safely assumed to be immutable.
Code observed in a non-reverting context to be immutable will remain immutable, allowing on-chain static analysis for immutability.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;The only prior operation changing code is &lt;code&gt;SELFDESTRUCT&lt;&#x2F;code&gt;.
As code modification via &lt;code&gt;SELFDESTRUCT&lt;&#x2F;code&gt; is deferred until the end of the transaction, its interactions with &lt;code&gt;SETCODE&lt;&#x2F;code&gt; are well-defined.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;CodeStart&lt;&#x2F;th&gt;&lt;th&gt;CallData&lt;&#x2F;th&gt;&lt;th&gt;CodeResult&lt;&#x2F;th&gt;&lt;th&gt;Gas&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;365f5f37365ffc00&lt;&#x2F;td&gt;&lt;td&gt;365f5f37365ffc00&lt;&#x2F;td&gt;&lt;td&gt;365f5f37365ffc00&lt;&#x2F;td&gt;&lt;td&gt;6613&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;365f5f37365ffc00&lt;&#x2F;td&gt;&lt;td&gt;00&lt;&#x2F;td&gt;&lt;td&gt;00&lt;&#x2F;td&gt;&lt;td&gt;5213&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;365f5f37365ffc00&lt;&#x2F;td&gt;&lt;td&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;&#x2F;td&gt;&lt;td&gt;5013&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;365f5f37365ffc595ffd&lt;&#x2F;td&gt;&lt;td&gt;365f5f37365ffc00&lt;&#x2F;td&gt;&lt;td&gt;365f5f37365ffc595ffd&lt;&#x2F;td&gt;&lt;td&gt;6617&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;365f5f37365ffcfe&lt;&#x2F;td&gt;&lt;td&gt;365f5f37365ffc00&lt;&#x2F;td&gt;&lt;td&gt;365f5f37365ffcfe&lt;&#x2F;td&gt;&lt;td&gt;all&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;Risks related to &lt;code&gt;SETCODE&lt;&#x2F;code&gt; similarly apply to other upgrade patterns.&lt;&#x2F;p&gt;
&lt;p&gt;Most contracts should never be replaced and should not be upgradeable.
Any upgrade mechanism can risk permanent failure.
The possibility of upgrade perpetuates such risk.&lt;&#x2F;p&gt;
&lt;p&gt;Access to upgrade operations should be restricted.
Upgrades should never be performed in a hurry or when tired.
Upgrades should be tested under as similar conditions to production as possible; discrepancies are sources of unexpected results.
When possible, multiple engineers should preview and independently verify pending upgrade procedures.&lt;&#x2F;p&gt;
&lt;p&gt;Block explorers, wallets, and other interfaces should flag upgradeable code.
Client software should warn against approving &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;20&#x2F;&quot;&gt;ERC-20&lt;&#x2F;a&gt; or &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;721&#x2F;&quot;&gt;ERC-721&lt;&#x2F;a&gt; tokens for upgradeable accounts.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Insert Code into EOAs with AUTHUSURP</title>
        <published>2022-03-26T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Dan Finlay</name><uri>https://github.com/danfinlay</uri>
	</author>
	
	<author>
		<name>Sam Wilson</name><uri>https://github.com/SamWilsn</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/5003/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-5003-auth-usurp-publishing-code-at-an-eoa-address/8979" />
        

        <id>https://wg-eips.ritovision.com/5003/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        

        
        <category
            term="tag:eip:5003"
            label="EIP-5003" />
        

        
        

        
        <summary type="html">Allow migrating away from ECDSA by deploying code in place of an externally owned account.</summary>
        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/5003/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP introduces a new opcode, &lt;code&gt;AUTHUSURP&lt;&#x2F;code&gt;, which deploys code at an &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;3074&#x2F;&quot;&gt;EIP-3074&lt;&#x2F;a&gt; authorized address. For externally owned accounts (EOAs), together with &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;3607&#x2F;&quot;&gt;EIP-3607&lt;&#x2F;a&gt;, this effectively revokes the original signing key&#x27;s authority.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;EOAs currently hold a significant amount of user-controlled value on Ethereum blockchains, but are limited by the protocol in a variety of critical ways. These accounts do not support rotating keys for security, batching to save gas, or sponsored transactions to reduce the need to hold ether yourself. There are countless other benefits that come from having a contract account or account abstraction, like choosing one&#x27;s own authentication algorithm, setting spending limits, enabling social recovery, allowing key rotation, arbitrarily and transitively delegating capabilities, and just about anything else we can imagine.&lt;&#x2F;p&gt;
&lt;p&gt;New users have access to these benefits using smart contract wallets, and new contracts can adopt recent standards to enable app-layer account abstraction (like &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4337&#x2F;&quot;&gt;EIP-4337&lt;&#x2F;a&gt;), but these would neglect the vast majority of existing Ethereum users&#x27; accounts. These users exist today, and they also need a path to achieving their security goals.&lt;&#x2F;p&gt;
&lt;p&gt;Those added benefits would mostly come along with EIP-3074 itself, but with one significant shortcoming: the original signing key has ultimate authority for the account. While an EOA could delegate its authority to some &lt;em&gt;additional&lt;&#x2F;em&gt; contract, the key itself would linger, continuing to provide an attack vector, and a constantly horrifying question lingering: have I been leaked? In other words, EIP-3074 can only grant authority to additional actors, but never revoke it.&lt;&#x2F;p&gt;
&lt;p&gt;Today&#x27;s EOAs have no option to rotate their keys. A leaked private key (either through phishing, or accidental access) cannot be revoked. A prudent user concerned about their key security might migrate to a new secret recovery phrase but at best this requires a transaction per asset (making it extremely expensive), and at worst, some powers (like hard-coded owners in a smart contract) might not be transferable at all.&lt;&#x2F;p&gt;
&lt;p&gt;We know that EOAs cannot provide ideal user experience or safety, and there is a desire in the community to change the norm to contract-based accounts, but if that transition is designed without regard for the vast majority of users today—for whom Ethereum has always meant EOAs—we will be continually struggling against the need to support both of these userbases. This EIP provides a path not to enshrine EOAs, but to provide a migration path off of them, once and for all.&lt;&#x2F;p&gt;
&lt;p&gt;This proposal combines well with, but is distinct from, &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;3074&#x2F;&quot;&gt;EIP-3074&lt;&#x2F;a&gt;, which provides opcodes that could enable any externally owned account (EOA) to delegate its signing authority to an arbitrary smart contract. It allows an EOA to authorize a contract account to act on its behalf &lt;em&gt;without forgoing its own powers&lt;&#x2F;em&gt;, while this EIP provides a final migration path off the EOA&#x27;s original signing key.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be interpreted as described in RFC 2119.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;conventions&quot;&gt;Conventions&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;top - N&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt; - the &lt;code&gt;N&lt;&#x2F;code&gt;th most recently pushed value on the EVM stack, where &lt;code&gt;top - 0&lt;&#x2F;code&gt; is the most recent.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;invalid execution&lt;&#x2F;strong&gt; - execution that is invalid and must exit the current execution frame immediately, consuming all remaining gas (in the same way as a stack underflow or invalid jump).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;empty account&lt;&#x2F;strong&gt; - account where its balance is 0, its nonce is 0, and it has no code.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;authusurp-0xf8&quot;&gt;&lt;code&gt;AUTHUSURP&lt;&#x2F;code&gt; (&lt;code&gt;0xf8&lt;&#x2F;code&gt;)&lt;&#x2F;h3&gt;
&lt;p&gt;A new opcode &lt;code&gt;AUTHUSURP&lt;&#x2F;code&gt; shall be created at &lt;code&gt;0xf8&lt;&#x2F;code&gt;. It shall take two stack elements and return one stack element.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;input&quot;&gt;Input&lt;&#x2F;h4&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Stack&lt;&#x2F;th&gt;&lt;th&gt;Value&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 0&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;offset&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 1&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;length&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h4 id=&quot;output&quot;&gt;Output&lt;&#x2F;h4&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Stack&lt;&#x2F;th&gt;&lt;th&gt;Value&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 0&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;address&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h4 id=&quot;behavior&quot;&gt;Behavior&lt;&#x2F;h4&gt;
&lt;p&gt;&lt;code&gt;AUTHUSURP&lt;&#x2F;code&gt; behaves identically to &lt;code&gt;CREATE&lt;&#x2F;code&gt; (&lt;code&gt;0xf0&lt;&#x2F;code&gt;), except as described below:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;authorized&lt;&#x2F;code&gt; (as defined in EIP-3074) is unset, execution is invalid.&lt;&#x2F;li&gt;
&lt;li&gt;If &lt;code&gt;authorized&lt;&#x2F;code&gt; points to an empty account, then &lt;code&gt;static_gas&lt;&#x2F;code&gt; remains 32,000. Otherwise, &lt;code&gt;static_gas&lt;&#x2F;code&gt; shall be 7,000.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;AUTHUSURP&lt;&#x2F;code&gt; does not check the nonce of the &lt;code&gt;authorized&lt;&#x2F;code&gt; account.&lt;&#x2F;li&gt;
&lt;li&gt;The initcode runs at the address &lt;code&gt;authorized&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;If the initcode returns no bytes, its execution frame must be reverted, and &lt;code&gt;AUTHUSURP&lt;&#x2F;code&gt; returns zero.&lt;&#x2F;li&gt;
&lt;li&gt;After executing the initcode, but before the returned code is deployed, if the account&#x27;s code is non-empty, the initcode&#x27;s execution frame must be reverted, and &lt;code&gt;AUTHUSURP&lt;&#x2F;code&gt; returns zero.&lt;&#x2F;li&gt;
&lt;li&gt;The code is deployed into the account with the address &lt;code&gt;authorized&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;code&gt;AUTHUSURP&lt;&#x2F;code&gt; does not check the nonce of the &lt;code&gt;authorized&lt;&#x2F;code&gt; account because it must work with accounts that have previously sent transactions.&lt;&#x2F;p&gt;
&lt;p&gt;When using &lt;code&gt;AUTHUSURP&lt;&#x2F;code&gt;, if the initcode were to deploy a zero-length contract, there would be no way to prevent using &lt;code&gt;AUTHUSURP&lt;&#x2F;code&gt; again later.&lt;&#x2F;p&gt;
&lt;p&gt;The account&#x27;s code must be checked immediately before deploying to catch the situation where the initcode attempts to &lt;code&gt;AUTHUSURP&lt;&#x2F;code&gt; at the same address. This is unnecessary with other deployment instructions because they increment and check the account&#x27;s nonce.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;code&gt;AUTHUSURP&lt;&#x2F;code&gt; with EIP-3607 revokes the authority of the original ECDSA signature to send transactions from the account. This is completely new behavior, although it is somewhat similar to the &lt;code&gt;CREATE2&lt;&#x2F;code&gt; opcode.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;Contracts using ECDSA signatures outside of transactions will not be aware that the usurped account is no longer controlled by a private key. This means that, for example, the private key will &lt;em&gt;always&lt;&#x2F;em&gt; have access to the &lt;code&gt;permit&lt;&#x2F;code&gt; function on token contracts. This can—and should—be mitigated by modifying the &lt;code&gt;ecrecover&lt;&#x2F;code&gt; pre-compiled contract.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Safer Control Flow for the EVM</title>
        <published>2021-08-30T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:28+00:00</updated>
	
	
	<author>
		<name>Greg Colvin</name><uri>https://github.com/gcolvin</uri>
	</author>
	
	<author>
		<name>Greg Colvin</name><email>greg@colvin.org</email>
	</author>
	
	<author>
		<name>Brooklyn Zelenka</name><uri>https://github.com/expede</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/3779/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-3779-safe-control-flow-for-the-evm/6975" />
        

        <id>https://wg-eips.ritovision.com/3779/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        

        
        <category
            term="tag:eip:3779"
            label="EIP-3779" />
        

        
        

        
        <summary type="html">Ensure an essential level of safety for EVM code.</summary>
        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/3779/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;We define a safe EVM contract as one that cannot encounter an exceptional halting state.  In general, we cannot prove safety for Turing-complete programs. But we can prove a useful subset.&lt;&#x2F;p&gt;
&lt;p&gt;This EIP specifies validity rules to ensure that:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Valid contracts will not halt with an exception unless they either&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;throw &lt;code&gt;out of gas&lt;&#x2F;code&gt; or&lt;&#x2F;li&gt;
&lt;li&gt;recursively overflow stack.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;This EIP does not introduce any new opcodes.  Rather, it restricts the use of existing and proposed control-flow instructions.  The restrictions must be validated at contract initialization time – not at runtime – by the provided algorithm or its equivalent. This algorithm must take time and space near-linear in the size of the contract, so as not to be a denial of service vulnerability.&lt;&#x2F;p&gt;
&lt;p&gt;This specification is entirely semantic.  It imposes no further syntax on bytecode, as none is required to ensure the specified level of safety.  Ethereum Virtual Machine bytecode is just that -- a sequence of bytes that when executed causes a sequence of changes to the machine state.  The safety we seek here is simply to not, as it were, jam up the gears.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;safety&quot;&gt;Safety&lt;&#x2F;h3&gt;
&lt;p&gt;For our purposes we define a safe EVM contract as one that cannot encounter an exceptional halting state.  From the standpoint of security it would be best if unsafe contracts were never placed on the blockchain.  Unsafe code can attempt to overflow stack, underflow stack, execute invalid instructions, and jump to invalid locations.&lt;&#x2F;p&gt;
&lt;p&gt;Unsafe contracts are exploits waiting to happen.&lt;&#x2F;p&gt;
&lt;p&gt;Validating contract safety requires traversing the contract code.  So in order to prevent denial of service attacks all jumps, including the existing &lt;code&gt;JUMP&lt;&#x2F;code&gt; and &lt;code&gt;JUMPI&lt;&#x2F;code&gt;, and also the other proposed jumps -- &lt;code&gt;RJUMP&lt;&#x2F;code&gt;, &lt;code&gt;RJUMPI&lt;&#x2F;code&gt;, &lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt; and &lt;code&gt;RETURNSUB&lt;&#x2F;code&gt; -- must be validated at initialization time, and in time and space linear in the size of the code.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;static-jumps-and-subroutines&quot;&gt;Static Jumps and Subroutines&lt;&#x2F;h4&gt;
&lt;p&gt;The relative jumps of &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4200&#x2F;&quot;&gt;EIP-4200&lt;&#x2F;a&gt; and the simple subroutines of &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2315&#x2F;&quot;&gt;EIP-2315&lt;&#x2F;a&gt; provide a complete set of static control flow instructions:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;RJUMP&lt;&#x2F;code&gt; &lt;em&gt;offset&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Jumps to &lt;em&gt;IP+offset&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;RJUMPI&lt;&#x2F;code&gt; &lt;em&gt;offset&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Jumps if the top of stack is non-zero.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt; offset&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Pushes &lt;em&gt;IP+1&lt;&#x2F;em&gt; on the return stack and jumps to &lt;em&gt;IP+offset&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;RETURNSUB&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Jumps to the address popped off the return stack.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Note that each jump creates at most two paths of control through the code, such that the complexity of traversing the entire control-flow graph is linear in the size of the code.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;dynamic-jumps&quot;&gt;&lt;em&gt;Dynamic Jumps&lt;&#x2F;em&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;Dynamic jumps, where the destination of a &lt;code&gt;JUMP&lt;&#x2F;code&gt; or &lt;code&gt;JUMPI&lt;&#x2F;code&gt; is not known until runtime, are an obstacle to proving validity in linear time -- any jump can be to any destination in the code, potentially requiring time quadratic in the size of code. For this reason we have two real choices.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Deprecate dynamic jumps. This is easily done:&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;blockquote&gt;
&lt;p&gt;Define &lt;code&gt;JUMP&lt;&#x2F;code&gt; and &lt;code&gt;JUMPI&lt;&#x2F;code&gt; as &lt;code&gt;INVALID&lt;&#x2F;code&gt; for the purposes of EOF Code Validation&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;Constrain dynamic jumps. This requires static analysis.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Consider the simplest and most common case.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PUSH address&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;JUMP&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This is effectively a static jump.&lt;&#x2F;p&gt;
&lt;p&gt;Another important use of &lt;code&gt;JUMP&lt;&#x2F;code&gt; is to implement the return jump from a subroutine. So consider this example of calling and returning from a minimal subroutine:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;TEST_SQUARE:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jumpdest&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    push RTN_SQUARE &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    0x02&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    push SQUARE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jump&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;RTN_SQUARE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jumpdest&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    swap1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jump&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SQUARE:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jumpdest&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    dup1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    mul&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    swap1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jump&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The return address -&lt;code&gt;RTN_SQUARE&lt;&#x2F;code&gt; - and the destination address - &lt;code&gt;SQUARE&lt;&#x2F;code&gt; - are pushed on the stack as constants and remain unchanged as they move on the stack, such that only those constants are passed to each &lt;code&gt;JUMP&lt;&#x2F;code&gt;. They are effectively static.  We can track the motion of constants on the &lt;code&gt;data stack&lt;&#x2F;code&gt; at validation time, so &lt;em&gt;we do not need unconstrained dynamic jumps to implement subroutines.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;The above is the simplest analysis that suffices.  A more powerful analysis that takes in more use cases is possible -- slower, but still linear-time.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h4 id=&quot;validation&quot;&gt;Validation&lt;&#x2F;h4&gt;
&lt;p&gt;We can validate the safety of contracts with a static analysis that takes time and space linear in the size of the &lt;em&gt;code&lt;&#x2F;em&gt;, as shown below.  And since we can, we should.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;performance&quot;&gt;Performance&lt;&#x2F;h3&gt;
&lt;p&gt;Validating safe control flow at initialization time has potential performance advantages.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Static jumps do not need to be checked at runtime.&lt;&#x2F;li&gt;
&lt;li&gt;Stack underflow does not need to be checked for at runtime.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;validity&quot;&gt;Validity&lt;&#x2F;h3&gt;
&lt;blockquote&gt;
&lt;p&gt;In theory, theory and practice are the same. In practice, they&#x27;re not. -- Albert Einstein&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;We define a &lt;em&gt;safe&lt;&#x2F;em&gt; EVM contract as one that cannot encounter an exceptional halting state.  We validate &lt;em&gt;safety&lt;&#x2F;em&gt; at initialization time to the extent practical.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;exceptional-halting-states&quot;&gt;&lt;em&gt;Exceptional Halting States&lt;&#x2F;em&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;em&gt;execution&lt;&#x2F;em&gt; of each instruction is defined in the Yellow Paper as a change to the EVM state that preserves the invariants of EVM state.  At runtime, if the execution of an instruction would violate an invariant the EVM is in an exceptional halting state.  The Yellow Paper defined five such states.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Insufficient gas&lt;&#x2F;li&gt;
&lt;li&gt;More than 1024 stack items&lt;&#x2F;li&gt;
&lt;li&gt;Insufficient stack items&lt;&#x2F;li&gt;
&lt;li&gt;Invalid jump destination&lt;&#x2F;li&gt;
&lt;li&gt;Invalid instruction&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;&lt;em&gt;A program is safe iff no execution can lead to an exceptional halting state.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;We would like to consider EVM programs valid iff they are safe.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;In practice&lt;&#x2F;em&gt;, we must be able to validate &lt;em&gt;code&lt;&#x2F;em&gt; in linear time to avoid denial of service attacks. And we must support dynamically-priced instructions, loops, and recursion, which can use arbitrary amounts of gas and stack.&lt;&#x2F;p&gt;
&lt;p&gt;Thus our validation cannot consider concrete computations -- it only performs a limited symbolic execution of the &lt;em&gt;code&lt;&#x2F;em&gt;.  This means we will reject programs if we detect any invalid execution paths, even if those paths are not reachable at runtime.  And we will count as valid programs that may not always produce correct results.&lt;&#x2F;p&gt;
&lt;p&gt;We can detect only &lt;em&gt;non-recursive&lt;&#x2F;em&gt; stack overflows at &lt;em&gt;validation time&lt;&#x2F;em&gt;, so we must check for the first two states at &lt;em&gt;runtime&lt;&#x2F;em&gt;:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;out of gas&lt;&#x2F;code&gt; and&lt;&#x2F;li&gt;
&lt;li&gt;stack overflow.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The remaining three states we can check at &lt;em&gt;validation time&lt;&#x2F;em&gt;:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;stack underflow,&lt;&#x2F;li&gt;
&lt;li&gt;invalid jump, and&lt;&#x2F;li&gt;
&lt;li&gt;invalid instruction.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;That is to say:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Valid contracts will not halt with an exception unless they either&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;throw &lt;code&gt;out of gas&lt;&#x2F;code&gt; or&lt;&#x2F;li&gt;
&lt;li&gt;recursively overflow stack.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;blockquote&gt;
&lt;h4 id=&quot;constraints-on-valid-code&quot;&gt;&lt;em&gt;Constraints on Valid Code&lt;&#x2F;em&gt;&lt;&#x2F;h4&gt;
&lt;ul&gt;
&lt;li&gt;Every instruction is valid.&lt;&#x2F;li&gt;
&lt;li&gt;Every jump is valid:
&lt;ul&gt;
&lt;li&gt;Every&lt;code&gt;JUMP&lt;&#x2F;code&gt; and &lt;code&gt;JUMPI&lt;&#x2F;code&gt; is &lt;em&gt;static&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;No &lt;code&gt;JUMP&lt;&#x2F;code&gt;, &lt;code&gt;JUMPI&lt;&#x2F;code&gt;, &lt;code&gt;RJUMP&lt;&#x2F;code&gt;, &lt;code&gt;RJUMPI&lt;&#x2F;code&gt;, or &lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt; addresses immediate data.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;The stacks are always valid:
&lt;ul&gt;
&lt;li&gt;The &lt;em&gt;number&lt;&#x2F;em&gt; of items on the &lt;code&gt;data stack&lt;&#x2F;code&gt; is always positive, and at most 1024.&lt;&#x2F;li&gt;
&lt;li&gt;The &lt;em&gt;number&lt;&#x2F;em&gt; of items on the &lt;code&gt;return stack&lt;&#x2F;code&gt; is always positive, and at most 1024.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;The data stack is consistently aligned:
&lt;ul&gt;
&lt;li&gt;The &lt;em&gt;number&lt;&#x2F;em&gt; of items on the &lt;code&gt;data stack&lt;&#x2F;code&gt; between the current &lt;code&gt;stack pointer&lt;&#x2F;code&gt; and the &lt;code&gt;stack pointer&lt;&#x2F;code&gt; on entry to the most recent basic block is the same for each &lt;em&gt;execution&lt;&#x2F;em&gt; of a &lt;em&gt;byte_code&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;We define a &lt;code&gt;JUMP&lt;&#x2F;code&gt; or &lt;code&gt;JUMPI&lt;&#x2F;code&gt; instruction to be &lt;em&gt;static&lt;&#x2F;em&gt; if its &lt;code&gt;jumpsrc&lt;&#x2F;code&gt; argument was first placed on the stack via a &lt;code&gt;PUSH…&lt;&#x2F;code&gt; and that value has not changed since, though it may have been copied via a &lt;code&gt;DUP…&lt;&#x2F;code&gt; or &lt;code&gt;SWAP…&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;code&gt;RJUMP&lt;&#x2F;code&gt;, &lt;code&gt;RJUMPI&lt;&#x2F;code&gt; and &lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt;instructions take their destination as an immediate argument, so they are &lt;em&gt;static&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Taken together, these rules allow for code to be validated by traversing the control-flow graph, in time and space linear in the size of the code, following each edge only once.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;Note: The definition of &#x27;static&#x27; for &lt;code&gt;JUMP&lt;&#x2F;code&gt; and &lt;code&gt;JUMPI&lt;&#x2F;code&gt; is the bare minimum needed to implement subroutines.  Deeper analyses could be proposed that would validate a larger and probably more useful set of jumps, at the cost of more expensive (but still linear) validation.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;Demanding &lt;em&gt;static&lt;&#x2F;em&gt; destinations for all jumps means that all jump destinations can be validated at initialization time, not runtime.&lt;&#x2F;p&gt;
&lt;p&gt;Bounding the stack pointers catches all &lt;code&gt;data stack&lt;&#x2F;code&gt; and non-recursive&lt;code&gt;return stack&lt;&#x2F;code&gt; overflows.&lt;&#x2F;p&gt;
&lt;p&gt;Requiring a consistently aligned&lt;code&gt;data stack&lt;&#x2F;code&gt; prevents stack underflow. It can also catch such errors as misaligned stacks due to irreducible control flows and calls to subroutines with the wrong number of arguments.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;These changes affect the semantics of EVM code – the use of &lt;code&gt;JUMP&lt;&#x2F;code&gt;, &lt;code&gt;JUMPI&lt;&#x2F;code&gt;, and the stack are restricted, such that some &lt;em&gt;code&lt;&#x2F;em&gt; that would otherwise run correctly will nonetheless be invalid EVM &lt;em&gt;code&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;reference-implementation&quot;&gt;Reference Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;The following is a pseudo-Go implementation of an algorithm for predicating code validity.  An equivalent algorithm must be run at initialization time.&lt;&#x2F;p&gt;
&lt;p&gt;This algorithm performs a symbolic execution of the program that recursively traverses the &lt;em&gt;code&lt;&#x2F;em&gt;, emulating its control flow and stack use and checking for violations of the rules above.&lt;&#x2F;p&gt;
&lt;p&gt;It runs in time equal to &lt;code&gt;O(vertices + edges)&lt;&#x2F;code&gt; in the program&#x27;s control-flow graph, where edges represent control flow and the vertices represent &lt;em&gt;basic blocks&lt;&#x2F;em&gt; -- thus the algorithm takes time proportional to the size of the &lt;em&gt;code&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;Note: All valid code has a control-flow graph that can be traversed in time and space linear in the length of the code.  That means that some other static analyses and code transformations that might otherwise require quadratic time can also be written to run in near-linear time, including one-pass and streaming compilers.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;validation-function&quot;&gt;Validation Function&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;&#x2F;strong&gt; This function is a work in progress, and the version below is known to be incorrect.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;For simplicity&#x27;s sake we assume that &lt;em&gt;jumpdest analysis&lt;&#x2F;em&gt; has been done and that we have some helper functions.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;isValidInstruction(pc)&lt;&#x2F;code&gt; returns true if &lt;code&gt;pc&lt;&#x2F;code&gt; points at a valid instruction&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;isValidJumpdest(dest)&lt;&#x2F;code&gt; returns true if &lt;code&gt;dest&lt;&#x2F;code&gt; is a valid jumpdest&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;immediateData(pc)&lt;&#x2F;code&gt; returns the immediate data for the instruction at &lt;code&gt;pc&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;advancePC(pc)&lt;&#x2F;code&gt; returns next &lt;code&gt;pc&lt;&#x2F;code&gt;,  skipping any immediate data.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;removed_items(pc)&lt;&#x2F;code&gt; returns the number of items removed from the &lt;code&gt;dataStack&lt;&#x2F;code&gt; by the instruction at &lt;code&gt;pc&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;added_items(pc)&lt;&#x2F;code&gt; returns the number of items added to the &lt;code&gt;dataStack&lt;&#x2F;code&gt; by the instruction at &lt;code&gt;pc&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;var bytecode      [codeLen]byte&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;var subMin        [codeLen]int&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;var subMax        [codeLen]int&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;var subDelta      [codeLen]int&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;var visited       [codeLen]bool&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;var dataStack     [1024]int&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;&#x2F; validate a path through the control flow of the bytecode at pc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;&#x2F; and return the maximum number of stack items used down that path&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;&#x2F; or else the PC and an error&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;&#x2F; by starting at pc:=0 the entire program is recursively evaluated&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;func validate(pc := 0, sp := 0, rp := 0) int, error {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   minStack := 0 &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   maxStack := 0 &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   deltaStack := 0 &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   for pc &amp;lt; codeLen {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      if !isValidInstruction(pc) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         return 0,0,0,invalid_instruction&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F; if we have jumped here before return to break cycle&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      if visited[pc] {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          &#x2F;&#x2F; stack is not aligned if deltas not the same&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          if ??? {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,invalid_stack&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          return minStack, maxStack, sp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      visited[pc] = true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      switch bytecode[pc] {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F; successful termination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case STOP:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         return minStack, maxStack, sp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case RETURN:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         return minStack, maxStack, sp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case SELFDESTRUCT:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         return minStack, maxStack, sp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case REVERT:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         return minStack, maxStack, sp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case INVALID:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         return 0,0,0,invalid_instruction&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case RJUMP:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &#x2F;&#x2F; check for valid jump destination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if !isValidJumpdest(jumpdest) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,invalid_destination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &#x2F;&#x2F; reset pc to destination of jump&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         pc += immediateData(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case RJUMPI:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &#x2F;&#x2F; recurse to validate true side of conditional&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         jumpdest = pc + immediateData(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if !isValidJumpdest(pc + jumpdest) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,invalid_destination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         minRight, maxLeft, deltaRight, err =&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            validate(jumpdest, sp, rp)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     err {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,err&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &#x2F;&#x2F; recurse to validate false side of conditional&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         pc = advancePC(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         minRight, maxRight, deltaRight, err =&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            validate(pc, sp, rp)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if err {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,err&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &#x2F;&#x2F; both paths valid, so return max&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         minStack = min(minStack, min(minLeft, minRight))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         maxStack += max(maxLeft, maxRight)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         deltaStack += max(deltaLeft, deltaRight)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         return minStack, maxStack, deltaStack&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case RJUMPSUB:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &#x2F;&#x2F; check for valid jump destination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         jumpdest = immediateData(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if !isValidJumpdest(pc + jumpdest) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,invalid_destination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         pc += jumpdest&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &#x2F;&#x2F; recurse to validate subroutine call&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         minSub, maxSub, deltaSub, err = validate(jumpdest, sp, rp)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if err {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,err&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         subMin[pc] = minSub&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         subMax[pc] = maxSub&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         subDelta[pc] = deltaSub&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         minStack = min(minStack, sp)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         maxStack = max(maxStack, sp)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         pc = advancePC(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case RETURNSUB:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         maxStack = max(maxStack, sp)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         return minStack, maxStack, sp, nil&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F; The following are to be included only if we take&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F;    Option 2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F; and do not deprecate JUMP and JUMPI&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case JUMP:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &#x2F;&#x2F; pop jump destination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         jumpdest = dataStack[--sp]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if !valid_jumpdest(jumpdest) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,invalid_destination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         pc = jumpdest&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case JUMPI:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &#x2F;&#x2F; pop jump destination and conditional&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         jumpdest = dataStack[--sp]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         jumpif = dataStack[--sp]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if sp &amp;lt; 0 {}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,stack_underflow&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if !valid_jumpdest(jumpdest) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,invalid_destination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &#x2F;&#x2F; recurse to validate true side of conditional&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if !isValidJumpdest(jumpdest) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,invalid_destination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         maxLeft, err = validate(jumpdest, sp, rp)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if err {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,err&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &#x2F;&#x2F; recurse to validate false side of conditional&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         pc = advance_pc(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         maxRight, err = validate(pc, sp, rp)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if err {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,err&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &#x2F;&#x2F; both sides valid, return max&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         maxStack += max(maxLeft, maxRight)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         return minStack, maxStack, sp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case PUSH1 &amp;lt;= bytecode[pc] &amp;amp;&amp;amp; bytecode[pc] &amp;lt;= PUSH32 {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         sp++&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if (sp &amp;gt; 1023) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,stack_overflow&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         maxStack = max(maxStack, sp)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         dataStack[sp] = immediateData(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         pc = advancePC(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case DUP1 &amp;lt;= bytecode[pc] &amp;amp;&amp;amp; bytecode[pc] &amp;lt;= DUP32 {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         dup = sp - (bytecode[pc] - DUP1)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if dup &amp;lt; 0 {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,stack_underflow&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         sp++&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if (sp &amp;gt; 1023) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,stack_overflow&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         maxStack = max(maxStack, sp)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         dataStack[sp] = dataStack[dup]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         pc = advancePC(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case SWAP1 &amp;lt;= bytecode[pc] &amp;amp;&amp;amp; bytecode[pc] &amp;lt;= SWAP32 {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         swap = sp - (bytecode[pc] - SWAP1)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if swap &amp;lt; 0 {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,stack_underflow&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         temp := dataStack[swap]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         dataStack[swap] = dataStack[0]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         dataStack[0] = temp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         pc = advancePC(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      &#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      default:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         &#x2F;&#x2F; apply other instructions to stack pointer&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         sp -= removed_items(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if (sp &amp;lt; 0) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,stack_underflow&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         minStack = min(minStack, sp)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         sp += added_items(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         if (sp &amp;gt; 1023) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            return 0,0,0,stack_overflow&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         maxStack = max(maxStack, sp)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         pc = advancePC(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   &#x2F;&#x2F; successful termination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   return minStack, maxStack, sp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP is intended to ensure an essential level of safety for EVM code deployed on the blockchain.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Predictable Proof-of-Work (POW) Sunsetting</title>
        <published>2021-03-13T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Query0x</name><uri>https://github.com/Query0x</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/3374/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-3374-predictable-proof-of-work-sunsetting" />
        

        <id>https://wg-eips.ritovision.com/3374/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        

        
        <category
            term="tag:eip:3374"
            label="EIP-3374" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/3374/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;Sets block reward to 3 and reduces it to 1 linearly over the course of about 1 year.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;Sets the block reward to 3 ETH and then incrementally decreases it every block for 2,362,000 blocks (approximately 1 year) until it reaches 1 ETH.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;Unnecessarily abrupt changes to the Ethereum ecosystem cause disruption and disharmony resulting in the disenfranchisement of community members while undermining stability and confidence.  While moves from Proof-of-Work to Proof-of-Stake will undoubtedly cause friction between those community members vested in either, all benefit from a measured, predictable transition.&lt;&#x2F;p&gt;
&lt;p&gt;This proposal:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Is issuance neutral over 1 year, and reduces issuance beyond that.&lt;&#x2F;li&gt;
&lt;li&gt;Sets an initial block reward of 3;&lt;&#x2F;li&gt;
&lt;li&gt;Introduces an ongoing, predictable reduction in future mining rewards down to 1, effectively &quot;sunsetting&quot; POW and codifying the move to POS;&lt;&#x2F;li&gt;
&lt;li&gt;Reduces economic incentives for continued development of ASICs;&lt;&#x2F;li&gt;
&lt;li&gt;Allows the impacts of decreasing miner rewards to be measured and monitored rather than relying on conjecture and game theory, so adjustments can be made if necessary.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;constants&quot;&gt;Constants&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;TRANSITION_START_BLOCK_NUMBER: TBD&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;TRANSITION_DURATION: 2_362_000&lt;&#x2F;code&gt; &#x2F;&#x2F; (about one year)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;TRANSITION_END_BLOCK_NUMBER: FORK_BLOCK_NUMBER + TRANSITION_DURATION&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;STARTING_REWARD: 3_000_000_000_000_000_000&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;ENDING_REWARD: 1_000_000_000_000_000_000&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;REWARD_DELTA: STARTING_REWARD - ENDING_REWARD&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;block-reward&quot;&gt;Block Reward&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;if&lt;&#x2F;span&gt;&lt;span&gt; block&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;number&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; TRANSITION_END_BLOCK_NUMBER&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    block_reward&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; ENDING_REWARD&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;elif&lt;&#x2F;span&gt;&lt;span&gt; block&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;number&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; TRANSITION_START_BLOCK_NUMBER&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    block_reward&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; STARTING_REWARD&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;elif&lt;&#x2F;span&gt;&lt;span&gt; block&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;number&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; TRANSITION_START_BLOCK_NUMBER&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    block_reward&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; STARTING_REWARD&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; REWARD_DELTA&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; *&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; TRANSITION_DURATION&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span&gt;block&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;number&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; TRANSITION_START_BLOCK_NUMBER&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;Picking starting and ending block reward values that are equidistant from the current block reward rate of 2 ensures the impact of this EIP will be issuance neutral over the one year time frame.  Temporarily raising the block reward to 3 blunts the initial impact of a sudden miner revenue decrease and the continual reductions thereafter codify Ethereum&#x27;s move to POS by increasingly disincentivizing POW.  Importantly, this approach moderates the rate of change so impacts and threats can be measured and monitored.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;There are no known backward compatibility issues with the introduction of this EIP.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;There are no known security issues with the introduction of this EIP.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via CC0.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Hardcoded Block Gas Limit</title>
        <published>2021-03-13T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Philippe Castonguay</name><uri>https://github.com/PhABC</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/3382/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-3382-hardcoded-gas-limit" />
        

        <id>https://wg-eips.ritovision.com/3382/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        

        
        <category
            term="tag:eip:3382"
            label="EIP-3382" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/3382/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;Hardcode the block gas limit to &lt;code&gt;12,500,000&lt;&#x2F;code&gt; gas per block.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;Updates the block validation rules such that a block is invalid if the &lt;code&gt;gas_limit&lt;&#x2F;code&gt; header field is not equal to &lt;code&gt;12,500,000&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;Both Ethereum&#x27;s Proof of Work and Proof of Stake designs assume that block producers are financially rational, but does not assume block producers to be benevolent. There is one exception however, and it is when block producers choose the gas limit of a block where it is assumed that block producers care about the long term health and decentralisation of the chain. Indeed, the block gas limit is one of the only parameters in Ethereum that is not dictated by node consensus, but instead is chosen by block producers. This decision was initially made to allow urgent changes in the block gas limit if necessary. Both drastically increasing or decreasing this parameter could have serious consequences that may not be desired. It is therefore a critical parameter that should require node consensus to avoid any sudden harmful change imposed by a small number of actors on the rest of the network.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;Refer to &lt;code&gt;gasLimit&lt;&#x2F;code&gt; as &lt;code&gt;gasTarget&lt;&#x2F;code&gt; post EIP-1559.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;added-consensus-constraint&quot;&gt;Added Consensus Constraint&lt;&#x2F;h3&gt;
&lt;p&gt;As of &lt;code&gt;FORK_BLOCK_NUMBER&lt;&#x2F;code&gt;, the &lt;code&gt;header.gasLimit&lt;&#x2F;code&gt; &lt;strong&gt;MUST&lt;&#x2F;strong&gt; be equal to &lt;code&gt;BLOCK_GAS_LIMIT&lt;&#x2F;code&gt;, where &lt;code&gt;BLOCK_GAS_LIMIT&lt;&#x2F;code&gt; is a hardcoded constant set to &lt;code&gt;12,500,000&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;keeping-gaslimit-in-block-headers&quot;&gt;Keeping gasLimit in Block Headers&lt;&#x2F;h3&gt;
&lt;p&gt;While it would be possible to remove the &lt;code&gt;gasLimit&lt;&#x2F;code&gt; field from block headers, it would change the data structure to be hashed, which could lead to unintended consequences. It is therefore easier to leave the gasLimit as part of block headers.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;chosen-gas-limit&quot;&gt;Chosen Gas Limit&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;12,500,000&lt;&#x2F;code&gt; value is being proposed as it&#x27;s the current block gas limit as of time of writing this EIP. The actual amount could be altered with a subsequent EIP to avoid deviating from the core intent of this EIP.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP is backward compatible.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;Rapid changes to the gas limit will likely be more difficult to execute, which could be problematic if an urgent situation arise that required changing the gas limit.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Limit account nonce to 2^52</title>
        <published>2021-03-07T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Micah Zoltu</name><uri>https://github.com/MicahZoltu</uri>
	</author>
	
	<author>
		<name>Alex Beregszaszi</name><uri>https://github.com/axic</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/3338/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-2681-limit-account-nonce-to-2-64-1/4324" />
        

        <id>https://wg-eips.ritovision.com/3338/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        

        
        <category
            term="tag:eip:3338"
            label="EIP-3338" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/3338/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;Limit account nonce to be between &lt;code&gt;0&lt;&#x2F;code&gt; and &lt;code&gt;2^52&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;Account nonces are currently specified to be arbitrarily long unsigned integers. Dealing with arbitrary length data in the state witnesses is not optimal, therefore this EIP will allow proofs to represent the nonce in a more optimized way.&lt;&#x2F;p&gt;
&lt;p&gt;Additionally it could prove beneficial to transaction formats, where some improvements are potentially sought by at least three other proposals.&lt;&#x2F;p&gt;
&lt;p&gt;Lastly, this facilitates a minor optimisation in clients, because the nonce no longer needs to be kept as a 256-bit number.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;If &lt;code&gt;block.number &amp;gt;= FORK_BLOCK&lt;&#x2F;code&gt; introduce two new restrictions:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Consider any transaction invalid, where the nonce exceeds &lt;code&gt;2^52&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;The &lt;code&gt;CREATE&lt;&#x2F;code&gt; instruction to abort with an exceptional halt, where the account nonce is &lt;code&gt;2^52&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;It is unlikely for any nonce to reach or exceed the proposed limit. If one would want to reach that limit via external transactions, it would cost at least &lt;code&gt;21000 * (2^64-1) = 387_381_625_547_900_583_915_000&lt;&#x2F;code&gt; gas.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;It must be noted that in the past, in the Morden testnet, each new account had a starting nonce of &lt;code&gt;2^20&lt;&#x2F;code&gt; in order to differentiate transactions from mainnet transactions.
This mode of replay protection is out of fashion since &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;155&#x2F;&quot;&gt;EIP-155&lt;&#x2F;a&gt; introduced a more elegant way using chain identifiers.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Most clients already consider the nonce field to be 64-bit, such as go-ethereum.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;All integer values &amp;lt;= 2^52 can be encoded in a 64-bit floating point without any loss of precision, making this value easy to work with in languages that only have floating point number support.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;While this is a breaking change, no actual effect should be visible:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;There is no account in the state currently which would have a nonce exceeding that value. As of November 2020, the account &lt;code&gt;0xea674fdde714fd979de3edf0f56aa9716b898ec8&lt;&#x2F;code&gt; is responsible for the highest account nonce at approximately 29 million.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;None.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>MEDGASPRICE Opcode</title>
        <published>2021-03-05T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Justice Hudson</name><uri>https://github.com/jchancehud</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/3332/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/medgasprice-opcode-eip/5480" />
        

        <id>https://wg-eips.ritovision.com/3332/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        

        
        <category
            term="tag:eip:3332"
            label="EIP-3332" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/3332/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;An opcode for getting the median gas price of the parent block.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;Adds &lt;code&gt;MEDGASPRICE (0x46)&lt;&#x2F;code&gt; opcode that returns the median gas price for the parent block.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;With the emergence of rollups as core mechanisms in scaling Ethereum there are a number of common transactions that can be front-run. Optimistic rollups rely on the submission of fraud proofs to maintain the integrity of their systems. As a result actors submitting fraud proofs typically receive a financial reward for doing so. This opens a trivial front-running strategy of watching the mempool for fraud proof submissions and copying such transactions with a much higher gas price to reap the reward. Such front-runners do not perform validation independently and de-incentivize others from performing validation. Adding a mechanism enforcing an upper bound on gas prices for a transaction could be an effective defense against such front-running attacks.&lt;&#x2F;p&gt;
&lt;p&gt;Consider a smart contract that wants to implement a first come first serve mechanism. Such a mechanism must defeat the inherently pay-to-win nature of the gas price market. Enforcing a maximum gas price for a transaction relies on the fact that transactions of the same gas price are generally processed in a first in first out way by Ethereum miners. A contract currently has few options for setting a max gas price:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Set a constant value at a reasonable rate given the current gas prices&lt;&#x2F;li&gt;
&lt;li&gt;Allow an individual or group of individuals to adjust a max gas price over time&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;More elaborate schemes could likely be constructed but all would involve storing gas price information on chain increasing the number of transactions and costing Ether.&lt;&#x2F;p&gt;
&lt;p&gt;Given a median gas price opcode a contract can set a maximum gas price as a function of the last blocks gas price. This can easily be implemented using a strategy such as the following:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;&#x2F; Assume that block.medgasprice is bound to MEDGASPRICE (0x46)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;function submitFraudProof(bytes calldata proof) public {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  require(tx.gasprice &amp;lt;= maxGasPrice());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  &#x2F;&#x2F; process the fraud proof and provide a reward (if valid)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;function maxGasPrice() public view returns (uint) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  return 3 * block.medgasprice;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Given the contract implementation above a client would simply call &lt;code&gt;maxGasPrice&lt;&#x2F;code&gt; to determine the gas price to use when submitting a fraud proof. This particular implementation allows up to 3x the median gas price of the last block to be used.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;forwards-compatibility&quot;&gt;Forwards Compatibility&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;eips.ethereum.org&#x2F;EIPS&#x2F;eip-1559&quot;&gt;EIP-1559&lt;&#x2F;a&gt; plans to change the fee market in a number of ways. Most notably is the creation of a base fee that is burned. In this context an &quot;inclusion fee&quot; still exists as a part of the total fee. Consider the following two cases:&lt;&#x2F;p&gt;
&lt;h4 id=&quot;block-sizes-are-increasing-all-available-gas-is-being-consumed&quot;&gt;Block sizes are increasing (all available gas is being consumed)&lt;&#x2F;h4&gt;
&lt;p&gt;In this case there will be bidding contention in the inclusion fee to incentivize miners to include transactions. A median gas price operator would still be helpful as an attacker could supply a high inclusion fee to bump honest transactions.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;block-sizes-are-decreasing-excess-gas-is-available&quot;&gt;Block sizes are decreasing (excess gas is available)&lt;&#x2F;h4&gt;
&lt;p&gt;In this case an attacker could specify a high inclusion fee to incentivize miners to include their transaction early in the block. Miners are incentivized to do so as including expensive transactions first reduces the risk of a revert (and partial refund) occurring.&lt;&#x2F;p&gt;
&lt;p&gt;Given these two cases this EIP seems relevant in the context of EIP-1559.&lt;&#x2F;p&gt;
&lt;p&gt;Post EIP-1559 &lt;code&gt;MEDGASPRICE (0x46)&lt;&#x2F;code&gt; should return the median &lt;code&gt;effective_gas_price&lt;&#x2F;code&gt; of the previous block.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;eips.ethereum.org&#x2F;EIPS&#x2F;eip-3198&quot;&gt;EIP-3198&lt;&#x2F;a&gt; is required for the above strategies to be implemented. With the inclusion of &lt;code&gt;BASEFEE (0x48)&lt;&#x2F;code&gt; a contract can subtract the &lt;code&gt;base_fee_per_gas&lt;&#x2F;code&gt; from the &lt;code&gt;effective_gas_price&lt;&#x2F;code&gt; to determine the inclusion fee per gas being paid for the transaction and thus implement an upper bound.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;If &lt;code&gt;block.number &amp;gt;= TBD&lt;&#x2F;code&gt;, add a new opcode &lt;code&gt;MEDGASPRICE (0x46)&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;p&gt;Pushes the median gas price of the parent block onto the stack.&lt;&#x2F;p&gt;
&lt;p&gt;|  Op  	| Input 	| Output 	| Cost 	|
|:----:	|:-----:	|:------:	|:----:	|
| 0x46 	|   0   	|    1   	|   8  	|&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;Having access to the current gas price economy allows contracts to implement more robust and automated logic surrounding acceptable transaction gas prices.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;naming-note&quot;&gt;Naming note&lt;&#x2F;h3&gt;
&lt;p&gt;The name &lt;code&gt;MEDGASPRICE&lt;&#x2F;code&gt; was chosen because the median gas price of the network can only be calculated from the latest complete block. Thus transactions being executed should expect the median gas price to be calculated from the previous block.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;There are no known backwards incompabitility issues.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;The strategy described for preventing front-running by setting an upper bound on the gas price of transactions has a few caveats:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;It relies on miners being impartial. Reordering transactions with the same gas price is a trivial means of defeating this strategy.&lt;&#x2F;li&gt;
&lt;li&gt;The value returned by &lt;code&gt;MEDGASPRICE (0x46)&lt;&#x2F;code&gt; may fluctuate rapidly between blocks. If a transaction is not included immediately it may either fail (if the gas price drops) or become vulnerable to front-running (if the gas price increases).&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>AUTH and AUTHCALL opcodes</title>
        <published>2020-10-15T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:28+00:00</updated>
	
	
	<author>
		<name>Sam Wilson</name><uri>https://github.com/SamWilsn</uri>
	</author>
	
	<author>
		<name>Ansgar Dietrichs</name><uri>https://github.com/adietrichs</uri>
	</author>
	
	<author>
		<name>Matt Garnett</name><uri>https://github.com/lightclient</uri>
	</author>
	
	<author>
		<name>Micah Zoltu</name><uri>https://github.com/micahzoltu</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/3074/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-3074-sponsored-transaction-precompile/4880" />
        

        <id>https://wg-eips.ritovision.com/3074/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        

        
        <category
            term="tag:eip:3074"
            label="EIP-3074" />
        

        
        

        
        <summary type="html">Allow externally owned accounts to delegate control to a contract.</summary>
        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/3074/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP introduces two EVM instructions &lt;code&gt;AUTH&lt;&#x2F;code&gt; and &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt;. The first sets a context variable &lt;code&gt;authorized&lt;&#x2F;code&gt; based on an ECDSA signature. The second sends a call as the &lt;code&gt;authorized&lt;&#x2F;code&gt; account. This essentially delegates control of the externally owned account (EOA) to a smart contract.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;Adding more functionality to EOAs has been a long-standing feature request. The requests have spanned from implementing batching capabilities, allowing for gas sponsoring, expirations, scripting, and beyond. These changes often mean increased complexity and rigidity of the protocol. In some cases, it also means increased attack surfaces.&lt;&#x2F;p&gt;
&lt;p&gt;This EIP takes a different approach. Instead of enshrining these capabilities in the protocol as transaction validity requirements, it allows users to &lt;em&gt;delegate&lt;&#x2F;em&gt; control of their EOA to a contract. This gives developers a flexible framework for developing novel transaction schemes for EOAs. A motivating use case of this EIP is that it allows any EOA to act like a smart contract wallet &lt;em&gt;without&lt;&#x2F;em&gt; deploying a contract.&lt;&#x2F;p&gt;
&lt;p&gt;Although this EIP provides great benefit to individual users, the leading motivation for this EIP is &quot;sponsored transactions&quot;. This is where the fee for a transaction is provided by a different account than the one that originates the call.&lt;&#x2F;p&gt;
&lt;p&gt;With the extraordinary growth of tokens on Ethereum, it has become common for EOAs to hold valuable assets without holding any ether at all. Today, these assets must be converted to ether before they can be used to pay gas fees. However, without ether to pay for the conversion, it&#x27;s impossible to convert them. Sponsored transactions break the circular dependency.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;conventions&quot;&gt;Conventions&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;top - N&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt; - the &lt;code&gt;N&lt;&#x2F;code&gt;th most recently pushed value on the EVM stack, where &lt;code&gt;top - 0&lt;&#x2F;code&gt; is the most recent.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;||&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt; - byte concatenation operator.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;invalid execution&lt;&#x2F;strong&gt; - execution that is invalid and must exit the current execution frame immediately, consuming all remaining gas (in the same way as a stack underflow or invalid jump).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;constants&quot;&gt;Constants&lt;&#x2F;h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Constant&lt;&#x2F;th&gt;&lt;th&gt;Value&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;MAGIC&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;0x04&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;&lt;code&gt;MAGIC&lt;&#x2F;code&gt; is used for &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;3074&#x2F;&quot;&gt;EIP-3074&lt;&#x2F;a&gt; signatures to prevent signature collisions with other signing formats.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;context-variables&quot;&gt;Context Variables&lt;&#x2F;h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Variable&lt;&#x2F;th&gt;&lt;th&gt;Type&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Initial Value&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;authorized&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;address&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;unset&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;The context variable &lt;code&gt;authorized&lt;&#x2F;code&gt; shall indicate the active account for &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; instructions in the current frame of execution. If set, &lt;code&gt;authorized&lt;&#x2F;code&gt; shall only contain an account which has given the contract authorization to act on its behalf. An unset value shall indicate that no such account is set and that there is not yet an active account for &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; instructions in the current frame of execution.&lt;&#x2F;p&gt;
&lt;p&gt;The variable has the same scope as the program counter -- &lt;code&gt;authorized&lt;&#x2F;code&gt; persists throughout a single frame of execution of the contract, but is not passed through any calls (including &lt;code&gt;DELEGATECALL&lt;&#x2F;code&gt;). If the same contract is being executed in separate execution frames (ex. a &lt;code&gt;CALL&lt;&#x2F;code&gt; to self), both frames shall have independent values for &lt;code&gt;authorized&lt;&#x2F;code&gt;. Initially in each frame of execution, &lt;code&gt;authorized&lt;&#x2F;code&gt; is always unset, even if a previous execution frame for the same contract has a value.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;auth-0xf6&quot;&gt;&lt;code&gt;AUTH&lt;&#x2F;code&gt; (&lt;code&gt;0xf6&lt;&#x2F;code&gt;)&lt;&#x2F;h3&gt;
&lt;p&gt;A new opcode &lt;code&gt;AUTH&lt;&#x2F;code&gt; shall be created at &lt;code&gt;0xf6&lt;&#x2F;code&gt;. It shall take three stack element inputs (the last two describing a memory range), and it shall return one stack element.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;input&quot;&gt;Input&lt;&#x2F;h4&gt;
&lt;h5 id=&quot;stack&quot;&gt;Stack&lt;&#x2F;h5&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Stack&lt;&#x2F;th&gt;&lt;th&gt;Value&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 0&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;authority&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 1&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;offset&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 2&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;length&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h5 id=&quot;memory&quot;&gt;Memory&lt;&#x2F;h5&gt;
&lt;p&gt;The final two stack arguments (&lt;code&gt;offset&lt;&#x2F;code&gt; and &lt;code&gt;length&lt;&#x2F;code&gt;) describe a range of memory. The format of the contents of that range is:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;memory[offset    : offset+1 ]&lt;&#x2F;code&gt; - &lt;code&gt;yParity&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;memory[offset+1  : offset+33]&lt;&#x2F;code&gt; - &lt;code&gt;r&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;memory[offset+33 : offset+65]&lt;&#x2F;code&gt; - &lt;code&gt;s&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;memory[offset+65 : offset+97]&lt;&#x2F;code&gt; - &lt;code&gt;commit&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h4 id=&quot;output&quot;&gt;Output&lt;&#x2F;h4&gt;
&lt;h5 id=&quot;stack-1&quot;&gt;Stack&lt;&#x2F;h5&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Stack&lt;&#x2F;th&gt;&lt;th&gt;Value&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 0&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;success&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h5 id=&quot;memory-1&quot;&gt;Memory&lt;&#x2F;h5&gt;
&lt;p&gt;Memory is not modified by this instruction.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;behavior&quot;&gt;Behavior&lt;&#x2F;h4&gt;
&lt;p&gt;If &lt;code&gt;length&lt;&#x2F;code&gt; is greater than 97, the extra bytes are ignored for signature verification (they still incur a gas cost as defined later). Bytes outside the range (in the event &lt;code&gt;length&lt;&#x2F;code&gt; is less than 97) are treated as if they had been zeroes.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;authority&lt;&#x2F;code&gt; is the address of the account which generated the signature. If &lt;code&gt;EXTCODESIZE&lt;&#x2F;code&gt; of &lt;code&gt;authority&lt;&#x2F;code&gt; is not zero, consider the operation unsuccessful and unset &lt;code&gt;authorized&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The arguments (&lt;code&gt;yParity&lt;&#x2F;code&gt;, &lt;code&gt;r&lt;&#x2F;code&gt;, &lt;code&gt;s&lt;&#x2F;code&gt;) are interpreted as an ECDSA signature on the secp256k1 curve over the message &lt;code&gt;keccak256(MAGIC || chainId || nonce || invokerAddress || commit)&lt;&#x2F;code&gt;, where:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;chainId&lt;&#x2F;code&gt; is the current chain&#x27;s &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;155&#x2F;&quot;&gt;EIP-155&lt;&#x2F;a&gt; unique identifier padded to 32 bytes.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;nonce&lt;&#x2F;code&gt; is the signer&#x27;s current nonce, left-padded to 32 bytes.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;invokerAddress&lt;&#x2F;code&gt; is the address of the contract executing &lt;code&gt;AUTH&lt;&#x2F;code&gt; (or the active state address in the context of &lt;code&gt;CALLCODE&lt;&#x2F;code&gt; or &lt;code&gt;DELEGATECALL&lt;&#x2F;code&gt;), left-padded with zeroes to a total of 32 bytes (ex. &lt;code&gt;0x000000000000000000000000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&lt;&#x2F;code&gt;).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;commit&lt;&#x2F;code&gt;, one of the arguments passed into &lt;code&gt;AUTH&lt;&#x2F;code&gt;, is a 32-byte value that can be used to commit to specific additional validity conditions in the invoker&#x27;s pre-processing logic.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Signature validity and signer recovery are handled analogously to transaction signatures, including the stricter &lt;code&gt;s&lt;&#x2F;code&gt; range for preventing ECDSA malleability. Note that &lt;code&gt;yParity&lt;&#x2F;code&gt; is expected to be &lt;code&gt;0&lt;&#x2F;code&gt; or &lt;code&gt;1&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;If the signature is valid and the signer address is equal to &lt;code&gt;authority&lt;&#x2F;code&gt;, the context variable &lt;code&gt;authorized&lt;&#x2F;code&gt; is set to the &lt;code&gt;authority&lt;&#x2F;code&gt;. In particular, this is also true if &lt;code&gt;authority == tx.origin&lt;&#x2F;code&gt;, which used to be handled separately in earlier versions of this EIP (see Security Considerations). If the signature is instead invalid or the signer address does not equal &lt;code&gt;authority&lt;&#x2F;code&gt;, &lt;code&gt;authorized&lt;&#x2F;code&gt; is reset to an unset value.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;AUTH&lt;&#x2F;code&gt; returns &lt;code&gt;1&lt;&#x2F;code&gt; if &lt;code&gt;authorized&lt;&#x2F;code&gt; is set, or &lt;code&gt;0&lt;&#x2F;code&gt; otherwise.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;gas-cost&quot;&gt;Gas Cost&lt;&#x2F;h4&gt;
&lt;p&gt;The gas cost for &lt;code&gt;AUTH&lt;&#x2F;code&gt; is equal to the sum of:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;fixed fee &lt;code&gt;3100&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;memory expansion gas cost (&lt;code&gt;auth_memory_expansion_fee&lt;&#x2F;code&gt;).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;100&lt;&#x2F;code&gt; if &lt;code&gt;authority&lt;&#x2F;code&gt; is warm, &lt;code&gt;2600&lt;&#x2F;code&gt; if it is cold (per &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2929&#x2F;&quot;&gt;EIP-2929&lt;&#x2F;a&gt;).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The fixed fee is equal to the cost for the &lt;code&gt;ecrecover&lt;&#x2F;code&gt; precompile, plus a bit extra to cover a keccak256 hash and some additional logic.&lt;&#x2F;p&gt;
&lt;p&gt;The memory expansion gas cost (&lt;code&gt;auth_memory_expansion_fee&lt;&#x2F;code&gt;) shall be calculated in the same way as &lt;code&gt;RETURN&lt;&#x2F;code&gt;, where memory is expanded if the specified range is outside the current allocation.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;authcall-0xf7&quot;&gt;&lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; (&lt;code&gt;0xf7&lt;&#x2F;code&gt;)&lt;&#x2F;h3&gt;
&lt;p&gt;A new opcode &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; shall be created at &lt;code&gt;0xf7&lt;&#x2F;code&gt;. It shall take seven stack elements and return one stack element. It matches the behavior of the existing &lt;code&gt;CALL&lt;&#x2F;code&gt; (&lt;code&gt;0xF1&lt;&#x2F;code&gt;) instruction, except where noted below.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;input-1&quot;&gt;Input&lt;&#x2F;h4&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Stack&lt;&#x2F;th&gt;&lt;th&gt;Value&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 0&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;gas&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 1&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;addr&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 2&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;value&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 3&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;argsOffset&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 4&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;argsLength&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 5&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;retOffset&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 6&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;retLength&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h4 id=&quot;output-1&quot;&gt;Output&lt;&#x2F;h4&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Stack&lt;&#x2F;th&gt;&lt;th&gt;Value&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;top - 0&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;success&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h4 id=&quot;behavior-1&quot;&gt;Behavior&lt;&#x2F;h4&gt;
&lt;p&gt;&lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; is interpreted the same as &lt;code&gt;CALL&lt;&#x2F;code&gt;, except for (note: this list is also the order of precedence for the logical checks):&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;authorized&lt;&#x2F;code&gt; is unset, execution is invalid (as defined above). Otherwise, the caller address for the call is set to &lt;code&gt;authorized&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;The gas cost, including how much gas is available for the subcall, is specified in the Gas Cost section.&lt;&#x2F;li&gt;
&lt;li&gt;If the &lt;code&gt;gas&lt;&#x2F;code&gt; operand is equal to &lt;code&gt;0&lt;&#x2F;code&gt;, the instruction will send all available gas as per &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;150&#x2F;&quot;&gt;EIP-150&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;If the gas available for the subcall would be less than &lt;code&gt;gas&lt;&#x2F;code&gt;, execution is invalid.&lt;&#x2F;li&gt;
&lt;li&gt;There is no gas stipend, even for non-zero &lt;code&gt;value&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;value&lt;&#x2F;code&gt; is deducted from the balance of &lt;code&gt;authorized&lt;&#x2F;code&gt;. If &lt;code&gt;value&lt;&#x2F;code&gt; is higher than the balance of &lt;code&gt;authorized&lt;&#x2F;code&gt;, execution is invalid.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; must increase the call depth by one. &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; must not increase the call depth by two as it would if it first called into the authorized account and then into the target.&lt;&#x2F;p&gt;
&lt;p&gt;The return data area accessed with &lt;code&gt;RETURNDATASIZE&lt;&#x2F;code&gt; (&lt;code&gt;0x3d&lt;&#x2F;code&gt;) and &lt;code&gt;RETURNDATACOPY&lt;&#x2F;code&gt; (&lt;code&gt;0x3e&lt;&#x2F;code&gt;) must be set in the same way as the &lt;code&gt;CALL&lt;&#x2F;code&gt; instruction.&lt;&#x2F;p&gt;
&lt;p&gt;Importantly, &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; does not reset &lt;code&gt;authorized&lt;&#x2F;code&gt;, but leaves it unchanged.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;gas-cost-1&quot;&gt;Gas Cost&lt;&#x2F;h4&gt;
&lt;p&gt;The gas cost for &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; shall be the &lt;strong&gt;sum&lt;&#x2F;strong&gt; of:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;static gas cost (&lt;code&gt;warm_storage_read&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;memory expansion gas cost (&lt;code&gt;memory_expansion_fee&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;dynamic gas cost (&lt;code&gt;dynamic_gas&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;gas available for execution in the subcall (&lt;code&gt;subcall_gas&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The memory expansion gas cost (&lt;code&gt;memory_expansion_fee&lt;&#x2F;code&gt;) shall be calculated in the same way as &lt;code&gt;CALL&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The dynamic gas portion (&lt;code&gt;dynamic_gas&lt;&#x2F;code&gt;), and the gas available for execution in the subcall (&lt;code&gt;subcall_gas&lt;&#x2F;code&gt;) shall be calculated as:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;dynamic_gas = 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;if addr not in accessed_addresses:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    dynamic_gas += 2500         # cold_account_access - warm_storage_read&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;if value &amp;gt; 0:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    dynamic_gas += 6700         # NB: Not 9000, like in `CALL`&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    if is_empty(addr):&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        dynamic_gas += 25000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;remaining_gas = available_gas - dynamic_gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;all_but_one_64th = remaining_gas - (remaining_gas &#x2F;&#x2F; 64)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;if gas == 0:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    subcall_gas = all_but_one_64th&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;elif all_but_one_64th &amp;lt; gas:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    raise                       # Execution is invalid.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;else:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    subcall_gas = gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;As with &lt;code&gt;CALL&lt;&#x2F;code&gt;, the full gas cost is charged immediately, independently of actually executing the call.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;signature-in-memory&quot;&gt;Signature in Memory&lt;&#x2F;h3&gt;
&lt;p&gt;The signature format (&lt;code&gt;yParity&lt;&#x2F;code&gt;, &lt;code&gt;r&lt;&#x2F;code&gt;, and &lt;code&gt;s&lt;&#x2F;code&gt;) is fixed, so it might seem curious that &lt;code&gt;auth&lt;&#x2F;code&gt; accepts a dynamic memory range. The signature is placed in memory so that &lt;code&gt;auth&lt;&#x2F;code&gt; can be upgraded in the future to work with contract accounts (which might use non-ECDSA signatures) and not just EOAs.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;signing-address-auth-argument&quot;&gt;Signing Address &lt;code&gt;auth&lt;&#x2F;code&gt; Argument&lt;&#x2F;h3&gt;
&lt;p&gt;Including &lt;code&gt;authority&lt;&#x2F;code&gt; (the signing address) as an argument to &lt;code&gt;auth&lt;&#x2F;code&gt; allows future upgrades to the instruction to work with contract accounts, and not just EOAs.&lt;&#x2F;p&gt;
&lt;p&gt;If &lt;code&gt;authority&lt;&#x2F;code&gt; were not included and multiple signature schemes allowed, it would not be possible to compute the authorizing account&#x27;s address from just the signature alone.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;reserving-one-sixty-fourth-of-available-gas&quot;&gt;Reserving One Sixty-Fourth of Available Gas&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; will not pass more than 63&#x2F;64th of the available gas for the reasons enumerated in &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;150&#x2F;&quot;&gt;EIP-150&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;throwing-for-unset-authorized-during-authcall&quot;&gt;Throwing for Unset &lt;code&gt;authorized&lt;&#x2F;code&gt; During &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;A well-behaved contract should never reach an &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; without having successfully set &lt;code&gt;authorized&lt;&#x2F;code&gt; beforehand. The safest behavior, therefore, is to exit the current frame of execution immediately. This is especially important in the context of transaction sponsoring &#x2F; relaying, which is expected to be one of the main use cases for this EIP. In a sponsored transaction, the inability to distinguish between a sponsee-attributable fault (like a failing sub-call) and a sponsor-attributable fault (like a failing &lt;code&gt;AUTH&lt;&#x2F;code&gt;) is especially dangerous and should be prevented because it charges unfair fees to the sponsee.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;another-sponsored-transaction-eip&quot;&gt;Another Sponsored Transaction EIP&lt;&#x2F;h3&gt;
&lt;p&gt;There are two general approaches to separating the &quot;fee payer&quot; from the &quot;action originator&quot;.&lt;&#x2F;p&gt;
&lt;p&gt;The first is introducing a new transaction type. This requires significant changes to clients to support and is generally less upgradeable than other solutions (e.g. this EIP). This approach is also not immediately compatible with account abstraction (AA). These proposals require a &lt;em&gt;signed&lt;&#x2F;em&gt; transaction from the sponsor&#x27;s account, which is not possible from an AA contract, because it has no private key to sign with. The main advantage of new transaction types is that the validity requirements are enforced by the protocol, therefore invalid transactions do not pollute block space.&lt;&#x2F;p&gt;
&lt;p&gt;The other main approach is to introduce a new mechanism in the EVM to masquerade as other accounts. This EIP introduces &lt;code&gt;AUTH&lt;&#x2F;code&gt; and &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; to make calls as EOAs. There are many different permutations of this mechanism. An alternative mechanism would be to add an opcode that can make arbitrary calls based on a similar address creation scheme as &lt;code&gt;CREATE2&lt;&#x2F;code&gt;. Although this mechanism would not benefit users today, it would immediately allow for those accounts to send and receive ether -- making it feel like a more first-class primitive.&lt;&#x2F;p&gt;
&lt;p&gt;Besides better compatibility with AA, introducing a new mechanism into the EVM is a much less intrusive change than a new transaction type. This approach requires no changes in existing wallets, and little change in other tooling.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;AUTHCALL&lt;&#x2F;code&gt;&#x27;s single deviation from &lt;code&gt;CALL&lt;&#x2F;code&gt; is to set &lt;code&gt;CALLER&lt;&#x2F;code&gt;. It implements the minimal functionality to enable sender abstraction for sponsored transactions. This single mindedness makes &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; significantly more composable with existing Ethereum features.&lt;&#x2F;p&gt;
&lt;p&gt;More logic can be implemented around the &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; instruction, giving more control to invokers and sponsors without sacrificing security or user experience for sponsees.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;what-to-sign&quot;&gt;What to Sign?&lt;&#x2F;h3&gt;
&lt;p&gt;As originally written, this proposal specified a precompile with storage to track nonces. Since a precompile with storage is unprecedented, a revision moved replay protection into the invoker contract, necessitating a certain level of user trust in the invoker. Expanding on this idea of trusted invokers, the other signed fields were eventually eliminated, one by one, until only &lt;code&gt;invoker&lt;&#x2F;code&gt; and &lt;code&gt;commit&lt;&#x2F;code&gt; remained. To appease concerns about cross-chain replay attacks and irrevocable signatures, the &lt;code&gt;chainId&lt;&#x2F;code&gt; and &lt;code&gt;nonce&lt;&#x2F;code&gt; fields returned to the signed message.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;code&gt;invoker&lt;&#x2F;code&gt; binds a particular signed message to a single invoker. If invoker was not part of the message, any invoker could reuse the signature to completely compromise the EOA. This allows users to trust that their message will be validated as they expect, particularly the values committed to in &lt;code&gt;commit&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;understanding-commit&quot;&gt;Understanding &lt;code&gt;commit&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Earlier iterations of this EIP included mechanisms for replay protection, and also signed over value, gas, and other arguments to &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt;. After further investigation, we revised this EIP to its current state: explicitly delegate these responsibilities to the invoker contract.&lt;&#x2F;p&gt;
&lt;p&gt;A user will specifically interact with an invoker they trust. Because they trust this contract to execute faithfully, they will &quot;commit&quot; to certain properties of a call they would like to make by computing a hash of the call values. They can be certain that the invoker will only allow the call to proceed if it is able to verify the values committed to (e.g. a nonce to protect against replay attacks). This certainty arises from the &lt;code&gt;commit&lt;&#x2F;code&gt; value that is signed over by the user. This is the hash of values which the invoker will validate. A safe invoker should accept the values from the user and compute the commit hash itself. This ensures that invoker operated on the same input that user authorized.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;3074&#x2F;.&#x2F;assets&#x2F;auth-msg.png&quot; alt=&quot;auth message format&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Using &lt;code&gt;commit&lt;&#x2F;code&gt; as a hash of values allows for invokers to implement arbitrary constraints. For example, they could allow accounts to have &lt;code&gt;N&lt;&#x2F;code&gt; parallel nonces. Or, they could allow a user to commit to multiple calls with a single signature. This would allow multi-tx flows, such as &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;20&#x2F;&quot;&gt;ERC-20&lt;&#x2F;a&gt; &lt;code&gt;approve&lt;&#x2F;code&gt;-&lt;code&gt;transfer&lt;&#x2F;code&gt; actions, to be condensed into a single transaction with a single signature verification. A commitment to multiple calls would look something like the diagram below.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;3074&#x2F;.&#x2F;assets&#x2F;auth-msg-multi-call.png&quot; alt=&quot;multi-call auth message&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Another interesting use is to delegate control of the EOA to other key(s). This would mean the EOA signs a &lt;code&gt;commit&lt;&#x2F;code&gt; message with the address of the key(s) and an access policy, if applicable. When the delegate wants to make a call as the EOA it will construct a signature over the invoker-specified call format and relay it (with the actual call data) onto chain with the signature and commit that granted it access to the account. The invoker will then be able to determine that the EOA has allowed this alternative key to make calls on its behalf.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;3074&#x2F;.&#x2F;assets&#x2F;auth-msg-delegate.png&quot; alt=&quot;delegate auth message&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;invoker-contracts&quot;&gt;Invoker Contracts&lt;&#x2F;h3&gt;
&lt;p&gt;The invoker contract is a trustless intermediary between the sponsor and sponsee. A sponsee signs over &lt;code&gt;invoker&lt;&#x2F;code&gt; to require the transaction to be processed only by a contract they trust. This allows them to interact with sponsors without needing to trust them.&lt;&#x2F;p&gt;
&lt;p&gt;Choosing an invoker is similar to choosing a smart contract wallet implementation. It&#x27;s important to choose one that has been thoroughly reviewed, tested, and accepted by the community as secure. We expect a few invoker designs to be utilized by most major transaction relay providers, with a few outliers that offer more novel mechanisms.&lt;&#x2F;p&gt;
&lt;p&gt;An important note is that invoker contracts &lt;strong&gt;MUST NOT&lt;&#x2F;strong&gt; be upgradeable. If an invoker can be redeployed to the same address with different code, it would be possible to redeploy the invoker with code that does not properly verify &lt;code&gt;commit&lt;&#x2F;code&gt; and any account that signed a message over that invoker would be compromised. Although this sounds scary, it is no different than using a smart contract wallet via &lt;code&gt;DELEGATECALL&lt;&#x2F;code&gt;. If the wallet is redeployed with different logic, all wallets using its code could be compromised.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;on-call-depth&quot;&gt;On Call Depth&lt;&#x2F;h3&gt;
&lt;p&gt;The EVM limits the maximum number of nested calls, and naively allowing a sponsor to manipulate the call depth before reaching the invoker would introduce a griefing attack against the sponsee. That said, with the 63&#x2F;64th gas rule, and the cost of &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt;, the stack is effectively limited to a much smaller depth than the hard maximum by the &lt;code&gt;gas&lt;&#x2F;code&gt; parameter.&lt;&#x2F;p&gt;
&lt;p&gt;It is, therefore, sufficient for the invoker to guarantee a minimum amount of gas, because there is no way to reach the hard maximum call depth with any reasonable (i.e. less than billions) amount of gas.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;source-of-value&quot;&gt;Source of &lt;code&gt;value&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;In previous iterations of this EIP, it was thought that deducting value from an EOA mid-execution was problematic. This was due to an invariant of pending transactions which allows tx pools to statically determine the validity of a given transaction.&lt;&#x2F;p&gt;
&lt;p&gt;However, after further investigation we found that breaking the invariant is safe. This is mostly due to the fact that the worst case is similar in both instances.&lt;&#x2F;p&gt;
&lt;p&gt;Currently an attacker can queue many transactions in the tx pool, across many accounts, and invalidate them all at once with a block where each of the queued accounts send a tx moving their entire balance. This attack will become easier and cheaper after this EIP, because it will no longer require direct access to the block builder and will not cost a full 21000 gas to originate each tx. However, the attack does not have a substantial impact on the network, so reducing the difficulty and cost is not of concern.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;allowing-tx-origin-as-signer&quot;&gt;Allowing &lt;code&gt;tx.origin&lt;&#x2F;code&gt; as Signer&lt;&#x2F;h3&gt;
&lt;p&gt;Allowing &lt;code&gt;authorized&lt;&#x2F;code&gt; to equal &lt;code&gt;tx.origin&lt;&#x2F;code&gt; enables simple transaction batching, where the sender of the outer transaction would be the signing account. The ERC-20 approve-then-transfer pattern, which currently requires two separate transactions, could be completed in a single transaction with this proposal.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;AUTH&lt;&#x2F;code&gt; allows for signatures to be signed by &lt;code&gt;tx.origin&lt;&#x2F;code&gt;. For any such signatures, subsequent &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt;s have &lt;code&gt;msg.sender == tx.origin&lt;&#x2F;code&gt; in their first layer of execution. Without EIP-3074, this situation can only ever arise in the topmost execution layer of a transaction. This EIP breaks that invariant and so affects smart contracts containing &lt;code&gt;require(msg.sender == tx.origin)&lt;&#x2F;code&gt; checks. This check can be used for at least three purposes:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Ensuring that &lt;code&gt;msg.sender&lt;&#x2F;code&gt; is an EOA (given that &lt;code&gt;tx.origin&lt;&#x2F;code&gt; always has to be an EOA). This invariant does not depend on the execution layer depth and, therefore, is not affected.&lt;&#x2F;li&gt;
&lt;li&gt;Protecting against atomic sandwich attacks like flash loans, that rely on the ability to modify state before and after the execution of the target contract as part of the same atomic transaction. This protection would be broken by this EIP. However, relying on &lt;code&gt;tx.origin&lt;&#x2F;code&gt; in this way is considered bad practice, and can already be circumvented by miners conditionally including transactions in a block.&lt;&#x2F;li&gt;
&lt;li&gt;Preventing reentrancy.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Examples of (1) and (2) can be found in contracts deployed on Ethereum mainnet, with (1) being more common (and unaffected by this proposal.) On the other hand, use case (3) is more severely affected by this proposal, but the authors of this EIP did not find any examples of this form of reentrancy protection, though the search was non-exhaustive.&lt;&#x2F;p&gt;
&lt;p&gt;This distribution of occurrences—many (1), some (2), and no (3)—is exactly what the authors of this EIP expect, because:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Determining if &lt;code&gt;msg.sender&lt;&#x2F;code&gt; is an EOA without &lt;code&gt;tx.origin&lt;&#x2F;code&gt; is difficult (if not impossible.)&lt;&#x2F;li&gt;
&lt;li&gt;The only execution context which is safe from atomic sandwich attacks is the topmost context, and &lt;code&gt;tx.origin == msg.sender&lt;&#x2F;code&gt; is the only way to detect that context.&lt;&#x2F;li&gt;
&lt;li&gt;In contrast, there are many direct and flexible ways of preventing reentrancy (ex. using a storage variable.) Since &lt;code&gt;msg.sender == tx.origin&lt;&#x2F;code&gt; is only true in the topmost context, it would make an obscure tool for preventing reentrancy, rather than other more common approaches.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;There are other approaches to mitigate this restriction which do not break the invariant:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Set &lt;code&gt;tx.origin&lt;&#x2F;code&gt; to a constant &lt;code&gt;ENTRY_POINT&lt;&#x2F;code&gt; address for &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt;s.&lt;&#x2F;li&gt;
&lt;li&gt;Set &lt;code&gt;tx.origin&lt;&#x2F;code&gt; to the invoker address for &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt;s.&lt;&#x2F;li&gt;
&lt;li&gt;Set &lt;code&gt;tx.origin&lt;&#x2F;code&gt; to a special address derived from any of the sender, invoker, and&#x2F;or signer addresses.&lt;&#x2F;li&gt;
&lt;li&gt;Disallow &lt;code&gt;authorized == tx.origin&lt;&#x2F;code&gt;. This would make the simple batching use cases impossible, but could be relaxed in the future.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;authcall-cheaper-than-call-when-sending-value&quot;&gt;&lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; cheaper than &lt;code&gt;CALL&lt;&#x2F;code&gt; when sending value&lt;&#x2F;h3&gt;
&lt;p&gt;Sending non-zero value with &lt;code&gt;CALL&lt;&#x2F;code&gt; increases its cost by 9,000. Of that, 6,700 covers the increased overhead of the balance transfer and 2,300 is used as a stipend into the subcall to seed its gas counter. &lt;code&gt;AUTHCALL&lt;&#x2F;code&gt; does not provide a stipend and thus only charges the base 6,700.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;in-protocol-revocation&quot;&gt;In-Protocol Revocation&lt;&#x2F;h3&gt;
&lt;p&gt;This EIP has gone &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;3074&#x2F;#what-to-sign&quot;&gt;back and forth&lt;&#x2F;a&gt; on how to deal with &lt;code&gt;AUTH&lt;&#x2F;code&gt; message revocation. Without revocation, this EIP is a supremely powerful and flexible primitive for developers. However, it does have risk for users who use insecure and&#x2F;or actively malicious invokers.&lt;&#x2F;p&gt;
&lt;p&gt;Much of the risk is due to the new ability for users to batch many operations in a single transaction. It becomes easier for an account to be drained. This is a risk that will continue to grow, regardless of the adoption of this EIP, due to overwhelming desire for the feature and attempts to support it at the protocol level and at the app level.&lt;&#x2F;p&gt;
&lt;p&gt;A new class of risk is introduced for insecure and buggy invokers. If an invoker has implemented replay protection, as per the authors&#x27; recommendation, this should substantially contain the blast radius. However, if the bug allows an adversary to circumvent the replay protection mechanism, it may give them full access to any EOA which has interacted with the vulnerable invoker.&lt;&#x2F;p&gt;
&lt;p&gt;Although this is a truly catastrophic event which is not expected to be possible via reputable wallets, it is a serious consideration. Without in-protocol revocation, users have no way to remove their account from the vulnerable invoker.&lt;&#x2F;p&gt;
&lt;p&gt;For this reason, &lt;code&gt;AUTH&lt;&#x2F;code&gt; requires the &lt;code&gt;nonce&lt;&#x2F;code&gt; in the message to be equal to the signer&#x27;s current nonce. This way, a single tx from the EOA will cause the nonce to increase, invalidating all outstanding authorizations.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;failing-on-extcodesize-check&quot;&gt;Failing on &lt;code&gt;EXTCODESIZE&lt;&#x2F;code&gt; check&lt;&#x2F;h3&gt;
&lt;p&gt;In &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;3607&#x2F;&quot;&gt;EIP-3607&lt;&#x2F;a&gt;, it was determined that the protocol should reject any transaction which originates from an account with code. Although this EIP focused on transaction origination, the authors of EIP-3074 feel the intention is clear: an account that has both code and a known private key should not be allowed to make arbitrary calls on behalf of said account. Therefore, the property is upheld in this EIP. For full rationale, please refer to &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;3607&#x2F;&quot;&gt;EIP-3607&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;Although this EIP poses no issues for backwards compatibility, there are concerns that it limits future changes to accounts by further enshrining ECDSA signatures. For example, it might be desirable to eradicate the concept of EOAs altogether, and replace them with smart contract wallets that emulate the same behavior. This is fully compatible with the EIP as written, however, it gets tricky if users can then elect to &quot;upgrade&quot; their smart contract wallets to use other methods of authentication -- e.g. convert into a multi-sig. Without any changes, &lt;code&gt;AUTH&lt;&#x2F;code&gt; would not respect this new logic and continue allowing the old private key to perform actions on behalf of the account.&lt;&#x2F;p&gt;
&lt;p&gt;A solution to this would be at the same time that EOAs are removed, to modify the logic of &lt;code&gt;AUTH&lt;&#x2F;code&gt; to actually call into the account with some standard message and allow the account to determine if the signature &#x2F; witness is valid. Further research should be done to understand how invokers would need to change in this situation and how best to write them in a future-compatible manner.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;secure-invokers&quot;&gt;Secure Invokers&lt;&#x2F;h3&gt;
&lt;p&gt;The following is a non-exhaustive list of checks&#x2F;pitfalls&#x2F;conditions that invokers &lt;em&gt;should&lt;&#x2F;em&gt; be wary of:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Replay protection (ex. a nonce) should be implemented by the invoker, and included in &lt;code&gt;commit&lt;&#x2F;code&gt;. Without it, a malicious actor can reuse a signature, repeating its effects.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;value&lt;&#x2F;code&gt; should be included in &lt;code&gt;commit&lt;&#x2F;code&gt;. Without it, a malicious sponsor could cause unexpected effects in the callee.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;gas&lt;&#x2F;code&gt; should be included in &lt;code&gt;commit&lt;&#x2F;code&gt;. Without it, a malicious sponsor could cause the callee to run out of gas and fail, griefing the sponsee.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;addr&lt;&#x2F;code&gt; and &lt;code&gt;calldata&lt;&#x2F;code&gt; should be included in &lt;code&gt;commit&lt;&#x2F;code&gt;. Without them, a malicious actor may call arbitrary functions in arbitrary contracts.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;A poorly implemented invoker can &lt;em&gt;allow a malicious actor to take near complete control over a signer&#x27;s EOA&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;allowing-tx-origin-as-signer-1&quot;&gt;Allowing &lt;code&gt;tx.origin&lt;&#x2F;code&gt; as Signer&lt;&#x2F;h3&gt;
&lt;p&gt;Allowing &lt;code&gt;authorized&lt;&#x2F;code&gt; to equal &lt;code&gt;tx.origin&lt;&#x2F;code&gt; has the possibility to:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Break atomic sandwich protections which rely on &lt;code&gt;tx.origin&lt;&#x2F;code&gt;;&lt;&#x2F;li&gt;
&lt;li&gt;Break reentrancy guards of the style &lt;code&gt;require(tx.origin == msg.sender)&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The authors of this EIP believe the risks of allowing &lt;code&gt;authorized&lt;&#x2F;code&gt; to equal &lt;code&gt;tx.origin&lt;&#x2F;code&gt; are acceptable for the reasons outlined in the Rationale section.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;sponsored-transaction-relayers&quot;&gt;Sponsored Transaction Relayers&lt;&#x2F;h3&gt;
&lt;p&gt;It is possible for the &lt;code&gt;authorized&lt;&#x2F;code&gt; account to cause sponsored transaction relayers to spend gas without being reimbursed by either invalidating the authorization (i.e. increasing the account&#x27;s nonce) or by sweeping the relevant assets out of the account. Relayers should be designed with these cases in mind, possibly by requiring a bond to be deposited or by implementing a reputation system.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Wrapped Legacy Transactions</title>
        <published>2020-09-12T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Micah Zoltu</name><uri>https://github.com/MicahZoltu</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/2972/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-2972-wrapped-legacy-transactions/4604" />
        

        <id>https://wg-eips.ritovision.com/2972/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        

        
        <category
            term="tag:eip:2972"
            label="EIP-2972" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/2972/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;Two new transaction types for wrapping legacy transactions with and without a chain ID.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;Introduces two new &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2718&#x2F;&quot;&gt;EIP-2718&lt;&#x2F;a&gt; transactions that are signature compatible with legacy transactions and can be automatically upgraded by any client.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;0x00 || ssz.serialize(yParity, r, s, rlp([nonce, gasPrice, gasLimit, to, value, data]))&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;0x01 || ssz.serialize(yParity, r, s, rlp([nonce, gasPrice, gasLimit, to, value, data, chainId, 0, 0]))&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;We would like to eventually deprecate legacy transactions so we no longer have to retain code in the networking and signer layer that deals with them.
However, we also want to ensure that signatures for transactions that were generated prior to that deprecation are still valid and funds don&#x27;t end up stuck because of an inability to sign a new style transaction.
This EIP provides a mechanism for transmitting&#x2F;including transactions in a way that is &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2718&#x2F;&quot;&gt;EIP-2718&lt;&#x2F;a&gt; compatible while still being signature compatible with legacy transactions.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;definitions&quot;&gt;Definitions&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;||&lt;&#x2F;code&gt; is the byte&#x2F;byte-array concatenation operator.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;yParity&lt;&#x2F;code&gt; is the parity (0 for even, 1 for odd) of the &lt;code&gt;y&lt;&#x2F;code&gt; value of the curve point for which &lt;code&gt;r&lt;&#x2F;code&gt; is the &lt;code&gt;x&lt;&#x2F;code&gt; value in the secp256k1 signing process.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;transactions&quot;&gt;Transactions&lt;&#x2F;h3&gt;
&lt;p&gt;As of &lt;code&gt;FORK_BLOCK_NUMBER&lt;&#x2F;code&gt;, &lt;code&gt;0x00 || ssz.serialize(yParity, r, s, rlp([nonce, gasPrice, gasLimit, to, value, data]))&lt;&#x2F;code&gt; will be a valid transaction where:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;the RLP encoded transaction portion is signed&#x2F;processed&#x2F;handled exactly the same as legacy transactions were signed&#x2F;processed&#x2F;handled, with the exception of the final encoding&lt;&#x2F;li&gt;
&lt;li&gt;TODO: Hashing or Merkleizing for block transaction root&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;As of &lt;code&gt;FORK_BLOCK_NUMBER&lt;&#x2F;code&gt;, &lt;code&gt;0x01 || ssz.serialize(yParity, r, s, rlp([nonce, gasPrice, gasLimit, to, value, data, chainId, 0, 0]))&lt;&#x2F;code&gt; will be a valid transaction where:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;the RLP encoded transaction portion is signed&#x2F;processed&#x2F;handled exactly the same as legacy transactions were signed&#x2F;processed&#x2F;handled, with the exception of the final encoding&lt;&#x2F;li&gt;
&lt;li&gt;TODO: Hashing or Merkleizing for block transaction root&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The SSZ schema for both transaction types is:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Transaction[&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  yParity: boolean,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  r: bytes32,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  s: bytes32,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  signedData: bytes,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Note: &lt;code&gt;sszencode(yParity, r, s, rlp(...))&lt;&#x2F;code&gt; is the same as &lt;code&gt;yParity || r || s || 0x45000000 || rlp(...)&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;As of &lt;code&gt;FORK_BLOCK_NUMBER&lt;&#x2F;code&gt;, &lt;code&gt;rlp(nonce, gasPrice, gasLimit, to, value, data, v, r, s)&lt;&#x2F;code&gt; will no longer be a valid transaction in a block.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;receipts&quot;&gt;Receipts&lt;&#x2F;h3&gt;
&lt;p&gt;As of &lt;code&gt;FORK_BLOCK_NUMBER&lt;&#x2F;code&gt;, &lt;code&gt;0 || ssz.serialize(status, cumulativeGasUsed, logsBloom, logs)&lt;&#x2F;code&gt; will be a valid receipt where:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;the &lt;code&gt;ReceiptPayload&lt;&#x2F;code&gt; will be generated&#x2F;processed&#x2F;handled exactly the same as legacy receipts were processed&#x2F;handled with the exception of its encoding&lt;&#x2F;li&gt;
&lt;li&gt;TODO: Hashing or Merkleizing for block receipt root&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;As of &lt;code&gt;FORK_BLOCK_NUMBER&lt;&#x2F;code&gt;, &lt;code&gt;1 || ssz.serialize(status, cumulativeGasUsed, logsBloom, logs)&lt;&#x2F;code&gt; will be a valid receipt where:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;the &lt;code&gt;ReceiptPayload&lt;&#x2F;code&gt; will be generated&#x2F;processed&#x2F;handled exactly the same as legacy receipts were processed&#x2F;handled with the exception of its encoding&lt;&#x2F;li&gt;
&lt;li&gt;TODO: Hashing or Merkleizing for block receipt root&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The SSZ schema for both receipt types is:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Log[&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  address: bytes20,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  topics: List[bytes32, 4],&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  data: List[uint8, 0xffffff],&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Receipt[&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  status: uint8,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  cumulativeGasUsed: uint64,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  logsBloom: BitVector[2048],&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  logs: List[Log, 0xffffff],&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;As of &lt;code&gt;FORK_BLOCK_NUMBER&lt;&#x2F;code&gt;, &lt;code&gt;rlp(status, cumulativeGasUsed, logsBloom, logs)&lt;&#x2F;code&gt; will no longer be a valid receipt in a block.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;signature-doesn-t-include-transaction-type-as-first-signature-byte&quot;&gt;Signature doesn&#x27;t include transaction type as first signature byte&lt;&#x2F;h3&gt;
&lt;p&gt;These transaction types are explicitly designed to be signature compatible with legacy transactions, which means we cannot change the data being signed.
See Security Considerations section for more details.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;two-transaction-types-instead-of-one&quot;&gt;Two transaction types instead of one&lt;&#x2F;h3&gt;
&lt;p&gt;With the introduction of typed transactions, we no longer need to do bit packing to avoid changing the shape of the signature.
Legacy transactions introduced chain ID in &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;155&#x2F;&quot;&gt;EIP-155&lt;&#x2F;a&gt; and wanted to avoid changing the transaction array length, so it bitpacked the chainID into the signature&#x27;s &lt;code&gt;v&lt;&#x2F;code&gt; value.
Since we no longer need to guarantee consistent payload lengths between transaction types, we have opted to have two transaction types with clear fields.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;signature-separate-from-signed-data&quot;&gt;Signature separate from signed data&lt;&#x2F;h3&gt;
&lt;p&gt;When validating a signature, one must first separate out the signed data from the signature and then validate the signature against the signed data.
In the case of legacy transactions, this was a bit of a burden since you had to first RLP decode the transaction, then extract out the signature, then RLP encode a subset of the transaction.
EIP-155 made this process even worse by requiring the validator to further decode the &lt;code&gt;v&lt;&#x2F;code&gt; signature value to extract the chain ID (if present) and include that in the signed data payload.
By having the signed data encoded exactly as it is signed, we make it so one can verify the transaction&#x27;s signature without having to do any decoding before hand.
By having the signature SSZ encoded up front, we can easily extract the signature without even having to use a decoder.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;ssz-for-serialization&quot;&gt;SSZ for serialization&lt;&#x2F;h3&gt;
&lt;p&gt;There is a weak consensus that RLP is not a particularly good encoding scheme for hashed data partially due to its inability to be streamed.
SSZ is almost certainly going to be included in Ethereum at some point in the future, so clients likely have access to an SSZ decoder.
For this particular case, manual decoding without a full SSZ decoder isn&#x27;t too complicated, though it does require doing a bit of &quot;pointer math&quot; since &lt;code&gt;logs&lt;&#x2F;code&gt; is an array of variable length items.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;deprecating-legacy-transactions&quot;&gt;Deprecating legacy transactions&lt;&#x2F;h3&gt;
&lt;p&gt;By deprecating legacy transactions, we make it easier for clients as they can always deal with typed transactions in blocks.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;max-length-of-logs-and-logs-data&quot;&gt;Max length of logs and logs data&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;706&#x2F;&quot;&gt;EIP-706&lt;&#x2F;a&gt; limits devp2p messages to 24 bit length, which gives us a pragmatic cap at that for any single transaction at the moment.
This number seems to far exceed what is reasonable anytime in the near future, so feels like as reasonable of a cap as any.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;The new transactions are signature compatible with legacy transactions.
Legacy transactions can be decoded and then encoded as type 0 or type 1 transactions.
This EIP does not introduce any deprecation process for legacy encoded transactions, though the authors do encourage client developers to upgrade legacy encoded transactions to typed transactions as soon as it is reasonable.&lt;&#x2F;p&gt;
&lt;p&gt;The signature compatibility means that a client may see the same transaction encoded both ways.
In such a case the client can choose which to retain, but it is encouraged to retain the typed transaction rather than the legacy encoded transaction.
Since the two transactions would share a nonce, only one will ever be valid in a chain at a time.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;p&gt;TBD&lt;&#x2F;p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;TBD&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;While &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2718&#x2F;&quot;&gt;EIP-2718&lt;&#x2F;a&gt; strongly recommends including the transaction type as the first byte of the signed data, we cannot accomplish that in this case because we need to remain signature compatible with legacy transactions.
Luckily, &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2718&#x2F;&quot;&gt;EIP-2718&lt;&#x2F;a&gt; also excludes transaction types &lt;code&gt;0xc0&lt;&#x2F;code&gt; to &lt;code&gt;0xfe&lt;&#x2F;code&gt; from valid transaction types, and the first byte of the signature in this case is in that range so we can be sure this will not conflict with any future transaction types.&lt;&#x2F;p&gt;
&lt;p&gt;A signature for these transaction types &lt;strong&gt;does&lt;&#x2F;strong&gt; collide with legacy transactions, but the transactions will be processed the same so it doesn&#x27;t matter if the transaction ends up included as a legacy transaction or a typed transaction.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Account Abstraction</title>
        <published>2020-09-04T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Vitalik Buterin</name><uri>https://github.com/vbuterin</uri>
	</author>
	
	<author>
		<name>Ansgar Dietrichs</name><uri>https://github.com/adietrichs</uri>
	</author>
	
	<author>
		<name>Matt Garnett</name><uri>https://github.com/lightclient</uri>
	</author>
	
	<author>
		<name>Will Villanueva</name><uri>https://github.com/villanuevawill</uri>
	</author>
	
	<author>
		<name>Sam Wilson</name><uri>https://github.com/SamWilsn</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/2938/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-2938-account-abstraction/4630" />
        

        <id>https://wg-eips.ritovision.com/2938/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        

        
        <category
            term="tag:eip:2938"
            label="EIP-2938" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/2938/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;Account abstraction (AA) allows a contract to be the top-level account that pays fees and starts transaction execution.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;strong&gt;See also: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ethereum-magicians.org&#x2F;t&#x2F;implementing-account-abstraction-as-part-of-eth1-x&#x2F;4020&quot;&gt;https:&#x2F;&#x2F;ethereum-magicians.org&#x2F;t&#x2F;implementing-account-abstraction-as-part-of-eth1-x&#x2F;4020&lt;&#x2F;a&gt; and the links therein for historical work and motivation.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Transaction validity, as of Muir Glacier, is defined rigidly by the protocol: ECDSA signature, a simple nonce, and account balance. Account abstraction extends the validity conditions of transactions with the execution of arbitrary EVM bytecode (with some limits on what state may be accessed.) To signal validity, we propose a new EVM opcode &lt;code&gt;PAYGAS&lt;&#x2F;code&gt;, which also sets the gas price and gas limit the contract is willing to pay.&lt;&#x2F;p&gt;
&lt;p&gt;We split account abstraction into two tiers: &lt;strong&gt;single-tenant AA&lt;&#x2F;strong&gt;, which is intended to support wallets or other use cases with few participants, and &lt;strong&gt;multi-tenant AA&lt;&#x2F;strong&gt;, which is intended to support applications with many participants (eg. tornado.cash, Uniswap).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;The existing limitations preclude innovation in a number of important areas, particularly:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Smart contract wallets that use signature verification other than ECDSA (eg. Schnorr, BLS, post-quantum...)&lt;&#x2F;li&gt;
&lt;li&gt;Smart contract wallets that include features such as multisig verification or social recovery, reducing the highly prevalent risk of funds being lost or stolen&lt;&#x2F;li&gt;
&lt;li&gt;Privacy-preserving systems like &lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;tornado.cash&quot;&gt;tornado.cash&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Attempts to improve gas efficiency of DeFi protocols by preventing transactions that don&#x27;t satisfy high-level conditions (eg. existence of a matching order) from being included on chain&lt;&#x2F;li&gt;
&lt;li&gt;Users being able to pay for transaction fees in a token other than ETH (eg. by converting that token into the ETH needed for fees inside the transaction in real-time)&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Most of the above use cases are currently possible using intermediaries, most notably the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.opengsn.org&#x2F;&quot;&gt;Gas Station Network&lt;&#x2F;a&gt; and application-specific alternatives. These implementations are (i) technically inefficient, due to the extra 21000 gas to pay for the relayer, (ii) economically inefficient, as relayers need to make a profit on top of the gas fees that they pay. Additionally, use of intermediary protocols means that these applications cannot simply rely on base Ethereum infrastructure and need to rely on extra protocols that have smaller userbases and higher risk of no longer being available at some future date.&lt;&#x2F;p&gt;
&lt;p&gt;Out of the five use cases above, single-tenant AA approximately supports (1) and (2), and multi-tenant AA approximately supports (3) and (4). We discuss the differences between the two tiers in the specification and rationale sections below.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;single-tenant&quot;&gt;Single Tenant&lt;&#x2F;h3&gt;
&lt;p&gt;After &lt;code&gt;FORK_BLOCK&lt;&#x2F;code&gt;, the following changes will be recognized by the protocol.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;constants&quot;&gt;Constants&lt;&#x2F;h4&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Constant&lt;&#x2F;th&gt;&lt;th&gt;Value&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;&lt;code&gt;AA_ENTRY_POINT&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;0xffffffffffffffffffffffffffffffffffffffff&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;&lt;code&gt;AA_TX_TYPE&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;2&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;&lt;code&gt;FORK_BLOCK&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;TBD&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;&lt;code&gt;AA_BASE_GAS_COST&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;15000&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h4 id=&quot;new-transaction-type&quot;&gt;New Transaction Type&lt;&#x2F;h4&gt;
&lt;p&gt;A new &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2718&#x2F;&quot;&gt;EIP-2718&lt;&#x2F;a&gt; transaction with type &lt;code&gt;AA_TX_TYPE&lt;&#x2F;code&gt; is introduced. Transactions of this type are referred to as &quot;AA transactions&quot;. Their payload should be interpreted as &lt;code&gt;rlp([nonce, target, data])&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The base gas cost of this transaction is set to &lt;code&gt;AA_BASE_GAS_COST&lt;&#x2F;code&gt; instead of 21000 to reflect the lack of &quot;intrinsic&quot; ECDSA and signature.&lt;&#x2F;p&gt;
&lt;p&gt;Nonces are processed analogously to existing transactions (check &lt;code&gt;tx.nonce == tx.target.nonce&lt;&#x2F;code&gt;, transaction is invalid if this fails, otherwise proceed and immediately set &lt;code&gt;tx.nonce += 1&lt;&#x2F;code&gt;).&lt;&#x2F;p&gt;
&lt;p&gt;Note that this transaction type has no intrinsic gas limit; when beginning execution, the gas limit is simply set to the remaining gas in the block (ie. &lt;code&gt;block.gas_limit&lt;&#x2F;code&gt; minus gas spent on previous transactions), and the &lt;code&gt;PAYGAS&lt;&#x2F;code&gt; opcode (see below) can adjust the gas limit downwards.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;transaction-wide-global-variables&quot;&gt;Transaction-wide global variables&lt;&#x2F;h4&gt;
&lt;p&gt;Introduce some new transaction-wide global variables. These variables work similarly (in particular, have similar reversion logic) to the SSTORE refunds counter.&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Variable&lt;&#x2F;th&gt;&lt;th&gt;Type&lt;&#x2F;th&gt;&lt;th&gt;Initial value&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;globals.transaction_fee_paid&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;bool&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;False if type(tx) == AA_TX_TYPE else True&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;globals.gas_price&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;int&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;0 if type(tx) == AA_TX_TYPE else tx.gas_price&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;globals.gas_limit&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;int&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;0 if type(tx) == AA_TX_TYPE else tx.gas_limit&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h4 id=&quot;nonce-0x48-opcode&quot;&gt;&lt;code&gt;NONCE (0x48)&lt;&#x2F;code&gt; Opcode&lt;&#x2F;h4&gt;
&lt;p&gt;A new opcode &lt;code&gt;NONCE (0x48)&lt;&#x2F;code&gt; is introduced, with gas cost &lt;code&gt;G_base&lt;&#x2F;code&gt;, which pushes the &lt;code&gt;nonce&lt;&#x2F;code&gt; of the callee onto the stack.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;paygas-0x49-opcode&quot;&gt;&lt;code&gt;PAYGAS (0x49)&lt;&#x2F;code&gt; Opcode&lt;&#x2F;h4&gt;
&lt;p&gt;A new opcode &lt;code&gt;PAYGAS (0x49)&lt;&#x2F;code&gt; is introduced, with gas cost &lt;code&gt;G_base&lt;&#x2F;code&gt;. It takes two arguments off the stack: (top) &lt;code&gt;version_number&lt;&#x2F;code&gt;, (second from top) &lt;code&gt;memory_start&lt;&#x2F;code&gt;. In the initial implementation, it will &lt;code&gt;assert version_number == 0&lt;&#x2F;code&gt; and read:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;gas_price = bytes_to_int(vm.memory[memory_start: memory_start + 32])&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;gas_limit = bytes_to_int(vm.memory[memory_start + 32: memory_start + 64])&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Both reads use similar mechanics to MLOAD and CALL, so memory expands if needed.&lt;&#x2F;p&gt;
&lt;p&gt;Future hard forks may add support for different version numbers, in which case the opcode may take different-sized memory slices and interpret them differently. Two particular potential use cases are &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;notes.ethereum.org&#x2F;@vbuterin&#x2F;BkSQmQTS8&quot;&gt;EIP 1559&lt;&#x2F;a&gt; and &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ethresear.ch&#x2F;t&#x2F;another-simple-gas-fee-model-the-escalator-algorithm-from-the-agoric-papers&#x2F;6399&quot;&gt;the escalator mechanism&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The opcode works as follows. If all three of the following conditions (in addition to the version number check above) are satisfied:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;The account&#x27;s balance is &lt;code&gt;&amp;gt;= gas_price * gas_limit&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;globals.transaction_fee_paid == False&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;We are in a top-level AA execution frame (ie. if the currently running EVM execution exits or reverts, the EVM execution of the entire transaction is finished)&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Then do the following:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Subtract &lt;code&gt;gas_price * gas_limit&lt;&#x2F;code&gt; from the contract&#x27;s balance&lt;&#x2F;li&gt;
&lt;li&gt;Set &lt;code&gt;globals.transaction_fee_paid&lt;&#x2F;code&gt; to &lt;code&gt;True&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Set &lt;code&gt;globals.gas_price&lt;&#x2F;code&gt; to &lt;code&gt;gas_price&lt;&#x2F;code&gt;, and &lt;code&gt;globals.gas_limit&lt;&#x2F;code&gt; to &lt;code&gt;gas_limit&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Set the remaining gas in the current execution context to equal &lt;code&gt;gas_limit&lt;&#x2F;code&gt; minus the gas that was already consumed&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;If any of the above three conditions are not satisfied, throw an exception.&lt;&#x2F;p&gt;
&lt;p&gt;At the end of execution of an AA transaction, it is mandatory that &lt;code&gt;globals.transaction_fee_paid == True&lt;&#x2F;code&gt;; if it is not, then the transaction is invalid. At the end of execution, the contract is refunded &lt;code&gt;globals.gas_price * remaining_gas&lt;&#x2F;code&gt; for any remaining gas, and &lt;code&gt;(globals.gas_limit - remaining_gas) * globals.gas_price&lt;&#x2F;code&gt; is transferred to the miner.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;PAYGAS&lt;&#x2F;code&gt; also serves as an EVM execution &lt;em&gt;checkpoint&lt;&#x2F;em&gt;: if the top-level execution frame reverts after &lt;code&gt;PAYGAS&lt;&#x2F;code&gt; has been called, then the execution only reverts up to the point right after &lt;code&gt;PAYGAS&lt;&#x2F;code&gt; was called, and exits there. In that case, the contract receives no refund, and &lt;code&gt;globals.gas_limit * globals.gas_price&lt;&#x2F;code&gt; is transferred to the miner.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;replay-protection&quot;&gt;Replay Protection&lt;&#x2F;h4&gt;
&lt;p&gt;One of the two following approaches must be implemented to safeguard against replay attacks.&lt;&#x2F;p&gt;
&lt;h5 id=&quot;require-set-indestructible&quot;&gt;Require &lt;code&gt;SET_INDESTRUCTIBLE&lt;&#x2F;code&gt;&lt;&#x2F;h5&gt;
&lt;p&gt;Require that contracts targeted by AA transactions begin with &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2937&#x2F;&quot;&gt;EIP-2937&lt;&#x2F;a&gt;&#x27;s &lt;code&gt;SET_INDESTRUCTIBLE&lt;&#x2F;code&gt; opcode. AA transactions targeting contracts that do not begin with &lt;code&gt;SET_INDESTRUCTIBLE&lt;&#x2F;code&gt; are invalid, and cannot be included in blocks.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;AA_PREFIX&lt;&#x2F;code&gt; would need to be modified to include this opcode.&lt;&#x2F;p&gt;
&lt;h5 id=&quot;preserve-nonce-on-selfdestruct&quot;&gt;Preserve Nonce on &lt;code&gt;SELFDESTRUCT&lt;&#x2F;code&gt;&lt;&#x2F;h5&gt;
&lt;p&gt;The other option is to preserve contract nonces across &lt;code&gt;SELFDESTRUCT&lt;&#x2F;code&gt; invocations, instead of setting the nonce to zero.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;miscellaneous&quot;&gt;Miscellaneous&lt;&#x2F;h4&gt;
&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;CALLER (0x33)&lt;&#x2F;code&gt; is invoked in the first frame of
execution of a call initiated by an AA transaction, then it must return &lt;code&gt;AA_ENTRY_POINT&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;If &lt;code&gt;ORIGIN (0x32)&lt;&#x2F;code&gt; is invoked in any frame of execution of an AA
transaction it must return &lt;code&gt;AA_ENTRY_POINT&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;The &lt;code&gt;GASPRICE (0x3A)&lt;&#x2F;code&gt; opcode now pushes the value &lt;code&gt;globals.gas_price&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Note that the new definition of &lt;code&gt;GASPRICE&lt;&#x2F;code&gt; does not lead to any changes in behavior in non-AA transactions, because &lt;code&gt;globals.gas_price&lt;&#x2F;code&gt; is initialized to &lt;code&gt;tx.gas_price&lt;&#x2F;code&gt; and cannot be changed as &lt;code&gt;PAYGAS&lt;&#x2F;code&gt; cannot be called.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;mining-and-rebroadcasting-strategies&quot;&gt;Mining and Rebroadcasting Strategies&lt;&#x2F;h4&gt;
&lt;p&gt;Much of the complexity in account abstraction originates from the strategies used by miners and validating nodes to determine whether or not to accept and rebroadcast transactions. Miners need to determine if a transaction will actually pay the fee if they include it after only a small amount of processing to avoid &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;hackingdistributed.com&#x2F;2016&#x2F;06&#x2F;28&#x2F;ethereum-soft-fork-dos-vector&#x2F;&quot;&gt;DoS attacks&lt;&#x2F;a&gt;. Validating nodes need to perform an essentially identical verification to determine whether or not to rebroadcast the transaction.&lt;&#x2F;p&gt;
&lt;p&gt;By keeping the consensus changes minimal, this EIP allows for gradual introduction of AA mempool support by miners and validating nodes. Initial support would be focused on enabling simple, single-tenant use cases, while later steps would additionally allow for more complex, multi-tenant use cases. Earlier stages are deliberately more fully fleshed-out than later stages, as there is still more time before later stages need to be implemented.&lt;&#x2F;p&gt;
&lt;h5 id=&quot;transactions-with-fixed-nonces&quot;&gt;Transactions with Fixed Nonces&lt;&#x2F;h5&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Constant&lt;&#x2F;th&gt;&lt;th&gt;Value&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;VERIFICATION_GAS_MULTIPLIER&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;6&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;VERIFICATION_GAS_CAP&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;= VERIFICATION_GAS_MULTIPLIER * AA_BASE_GAS_COST = 90000&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;AA_PREFIX&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;if(msg.sender != shr(-1, 12)) { LOG1(msg.sender, msg.value); return }&lt;&#x2F;code&gt;; compilation to EVM TBD&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;When a node receives an AA transaction, they process it (i.e. attempt to execute it against the current chain head&#x27;s post-state) to determine its validity, continuing to execute until one of several events happens:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;If the code of the &lt;code&gt;target&lt;&#x2F;code&gt; is NOT prefixed with &lt;code&gt;AA_PREFIX&lt;&#x2F;code&gt;, exit with failure&lt;&#x2F;li&gt;
&lt;li&gt;If the execution hits any of the following, exit with failure:
&lt;ul&gt;
&lt;li&gt;An environment opcode (&lt;code&gt;BLOCKHASH&lt;&#x2F;code&gt;, &lt;code&gt;COINBASE&lt;&#x2F;code&gt;, &lt;code&gt;TIMESTAMP&lt;&#x2F;code&gt;, &lt;code&gt;NUMBER&lt;&#x2F;code&gt;, &lt;code&gt;DIFFICULTY&lt;&#x2F;code&gt;, &lt;code&gt;GASLIMIT&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;BALANCE&lt;&#x2F;code&gt; (of any account, including the &lt;code&gt;target&lt;&#x2F;code&gt; itself)&lt;&#x2F;li&gt;
&lt;li&gt;An external call&#x2F;create that changes the &lt;code&gt;callee&lt;&#x2F;code&gt; to anything but the &lt;code&gt;target&lt;&#x2F;code&gt; or a precompile (&lt;code&gt;CALL&lt;&#x2F;code&gt;, &lt;code&gt;CALLCODE&lt;&#x2F;code&gt;, &lt;code&gt;STATICCALL&lt;&#x2F;code&gt;, &lt;code&gt;CREATE&lt;&#x2F;code&gt;, &lt;code&gt;CREATE2&lt;&#x2F;code&gt;).&lt;&#x2F;li&gt;
&lt;li&gt;An external state access that reads code (&lt;code&gt;EXTCODESIZE&lt;&#x2F;code&gt;, &lt;code&gt;EXTCODEHASH&lt;&#x2F;code&gt;, &lt;code&gt;EXTCODECOPY&lt;&#x2F;code&gt;, but also &lt;code&gt;CALLCODE&lt;&#x2F;code&gt; and &lt;code&gt;DELEGATECALL&lt;&#x2F;code&gt;), unless the address of the code that is read is the &lt;code&gt;target&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;If the execution consumes more gas than &lt;code&gt;VERIFICATION_GAS_CAP&lt;&#x2F;code&gt; (specified above), or more gas than is available in the block, exit with failure&lt;&#x2F;li&gt;
&lt;li&gt;If the execution reaches &lt;code&gt;PAYGAS&lt;&#x2F;code&gt;, then exit with success or failure depending on whether or not the balance is sufficient (e.g. &lt;code&gt;balance &amp;gt;= gas_price * gas_limit&lt;&#x2F;code&gt;).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Nodes do not keep transactions with nonces higher than the current valid nonce in the mempool. If the mempool already contains a transaction with a currently valid nonce, another incoming transaction to the same contract and with the same nonce either replaces the existing one (if its gas price is sufficiently higher) or is dropped. Thus, the mempool keeps only at most one pending transaction per account.&lt;&#x2F;p&gt;
&lt;p&gt;While processing a new block, take note of which accounts were the &lt;code&gt;target&lt;&#x2F;code&gt; of an AA transaction (each block currently has &lt;code&gt;12500000&lt;&#x2F;code&gt; gas and an AA transaction costs &lt;code&gt;&amp;gt;= 15000&lt;&#x2F;code&gt; so there would be at most &lt;code&gt;12500000 &#x2F;&#x2F; 15000 = 833&lt;&#x2F;code&gt; targeted accounts). Drop all pending transactions targeting those accounts. All other transactions remain in the mempool.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;single-tenant-1&quot;&gt;Single Tenant+&lt;&#x2F;h3&gt;
&lt;p&gt;If the &lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;EIPs&#x2F;pull&#x2F;2937&quot;&gt;indestructible contracts EIP&lt;&#x2F;a&gt; is added, Single Tenant AA can be adapted to allow for &lt;code&gt;DELEGATECALL&lt;&#x2F;code&gt; during transaction verification: during execution of a new AA transaction, external state access that reads code (&lt;code&gt;EXTCODESIZE&lt;&#x2F;code&gt;, &lt;code&gt;EXTCODEHASH&lt;&#x2F;code&gt;, &lt;code&gt;EXTCODECOPY&lt;&#x2F;code&gt;, &lt;code&gt;CALLCODE&lt;&#x2F;code&gt;, &lt;code&gt;DELEGATECALL&lt;&#x2F;code&gt;) of any contract whose first byte is the &lt;code&gt;SET_INDESTRUCTIBLE&lt;&#x2F;code&gt; opcode is no longer banned. However, calls to anything but the &lt;code&gt;target&lt;&#x2F;code&gt; or a precompile that change the &lt;code&gt;callee&lt;&#x2F;code&gt; (i.e., calls other than &lt;code&gt;CALLCODE&lt;&#x2F;code&gt; and &lt;code&gt;DELEGATECALL&lt;&#x2F;code&gt;) are still not permitted.&lt;&#x2F;p&gt;
&lt;p&gt;If the &lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;EIPs&#x2F;pull&#x2F;2975&quot;&gt;IS_STATIC EIP&lt;&#x2F;a&gt; is added, the list of allowed prefixes can be extended to allow a prefix that enables incoming static calls but not state-changing calls.&lt;&#x2F;p&gt;
&lt;p&gt;The list of allowed prefixes can also be extended to enable other benign use cases (eg. logging incoming payments).&lt;&#x2F;p&gt;
&lt;p&gt;External calls &lt;em&gt;into&lt;&#x2F;em&gt; AA accounts can be allowed as follows. We can add an opcode &lt;code&gt;RESERVE_GAS&lt;&#x2F;code&gt;, which takes as argument a value &lt;code&gt;N&lt;&#x2F;code&gt; and has simple behavior: immediately burn &lt;code&gt;N&lt;&#x2F;code&gt; gas and add &lt;code&gt;N&lt;&#x2F;code&gt; gas to the refund. We then add an allowed &lt;code&gt;AA_PREFIX&lt;&#x2F;code&gt; that reserves &lt;code&gt;&amp;gt;= AA_BASE_GAS_COST * 2&lt;&#x2F;code&gt; gas. This ensures that at least &lt;code&gt;AA_BASE_GAS_COST&lt;&#x2F;code&gt; gas must be spent (as refunds can refund max 50% of total consumption) in order to call into an account and invalidate transactions targeting that account in the mempool, preserving that invariant.&lt;&#x2F;p&gt;
&lt;p&gt;Note that accounts may also opt to set a higher &lt;code&gt;RESERVE_GAS&lt;&#x2F;code&gt; value in order to safely have a higher &lt;code&gt;VERIFICATION_GAS_CAP&lt;&#x2F;code&gt;; the goal would be to preserve a &lt;code&gt;VERIFICATION_GAS_MULTIPLIER&lt;&#x2F;code&gt;-to-1 ratio between the minimum gas cost to edit an account (ie. half its &lt;code&gt;RESERVE_GAS&lt;&#x2F;code&gt;) and the &lt;code&gt;VERIFICATION_GAS_CAP&lt;&#x2F;code&gt; that is permitted that account. This would also preserve invariants around maximum reverification gas consumption that are implied by the previous section.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;multi-tenant-beyond&quot;&gt;Multi-Tenant &amp;amp; Beyond&lt;&#x2F;h3&gt;
&lt;p&gt;In a later stage, we can add support for multiple pending transactions per account in the mempool. The main challenge here is that a single transaction can potentially cause state changes that invalidate all other transactions to that same account. Additionally, if we naively prioritize transactions by gasprice, there is an attack vector where the user willing to pay the highest gasprice publishes many (mutually exclusive) versions of their transaction with small alterations, thereby pushing everyone else&#x27;s transactions out of the mempool.&lt;&#x2F;p&gt;
&lt;p&gt;Here is a sketch of a strategy for mitigating this problem. We would require incoming transactions to contain an &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;EIPs&#x2F;blob&#x2F;master&#x2F;EIPS&#x2F;.&#x2F;02930.md&quot;&gt;EIP-2930&lt;&#x2F;a&gt;-style access list detailing the storage slots that the transaction reads or modifies, and make it binding; that is, accesses outside the access list would be invalid. A transaction would only be included in the mempool if its access list is disjoint from the access lists of other transactions in the mempool (or if its gasprice is higher). An alternative way to think about this is to have per-storage-slot mempools instead of just per-account mempools, except a transaction could be part of multiple per-storage-slot mempools (if desired it could be capped to eg. 5 storage slots).&lt;&#x2F;p&gt;
&lt;p&gt;Note also that multi-tenant AA will almost certainly require allowing miners to edit the nonces of incoming transactions to put them into sequence, with the result that the final hash of a transaction is unpredictable at publication time. Clients will need to explicitly work around this.&lt;&#x2F;p&gt;
&lt;p&gt;More research is required to refine these ideas, and this is left for later work.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;The core problem in an account abstraction setup is always that miners and network nodes need to be able to verify that a transaction that they attempt to include, or rebroadcast, will actually pay a fee. Currently, this is fairly simple, because a transaction is guaranteed to be includable and pay a fee as long as the signature and nonce are valid and the balance and gasprice are sufficient. These checks can be done quickly.&lt;&#x2F;p&gt;
&lt;p&gt;In an account abstraction setup, the goal is to allow accounts to specify EVM code that can establish more flexible conditions for a transaction&#x27;s validity, but with the requirement that this EVM code can be quickly verified, with the same safety properties as the existing setup.&lt;&#x2F;p&gt;
&lt;p&gt;In a normal transaction, the top-level call goes from the &lt;code&gt;tx.sender&lt;&#x2F;code&gt; to &lt;code&gt;tx.to&lt;&#x2F;code&gt; and carries with it &lt;code&gt;tx.value&lt;&#x2F;code&gt;. In an AA transaction, the top-level call goes from the &lt;em&gt;entry point address&lt;&#x2F;em&gt; (&lt;code&gt;0xFFFF...FF&lt;&#x2F;code&gt;) to the &lt;code&gt;tx.target&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The top-level code execution is expected to be split into two phases: the shorter &lt;strong&gt;verification phase&lt;&#x2F;strong&gt; (before &lt;code&gt;PAYGAS&lt;&#x2F;code&gt;) and the longer &lt;strong&gt;execution phase&lt;&#x2F;strong&gt; (after &lt;code&gt;PAYGAS&lt;&#x2F;code&gt;). If execution throws an exception during the verification phase, the transaction is invalid, much like a transaction with an invalid signature in the current system. If execution throws an exception after the verification phase, the transaction pays fees, and so the miner can still include it.&lt;&#x2F;p&gt;
&lt;p&gt;The transition between different stages of AA is entirely done through changes in miner strategy. The first stage supports &lt;strong&gt;single-tenant AA&lt;&#x2F;strong&gt;, where the only use cases that can be easily implemented are where the &lt;code&gt;tx.target&lt;&#x2F;code&gt; is a contract representing a user account (that is, a smart contract wallet, eg. multisig). Later stages improve support for eg. logs and libraries, and also move toward supporting &lt;strong&gt;multi-tenant AA&lt;&#x2F;strong&gt;, where the goal is to try to support cases where the &lt;code&gt;tx.target&lt;&#x2F;code&gt; represents an &lt;em&gt;application&lt;&#x2F;em&gt; that processes incoming activity from multiple users.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;nonces-still-enshrined-in-single-tenant-aa&quot;&gt;Nonces still enshrined in single-tenant AA&lt;&#x2F;h3&gt;
&lt;p&gt;Nonces are still enforced in single-tenant AA to ensure that single-target AA does not break the invariant that each transaction (and hence each transaction hash) can only be included in the chain once. While there is some limited value in allowing arbitrary-order transaction inclusion in single-tenant AA, there is not enough value to justify breaking that invariant.&lt;&#x2F;p&gt;
&lt;p&gt;Note that nonces in AA accounts do end up having a dual-purpose: they are both there for replay protection and for contract address generation when using the &lt;code&gt;CREATE&lt;&#x2F;code&gt; opcode. This does mean that a single transaction could increment the nonce by more than 1. This is deemed acceptable, as the other mechanics introduced by AA already break the ability to easily verify that a chain longer than one transaction can be processed. However, we strongly recommend that AA contracts use &lt;code&gt;CREATE2&lt;&#x2F;code&gt; instead of &lt;code&gt;CREATE&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;In multi-tenant AA, as mentioned above, nonces are expected to become malleable and applications that use multi-tenant AA systems would need to manage this.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;nonces-are-exposed-to-the-evm&quot;&gt;Nonces are exposed to the EVM&lt;&#x2F;h3&gt;
&lt;p&gt;This is done to allow signature checking done in validation code to validate the nonce.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;replay-protection-1&quot;&gt;Replay Protection&lt;&#x2F;h3&gt;
&lt;p&gt;One of the above two approaches (requiring &lt;code&gt;SET_INDESTRUCTIBLE&lt;&#x2F;code&gt; or modifying &lt;code&gt;SELFDESTRUCT&lt;&#x2F;code&gt; behavior) must be implemented so that nonces cannot be reused. It must be a consensus change, and not simply part of &lt;code&gt;AA_PREFIX&lt;&#x2F;code&gt;, so that transaction hash uniqueness is maintained.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;miners-refuse-transactions-that-access-external-data-or-the-target-s-own-balance-before-paygas&quot;&gt;Miners refuse transactions that access external data or the target&#x27;s own balance, before PAYGAS&lt;&#x2F;h3&gt;
&lt;p&gt;An important property of traditional transactions is that activity happening as part of transactions that originate outside of some given account X cannot make transactions whose sender is X invalid. The only state change that an outside transaction can impose on X is increasing its balance, which cannot invalidate a transaction.&lt;&#x2F;p&gt;
&lt;p&gt;Allowing AA contracts to access external data (both other accounts and environment variables such as GASPRICE, DIFFICULTY, etc.) before they call &lt;code&gt;PAYGAS&lt;&#x2F;code&gt; (ie. during the verification phase) breaks this invariant. For example, imagine someone sends many thousands of AA transactions that perform an external call &lt;code&gt;if FOO.get_number() != 5: throw()&lt;&#x2F;code&gt;. &lt;code&gt;FOO.number&lt;&#x2F;code&gt; might be set to &lt;code&gt;5&lt;&#x2F;code&gt; when those transactions are all sent, but a single transaction to &lt;code&gt;FOO&lt;&#x2F;code&gt; could set the &lt;code&gt;number&lt;&#x2F;code&gt; to something else, invalidating &lt;em&gt;all of the thousands of AA transactions&lt;&#x2F;em&gt; that depend on it. This would be a serious DoS vector.&lt;&#x2F;p&gt;
&lt;p&gt;The one allowed exception is contracts that are indestructible (that is, whose first byte is the &lt;code&gt;SET_INDESTRUCTIBLE&lt;&#x2F;code&gt; opcode defined in &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;hackmd.io&#x2F;@HWeNw8hNRimMm2m2GH56Cw&#x2F;SyNT3Cdmw&quot;&gt;this EIP&lt;&#x2F;a&gt;). This is a safe exception, because the data that is being read cannot be changed.&lt;&#x2F;p&gt;
&lt;p&gt;Disallowing reading &lt;code&gt;BALANCE&lt;&#x2F;code&gt; blocks a milder attack vector: an attacker could force a transaction to be reprocessed at a mere cost of 6700 gas (not 15000 or 21000), in the worst case more than doubling the number of transactions that would need to be reprocessed.&lt;&#x2F;p&gt;
&lt;p&gt;In the long term, AA could be expanded to allow reading external data, though protections such as mandatory access lists would be required.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;aa-transactions-must-call-contracts-with-prefix&quot;&gt;AA transactions must call contracts with prefix&lt;&#x2F;h3&gt;
&lt;p&gt;The prelude is used to ensure that &lt;em&gt;only&lt;&#x2F;em&gt; AA transactions can call the contract. This is another measure taken to ensure the invariant described above. If this check did not occur, it would be possible for a transaction originating outside some AA account X to call into X and make a storage change, forcing transactions targeting that account to be reprocessed at the cost of a mere 5000 gas.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;multi-tenant-aa&quot;&gt;Multi-tenant AA&lt;&#x2F;h3&gt;
&lt;p&gt;Multi-tenant AA extends single-tenant AA by &lt;strong&gt;better handling cases where distinct and uncoordinated users attempt to send transactions for&#x2F;to the same account and those transactions may interfere with each other&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;We can understand the value of multi-tenant AA by examining two example use cases: (i) &lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;tornado.cash&quot;&gt;tornado.cash&lt;&#x2F;a&gt; and (ii) &lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;uniswap.exchange&quot;&gt;Uniswap&lt;&#x2F;a&gt;. In both of these cases, there is a single central contract that represents the application, and not any specific user. Nevertheless, there is important value in using abstraction to do application-specific validation of transactions.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;tornado-cash&quot;&gt;Tornado Cash&lt;&#x2F;h4&gt;
&lt;p&gt;The tornado.cash workflow is as follows:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;A user sends a transaction to the TC contract, depositing some standard quantity of coins (eg. 1 ETH). A record of their deposit, containing the hash of a secret known by the user, is added to a Merkle tree whose root is stored in the TC contract.&lt;&#x2F;li&gt;
&lt;li&gt;When that user later wants to withdraw, they generate and send a ZK-SNARK proving that they know a secret whose hash is in a leaf somewhere in the deposit tree (without revealing where). The TC contract verifies the ZK-SNARK, and also verifies that a nullifier value (also derivable from the secret) has not yet been spent. The contract sends 1 ETH to the user&#x27;s desired address, and saves a record that the user&#x27;s nullifier has been spent.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;The privacy provided by TC arises because when a user makes a withdrawal, they can prove that it came from &lt;em&gt;some&lt;&#x2F;em&gt; unique deposit, but no one other than the user knows which deposit it came from. However, implementing TC naively has a fatal flaw: the user usually does not yet have ETH in their withdrawal address, and if the user uses their deposit address to pay for gas, that creates an on-chain link between their deposit address and their withdrawal address.&lt;&#x2F;p&gt;
&lt;p&gt;Currently, this is solved via relayers; a third-party relayer verifies the ZK-SNARK and unspent status of the nullifier, publishes the transaction using their own ETH to pay for gas, and collects the fee back from the user from the TC contract.&lt;&#x2F;p&gt;
&lt;p&gt;AA allows this without relayers: the user could simply send an AA transaction targeting the TC contract, the ZK-SNARK verification and the nullifier checking can be done in the verification step, and PAYGAS can be called directly after that. This allows the withdrawer to pay for gas directly out of the coins going to their withdrawal address, avoiding the need for relayers or for an on-chain link to their deposit address.&lt;&#x2F;p&gt;
&lt;p&gt;Note that fully implementing this functionality requires AA to be structured in a way that supports multiple users sending withdrawals at the same time (requiring nonces would make this difficult), and that allows a single account to support both AA transactions (the withdrawals) and externally-initiated calls (the deposits).&lt;&#x2F;p&gt;
&lt;h4 id=&quot;uniswap&quot;&gt;Uniswap&lt;&#x2F;h4&gt;
&lt;p&gt;A new version of Uniswap could be built that allows transactions to be sent that directly target the Uniswap contract. Users could deposit tokens into Uniswap ahead of time, and Uniswap would store their balances as well as a public key that transactions spending those balances could be verified against. An AA-initiated Uniswap trade would only be able to spend these internal balances.&lt;&#x2F;p&gt;
&lt;p&gt;This would be useless for normal traders, as normal traders have their coins outside the Uniswap contract, but it would be a powerful boon to arbitrageurs. Arbitrageurs would deposit their coins into Uniswap, and they would be able to send transactions that perform arbitrage every time external market conditions change, and logic such as price limits could be enforced during the verification step. Hence, transactions that do not get in (eg. because some other arbitrageur made the trade first) would not be included on-chain, allowing arbitrageurs to not pay gas, and reducing the number of &quot;junk&quot; transactions that get included on-chain. This could significantly increase both de-facto blockchain scalability as well as market efficiency, as arbitrageurs would be able to much more finely correct for cross-exchange discrepancies between prices.&lt;&#x2F;p&gt;
&lt;p&gt;Note that here also, Uniswap would need to support both AA transactions and externally-initiated calls.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;This AA implementation preserves the existing transaction type. The use of &lt;code&gt;assert origin == caller&lt;&#x2F;code&gt; to verify that an account is an EOA remains sound, but is not extensible to AA accounts; AA transactions will always have &lt;code&gt;origin == AA_ENTRY_POINT&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Badly-designed single-tenant AA contracts will break the transaction non-malleability invariant. That is, it is possible to take an AA transaction in-flight, modify it, and have the modified version still be valid; AA account contracts can be designed in such a way as to make that not possible, but it is their responsibility. Multi-tenant AA will break the transaction non-malleability invariant much more thoroughly, making the transaction hash unpredictable even for legitimate applications that use the multi-tenant AA features (though the invariant will not further break for applications that existed before then).&lt;&#x2F;p&gt;
&lt;p&gt;AA contracts may not have replay protection unless they build it in explicitly; this can be done with the &lt;code&gt;CHAINID (0x46)&lt;&#x2F;code&gt; opcode introduced in &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1344&#x2F;&quot;&gt;EIP 1344&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;p&gt;See: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;quilt&#x2F;tests&#x2F;tree&#x2F;account-abstraction&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;quilt&#x2F;tests&#x2F;tree&#x2F;account-abstraction&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;See: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;quilt&#x2F;go-ethereum&#x2F;tree&#x2F;account-abstraction&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;quilt&#x2F;go-ethereum&#x2F;tree&#x2F;account-abstraction&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;See &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ethresear.ch&#x2F;t&#x2F;dos-vectors-in-account-abstraction-aa-or-validation-generalization-a-case-study-in-geth&#x2F;7937&quot;&gt;https:&#x2F;&#x2F;ethresear.ch&#x2F;t&#x2F;dos-vectors-in-account-abstraction-aa-or-validation-generalization-a-case-study-in-geth&#x2F;7937&lt;&#x2F;a&gt; for an analysis of DoS issues.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;re-validation&quot;&gt;Re-validation&lt;&#x2F;h3&gt;
&lt;p&gt;When a transaction enters the mempool, the client is able to quickly ascertain whether the transaction is valid. Once it determines this, it can be confident that the transaction will continue to be valid unless a transaction from the same account invalidates it.&lt;&#x2F;p&gt;
&lt;p&gt;There are, however, cases where an attacker can publish a transaction that invalidates existing transactions and requires the network to perform more recomputation than the computation in the transaction itself. The EIP maintains the invariant that recomputation is bounded to a theoretical maximum of six times the block gas limit in a single block; this is somewhat more expensive than before, but not that much more expensive.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;peer-denial-of-service&quot;&gt;Peer denial-of-service&lt;&#x2F;h4&gt;
&lt;p&gt;Denial-of-Service attacks are difficult to defend against, due to the difficulty in identifying sybils within a peer list. At any moment, one may decide (or be bribed) to initiate an attack. This is not a problem that Account Abstraction introduces. It can be accomplished against existing clients today by inundating a target with transactions whose signatures are invalid. However, due to the increased allotment of validation work allowed by AA, it&#x27;s important to bound the amount of computation an adversary can force a client to expend with invalid transactions. For this reason, it&#x27;s best for the miner to follow the recommended mining strategies.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Ethereum Provider Connect&#x2F;Disconnect Events</title>
        <published>2020-07-15T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Micah Zoltu</name><uri>https://github.com/MicahZoltu</uri>
	</author>
	
	<author>
		<name>Erik Marks</name><uri>https://github.com/rekmarks</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/2786/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://github.com/ethereum/EIPs/issues/2787" />
        

        <id>https://wg-eips.ritovision.com/2786/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="interface"
                label="Interface" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        

        
        <category
            term="tag:eip:2786"
            label="EIP-2786" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/2786/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;When an Ethereum Provider becomes connected or disconnected, it will emit a &lt;code&gt;connect&lt;&#x2F;code&gt;&#x2F;&lt;code&gt;disconnect&lt;&#x2F;code&gt; event.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;The Provider is said to be “connected” when it can service RPC requests to at least one chain.
The Provider is said to be “disconnected” when it cannot service RPC requests to any chain at all.
When the Provider switches from a &quot;connected&quot; state to a &quot;disconnected&quot; state, it will emit a &lt;code&gt;connect&lt;&#x2F;code&gt; event.
When the Provider switches from a &quot;disconnected&quot; state to a &quot;connected&quot; state, it will emit a &lt;code&gt;disconnect&lt;&#x2F;code&gt; event.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;When an application is hooked up to an Ethereum provider, there is value in having the application be alerted of connect&#x2F;disconnect events that may occur so the application can appropriately inform the user of the situation.
It is left up to the application to decide whether to listen in on these events, and how to handle them.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;definitions&quot;&gt;Definitions&lt;&#x2F;h3&gt;
&lt;h4 id=&quot;connected&quot;&gt;Connected&lt;&#x2F;h4&gt;
&lt;p&gt;The Provider is considered &lt;code&gt;connected&lt;&#x2F;code&gt; when it is able to service RPC requests to at least one chain.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;disconnected&quot;&gt;Disconnected&lt;&#x2F;h4&gt;
&lt;p&gt;The Provider is considered &lt;code&gt;disconnected&lt;&#x2F;code&gt; when it is unable to service RPC requests to any chain.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;events&quot;&gt;Events&lt;&#x2F;h3&gt;
&lt;h4 id=&quot;connect&quot;&gt;&lt;code&gt;connect&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The Provider &lt;strong&gt;MUST&lt;&#x2F;strong&gt; emit a &lt;code&gt;connect&lt;&#x2F;code&gt; event to all attached &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2700&#x2F;&quot;&gt;EIP-2700&lt;&#x2F;a&gt; listeners if it transitions from a &lt;code&gt;disconnected&lt;&#x2F;code&gt; state to a &lt;code&gt;connected&lt;&#x2F;code&gt; state.
All attached listeners &lt;strong&gt;MUST&lt;&#x2F;strong&gt; be called with the parameter &lt;code&gt;{ chainId }&lt;&#x2F;code&gt;.
&lt;code&gt;chainId&lt;&#x2F;code&gt; &lt;strong&gt;MUST&lt;&#x2F;strong&gt; specify the integer ID of the connected chain encoded as a hexadecimal string.
If the Provider supports the &lt;code&gt;eth_chainId&lt;&#x2F;code&gt; JSON-RPC method or a derivation of it, then the &lt;code&gt;chainId&lt;&#x2F;code&gt; &lt;strong&gt;MUST&lt;&#x2F;strong&gt; match the return value of &lt;code&gt;eth_chainId&lt;&#x2F;code&gt;.
The Provider &lt;strong&gt;MAY&lt;&#x2F;strong&gt; call the attached listeners in any order.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP is mostly a retrospective EIP meaning it codifies an already existing specification so there isn’t a lot of room for improving things such as by having a connect&#x2F;disconnect event per chain.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;The relationship between Ethereum Provider and client is a trusted one, where it is assumed that the user implicitly trusts the Ethereum Provider which is how it managed to get injected into the client, or the client expressly pulled in a connection to it.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;appendix-i-examples&quot;&gt;Appendix I: Examples&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; connect&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;provider&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;on&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;connect&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; chainId&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;  console&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;log&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;`&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Provider connected to: &lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;${&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;chainId&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;`&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
    </entry>
    <entry xml:lang="en">
        <title>Transaction Package</title>
        <published>2020-06-16T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Matt Garnett</name><uri>https://github.com/lightclient</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/2733/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-transaction-package/4365" />
        

        <id>https://wg-eips.ritovision.com/2733/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        

        
        <category
            term="tag:eip:2733"
            label="EIP-2733" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/2733/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;Creates a new transaction type which executes a package of one or more
transactions, while passing status information to subsequent transactions.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;Introduce a new transaction type which includes a list of transactions that
must be executed serially by clients. Execution information (e.g. success,
gas_used, etc.) will be propagated forward to the next transaction.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;Onboarding new users to Ethereum has been notoriously difficult due to the need
for new users to acquire enough ether to pay for their transactions. This
hurdle has seen a significant allocation of resources over the years to solve.
Today, that solution is meta-transactions. This is, unfortunately, a brittle
solution that requires signatures to be recovered within a smart contract to
authenticate the message. This EIP aims to provide a flexible framework for
relayers to &quot;sponsor&quot; many transactions at once, trustlessly.&lt;&#x2F;p&gt;
&lt;p&gt;Meta-transactions often use relay contracts to maintain nonces and allow users
to pay for gas using alternative assets. They have historically been designed
to catch reversions in their inner transactions by only passing a portion of
the available gas to the subcall. This allows them to be certain the outer call
will have enough gas to complete any required account, like processing a gas
payment. This type of subcall has been considered bad practice for a long time,
but in the case of where you don&#x27;t trust the subcalls, it is the only available
solution.&lt;&#x2F;p&gt;
&lt;p&gt;Transaction packages are an alternative that allow multiple transactions to be
bundled into one package and executed atomically, similarly to how relay
contracts operate. Transactions are able to pass their result to subsequent
transactions. This allows for conditional workflows based on the outcome of
previous transactions. Although this functionality is already possible as
described above, workflows using transaction packages are more robust, because
they are protected from future changes to the gas schedule.&lt;&#x2F;p&gt;
&lt;p&gt;An important byproduct of this EIP is that it also facilitates bundling
transactions for single users.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;Introduce a new &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2718&#x2F;&quot;&gt;EIP-2718&lt;&#x2F;a&gt; transaction type where &lt;code&gt;id = 2&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;structure&quot;&gt;Structure&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;struct TransactionPackage {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    chain_id: u256,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    children: [ChildPackage],&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    nonce: u64,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    gas_price: u256,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    v: u256,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    r: u256,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    s: u256&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h5 id=&quot;hash&quot;&gt;Hash&lt;&#x2F;h5&gt;
&lt;p&gt;&lt;code&gt;keccak256(rlp([2, chain_id, children, nonce, gas_price, v, r, s])&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h5 id=&quot;signature-hash&quot;&gt;Signature Hash&lt;&#x2F;h5&gt;
&lt;p&gt;&lt;code&gt;keccak256(rlp([2, chain_id, children, nonce, gas_price])&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h5 id=&quot;receipt&quot;&gt;Receipt&lt;&#x2F;h5&gt;
&lt;p&gt;Each &lt;code&gt;ChildTransaction&lt;&#x2F;code&gt; transaction will generate a &lt;code&gt;ChildReceipt&lt;&#x2F;code&gt; after execution. Each
of these receipts will be aggregated into a &lt;code&gt;Receipt&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;type Receipt = [ChildReceipt]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;struct ChildReceipt {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    status: u256,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    cumulative_gas_used: u256,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    logs_bloom: [u8; 256],&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    logs: [u8]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;child-transaction&quot;&gt;Child Transaction&lt;&#x2F;h4&gt;
&lt;p&gt;Let &lt;code&gt;ChildPackage&lt;&#x2F;code&gt; be interpreted as follows.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;struct ChildPackage {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    type: u8,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    nonce: u64,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    transactions: [ChildTransaction],&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    max_gas_price: u256,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    v: u256,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    r: u256,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    s: u256&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;struct ChildTransaction {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    flags: u8,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    to: Address,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    value: u256,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    data: [u8],&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    extra: [u8],&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    gas_limit: u256&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h5 id=&quot;types&quot;&gt;Types&lt;&#x2F;h5&gt;
&lt;p&gt;The &lt;code&gt;type&lt;&#x2F;code&gt; field is used to denote whether the &lt;code&gt;Child&lt;&#x2F;code&gt; signer wishes to
delegate the &lt;code&gt;max_gas_price&lt;&#x2F;code&gt; and &lt;code&gt;gas_limit&lt;&#x2F;code&gt; choice to the &lt;code&gt;TransactionPackage&lt;&#x2F;code&gt;
signer.&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;type&lt;&#x2F;th&gt;&lt;th&gt;signature hash&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;0x00&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;keccak256(rlp([0, nonce, transactions, max_gas_price])&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;0x01&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;keccak256(rlp([1, nonce, transactions_without_gas_limit])&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h3 id=&quot;validity&quot;&gt;Validity&lt;&#x2F;h3&gt;
&lt;p&gt;A &lt;code&gt;TransactionPackage&lt;&#x2F;code&gt; can be deemed valid or invalid as follows.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; is_valid&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;config&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;Config&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; state&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;State&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; TransactionPackage&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; bool&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;        config&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;chain_id&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; !=&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;chain_id &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;|&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;        tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;children&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;len&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;        state&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;nonce&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; +&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; !=&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;nonce&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    )&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;        return&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; cum_limit&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;children&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;|&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;x&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;|&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; x&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;gas_limit&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;sum&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; state&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;balance&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; cum_limit&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; *&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;gas_price &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;+&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; intrinsic_gas&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;tx&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;        return&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; child&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; in&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;children &lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;            child&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;nonce &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;!=&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; state&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;nonce&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;child&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; +&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;            child&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;value&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; state&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;balance&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;child&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;            child&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;max_gas_price&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;gas_price&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        )&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;            return&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;        for&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; in&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; child&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;txs &lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;            if&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;                tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;flags &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;!=&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;                tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;extra&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;len&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; !=&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;                tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;gas_limit&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; intrinsic_gas&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;tx&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            )&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;                return&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-constant&quot;&gt;    true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;results&quot;&gt;Results&lt;&#x2F;h3&gt;
&lt;p&gt;Subsequent &lt;code&gt;ChildTransaction&lt;&#x2F;code&gt;s will be able to receive the result of the
previous &lt;code&gt;ChildTransaction&lt;&#x2F;code&gt; via &lt;code&gt;RETURNDATACOPY (0x3E)&lt;&#x2F;code&gt; in first frame of
execution, before making any subcalls. Each element, except the last, will be
&lt;code&gt;0&lt;&#x2F;code&gt;-padded left to 32 bytes.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;struct Result {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; Status of the previous transaction&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    success: bool,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; Total gas used by the previous transaction&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    gas_used: u256,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; Cumulative gas used by previous transactions&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    cum_gas_used: u256,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; The size of the return value&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    return_size: u256,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &#x2F;&#x2F; The return value of the previous transaction&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    return_value: [u8]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;intrinsic-cost&quot;&gt;Intrinsic Cost&lt;&#x2F;h3&gt;
&lt;p&gt;Let the intrinsic cost of the transaction package be defined as follows:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;fn intrinsic_gas(tx: TransactionPackage) u256 {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    let data_gas = tx.children.map(|c| c.txs.map(|t| data_cost(&amp;amp;c.data)).sum()).sum();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    17000 + 8000 * tx.children.len() + data_gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;execution&quot;&gt;Execution&lt;&#x2F;h3&gt;
&lt;p&gt;Transaction packages should be executed as follows:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Deduct the cumulative cost from the outer signer&#x27;s balance.&lt;&#x2F;li&gt;
&lt;li&gt;Load the first child package, and execute the first child transaction.&lt;&#x2F;li&gt;
&lt;li&gt;Record all state changes, logs, the receipt, and refund any unused gas.&lt;&#x2F;li&gt;
&lt;li&gt;If there are no more child transactions, goto &lt;code&gt;8&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Compute &lt;code&gt;Result&lt;&#x2F;code&gt; for the previously executed transaction.&lt;&#x2F;li&gt;
&lt;li&gt;Prepare &lt;code&gt;Result&lt;&#x2F;code&gt; to be available via return opcodes in the next
transaction&#x27;s first frame.&lt;&#x2F;li&gt;
&lt;li&gt;Execute the next transaction, then goto &lt;code&gt;3&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Load the next child package, then goto &lt;code&gt;7&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;each-child-has-its-own-signature&quot;&gt;Each &lt;code&gt;Child&lt;&#x2F;code&gt; has its own signature&lt;&#x2F;h3&gt;
&lt;p&gt;For simplicity, the author has chosen to require each child package to specify
its own signature, even if the signer is the same as the package signer. This
choice is made to allow for maximum flexibility, with minimal client changes.
This transaction can still be used by a single user at the cost of only one
additional signature recovery.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;childpackage-specifies-max-gas-price-instead-of-gas-price&quot;&gt;&lt;code&gt;ChildPackage&lt;&#x2F;code&gt; specifies &lt;code&gt;max_gas_price&lt;&#x2F;code&gt; instead of &lt;code&gt;gas_price&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Allowing child packages to specify a range of acceptable gas prices is
strictly more versatile than a static price. It gives relayers more flexibility
in terms of building transaction bundles, and it makes it possible for relayers
to try and achieve the best price for the transaction sender. With a fixed
price, the relayer may require the user to sign multiple different
transactions, with varying prices. This can be avoided by specifying a max
price, and communicating out-of-band how the urgency of the transaction (e.g.
the relayer should package it with the max price immediately vs. slowly
increasing the gas price).
A future transaction type can be specified with only a single
signature, if such an optimization is desired.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;childpackage-is-also-typed&quot;&gt;&lt;code&gt;ChildPackage&lt;&#x2F;code&gt; is also typed&lt;&#x2F;h3&gt;
&lt;p&gt;The type element serves a modest role in the transaction type, denoting whether
the transaction signer wishes to delegate control of the gas price and gas
limit to the outer signer. This is a useful UX improvement when interacting
with a trusted relayer, as once the user decides to make a transaction the
relayer can ensure it is included on chain by choosing the best gas price and
limit.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-flags-and-extra-fields-aren-t-used&quot;&gt;The &lt;code&gt;flags&lt;&#x2F;code&gt; and &lt;code&gt;extra&lt;&#x2F;code&gt; fields aren&#x27;t used&lt;&#x2F;h3&gt;
&lt;p&gt;These fields are included to better support future changes to the transaction
type. This would likely be used in conjunction with the &lt;code&gt;flags&lt;&#x2F;code&gt; and &lt;code&gt;type&lt;&#x2F;code&gt;
fields. A benefit of explicitly defining them is that specialized serialization
of RLP can be avoided, simplifying clients and downstream infrastructure. The
author believe the cost of 2 bytes per transaction is acceptable for smoother
integration of future features.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;Contracts which rely on &lt;code&gt;ORIGIN (0x32) == CALLER (0x33) &amp;amp;&amp;amp; RETURNDATASIZE (0x3D) == 0x00&lt;&#x2F;code&gt; will now always fail in transaction packages, unless they are
the first executed transaction. It’s unknown if any contracts conduct this
check.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;p&gt;TBD&lt;&#x2F;p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;TBD&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;managing-packages-efficiently-in-the-mempool&quot;&gt;Managing packages efficiently in the mempool&lt;&#x2F;h3&gt;
&lt;p&gt;The introduction of a new transaction type brings along new concerns regarding
the mempool. Done naively, it could turn into a DDoS vector for clients. This
EIP has been written to reduce as much validation complexity as possible.&lt;&#x2F;p&gt;
&lt;p&gt;An existing invariant in the mempool that is desirable for new transactions to
maintain, is that transactions can be validated in constant time. This is also
possible for packaged transactions. There is an inherent 10Mb limit for RLPx
frames, so that would be the upper bound on transactions that could be included
in a package. On the other hand, clients can also just configure their own
bound locally (e.g. packages must be less than 1Mb). Validity can then be
determined by using the function above.&lt;&#x2F;p&gt;
&lt;p&gt;Once a package has been validated, it must continuously be monitored for nonce
invalidations within its package. One potential way to achieve this efficiently
is to modify the mempool to operate on thin pointers to the underlying
transaction. This will allow packages to ingest as many &quot;single&quot; transactions,
simplifying the facilities for monitoring changes. These &quot;parts&quot; of the package
can maintain a pointer to a structure with pointers to all the parts of the
package. This way, as soon as one part becomes invalid, it can request the
parent to invalidate all outstanding parts of the package.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Sponsored, expiring and batch transactions.</title>
        <published>2020-06-11T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Micah Zoltu</name><uri>https://github.com/MicahZoltu</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/2711/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-2711-separate-gas-payer-from-msg-sender/4353" />
        

        <id>https://wg-eips.ritovision.com/2711/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        

        
        <category
            term="tag:eip:2711"
            label="EIP-2711" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/2711/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;Creates a new transaction type that supports sponsored transactions (separate gas payer from sender), batch transactions (multiple transactions executed in sequence), and expiring transactions (transactions which are not valid after a certain timestamp).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;An EIP-2718 transaction with the type number &lt;code&gt;2&lt;&#x2F;code&gt; is a new type of transaction that includes support for:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Sponsored Transactions&lt;&#x2F;strong&gt;: an optional additional signature from which the account that will pay for gas (&lt;code&gt;GAS_PAYER&lt;&#x2F;code&gt;) can be recovered&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Batch Transactions&lt;&#x2F;strong&gt;: multiple transactions from the same sender that will be executed in sequence&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Expiring Transactions&lt;&#x2F;strong&gt;: an optional &lt;code&gt;validUntil&lt;&#x2F;code&gt; field that makes the transaction invalid after a certain point in time&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;sponsored-transactions&quot;&gt;Sponsored Transactions&lt;&#x2F;h3&gt;
&lt;p&gt;With the advent of tokens and especially stable coins, it has become common for users to not hold ETH in an account while they may have other assets of value in that account.  Some users don&#x27;t want to be exposed to the perceived volatility of ETH and instead would prefer to transact using other assets.  Unfortunately, since gas &lt;strong&gt;MUST&lt;&#x2F;strong&gt; be paid for with ETH, this prevents the user from transacting with their assets without first acquiring some ETH using some other means, and then using that ETH to pay fees.&lt;&#x2F;p&gt;
&lt;p&gt;This EIP proposes a mechanism by which we can allow people to transact without ever having to own any ETH by allowing someone else to cover gas costs.  The arrangements that enable the covering of gas costs is out of scope for this EIP but it could be an extra-protocol monthly subscription, payment could occur as part of the transaction being submitted, the recipient may be willing to cover gas costs, or it could be a free service offered as a value-add by a company that you are working with.&lt;&#x2F;p&gt;
&lt;p&gt;While it is possible to implement these sort of mechanisms at the individual contract layer, such solutions require integration by just about every contract and those solutions also end up depending on gas costs being stable with time in order to appropriately bake them into contracts without putting either party at risk of malicious participants in the system.  For this reason, it is believed that separating out &lt;code&gt;GAS_PAYER&lt;&#x2F;code&gt; from &lt;code&gt;msg.sender&lt;&#x2F;code&gt; at the protocol layer is valuable.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;batch-transactions&quot;&gt;Batch Transactions&lt;&#x2F;h3&gt;
&lt;p&gt;Often times an EOA may want to execute a series of transactions with a strong guarantee that they happen in order with nothing occurring between them.  For example, one may want to send some tokens to a contract and then follow that up with another transaction that makes a contract call on the destination address that causes those tokens to be registered to them.  By supporting transaction batching at layer 1, we can ensure that the user can get strong guarantees at signing time of cross-transaction atomicity.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;expiring-transactions&quot;&gt;Expiring Transactions&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;If any form of dust-account clearing is introduced, e.g. (https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;EIPs&#x2F;issues&#x2F;168), it will be necessary to introduce a replay protection, such as https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;EIPs&#x2F;issues&#x2F;169 . Having temporal replay protection removes the need to change nonce-behaviour in the state, since transactions would not be replayable at a later date than explicitly set by the user.&lt;&#x2F;li&gt;
&lt;li&gt;In many cases, such as during ICOs, a lot of people want their transactions to either become included soon (within a couple of hours) or not at all. Currently, transactions are queued and may not execute for several days, at a cost for both the user (who ends up paying gas for a failing purchase) and the network, dealing with the large transaction queues.&lt;&#x2F;li&gt;
&lt;li&gt;Node implementations have no commonly agreed metric for which transactions to keep, discard or propagate. Having a TTL on transactions would make it easier to remove stale transactions from the system.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;definitions&quot;&gt;Definitions&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;TransactionType&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt; 2.  See &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2718&#x2F;&quot;&gt;EIP-2718&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;TransactionSubtype&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt; is either 1, 2, 3, or 4.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;ChainId&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt; The transaction is valid if this value is &lt;code&gt;0&lt;&#x2F;code&gt; or it is included in a block on a chain whose ID is equal to this value.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;ValidUntil&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt; The transaction is valid if this value is &lt;code&gt;0&lt;&#x2F;code&gt; or it is included in a block whose &lt;code&gt;timestamp&lt;&#x2F;code&gt; is less than or equal to this value.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;YParity&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt; The parity (0 for even, 1 for odd) of the y-value of a secp256k1 signature.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;ChildTransaction&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt; A nested transaction consisting of &lt;code&gt;[to, value, data]&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;SenderPayload&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt; Defined based on the &lt;code&gt;TransactionSubtype&lt;&#x2F;code&gt; as follows:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;[1, ChildTransaction[], nonce, ChainId, ValidUntil, gasLimit, gasPrice]&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;[2, ChildTransaction[], nonce, ChainId, ValidUntil, gasLimit, gasPrice]&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;[3, ChildTransaction[], nonce, ChainId, ValidUntil, gasLimit]&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;[4, ChildTransaction[], nonce, ChainId, ValidUntil]&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;SenderSignature&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt; &lt;code&gt;[YParity, r, s]&lt;&#x2F;code&gt; of &lt;code&gt;secp256k1(keccak256(rlp([TransactionType, SenderPayload])))&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;GasPayerPayload&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt; Defined based on the &lt;code&gt;TransactionSubtype&lt;&#x2F;code&gt; as follows:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;[]&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;[]&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;[gasPrice]&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;[gasLimit, gasPrice]&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;GasPayerSignature&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt; is &lt;code&gt;[]&lt;&#x2F;code&gt; for &lt;code&gt;TransactionSubType&lt;&#x2F;code&gt; &lt;code&gt;1&lt;&#x2F;code&gt; or &lt;code&gt;[YParity, r, s]&lt;&#x2F;code&gt; of &lt;code&gt;secp256k1(keccak256(rlp([SenderPayload, SenderSignature, GasPayerPayload])))&lt;&#x2F;code&gt; for others.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;new-transaction-type&quot;&gt;New Transaction Type&lt;&#x2F;h3&gt;
&lt;p&gt;As of &lt;code&gt;FORK_BLOCK_NUMBER&lt;&#x2F;code&gt; an &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2718&#x2F;&quot;&gt;EIP-2718&lt;&#x2F;a&gt; transaction with a &lt;code&gt;TransactionType&lt;&#x2F;code&gt; of &lt;code&gt;2&lt;&#x2F;code&gt; will have its &lt;code&gt;Payload&lt;&#x2F;code&gt; interpreted as an RLP encoded tuple of:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[...SenderPayload, ...SenderSignature, ...GasPayerPayload, ...GasPayerSignature]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The address recovered from &lt;code&gt;SenderSignature&lt;&#x2F;code&gt; is the address...&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;...returned by the &lt;code&gt;CALLER&lt;&#x2F;code&gt; opcode (0x33, aka &lt;code&gt;msg.sender&lt;&#x2F;code&gt;) during the first call frame of the transaction&lt;&#x2F;li&gt;
&lt;li&gt;...returned by the &lt;code&gt;ORIGIN&lt;&#x2F;code&gt; opcode (0x32, aka &lt;code&gt;tx.origin&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;...whose &lt;code&gt;nonce&lt;&#x2F;code&gt; is used&lt;&#x2F;li&gt;
&lt;li&gt;...whose ETH balance is deducted if any value is attached to the transaction&lt;&#x2F;li&gt;
&lt;li&gt;...whose ETH balance is deducted to pay for gas if &lt;code&gt;GasPayerSignature&lt;&#x2F;code&gt; is not present&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;If &lt;code&gt;GasPayerSignature&lt;&#x2F;code&gt; is present, then the address recovered from it is the address...&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;...whose ETH balance is deducted to pay for gas&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;The base gas cost of transactions of this type will be &lt;code&gt;TRANSACTION_TYPE_2_BASE_GAS_PRICE&lt;&#x2F;code&gt; + &lt;code&gt;TRANSACTION_TYPE_2_CHILD_GAS_PRICE&lt;&#x2F;code&gt; * &lt;code&gt;n&lt;&#x2F;code&gt;, rather than the cost associated with transactions of type &lt;code&gt;0&lt;&#x2F;code&gt; and legacy transactions.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;new-transaction-receipt&quot;&gt;New Transaction Receipt&lt;&#x2F;h3&gt;
&lt;p&gt;As of &lt;code&gt;FORK_BLOCK_NUMBER&lt;&#x2F;code&gt; an &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2718&#x2F;&quot;&gt;EIP-2718&lt;&#x2F;a&gt; transaction receipt with a &lt;code&gt;TransactionType&lt;&#x2F;code&gt; of &lt;code&gt;2&lt;&#x2F;code&gt; will have its &lt;code&gt;Payload&lt;&#x2F;code&gt; interpreted as a &lt;code&gt;rlp([status, cumulativeGasUsed, logsBloom, logs][])&lt;&#x2F;code&gt; where each item of the array corresponds to the child-transaction at matching offset in the transaction type 2 &lt;code&gt;Payload&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;one-monolithic-eip&quot;&gt;One Monolithic EIP&lt;&#x2F;h3&gt;
&lt;p&gt;This EIP could be split up into multiple EIPs, one for each of the subtypes and one for the meta-type.  Alternatively, each of the subtypes could be a unique TransactionType.  The reason we chose to go with a single EIP with subtypes is because these 4 transactions all have a &lt;em&gt;lot&lt;&#x2F;em&gt; in common and each separate EIP would be almost identical to the previous.  We felt that in this case, splitting into multiple EIPs wasn&#x27;t worth the duplication of EIP content.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;chainid-not-encoded-with-v&quot;&gt;ChainID not encoded with &lt;code&gt;v&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;While we could save one byte in the common case by bundling the y-parity bit of the signature with the Chain ID like in EIP-155, this adds complexity to signing tools that the authors deem not worth it given the size of the transaction overall.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;optionality-of-chainid&quot;&gt;Optionality of ChainID&lt;&#x2F;h3&gt;
&lt;p&gt;Sometimes it is useful to have a transaction that &lt;em&gt;can&lt;&#x2F;em&gt; be replayed on multiple chains.  An example of this is when you construct a vanity signature for a transaction and have the &lt;code&gt;from&lt;&#x2F;code&gt; be whatever address that signature recovers to.  With the ability to have someone else be a gas payer (setting both the gas limit and the gas price), one can have transactions that deploy contracts which live at the same address on every chain.  While this can be accomplished with CREATE2 using legacy transactions, we have the opportunity here to simplify the process and enable potentially other future uses of deterministic transactions by making ChainID optional.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;optionality-of-validuntil&quot;&gt;Optionality of ValidUntil&lt;&#x2F;h3&gt;
&lt;p&gt;A user can set &lt;code&gt;ValidUntil&lt;&#x2F;code&gt; to a very large number which effectively makes it non-expiring.  By making &lt;code&gt;ValidUntil&lt;&#x2F;code&gt; optional, we can save some bytes on the wire by allowing such transactions to simply have a &lt;code&gt;0&lt;&#x2F;code&gt; (1 byte in RLP) value for this field.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;sender-sets-gaslimit-and-gasprice&quot;&gt;&lt;code&gt;SENDER&lt;&#x2F;code&gt; sets &lt;code&gt;gasLimit&lt;&#x2F;code&gt; and &lt;code&gt;gasPrice&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;This type of transaction is useful when the transaction may execute differently depending on what these values are set to.  By having the &lt;code&gt;SENDER&lt;&#x2F;code&gt; set both, we ensure that the &lt;code&gt;SENDER&lt;&#x2F;code&gt; has full control over the transaction details.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;sender-sets-gaslimit-gas-payer-sets-gasprice&quot;&gt;&lt;code&gt;SENDER&lt;&#x2F;code&gt; sets &lt;code&gt;gasLimit&lt;&#x2F;code&gt;, &lt;code&gt;GAS_PAYER&lt;&#x2F;code&gt; sets &lt;code&gt;gasPrice&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;This type of transaction is useful when the transaction may execute differently depending on how much gas it is allowed (e.g., number of loops) but where the &lt;code&gt;SENDER&lt;&#x2F;code&gt; would like to give the &lt;code&gt;GAS_PAYER&lt;&#x2F;code&gt; the ability to price the transaction to maximize chances of inclusion.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;gas-payer-sets-gaslimit-and-gasprice&quot;&gt;&lt;code&gt;GAS_PAYER&lt;&#x2F;code&gt; sets &lt;code&gt;gasLimit&lt;&#x2F;code&gt; and &lt;code&gt;gasPrice&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;This type of transaction allows the &lt;code&gt;SENDER&lt;&#x2F;code&gt; to define what they want to do, and leaves all worry about gas to the &lt;code&gt;GAS_PAYER&lt;&#x2F;code&gt;.  This is useful for transactions where the sender doesn&#x27;t care how much gas is used or the price that is paid and also either trusts the &lt;code&gt;GAS_PAYER&lt;&#x2F;code&gt; to be non-malicious or doesn&#x27;t care if the &lt;code&gt;SENDER&lt;&#x2F;code&gt;&#x27;s nonce is increased.  Such situations are useful when you have extra-protocol trust between the &lt;code&gt;SENDER&lt;&#x2F;code&gt; and &lt;code&gt;GAS_PAYER&lt;&#x2F;code&gt; and you want to separate concerns (what to do vs how to get included) for security or complexity reasons.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;nonces&quot;&gt;Nonces&lt;&#x2F;h3&gt;
&lt;p&gt;The inner transaction needs a nonce to protect themselves from replay attacks.  Since the inner transaction has a nonce, we get replay protection on the outer transaction as well, so it is not critical for security to have multiple parties provide a nonce.&lt;&#x2F;p&gt;
&lt;p&gt;We could have the &lt;code&gt;GAS_PAYER&lt;&#x2F;code&gt; provide a second nonce, but this would increase the payload size and require &lt;code&gt;GAS_PAYER&lt;&#x2F;code&gt; to do replace-by-fee (noisy for gossip) if they want to slip in a new (different inner) transaction with a higher gas price.  It would also create the possibility of a deadlock if the &lt;code&gt;SENDER&lt;&#x2F;code&gt; nonces aren&#x27;t ordered the same as the &lt;code&gt;GAS_PAYER&lt;&#x2F;code&gt; nonces, and if the &lt;code&gt;SENDER&lt;&#x2F;code&gt; nonce isn&#x27;t the lowest valid nonce for the &lt;code&gt;SENDER&lt;&#x2F;code&gt; then the &lt;code&gt;GAS_PAYER&lt;&#x2F;code&gt; can&#x27;t sign and submit yet.  Finally, client complexity increases slightly if a transaction has two nonces because you have to protect yourself from deadlocks and do more work to determine validity.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;validuntil&quot;&gt;ValidUntil&lt;&#x2F;h3&gt;
&lt;p&gt;For the dust-account clearing usecase,&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;This change is much less invasive in the consensus engine.
&lt;ul&gt;
&lt;li&gt;No need to maintain a consensus-field of &#x27;highest-known-nonce&#x27; or cap the number of transactions from a sender in a block.&lt;&#x2F;li&gt;
&lt;li&gt;Only touches the transaction validation part of the consensus engine&lt;&#x2F;li&gt;
&lt;li&gt;Other schemas which uses the &lt;code&gt;nonce&lt;&#x2F;code&gt; can have unintended side-effects,
&lt;ul&gt;
&lt;li&gt;such as inability to create contracts at certain addresses.&lt;&#x2F;li&gt;
&lt;li&gt;more difficult to integrate with offline signers, since more elaborate nonce-schemes requires state access to determine.&lt;&#x2F;li&gt;
&lt;li&gt;More intricate schemes like &lt;code&gt;highest-nonce&lt;&#x2F;code&gt; are a lot more difficult, since highest-known-nonce will be a consensus-struct that is incremented and possibly reverted during transaction execution, requiring one more journalled field.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;validuntil-as-timestamp-instead-of-block-number&quot;&gt;ValidUntil as timestamp instead of block number&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;The unix time is generally available in most settings, even on a computer which is offline. This means that even a setup where blockchain information is unavailable, the party signing a transaction can generate a transaction with the desired properties.&lt;&#x2F;li&gt;
&lt;li&gt;The correlation between time and block number is not fixed; even though a 13s blocktime is &#x27;desired&#x27;, this varies due to both network hashrate and difficulty bomb progression.&lt;&#x2F;li&gt;
&lt;li&gt;The block number is even more unreliable as a timestamp for testnets and private networks.&lt;&#x2F;li&gt;
&lt;li&gt;unix time is more user-friendly, a user can more easily decide on reasonable end-date for a transaction, rather than a suitable number of valid blocks.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;No known issues.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Limit size of `initcode`</title>
        <published>2020-05-18T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Martin Holst Swende</name><uri>https://github.com/holiman</uri>
	</author>
	
	<author>
		<name>Paweł Bylica</name><uri>https://github.com/chfast</uri>
	</author>
	
	<author>
		<name>Alex Beregszaszi</name><uri>https://github.com/axic</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/2677/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-2677-limit-size-of-initcode/4550" />
        

        <id>https://wg-eips.ritovision.com/2677/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        

        
        <category
            term="tag:eip:2677"
            label="EIP-2677" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/2677/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;Enforce a maximum size limit (&lt;code&gt;max_initcode_size&lt;&#x2F;code&gt;) of &lt;code&gt;49152&lt;&#x2F;code&gt; (&lt;code&gt;0xc000&lt;&#x2F;code&gt;) for &lt;code&gt;initcode&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;Enforce a maximum size limit (&lt;code&gt;max_initcode_size&lt;&#x2F;code&gt;) for &lt;code&gt;initcode&lt;&#x2F;code&gt;. If the size of &lt;code&gt;initcode&lt;&#x2F;code&gt; exceeds &lt;code&gt;max_initcode_size&lt;&#x2F;code&gt;, then contract creation fails with an out of gas error.&lt;&#x2F;p&gt;
&lt;p&gt;Since &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;170&#x2F;&quot;&gt;EIP-170&lt;&#x2F;a&gt; was implemented, there has been a size limit of &lt;code&gt;24576&lt;&#x2F;code&gt; (&lt;code&gt;0x6000&lt;&#x2F;code&gt;) on contract code. We propose to also limit the size of executable code to &lt;code&gt;2x&lt;&#x2F;code&gt; the above limit, i.e. &lt;code&gt;49152&lt;&#x2F;code&gt; (&lt;code&gt;0xc000&lt;&#x2F;code&gt;).&lt;&#x2F;p&gt;
&lt;p&gt;This also leads to two nice properties:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;instruction offset in code fits 16-bit value,&lt;&#x2F;li&gt;
&lt;li&gt;code size fits 16-bit value.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;When a client executes &lt;code&gt;initcode&lt;&#x2F;code&gt;, the client has to perform a jumpdest analysis. In some cases, the client also performs a &lt;code&gt;hash&lt;&#x2F;code&gt; of the code:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;To use as a key in a mapping containing the result of a jumpdest analysis&lt;&#x2F;li&gt;
&lt;li&gt;To use for address calculation within &lt;code&gt;CREATE2&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The work performed during a jumpdest analysis scales linearly with the size of the code. Currently, a transaction can expand the memory once, and reuse the same memory segment (with minor modifications) to force the client to perform a lot of analysis&#x2F;hashing, leading to slow block processing.&lt;&#x2F;p&gt;
&lt;p&gt;Historically, this was exploited in June 2017, precipitating the 1.6.5-patch release of &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;go-ethereum&#x2F;releases&#x2F;tag&#x2F;v1.6.5&quot;&gt;geth&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The work performed during address calculation within &lt;code&gt;CREATE2&lt;&#x2F;code&gt; is charged in proportion with size of the code.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;There are three situations where this is applicable:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;CREATE&lt;&#x2F;code&gt;,&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;CREATE2&lt;&#x2F;code&gt;,&lt;&#x2F;li&gt;
&lt;li&gt;creation using a transaction with empty receiver.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;In all these (and future) cases, the EVM should fail with Out Of Gas error if the code has a length more than &lt;code&gt;max_initcode_size&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;TBA&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP requires a &quot;network upgrade&quot;, since it modifies consensus-rules.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;For client implementations, this EIP makes attacks based on jumpdest-analysis or hashing of code less problematic, so should increase the robustness of clients.&lt;&#x2F;p&gt;
&lt;p&gt;For layer 2, this EIP introduces failure-modes where there previously were none. There &lt;em&gt;could&lt;&#x2F;em&gt; exist factory-contracts which deploy multi-level contract hierarchies, such that the code for multiple contracts are included in the initcode of the first contract. The author(s) of this EIP are not aware of any such contracts.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;p&gt;Test cases should include the following cases,&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;CREATE&lt;&#x2F;code&gt;&#x2F;&lt;code&gt;CREATE2&lt;&#x2F;code&gt;&#x2F;&lt;code&gt;tx create&lt;&#x2F;code&gt; with &lt;code&gt;initcode_size&lt;&#x2F;code&gt; at &lt;code&gt;max_initcode_size&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;CREATE&lt;&#x2F;code&gt;&#x2F;&lt;code&gt;CREATE2&lt;&#x2F;code&gt;&#x2F;&lt;code&gt;tx create&lt;&#x2F;code&gt; with &lt;code&gt;initcode_size&lt;&#x2F;code&gt; at &lt;code&gt;max_initcode_size+1&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;TBA&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Updates and Updated-by Header</title>
        <published>2020-01-06T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Edson Ayllon</name><uri>https://github.com/edsonayllon</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/2458/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://github.com/ethereum/EIPs/issues/2453" />
        

        <id>https://wg-eips.ritovision.com/2458/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="informational"
                label="Informational" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        

        
        <category
            term="tag:eip:2458"
            label="EIP-2458" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/2458/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;Adds EIP header options &lt;code&gt;updates&lt;&#x2F;code&gt; and &lt;code&gt;updated-by&lt;&#x2F;code&gt; to frontmatter of &lt;code&gt;active&lt;&#x2F;code&gt; EIPs for use as needed.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;EIP headers &lt;code&gt;updates&lt;&#x2F;code&gt; and &lt;code&gt;updated-by&lt;&#x2F;code&gt; are used for updating &lt;code&gt;active&lt;&#x2F;code&gt; EIPs. This is to make the improvement process of EIPs more modular, and have updates to existing &lt;code&gt;active&lt;&#x2F;code&gt; EIPs receive similar exposures to EIPs which replace existing &lt;code&gt;final&lt;&#x2F;code&gt; EIPs.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;Currently, EIP1 specifies EIP headers: &lt;code&gt;updated&lt;&#x2F;code&gt;, &lt;code&gt;replaces&lt;&#x2F;code&gt;, and &lt;code&gt;superseded-by&lt;&#x2F;code&gt;. Headers &lt;code&gt;replaces&lt;&#x2F;code&gt; and &lt;code&gt;superseded-by&lt;&#x2F;code&gt; indicates when an entire EIP is being replaced by another EIP, indicating when an EIP is now historical, and is updated by a new standard.&lt;&#x2F;p&gt;
&lt;p&gt;The header &lt;code&gt;updated&lt;&#x2F;code&gt; indicates the date an EIP has received an update by EIP authors and editors, an example EIP being EIP1. &lt;code&gt;updated&lt;&#x2F;code&gt; is reserved for EIPs in &lt;code&gt;draft&lt;&#x2F;code&gt; or &lt;code&gt;active&lt;&#x2F;code&gt; status.&lt;&#x2F;p&gt;
&lt;p&gt;In the case of &lt;code&gt;active&lt;&#x2F;code&gt; status, an EIP may receive an update, but these updates don&#x27;t operate as with EIPs in &lt;code&gt;final&lt;&#x2F;code&gt; status, where a historical EIP is created, and the new EIP is referenced by the historical one. While these updates are not kept immutably, updates to active EIPs can be done modularly by creating a new EIP that goes through the standard discussion and auditing process EIPs undergo. The EIP headers &lt;code&gt;updates&lt;&#x2F;code&gt; and &lt;code&gt;updated-by&lt;&#x2F;code&gt; are to facilitate this modularity. Creating a new EIP also provides sufficient notification to affected stakeholders of an active EIP before that EIP is &lt;code&gt;updated&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;updated-by&quot;&gt;&lt;code&gt;updated-by&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;code&gt;updated-by&lt;&#x2F;code&gt; is reserved for EIPs in &lt;code&gt;active&lt;&#x2F;code&gt; status. For an EIP in status &lt;code&gt;active&lt;&#x2F;code&gt;, updates to that EIP, which update the header &lt;code&gt;updated&lt;&#x2F;code&gt;, should be started by opening a new EIP to start vetting for that update. When an &lt;code&gt;active&lt;&#x2F;code&gt; EIP receives a new entry to header &lt;code&gt;updated&lt;&#x2F;code&gt;, an associated &lt;code&gt;updated-by&lt;&#x2F;code&gt; EIP listing should be included, where that newly listed EIP has reached &lt;code&gt;final&lt;&#x2F;code&gt; status.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;updates&lt;&#x2F;code&gt; should be included as an EIP header, as all EIP headers, and include a reference to an EIP designation. When multiple EIP designations are referenced, each should be separated by a comma. Example:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;updated-by: 9999, 9998, 9997&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;updates&quot;&gt;&lt;code&gt;updates&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;code&gt;updates&lt;&#x2F;code&gt; is reserved for EIPs updating EIPs in &lt;code&gt;active&lt;&#x2F;code&gt; status. An EIP listed as &lt;code&gt;updates&lt;&#x2F;code&gt; is implied to also be &lt;code&gt;requires&lt;&#x2F;code&gt;; only &lt;code&gt;updates&lt;&#x2F;code&gt; is needed for those EIP listings. Having an EIP listing &lt;code&gt;updates&lt;&#x2F;code&gt; does not necessarily mean that referenced EIP must reference back with an &lt;code&gt;updated-by&lt;&#x2F;code&gt; listing.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;updates&lt;&#x2F;code&gt; should be included as an EIP header, as all EIP headers, and include a reference to an EIP designation. When multiple EIP designations are referenced, each should be separated by a comma. Example:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;updates: 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;code&gt;updates&lt;&#x2F;code&gt; and &lt;code&gt;updated-by&lt;&#x2F;code&gt; apply only to EIPs in &lt;code&gt;active&lt;&#x2F;code&gt; status as updates to EIPs in &lt;code&gt;final&lt;&#x2F;code&gt; status are already handled by EIP headers &lt;code&gt;superseded-by&lt;&#x2F;code&gt; and &lt;code&gt;replaces&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The syntax should align with previous EIP header syntax, as this EIP is not updating syntax, simply adding header options.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;These EIP headers are optional and do not introduce compatibility issues.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;An implementation is adding a header option.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;This standard is informational and does not introduce technical security issues.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Simple Subroutines for the EVM</title>
        <published>2019-10-17T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:28+00:00</updated>
	
	
	<author>
		<name>Greg Colvin</name><uri>https://github.com/gcolvin</uri>
	</author>
	
	<author>
		<name>Martin Holst Swende</name><uri>https://github.com/holiman</uri>
	</author>
	
	<author>
		<name>Brooklyn Zelenka</name><uri>https://github.com/expede</uri>
	</author>
	
	<author>
		<name>John Max Skaller</name><email>skaller@internode.on.net</email>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/2315/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-2315-simple-subroutines-for-the-evm/3941" />
        

        <id>https://wg-eips.ritovision.com/2315/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        

        
        <category
            term="tag:eip:2315"
            label="EIP-2315" />
        

        
        

        
        <summary type="html">Two opcodes for efficient, safe, and static subroutines.</summary>
        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/2315/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;This proposal provides a &lt;em&gt;complete&lt;&#x2F;em&gt;, &lt;em&gt;efficient&lt;&#x2F;em&gt;, &lt;em&gt;safe&lt;&#x2F;em&gt; and &lt;em&gt;static&lt;&#x2F;em&gt; control-flow facility.&lt;&#x2F;p&gt;
&lt;p&gt;It introduces two new opcodes to support calling and returning from subroutines:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;RJUMPSUB relative_offset&lt;&#x2F;code&gt; -- relative jump to subroutine&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;RETURNSUB&lt;&#x2F;code&gt; -- return to &lt;code&gt;PC&lt;&#x2F;code&gt; after most recent &lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;It depends on the two new opcodes proposed by &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;4200&#x2F;&quot;&gt;EIP-4200&lt;&#x2F;a&gt; to support static jumps:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;RJUMP relative_offset&lt;&#x2F;code&gt; — relative jump to &lt;code&gt;PC + relative_offset&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;RJUMPI relative_offset&lt;&#x2F;code&gt; — conditional relative jump&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;It deprecates &lt;code&gt;JUMP&lt;&#x2F;code&gt; and &lt;code&gt;JUMPI&lt;&#x2F;code&gt;, allowing valid code to support streaming, one-pass, and other near-linear compilers.&lt;&#x2F;p&gt;
&lt;p&gt;In concert with &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;3540&#x2F;&quot;&gt;EIP-3540&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;3670&#x2F;&quot;&gt;EIP-3670&lt;&#x2F;a&gt; it ensures, at initialization time, that valid code will not execute invalid instructions or jump to invalid locations, will not underflow stack, will maintain consistent numbers of inputs and outputs for subroutines, and will have bounded stack height in the absence of recursion.&lt;&#x2F;p&gt;
&lt;p&gt;This is among the simplest possible proposals that meets these requirements.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;a-complete-control-flow-facility&quot;&gt;A complete control-flow facility.&lt;&#x2F;h3&gt;
&lt;p&gt;Jumps, conditional jumps and subroutines were proposed by Alan Turing in 1945 as a means of organizing the logic of the code and the design of the memory crystals for his Automatic Computing Engine:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;We wish to be able to arrange that sequences of orders can divide at various points, continuing in different ways according to the outcome of the calculations to date...  We also wish to be able to arrange for the splitting up of operations into subsidiary operations... To start on a subsidiary operation we need only make a note of where we left off the major operation and then apply the first instruction of the subsidiary.  When the subsidiary is over we look up the note and continue with the major operation.&lt;&#x2F;p&gt;
&lt;p&gt;— Alan Turing — in B.E. Carpenter, R.W. Doran, &quot;The other Turing machine.&quot; The Computer Journal, Volume 20, Issue 3, January 1977.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;In more contemporary terms, we have sequences of instructions, jumps and conditional jumps that divide sequences into blocks, subroutine calls, and a stack of addresses to return to.  The details vary, but similar facilities have proven their value across a long line of important machines over the last 75 years, including most all of the machines we have programmed or implemented -- physical machines including the Burroughs 5000, CDC 7600, IBM 360, DEC PDP-11 and VAX, Motorola 68000, Sun SPARC, and Intel x86s, as well as virtual machines for Scheme, Forth, Pascal, Java, Wasm, and others.&lt;&#x2F;p&gt;
&lt;p&gt;Unlike these machines, the Ethereum Virtual Machine &lt;em&gt;does not&lt;&#x2F;em&gt; provide subroutine operations. Instead, they must be synthesized using the dynamic &lt;code&gt;JUMP&lt;&#x2F;code&gt; instruction, which takes its destination on the stack. Further, the EVM provides &lt;em&gt;only&lt;&#x2F;em&gt; dynamic jumps, impeding the static analysis we need.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;efficient-control-flow&quot;&gt;Efficient control-flow.&lt;&#x2F;h3&gt;
&lt;p&gt;Efficient to write by hand, compile from high level labguages, validate at deploy time, interpret by VMs, and compile to machine code.&lt;&#x2F;p&gt;
&lt;p&gt;Static jumps, conditional jumps, and subroutines are sufficient and efficient in space and time, as shown by historical experience and as we will show for the EVM below.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;safe-control-flow&quot;&gt;Safe control-flow.&lt;&#x2F;h3&gt;
&lt;p&gt;The EVM has unusually high requirements for safety.  Not only do many smart contracts control inordinately large amounts of valuable Ether, but once placed on the blockchain any defects are visible to attackers and cannot be repaired.  We propose to statically validate important safety constraints on code at initialization time.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;static-control-flow&quot;&gt;Static control-flow.&lt;&#x2F;h3&gt;
&lt;p&gt;The EVM&#x27;s dynamic jumps cause two major problems. First, the need to synthesize static jumps and subroutines with dynamic jumps wastes space and gas with needlessly complex code, as we will show below.&lt;&#x2F;p&gt;
&lt;p&gt;Worse, jumps that can dynamically branch to any destination in the code can cause quadratic &quot;path explosions&quot; when traversing the flow of control. For Ethereum, this is a denial-of-service vulnerability that prevents us, at initialization time, from validating the safe use of EVM code and from compiling EVM code to machine code.&lt;&#x2F;p&gt;
&lt;p&gt;We &lt;em&gt;need&lt;&#x2F;em&gt; static control-flow to validate program safety and to compile EVM bytecode to machine code -- in time and space linear in the size of the code.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;opcodes&quot;&gt;Opcodes&lt;&#x2F;h3&gt;
&lt;h4 id=&quot;rjumpsub-0x5f-relative-offset&quot;&gt;&lt;code&gt;RJUMPSUB (0x5f) relative_offset&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;Transfers control to a subroutine.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Decode the &lt;code&gt;relative_offset&lt;&#x2F;code&gt; from the immediate data at &lt;code&gt;PC&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Push the current &lt;code&gt;PC + 3&lt;&#x2F;code&gt; to the &lt;code&gt;return stack&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Set &lt;code&gt;PC&lt;&#x2F;code&gt; to &lt;code&gt;PC + relative_offset&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;The &lt;code&gt;relative_offset&lt;&#x2F;code&gt; is relative to the current &lt;code&gt;PC&lt;&#x2F;code&gt;. The offset is encoded as a two-byte, twos-complement signed integer, stored MSB-first.&lt;&#x2F;p&gt;
&lt;p&gt;The gas cost is &lt;em&gt;low&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;returnsub-0x5e&quot;&gt;&lt;code&gt;RETURNSUB (0x5e)&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;Returns control to the caller of a subroutine.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Pop the &lt;code&gt;return stack&lt;&#x2F;code&gt; to &lt;code&gt;PC&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;The gas cost is &lt;em&gt;verylow&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;Notes:&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Values popped off the &lt;code&gt;return stack&lt;&#x2F;code&gt; do not need to be validated, since they are alterable only by &lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt; and &lt;code&gt;RETURNSUB&lt;&#x2F;code&gt;.&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;em&gt;The description above lays out the semantics of these instructions in terms of a &lt;code&gt;return stack&lt;&#x2F;code&gt;.  But the actual state of the &lt;code&gt;return stack&lt;&#x2F;code&gt; is not observable by EVM code or consensus-critical to the protocol.  (For example, a node implementer may code &lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt; to unobservably push &lt;code&gt;PC&lt;&#x2F;code&gt; on the &lt;code&gt;return stack&lt;&#x2F;code&gt; rather than &lt;code&gt;PC + 1&lt;&#x2F;code&gt;, which is allowed so long as &lt;code&gt;RETURNSUB&lt;&#x2F;code&gt; observably returns control to the &lt;code&gt;PC + 3&lt;&#x2F;code&gt; location.)&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;validity&quot;&gt;Validity&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;em&gt;Execution&lt;&#x2F;em&gt; is defined in the Yellow Paper as a sequence of changes in the EVM state.  The conditions on valid code are preserved by state changes.  At runtime, if execution of an instruction would violate a condition the execution is in an exceptional halting state.  The Yellow Paper defines six such states.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Insufficient gas&lt;&#x2F;li&gt;
&lt;li&gt;More than 1024 stack items&lt;&#x2F;li&gt;
&lt;li&gt;State modification during a static call&lt;&#x2F;li&gt;
&lt;li&gt;Insufficient stack items&lt;&#x2F;li&gt;
&lt;li&gt;Invalid jump destination&lt;&#x2F;li&gt;
&lt;li&gt;Invalid instruction&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;We would like to consider EVM code valid iff no execution of the program can lead to an exceptional halting state.  In practice, we must test at runtime for the first three conditions.  We don’t know how much gas there will be, we don’t know how deep a recursion may go, analysis of stack depth even for non-recursive programs is nontrivial, and we don&#x27;t know whether a call will be static.  All of the remaining conditions MUST be validated statically, in time and space quasi-linear in the size of the code.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;static-constraints-on-valid-code&quot;&gt;Static Constraints on Valid Code&lt;&#x2F;h4&gt;
&lt;ul&gt;
&lt;li&gt;Every instruction MUST be valid:
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;JUMP&lt;&#x2F;code&gt; and &lt;code&gt;JUMPI&lt;&#x2F;code&gt; instructions ARE NOT valid.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Every jump MUST be valid:
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;RJUMP&lt;&#x2F;code&gt;, &lt;code&gt;RJUMPI&lt;&#x2F;code&gt;, or &lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt; instructions MUST NOT address immediate data or addresses outside of their code section.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;The stacks MUST be valid:
&lt;ul&gt;
&lt;li&gt;The number of items on the &lt;code&gt;data stack&lt;&#x2F;code&gt; MUST always be positive.&lt;&#x2F;li&gt;
&lt;li&gt;The number of items on the &lt;code&gt;return stack &lt;&#x2F;code&gt;MUST always be positive.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;The data stack MUST be consistently aligned:
&lt;ul&gt;
&lt;li&gt;The data stack height is
&lt;ul&gt;
&lt;li&gt;the absolute difference between the current &lt;code&gt;stack pointer&lt;&#x2F;code&gt; and the &lt;code&gt;stack pointer&lt;&#x2F;code&gt; on entry to the current subroutine.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;It MUST be the same for every reachable path through a given &lt;code&gt;PC&lt;&#x2F;code&gt; and&lt;&#x2F;li&gt;
&lt;li&gt;MUST NOT exceed 1024.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;This is a purely semantic specification, placing no constraints on the syntax of code sections beyond being a sequence of opcodes and immediate data – a subroutine is not a contiguous sequence of bytecode, it is a subgraph of the bytecode&#x27;s control-flow graph.  The EVM is a simple state machine.  We only promise that valid code will not, as it were, jam up the gears of the machine.&lt;&#x2F;p&gt;
&lt;p&gt;By avoiding syntactic constraints we allow for optimizations like tail call elimination, multiple-entry subroutines, moving &quot;cold&quot; code out of line, and other ways of reducing redundancy and keeping &quot;hot&quot; code in cache.   Since we wish to support one-pass compilation of EVM code to machine code it is crucial that the EVM code be as well optimized as possible up front.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;validation&quot;&gt;Validation&lt;&#x2F;h3&gt;
&lt;p&gt;Rather than enforce constraints via syntax, we enforce them via validation.&lt;&#x2F;p&gt;
&lt;p&gt;The constraints on valid code cover all of the exceptional halting states that we can validate and allow code to be validated and compiled in time and space quasi-linear in the size of the code.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;code&gt;RJUMP&lt;&#x2F;code&gt;, &lt;code&gt;RJUMPI&lt;&#x2F;code&gt; and &lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt; instructions take their &lt;em&gt;relative_offset&lt;&#x2F;em&gt; as immediate arguments, which cannot change at runtime.  Having constant destinations for all jumps means that all jump destinations can be validated at initialization time, not runtime.  Dynamic jumps can branch to any destination in the code, so exploitable quadratic &quot;path explosions&quot; are possible when traversing the control flow graph. Deprecating &lt;code&gt;JUMP&lt;&#x2F;code&gt; and &lt;code&gt;JUMPI&lt;&#x2F;code&gt; prevents this.&lt;&#x2F;p&gt;
&lt;p&gt;Requiring a consistently aligned &lt;code&gt;data stack&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;prevents stack underflow&lt;&#x2F;li&gt;
&lt;li&gt;ensures that all calls to a subroutine have the same number of inputs and the same number of outputs and&lt;&#x2F;li&gt;
&lt;li&gt;ensures that stack height is bounded in the absence of recursion.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Requiring a consistently aligned &lt;code&gt;data stack&lt;&#x2F;code&gt; also allows some algorithms that traverse the control-flow graph -- including code validation and compilation -- to break cycles at joins, again preventing quadratic path explosion.  When a traversal gets to a &lt;code&gt;PC&lt;&#x2F;code&gt; it has visited before it is either at the beginning of a loop or the entry to a function.  Since the stack height at that &lt;code&gt;PC&lt;&#x2F;code&gt; is constant we know that loops will not grow stack, and that the number of arguments to a subroutine will always be the same -- there may be no need to traverse that path again.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;Note: The JVM and Wasm enforce similar constraints for similar reasons.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;alternative-designs&quot;&gt;Alternative Designs&lt;&#x2F;h3&gt;
&lt;p&gt;There are a few major designs for a subroutine facility, two of which are considered here.  The others are mostly not appropriate for the EVM, such as the Wheeler Jump -- self-modifying code that writes return addresses into called subroutines.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;1. Keep return addresses on a dedicated return stack.&lt;&#x2F;em&gt; Turing&#x27;s design is often used by stack machines, including those for Forth, Java, Wasm, and others.  The data stack is used for computation, with a dedicated stack for return addresses.  A single instruction suffices to call, and another to return from a routine.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;2. Keep return addresses on the data stack.&lt;&#x2F;em&gt;  This design is often used by register machines, including those from CDC, IBM, DEC, Intel, and ARM.  The registers are used primarily for computation, and the stack maintains call frames for return addresses, arguments, and local variables.  On the EVM there are no registers for computation, so using the stack for both purposes can cause the sort of inefficiencies we see below.  Pascal p-code does use this design, but as part of a complex calling convention with dedicated registers.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;we-prefer-the-dedicated-return-stack&quot;&gt;We prefer the dedicated return stack.&lt;&#x2F;h4&gt;
&lt;ul&gt;
&lt;li&gt;It maintains a clear separation between calculation and flow of control:
&lt;ul&gt;
&lt;li&gt;the data stack is free of vulnerable return addresses and&lt;&#x2F;li&gt;
&lt;li&gt;it&#x27;s impossible to overwrite the return stack.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;It improves efficiency:
&lt;ul&gt;
&lt;li&gt;it uses native arithmetic rather than 256-bit EVM instructions for the return address,&lt;&#x2F;li&gt;
&lt;li&gt;doesn&#x27;t use up a &lt;code&gt;data stack&lt;&#x2F;code&gt; slot for the return address and&lt;&#x2F;li&gt;
&lt;li&gt;needs less motion of 256-bit data on the stack.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;efficiency&quot;&gt;Efficiency&lt;&#x2F;h3&gt;
&lt;p&gt;We illustrate here how subroutine instructions can be used to reduce the complexity and gas costs of both ordinary and optimized subroutine calls compared to using &lt;code&gt;JUMP&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;simple-subroutine-call&quot;&gt;&lt;strong&gt;Simple Subroutine Call&lt;&#x2F;strong&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;Consider these examples of a fairly minimal subroutine, including the code to call it.&lt;&#x2F;p&gt;
&lt;p&gt;Subroutine call, using &lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SQUARE:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    dup1            ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    mul             ; 5 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    returnsub       ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;CALL_SQUARE:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    push 0x02       ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    rjumpsub SQUARE ; 5 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;em&gt;Total gas: 19&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Subroutine call, using &lt;code&gt;JUMP&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SQUARE:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jumpdest        ; 1 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    swap1           ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    dup1            ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    mul             ; 5 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    swap1           ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jump            ; 8 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;CALL_SQUARE:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jumpdest        ; 1 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    push 0x02       ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    push RTN_CALL:  ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    push SQUARE     ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jump            ; 8 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;RTN_CALL:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jumpdest        ; 1 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;em&gt;Total: 41 gas&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Using &lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt; versus &lt;code&gt;JUMP&lt;&#x2F;code&gt; saves &lt;em&gt;41 - 19 = 22 gas&lt;&#x2F;em&gt; — a &lt;em&gt;54%&lt;&#x2F;em&gt; improvement.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;tail-call-optimization&quot;&gt;&lt;strong&gt;Tail Call Optimization&lt;&#x2F;strong&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;Of course in cases like this one we can optimize the tail call, so that the return from &lt;code&gt;SQUARE&lt;&#x2F;code&gt; actually returns from &lt;code&gt;TEST_SQUARE&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Tail call optimization, using &lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt; and &lt;code&gt;RETURNSUB&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SQUARE:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    dup1            ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    mul             ; 5 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    returnsub       ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;CALL_SQUARE:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    push 0x02       ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    rjump SQUARE    ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;em&gt;Total: 17 gas&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Tail call optimization, using &lt;code&gt;JUMP&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SQUARE:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jumpdest        ; 1 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    swap1           ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    dup1            ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    mul             ; 5 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    swap2           ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jump            ; 8 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;CALL_SQUARE:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jumpdest        ; 1 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    push 0x02       ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    push SQUARE     ; 3 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    jump            ; 8 gas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;em&gt;Total: 38 gas&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Using &lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt; versus &lt;code&gt;JUMP&lt;&#x2F;code&gt; saves &lt;em&gt;38 - 17 = 21 gas&lt;&#x2F;em&gt; — a &lt;em&gt;55%&lt;&#x2F;em&gt; improvement.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;efficiency-caveats&quot;&gt;Efficiency Caveats&lt;&#x2F;h4&gt;
&lt;p&gt;We can see that these instructions provide a simpler and more gas-efficient subroutine mechanism than using &lt;code&gt;JUMP&lt;&#x2F;code&gt; — in our examples they cut gas use by about half.&lt;&#x2F;p&gt;
&lt;p&gt;Clearly, the benefits of this efficiency are greater for programs that have been factored into smaller subroutines.  How small?  Wrapping code in a subroutine costs only &lt;em&gt;8 gas&lt;&#x2F;em&gt; using &lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt; and &lt;code&gt;RETURNSUB&lt;&#x2F;code&gt; versus &lt;em&gt;30 gas&lt;&#x2F;em&gt; using &lt;code&gt;JUMP&lt;&#x2F;code&gt;, &lt;code&gt;PUSH&lt;&#x2F;code&gt; and &lt;code&gt;SWAP&lt;&#x2F;code&gt; as above.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;costs&quot;&gt;Costs&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;em&gt;low&lt;&#x2F;em&gt; cost of &lt;code&gt;RJUMPSUB&lt;&#x2F;code&gt; versus the &lt;em&gt;mid&lt;&#x2F;em&gt; cost of &lt;code&gt;JUMP&lt;&#x2F;code&gt; is justified by needing only to decode the immediate two byte destination to the &lt;code&gt;PC&lt;&#x2F;code&gt; and push the return address on the &lt;code&gt;return stack&lt;&#x2F;code&gt;, all using native arithmetic, versus using the data stack with emulated 256-bit instructions.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;em&gt;verylow&lt;&#x2F;em&gt; cost of &lt;code&gt;RETURNSUB&lt;&#x2F;code&gt; is justified by needing only to pop the &lt;code&gt;return stack&lt;&#x2F;code&gt; into the &lt;code&gt;PC&lt;&#x2F;code&gt;.  Benchmarking will be needed to tell if the costs are well-balanced.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;These changes affect the semantics of existing EVM code: bytes that would have been interpreted as valid jump destinations may now be interpreted as immediate data.  Since this proposal depends on the Ethereum Object Format to signal the change this is not a practical issue.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;simple-routine&quot;&gt;Simple routine&lt;&#x2F;h3&gt;
&lt;p&gt;This should jump into a subroutine, back out and stop.&lt;&#x2F;p&gt;
&lt;p&gt;Bytecode: &lt;code&gt;0x5f0003005e&lt;&#x2F;code&gt; (&lt;code&gt;RJUMPSUB 3, RETURNSUB, STOP&lt;&#x2F;code&gt;)&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Pc&lt;&#x2F;th&gt;&lt;th&gt;Op&lt;&#x2F;th&gt;&lt;th&gt;Cost&lt;&#x2F;th&gt;&lt;th&gt;Stack&lt;&#x2F;th&gt;&lt;th&gt;RStack&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;0&lt;&#x2F;td&gt;&lt;td&gt;RJUMPSUB&lt;&#x2F;td&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;2&lt;&#x2F;td&gt;&lt;td&gt;STOP&lt;&#x2F;td&gt;&lt;td&gt;0&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;3&lt;&#x2F;td&gt;&lt;td&gt;RETURNSUB&lt;&#x2F;td&gt;&lt;td&gt;3&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;Output: 0x
Consumed gas: &lt;code&gt;10&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;two-levels-of-subroutines&quot;&gt;Two levels of subroutines&lt;&#x2F;h3&gt;
&lt;p&gt;This should execute fine, going into one two depths of subroutines&lt;&#x2F;p&gt;
&lt;p&gt;Bytecode: &lt;code&gt;0x5f00045F00025200&lt;&#x2F;code&gt; (&lt;code&gt;RJUMPSUB 4, RJUMPSUB 2, RETURNSUB, RETURNSUB, STOP&lt;&#x2F;code&gt;)&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Pc&lt;&#x2F;th&gt;&lt;th&gt;Op&lt;&#x2F;th&gt;&lt;th&gt;Cost&lt;&#x2F;th&gt;&lt;th&gt;Stack&lt;&#x2F;th&gt;&lt;th&gt;RStack&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;0&lt;&#x2F;td&gt;&lt;td&gt;RJUMPSUB&lt;&#x2F;td&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;3&lt;&#x2F;td&gt;&lt;td&gt;RJUMPSUB&lt;&#x2F;td&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;4&lt;&#x2F;td&gt;&lt;td&gt;RETURNSUB&lt;&#x2F;td&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;td&gt;RETURNSUB&lt;&#x2F;td&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;6&lt;&#x2F;td&gt;&lt;td&gt;STOP&lt;&#x2F;td&gt;&lt;td&gt;0&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;Consumed gas: &lt;code&gt;20&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;failure-1-invalid-jump&quot;&gt;Failure 1: invalid jump&lt;&#x2F;h3&gt;
&lt;p&gt;This should fail, since the given location is outside of the code-range.&lt;&#x2F;p&gt;
&lt;p&gt;Bytecode: &lt;code&gt;0X5fff&lt;&#x2F;code&gt;(&lt;code&gt;RJUMPSUB -1&lt;&#x2F;code&gt;)&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Pc&lt;&#x2F;th&gt;&lt;th&gt;Op&lt;&#x2F;th&gt;&lt;th&gt;Cost&lt;&#x2F;th&gt;&lt;th&gt;Stack&lt;&#x2F;th&gt;&lt;th&gt;RStack&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;0&lt;&#x2F;td&gt;&lt;td&gt;RJUMPSUB&lt;&#x2F;td&gt;&lt;td&gt;10&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Error: at pc=0, op=RJUMPSUB: invalid jump destination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;failure-2-shallow-return-stack&quot;&gt;Failure 2: shallow &lt;code&gt;return stack&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;This should fail at first opcode, due to shallow &lt;code&gt;return_stack&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Bytecode: &lt;code&gt;0x5e&lt;&#x2F;code&gt; (&lt;code&gt;RETURNSUB&lt;&#x2F;code&gt;)&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Pc&lt;&#x2F;th&gt;&lt;th&gt;Op&lt;&#x2F;th&gt;&lt;th&gt;Cost&lt;&#x2F;th&gt;&lt;th&gt;Stack&lt;&#x2F;th&gt;&lt;th&gt;RStack&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;0&lt;&#x2F;td&gt;&lt;td&gt;RETURNSUB&lt;&#x2F;td&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Error: at pc=0, op=RETURNSUB: invalid retsub&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;subroutine-at-end-of-code&quot;&gt;Subroutine at end of code&lt;&#x2F;h3&gt;
&lt;p&gt;In this example the RJUMPSUB is on the last byte of code. When the subroutine returns, it should hit the &#x27;virtual stop&#x27; &lt;em&gt;after&lt;&#x2F;em&gt; the bytecode, and not exit with error&lt;&#x2F;p&gt;
&lt;p&gt;Bytecode: &lt;code&gt;0x5c00045e5fffff&lt;&#x2F;code&gt; (&lt;code&gt;RJUMP 4, RETURNSUB, RJUMPSUB -1&lt;&#x2F;code&gt;)&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Pc&lt;&#x2F;th&gt;&lt;th&gt;Op&lt;&#x2F;th&gt;&lt;th&gt;Cost&lt;&#x2F;th&gt;&lt;th&gt;Stack&lt;&#x2F;th&gt;&lt;th&gt;RStack&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;0&lt;&#x2F;td&gt;&lt;td&gt;RJUMP&lt;&#x2F;td&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;3&lt;&#x2F;td&gt;&lt;td&gt;RETURNSUB&lt;&#x2F;td&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;4&lt;&#x2F;td&gt;&lt;td&gt;RJUMPSUB&lt;&#x2F;td&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;7&lt;&#x2F;td&gt;&lt;td&gt;STOP&lt;&#x2F;td&gt;&lt;td&gt;0&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;td&gt;[]&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;Consumed gas: &lt;code&gt;15&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;reference-implementation&quot;&gt;Reference Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;The following is a pseudo-Python implementation of an algorithm for predicating code validity.  An equivalent algorithm must be run at initialization time.&lt;&#x2F;p&gt;
&lt;p&gt;This algorithm performs a symbolic execution of the program that recursively traverses the &lt;em&gt;code&lt;&#x2F;em&gt;, emulating its control flow and stack use and checking for violations of the rules above.&lt;&#x2F;p&gt;
&lt;p&gt;It runs in time equal to &lt;code&gt;O(vertices + edges)&lt;&#x2F;code&gt; in the program&#x27;s control-flow graph, where edges represent control flow and the vertices represent &lt;em&gt;basic blocks&lt;&#x2F;em&gt; — thus the algorithm takes time proportional to the size of the &lt;em&gt;code&lt;&#x2F;em&gt;. It maintains a stack of continuations for conditional jumps, the size of which is at most proportional to the size of the &lt;em&gt;code&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;validation-function&quot;&gt;Validation Function&lt;&#x2F;h3&gt;
&lt;p&gt;** Note: this function is known to be incomplete and incorrect. **&lt;&#x2F;p&gt;
&lt;p&gt;For simplicity&#x27;s sake we assume that all jumpdest analysis and prior validation has been done, including EIP-3540, EIP-3670, and EIP-4200, so EOF headers and sections are well-formed, and there are no invalid instructions or jumps.  In practice, all passes of validation can be folded into a single loop no recursion.&lt;&#x2F;p&gt;
&lt;p&gt;We also assume some helper functions.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;is_valid(opcode)&lt;&#x2F;code&gt; returns true iff opcode is valid.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;is_terminator(opcode)&lt;&#x2F;code&gt; returns true iff opcode is terminator.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;is_valid_jumpdest(pc)&lt;&#x2F;code&gt; returns true iff &lt;code&gt;pc&lt;&#x2F;code&gt; is a valid jump destination.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;immediate_data(pc)&lt;&#x2F;code&gt; returns the immediate data for the instruction at &lt;code&gt;pc&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;immediate_size(opcode)&lt;&#x2F;code&gt; returns the size of the immediate data for an opcode.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;removed_items(opcode)&lt;&#x2F;code&gt; returns the number of items removed from the &lt;code&gt;data_stack&lt;&#x2F;code&gt; by the &lt;code&gt;opcode&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;added_items(opcode)&lt;&#x2F;code&gt; returns the number of items added to the &lt;code&gt;data_stack&lt;&#x2F;code&gt; by the &lt;code&gt;opcode&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# returns true iff code is valid&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;def validate_code(code: bytes, pc: int, sp: int, bp: int) -&amp;gt; boolean:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    continuations = []&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        while pc &amp;lt; len(code):&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            opcode = code[pc]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            if !is_valid(opcode):&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                return false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            if is_terminator(opcode):&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                return true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            # check stack height and return if we have been here before&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            stack_height = sp - bp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            if stack_height &amp;gt; 1024&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                return false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            if pos in stack_heights:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                if stack_height != stack_heights[pos]:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    return false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                return true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            else:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                stack_heights[pos] = stack_height&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            if opcode == RJUMP:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                # reset pc to destination of jump&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                jumpdest = immediate_data(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                pc += jumpdest&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                if !is_valid_jumpdest(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    return false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            elif opcode == RJUMPI:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                jumpdest = pc + immediate_data(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                if !is_valid_jumpdest(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    return false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                # continue true side of conditional later&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                continations.push((jumpdest, sp, bp))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                # continue false side of conditional now&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            elif opcode == RJUMPSUB:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                # will enter subroutine at destination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                bp = sp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                # push return address and reset pc to destination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                jumpdest = pc + immediate_data(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                if !is_valid_jumpdest(pc)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    return false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                push(return_stack, pc + 3)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                pc = jumpdest&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                continue&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            elif opcode == RETURNSUB:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                # will return to subroutine at destination&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                bp = sp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                # pop return address and check for preceding call&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                pc = pop(return_stack)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                if code[pc - 3] != RJUMPSUB:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                   return false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            # apply instructions to stack&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            sp -= removed_items(opcode)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            if sp &amp;lt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                return false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            sp += added_items(opcode)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            # Skip opcode and immediate data&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            pc += 1 + immediate_size(opcode)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        while (pc, sp, bp) = continuations.pop()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    return true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;These changes introduce new flow control instructions.  They do not introduce any new security considerations. This EIP is intended to improve security by validating a higher level of safety for EVM code deployed on the blockchain.  The validation algorithm must be quasi-linear in time and space to not be a denial of service vulnerability.  The algorithm here makes one linear-time pass of the bytecode, and uses a stack of continuations that cannot exceed the number of &lt;code&gt;RJUMPI&lt;&#x2F;code&gt; instructions in the code.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>&quot;Hardfork Meta: Berlin&quot;</title>
        <published>2019-05-20T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Alex Beregszaszi</name><uri>https://github.com/axic</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/2070/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/hardfork-meta-eip-2070-berlin-discussion/3561" />
        

        <id>https://wg-eips.ritovision.com/2070/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="meta"
                label="Meta" />
            
        

        
        <category
            term="tag:eip:2070"
            label="EIP-2070" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/2070/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;This meta-EIP specifies the changes included in the Ethereum hardfork named Berlin.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Codename: Berlin&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;In the current stage of coordination, the changes are tracked and discussed in the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;eth1.0-specs&quot;&gt;eth1.0-specs&lt;&#x2F;a&gt; repository.
For an accurate status please refer to the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;eth1.0-specs&#x2F;blob&#x2F;master&#x2F;network-upgrades&#x2F;mainnet-upgrades&#x2F;berlin.md&quot;&gt;&lt;code&gt;berlin.md&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; file.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Block Rewards Proposal for funding Eth1.x</title>
        <published>2019-04-20T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>James Hancock</name><uri>https://github.com/madeoftin</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/2025/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://github.com/MadeofTin/EIPs/issues" />
        

        <id>https://wg-eips.ritovision.com/2025/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        

        
        <category
            term="tag:eip:2025"
            label="EIP-2025" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/2025/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;Add &lt;code&gt;0.0055 ETH&lt;&#x2F;code&gt; per block for 18 months (A total of 17050 ETH) as a developer block reward reserved for funding specific Ethereum1.X working groups. The working groups are State rent (750k), Better sync (360k), Finality gadget (360k), Fee market (360k), Testing infrastructure (360k). Governance of the funds will be through a multisig of trusted individuals from the ecosystem including client teams, the foundation, and the community.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1890&#x2F;&quot;&gt;EIP-1890&lt;&#x2F;a&gt; proposes a mechanism to capture a portion of block rewards for sustainably funding ongoing network development. That EIP sets values and addresses to zero and so does not actually collect any rewards. This proposal is to explicitly set those values and begin collecting a portion of block rewards for 18 months in order to fund Ethereum 1.X working groups and organization efforts. This funding will be used to repay an initial loan provided by investors in the community funding this work with a small amount of interest. After 18 months the block reward would again reduce to zero.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP extends the mechanism established in EIP-1890 to add &lt;code&gt;0.0055 ETH&lt;&#x2F;code&gt; to the block reward for a specific distribution period of &lt;code&gt;3,100,000 BLOCKS&lt;&#x2F;code&gt;(≈ 18 months). The &lt;code&gt;RECIPIENT_ADDRESS&lt;&#x2F;code&gt; is set to a smart contract with hardcoded denominations that distributes incoming ETH to a set of addresses for the purpose of Eth1.X development. The emission schedule would start at the hard fork block number and continue for &lt;code&gt;3,100,000 BLOCKS&lt;&#x2F;code&gt; (≈ 18 months) at which point the address and amount would again return to 0. Any further distribution would require a future hard fork.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;The context for this proposal came from attending the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Au1Qll-86v0&quot;&gt;Core Dev Eth1.X Meeting&lt;&#x2F;a&gt; in Berlin. Development is needed to move Eth1.X forward, and I observed that a lack of funding is the primary barrier to this work. This work can only be effectively conducted by working groups forming around these issues, and these working groups need funding in order to pay dedicated contractors and project managers. This proposal is a plan for funding these groups and supporting their operation.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;Two constants will be introduced:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;REWARD_DURATION_IN_BLOCKS&lt;&#x2F;code&gt;, which specifies the number of blocks after &lt;code&gt;ISTANBUL_BLOCK_HEIGHT&lt;&#x2F;code&gt; when the reward collection will terminate (i.e., at block &lt;code&gt;ISTANBUL_BLOCK_HEIGHT + REWARD_DURATION_IN_BLOCKS&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;BENEFICIARY_ADDRESSES&lt;&#x2F;code&gt;, a list of tuples containing the address and the amount to be transferred to this address per block. These amounts will be determined as the loan is collected from participating organizations and the addresses for repayment will be specified by them. The total of the amounts will sum to 0.0055. At the end of &lt;code&gt;REWARD_DURATION_IN_BLOCKS&lt;&#x2F;code&gt; the loan will be completely repaid.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;REWARD_DURATION_IN_BLOCKS = 3100000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;DEVFUND_BLOCK_REWARD = 0.0055&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;BENEFICIARY_ADDRESSES = [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; (&amp;lt;address&amp;gt;, &amp;lt;amount_in_eth&amp;gt;),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; (&amp;lt;address&amp;gt;, &amp;lt;amount_in_eth&amp;gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Beginning with block &lt;code&gt;ISTANBUL_BLOCK_HEIGHT&lt;&#x2F;code&gt;, the reward is added to the participating addresses within &lt;code&gt;BENEFICIARY_ADDRESSES&lt;&#x2F;code&gt; at each block until the end of the &lt;code&gt;REWARD_DURATION_IN_BLOCKS&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;IF (CURRENT_BLOCK - ISTANBUL_BLOCK_HEIGHT &amp;lt;= REWARD_DURATION_IN_BLOCKS)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;FOR BENEFICIARY in BENEFICIARY_ADDRESSES:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  BENEFICIARY[0].balance += BENEFICIARY[1]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;rewards-distribution-rationale&quot;&gt;Rewards Distribution Rationale&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; Development loan repayment: 0.005 ETH per block: 15500 ETH total&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; Development loan interest (10% total over the period, simple interest): 0.0005 ETH per block: 1550 ETH total&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; Total Block Reward Increase = `0.0055` ETH per block: 17050 ETH Total&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;em&gt;With a price of Ethereum at $150.00 this will raise approx USD $2,325,000.00 for developing Eth1.X over the next 18 months.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2025&#x2F;.&#x2F;assets&#x2F;block_rewards_distribution.png&quot; alt=&quot;Block Rewards Distribution&quot; &#x2F;&gt; *Specific Addresses to be determined&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2025&#x2F;#why-hardcoded-values&quot;&gt;FAQ - Why hardcoded values?&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;There has been great public debate concerning EIP-1890, and one of the primary concerns is that it is difficult to evaluate the proposal without more complete information on how funds would be raised, how they would be administered, and how they would be used. There is a need for funding Eth1.x development and it is currently unclear where those funds will come from. This proposal is intended to give a more comprehensive proposal for its funding. In the case that ETH1.x is fully funded before the Istanbul upgrade I will withdraw this EIP. Until that point I intend to continue championing this proposal as a valid funding mechanism for this work.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;why-a-loan&quot;&gt;Why a loan?&lt;&#x2F;h3&gt;
&lt;p&gt;The Eth1x initiative needs funding now, not in 18 months. A loan is necessary to complete certain stages of work before the funding mechanism begins to provide funds. A loan would provide this necessary funding today, and the investors willing to front this cost can recoup their contribution + a reward of &lt;em&gt;a fixed interest rate&lt;&#x2F;em&gt; for the risk on their loan. This arrangement will make it easier to find investors willing to participate who have sufficient funds.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;loan-repayment&quot;&gt;Loan Repayment&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2025&#x2F;.&#x2F;assets&#x2F;loan_state.png&quot; alt=&quot;Loan State Diagram&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;There is a risk that the investors lose part of their contribution in the case that this EIP is rejected by the community between the time the funds have been collected and the beginning of the payout schedule. In this case all remaining funds will be returned to the contributors. The interest on the loan is an incentive for investors to participate in spite of this risk. Their downside is limited to the amount of funds spent before this EIP is accepted or rejected, which should be no more than about 5%, while their upside consists of the 10% simple interest paid over the period.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;development-loan&quot;&gt;Development Loan&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;code&gt;Development Loan: 0.005&lt;&#x2F;code&gt; over 3.1 Million blocks = 15500 ETH&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Funding Working Groups on 1.X&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Funding Contractors, Coordinators, and project managers&lt;&#x2F;li&gt;
&lt;li&gt;Working Groups defined with clear mandates&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Budget&lt;&#x2F;p&gt;
&lt;p&gt;Working groups&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;State rent (750k)&lt;&#x2F;li&gt;
&lt;li&gt;Better sync (360k)&lt;&#x2F;li&gt;
&lt;li&gt;finality gadget (360k)&lt;&#x2F;li&gt;
&lt;li&gt;Fee market (360k)&lt;&#x2F;li&gt;
&lt;li&gt;testing infrastructure (360k)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;ETH1.X Core Dev Gatherings&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Funding hosting, traveling, and accommodations for necessary in-person gatherings of ETH1.X core developers similar to the Stanford and Berlin ETH1.X Core Dev Meeting held earlier this year.&lt;&#x2F;p&gt;
&lt;p&gt;At the end of the 18 Months, the whole process would be torn down to prevent any internal tyranny of structurelessness forming within.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2025&#x2F;#how-will-funding-the-devs-be-organized&quot;&gt;FAQ - How will the funding of the devs be organized?&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;accountability&quot;&gt;Accountability&lt;&#x2F;h2&gt;
&lt;p&gt;The funds will be transferred into DAI and secured in a multi-sig comprised of members of the community. Representatives from the following groups will receive a key.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;EIP Editors&lt;&#x2F;li&gt;
&lt;li&gt;Geth&lt;&#x2F;li&gt;
&lt;li&gt;Parity&lt;&#x2F;li&gt;
&lt;li&gt;ConsenSys&#x2F;PegaSys (PegaSys)&lt;&#x2F;li&gt;
&lt;li&gt;The Ethereum Foundation (Hudson Jameson)&lt;&#x2F;li&gt;
&lt;li&gt;Community&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;personal-notes-and-disclosure&quot;&gt;Personal Notes and Disclosure&lt;&#x2F;h2&gt;
&lt;p&gt;I want to address any concerns about conflicts of interests directly. My participation with Eth1.X currently has been as a volunteer. I am in talks about a possible funded role helping with testing and coordination. If my work for with Eth1.x is funded, I will accept no additional funding collected by the mechanism proposed in this EIP.&lt;&#x2F;p&gt;
&lt;p&gt;Eth1.X is the now of Ethereum and I would like to see it succeed. This is the intent of my proposal.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;coi&quot;&gt;COI&lt;&#x2F;h3&gt;
&lt;p&gt;Previously I was PM for Tennagraph, a signalling solution for Ethereum. An Aragon grant funded this project and was distributed through Giveth and an AragonDAO. I have not received any funding from the project beyond this grant. All of this is verifiable on-chain. I am stepping down from any paid role on the project to continue as an advisor. I am also stepping down as a moderator for stances as there is a COI moderating stances for EIPs I am working with directly.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;disclaimer&quot;&gt;Disclaimer&lt;&#x2F;h3&gt;
&lt;p&gt;I do not claim to represent the community with my views; any members who wish to join supporting me with this proposal are free to do so. This is as fair of a proposal as I can personally conceive.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP has no impact on backwards compatibility.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;p&gt;Not Implemented&lt;&#x2F;p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;Not Implemented&lt;&#x2F;p&gt;
&lt;h2 id=&quot;faq&quot;&gt;FAQ&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;why-hardcoded-values&quot;&gt;Why Hardcoded Values?&lt;&#x2F;h3&gt;
&lt;p&gt;Why not use a smart contract with some governance mechanism to allow changing the distribution of funds? Wouldn’t that be more flexible and effective?&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;TLDR: This EIP is not about governance reform&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;First, the payment of the loan will be hardcoded. Once agreed, the terms must be kept to give the lenders confidence in the repayment of the loan. As long as blocks are created the debt will be paid back. This is the essence of a trustless smart contract.&lt;&#x2F;p&gt;
&lt;p&gt;After the loan, there is the option to allow the amounts (limited to less than .05ETH), and the locations (orgs that receive ecosystem funding) to be changed throughout the emission schedule. It is pretty easy to imagine a smart contract or DAO fulfilling this role. However, there are three classes of options available today we can consider when governing changes.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Give the Keys to the Hands of the Few (Oligarchy)&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Create a multisig that allows a group of individuals to update the smart contract. The most likely candidates for this are the Core Devs themselves, but it could also be a trusted few from the community&#x2F;stakeholders. No matter how you slice it, there is a fundamental issue in deciding who gets to decide. There currently is not a trusted&#x2F;adopted governance mechanism to make these decisions within the Ethereum ecosystem. Also, preventing changing the contract in self interest is difficult without a well-engineered governance system of checks and balances. This EIP does not claim nor aim to solve these issues.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Give the Keys to the Hands of the Many (Plutarchy)&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Allow ethereum holders with coin votes to update the smart contract. Using holographic consensus could overcome the issue of voter turnout as it scales as participation scales, even to the size of the whole network. This has some benefits as the entire network can participate. However, the problem is that some individuals in the network are over represented -- the wealthy. Without a solution to identity that has been agreed to and implemented by the entire Ethereum Network, there is no way around giving more power in votes to the rich. This EIP does not claim, nor aim to solve these issues.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Use Ethereum Governance as it is Today&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Criticisms or support aside, there is a system that governs Ethereum today. It is a mix of rough consensus among core devs, miners running nodes, clients implementing changes, and stakeholders adopting those changes. It includes yelling or not yelling on twitter and reddit. It is complicated and I don’t claim to understand it. Even without a clear view of how it works, there is evidence of its existence. This evidence is there are changes that have allowed to be implemented, and changes that have not allowed to be implemented in Ethereum.&lt;&#x2F;p&gt;
&lt;p&gt;I do not aim to change Ethereum governance. Because this EIP has hardcoded values, it must go through the existing governance process, whatever that is, before it is implemented. It will then continue to operate until the end of the emission schedule. This is intentional. This makes it uncapturable. No party other then the ecosystem itself can modify the contract once it has been deployed.&lt;&#x2F;p&gt;
&lt;p&gt;This EIP is not about governance reform.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;why-not-allow-current-client-implementors-fund-this-work-ef-consensys-parity-etc&quot;&gt;Why not allow current client implementors fund this work? (EF, Consensys, Parity, etc...)&lt;&#x2F;h3&gt;
&lt;p&gt;Historically there has been a precedent that the Ethereum Foundation is solely responsible for funding the development of Ethereum. This process has evolved as the development has become more distributed. Aya Miyaguchi observed in a recent &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.coindesk.com&#x2F;ethereum-foundation-director-sets-new-vision-for-blockchain-non-profit&quot;&gt;Coindesk article&lt;&#x2F;a&gt;, “it really is not only Ethereum Foundation people who are building [Ethereum]”. Yes, we could rely on the Ethereum Foundation to fund Eth1.X. But, why should we? This is a call for the network to come together and fund its own development. Ethereum &lt;em&gt;the network&lt;&#x2F;em&gt; is not owned by any one organization or group of people. We are lucky to have the EF and I consider this EIP in support of their coordination efforts.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;how-will-funding-the-devs-be-organized&quot;&gt;How Will Funding the Devs be Organized&lt;&#x2F;h3&gt;
&lt;p&gt;I do not profess to know the best way to organize these funds. There is work already in progress to organize these efforts championed by Alexey Akhunov. The following is a quote from a &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;medium.com&#x2F;@akhounov&#x2F;ethereum-1x-as-an-attempt-to-change-the-process-783efa23cf60&quot;&gt;recent medium article&lt;&#x2F;a&gt;:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Going from funding a few implementation teams continuously and letting them do &#x27;their stuff&#x27; to funding more specific and temporary initiatives requires looking at funding through different lenses. How much &#x27;due diligence&#x27; and oversight is too much (in terms of overhead), who can decide whether working groups actually deliver, etc. This is also solvable, and also more on this will come later (not in this post).&quot;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;My suggestion would be to create an Eth1.X core developer DAO using &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;daostack.io&#x2F;&quot;&gt;DaoStack&lt;&#x2F;a&gt; to coordinate membership and payment of the Core Devs, but ultimately they are capable of determining the system that works best for them. As long as the system is transparent and mature enough to distribute funds when the time comes, this is sufficient for now.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;isn-t-a-loan-considered-a-security-or-is-it&quot;&gt;Isn&#x27;t a loan considered a security, or is it?&lt;&#x2F;h3&gt;
&lt;p&gt;I am not a lawyer and will seek further guidance from lawyers in the field on this point in particular. From the research I have done and conversations I have had there is a very good argument that a loan of this nature will not be considered a security by the US Supreme Court.
As the result of &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;casetext.com&#x2F;case&#x2F;reves-v-ernst-young&quot;&gt;REVES ET AL. v . ERNST YOUNG 1990&lt;&#x2F;a&gt;, the court stated that a home loan, consumer financing, a loan secured by a lien on a small business or some assets of a small business, short term notes, or notes that formalize a debt incurred in the ordinary course of business are not securities. If the note resembles the items listed above (home loans, etc.) then the note will not be deemed a security. The Supreme Court provided four factors to determine if a note sufficiently resembles the types of notes that are not classified as securities. (&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.invigorlaw.com&#x2F;loan-subject-securities-regulations&#x2F;&quot;&gt;source&lt;&#x2F;a&gt;)&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Family Resemblance Test&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;The intentions of the company and the individual—if the company raised money for general use in a business enterprise, then the note is more likely to be a security; if the individual agreed to the loan primarily for the profit the note was expected to generate, the note is more likely to be a security.&lt;&#x2F;li&gt;
&lt;li&gt;The plan of distribution—the more widely the note is offered, the more likely it is to be found a security.&lt;&#x2F;li&gt;
&lt;li&gt;The expectations of the investing public—if the investors thought they were investing in a business to make a profit on their investment, the note is more likely to be found a security.&lt;&#x2F;li&gt;
&lt;li&gt;Other risk-reducing factor—if the note is collateralized or otherwise less risky than common notes, the note is less likely to be found to be a security.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;The loan is for the specific use of supporting Eth1.X research and development. The distribution will not be widely offered and the note will be collateralized by the network itself, provided in ETH and repaid in ETH. In coordinating the collection of these funds recognise I may be legally liable for some of this work and I will do all of the due dilegence I can, seek legal counsel, and accept any legal repercussions resulting from this work.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Commitment to Sustainable Ecosystem Funding</title>
        <published>2019-03-31T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Gregory Markou</name><email>greg@chainsafe.io</email>
	</author>
	
	<author>
		<name>Kevin Owocki</name><email>kevin@gitcoin.co</email>
	</author>
	
	<author>
		<name>Lane Rettig</name><email>lane@ethereum.org</email>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/1890/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://t.me/joinchat/DwEd_xahL5hHvzNYH2RnQA" />
        

        <id>https://wg-eips.ritovision.com/1890/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        

        
        <category
            term="tag:eip:1890"
            label="EIP-1890" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/1890/">&lt;h1 id=&quot;commitment-to-sustainable-ecosystem-funding&quot;&gt;Commitment to Sustainable Ecosystem Funding&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;Ethereum currently provides a block reward to proof of work miners every block, but it does not capture any block rewards for ecosystem funding. This EIP adds a simple mechanism for capturing a portion of block rewards for ecosystem funding as a credible commitment to doing so in future, but it does not actually capture any such rewards.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;A mechanism that allows specification of two parameters, a beneficiary address and a per-block reward denominated in wei, that allows a portion of block rewards to be captured for the purpose of ecosystem funding. Both values are set to zero.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;In order for Ethereum to succeed, it needs talented, motivated researchers and developers to continue to develop and maintain the platform. Those talented researchers and developers deserve to be paid fairly for their work. At present there is no mechanism in the Ethereum ecosystem that rewards R&amp;amp;D teams fairly for their work on the platform.&lt;&#x2F;p&gt;
&lt;p&gt;We recognize that, while technically trivial, the real challenge in inflation-based funding is social: how to fairly capture, govern, and distribute block rewards. It will take time to work out the answer to these questions. For this reason, this EIP only seeks to make a credible commitment on the part of core developers to securing the funding they need to keep Ethereum alive and healthy by adding a mechanism to do so, but the actual amount of rewards captured remains at zero, i.e., there is no change at present to Ethereum’s economics. Raising the amount captured above zero would require a future EIP.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;Two new constants are introduced: BENEFICIARY_ADDRESS, an Address, and DEVFUND_BLOCK_REWARD, an amount denominated in wei. Both are set to zero.&lt;&#x2F;p&gt;
&lt;p&gt;Beginning with block ISTANBUL_BLOCK_HEIGHT, DEVFUND_BLOCK_REWARD wei is added to the balance of BENEFICIARY_ADDRESS at each block.&lt;&#x2F;p&gt;
&lt;p&gt;We may optionally add another constant, DECAY_FACTOR, which specifies a linear or exponenential decay factor that reduces the reward at every block &amp;gt; ISTANBUL_BLOCK_HEIGHT until it decays to zero. For simplicity, it has been omitted from this proposal.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;We believe that the technical design of this EIP is straightforward. The social rationale is explained in &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;medium.com&#x2F;gitcoin&#x2F;funding-open-source-in-the-blockchain-era-8ded753bf05f&quot;&gt;this article&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP has no impact on backwards compatibility.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP makes no changes to existing state transitions. Existing consensus tests should be sufficient.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;Reference implementations are included for the Trinity, go-ethereum, and parity clients.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Disable SSTORE with gasleft lower than call stipend</title>
        <published>2019-01-15T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Alex Forshtat</name><email>alex@tabookey.com</email>
	</author>
	
	<author>
		<name>Yoav Weiss</name><email>yoav@tabookey.com</email>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/1706/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://github.com/alex-forshtat-tbk/EIPs/issues/1" />
        

        <id>https://wg-eips.ritovision.com/1706/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        

        
        <category
            term="tag:eip:1706"
            label="EIP-1706" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/1706/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;The proposal that had been accepted changes security properties of a large portion of an existing contract code base that may be infeasible to update and validate. This proposal will make the old assumptions hold even after a network upgrade.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1283&#x2F;&quot;&gt;EIP-1283&lt;&#x2F;a&gt; significantly lowers the gas costs of writing to contract&#x27;s storage. This created a danger of a new kind of reentrancy attacks on existing contracts as Solidity by default grants a &#x27;stipend&#x27; of 2300 gas to simple transfer calls.
This danger is easily mitigated if SSTORE is not allowed in low gasleft state, without breaking the backward compatibility and the original intention of this EIP.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;An attack that is described in &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;medium.com&#x2F;chainsecurity&#x2F;constantinople-enables-new-reentrancy-attack-ace4088297d9&quot;&gt;this article&lt;&#x2F;a&gt;.
Explicitly specifying the call stipend as an invariant will have a positive effect on Ethereum protocol security:
https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;ethereum&#x2F;comments&#x2F;agdqsm&#x2F;security_alert_ethereum_constantinople&#x2F;ee5uvjt&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;Add the following condition to the SSTORE opcode gas cost calculation:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;If &lt;em&gt;gasleft&lt;&#x2F;em&gt; is less than or equal to 2300, fail the current call frame
with &#x27;out of gas&#x27; exception.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;In order to keep in place the implicit reentrancy protection of existing contracts, transactions should not be allowed to modify state if the remaining gas is lower then the 2300 stipend given to &#x27;transfer&#x27;&#x2F;&#x27;send&#x27; in Solidity.
These are other proposed remediations and objections to implementing them:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Drop EIP-1283 and abstain from modifying SSTORE cost
&lt;ul&gt;
&lt;li&gt;EIP-1283 is an important update&lt;&#x2F;li&gt;
&lt;li&gt;It was accepted and implemented on test networks and in clients.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Add a new call context that permits LOG opcodes but not changes to state.
&lt;ul&gt;
&lt;li&gt;Adds another call type beyond existing regular&#x2F;staticcall&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Raise the cost of SSTORE to dirty slots to &amp;gt;=2300 gas
&lt;ul&gt;
&lt;li&gt;Makes net gas metering much less useful.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Reduce the gas stipend
&lt;ul&gt;
&lt;li&gt;Makes the stipend almost useless.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Increase the cost of writes to dirty slots back to 5000 gas, but add 4800 gas to the refund counter
&lt;ul&gt;
&lt;li&gt;Still doesn’t make the invariant explicit.&lt;&#x2F;li&gt;
&lt;li&gt;Requires callers to supply more gas, just to have it refunded&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Add contract metadata specifying per-contract EVM version, and only apply SSTORE changes to contracts deployed with the new version.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;Performing SSTORE has never been possible with less than 5000 gas, so it does not introduce incompatibility to the Ethereum mainnet. Gas estimation should account for this requirement.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;p&gt;Test cases for an implementation are mandatory for EIPs that are affecting consensus changes. Other EIPs can choose to include links to test cases if applicable.
TODO&lt;&#x2F;p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;TODO&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Storage Rent</title>
        <published>2018-11-10T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:28+00:00</updated>
	
	
	<author>
		<name>Felix J Lange</name><uri>https://github.com/fjl</uri>
	</author>
	
	<author>
		<name>Martin Holst Swende</name><uri>https://github.com/holiman</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/1682/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/storage-rent-eip/2357" />
        

        <id>https://wg-eips.ritovision.com/1682/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        

        
        <category
            term="tag:eip:1682"
            label="EIP-1682" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/1682/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP describes a scheme to charge for data in state, and &#x27;archive&#x27; data which is no longer being paid for. It also describes how resurrection of &#x27;archived&#x27; data happens.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;The Ethereum blockchain in its current form is not sustainable because it grows
indefinitely. This is true of any blockchain, but Ethereum grows faster than most chains.
Many implementation strategies to slow down growth exist. A common strategy is &#x27;state
pruning&#x27; which discards historical state, keeping only the active copy of contract data
and a few recent versions to deal with short-range chain reorganizations. Several
implementations also employ compression techniques to keep the active copy of the state as
small as possible.&lt;&#x2F;p&gt;
&lt;p&gt;A full node participating in consensus today requires storing large amounts of data even
with advanced storage optimizations applied. Future storage requirements are unbounded
because any data stored in a contract must be retained forever as dictated by the
protocol. This EIP attempts to correct this by adding new consensus rules that put an
upper bound on the size of the Ethereum state.&lt;&#x2F;p&gt;
&lt;p&gt;Adding these new rules changes fundamental guarantees of the system and requires a hard
fork. Users of Ethereum already pay for the creation and modification of accounts and
their storage entries. Under the rules introduced in this EIP, users must also pay to keep
accounts accessible. A similar rent scheme was proposed in &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;EIPs&#x2F;issues&#x2F;35&quot;&gt;EIP-103&lt;&#x2F;a&gt; but rejected
even back then because the proposal would&#x27;ve upset peoples expectations. As implementers
of Ethereum, we still feel that state rent is the right path to long-term sustainability
of the Ethereum blockchain and that its undesirable implications can be overcome with
off-protocol tooling and careful design.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;The cost of storing an account over time is called &lt;code&gt;rent&lt;&#x2F;code&gt;. The amount of &lt;code&gt;rent&lt;&#x2F;code&gt; due depends
on the size of the account. The &lt;code&gt;ether&lt;&#x2F;code&gt; that is paid for &lt;code&gt;rent&lt;&#x2F;code&gt; is destroyed. The &lt;code&gt;rent&lt;&#x2F;code&gt; is deducted whenever an account is touched.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;rent&lt;&#x2F;code&gt; can be paid from the account&#x27;s regular &lt;code&gt;balance&lt;&#x2F;code&gt; or from its &#x27;rent balance&#x27;. Accounts
can be endowed with &lt;code&gt;rent balance&lt;&#x2F;code&gt; through a new EVM opcode. When &lt;code&gt;rent&lt;&#x2F;code&gt; is charged, it is
first taken from the &lt;code&gt;rent balance&lt;&#x2F;code&gt;. When &lt;code&gt;rent balance&lt;&#x2F;code&gt; is zero, it is instead charged from the account&#x27;s regular &lt;code&gt;balance&lt;&#x2F;code&gt; instead.&lt;&#x2F;p&gt;
&lt;p&gt;The reason to separate &lt;code&gt;balance&lt;&#x2F;code&gt; and &lt;code&gt;rent balance&lt;&#x2F;code&gt; is that certain contracts do not accept &lt;code&gt;ether&lt;&#x2F;code&gt; sends, or always send the entire balance off to some other destination. For these cases, a separate&lt;code&gt;rent balance&lt;&#x2F;code&gt; is required.&lt;&#x2F;p&gt;
&lt;p&gt;When an account&#x27;s &lt;code&gt;balance&lt;&#x2F;code&gt; is insufficient to pay rent, the account becomes &lt;code&gt;inactive&lt;&#x2F;code&gt;. Its
storage and contract code are removed. Inactive accounts cannot be interacted with, i.e.
it behaves as if it has no contract code.&lt;&#x2F;p&gt;
&lt;p&gt;Inactive accounts can be restored by re-uploading their storage. To restore an inactive
account &lt;code&gt;A&lt;&#x2F;code&gt;, a new account &lt;code&gt;B&lt;&#x2F;code&gt; is created with arbitrary code and its storage modified
with &lt;code&gt;SSTORE&lt;&#x2F;code&gt; operations until it matches the storage root of &lt;code&gt;A&lt;&#x2F;code&gt;. Account &lt;code&gt;B&lt;&#x2F;code&gt; can restore
&lt;code&gt;A&lt;&#x2F;code&gt; through the &lt;code&gt;RESTORETO&lt;&#x2F;code&gt; opcode. This means the cost of restoring an account is
equivalent to recreating it via successive &lt;code&gt;SSTORE&lt;&#x2F;code&gt; operations.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;changes-to-state&quot;&gt;Changes To State&lt;&#x2F;h3&gt;
&lt;p&gt;At the top level, a new key &lt;code&gt;size&lt;&#x2F;code&gt; is added to the accounts trie. This key tracks the
total number of trie nodes across all accounts, including storage trie nodes. To track
rent, the structure of account entries is changed as well.&lt;&#x2F;p&gt;
&lt;p&gt;Before processing the block in which this EIP becomes active, clients iterate the whole
state once to count the number of trie nodes and to change the representation of all
accounts to the new format.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;account-representation&quot;&gt;Account Representation&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;account = [nonce, balance, storageroot, codehash, rentbalance, rentblock, storagesize]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Each account gets three additional properties: &lt;code&gt;rentbalance&lt;&#x2F;code&gt;, &lt;code&gt;rentblock&lt;&#x2F;code&gt; and
&lt;code&gt;storagesize&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;code&gt;rentbalace&lt;&#x2F;code&gt; field tracks the amount of &lt;code&gt;rent balance&lt;&#x2F;code&gt; available to the account. Upon
self-destruction any remaining &lt;code&gt;rent balance&lt;&#x2F;code&gt; is transferred to the beneficiary. Any
modification of the account recomputes its current &lt;code&gt;rent balance&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;code&gt;rentblock&lt;&#x2F;code&gt; field tracks the block number in which the &lt;code&gt;rent balance&lt;&#x2F;code&gt; was last
recomputed. Upon creation, this field is initialized with the current block number.
&lt;code&gt;rentblock&lt;&#x2F;code&gt; is also updated with the current block number whenever the account is
modified.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;code&gt;storagesize&lt;&#x2F;code&gt; field tracks the amount of storage related to the account. It is a
number containing the number of storage slots currently set. The &lt;code&gt;storagesize&lt;&#x2F;code&gt; of an
inactive account is zero.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;charging-rent&quot;&gt;Charging Rent&lt;&#x2F;h3&gt;
&lt;p&gt;There is a new protocol constant &lt;code&gt;MAX_STORAGE_SIZE&lt;&#x2F;code&gt; that specifies the upper bound on the
number of state tree nodes:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-constant&quot;&gt;MAX_STORAGE_SIZE&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;**&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;32&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt; #&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; ~160GB of state&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;A &#x27;storage fee factor&#x27; for each block is derived from this constant such that fees
increase as the limit is approached.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;def&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; storagefee_factor&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt;block&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ramp&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; MAX_STORAGE_SIZE&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;MAX_STORAGE_SIZE&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; -&lt;&#x2F;span&gt;&lt;span&gt; total_storage_size&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;block&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;**&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;22&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; *&lt;&#x2F;span&gt;&lt;span&gt; ramp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;When a block is processed, &lt;code&gt;rent&lt;&#x2F;code&gt; is deducted from all accounts modified by transactions in
the block after the transactions have been processed. The amount due for each account is
based on the account&#x27;s storage size.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;def&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; rent&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt;prestate&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; poststate&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; addr&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; currentblock&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    fee&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; b&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; in&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; range&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;prestate&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;addr&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;rentblock&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;+&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; currentblock&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        fee&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; +=&lt;&#x2F;span&gt;&lt;span&gt; storagefee_factor&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;b&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; *&lt;&#x2F;span&gt;&lt;span&gt; prestate&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;addr&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;storagesize&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span&gt; fee&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; storagefee_factor&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;currentblock&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; *&lt;&#x2F;span&gt;&lt;span&gt; poststate&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;addr&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;storagesize&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;def&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; charge_rent&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt;prestate&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; poststate&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; addr&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; currentblock&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    fee&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; rent&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;prestate&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; poststate&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; addr&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; currentblock&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; fee&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;lt;=&lt;&#x2F;span&gt;&lt;span&gt; poststate&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;addr&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;rentbalance&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        poststate&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;addr&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;rentbalance&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; -=&lt;&#x2F;span&gt;&lt;span&gt; fee&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    else&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        fee&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; -=&lt;&#x2F;span&gt;&lt;span&gt; poststate&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;addr&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;rentbalance&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        poststate&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;addr&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;rentbalance&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        poststate&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;addr&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;balance&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; -=&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; min&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;poststate&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;addr&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;balance&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; fee&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    poststate&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;addr&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;rentblock&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; currentblock&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;new-evm-opcodes&quot;&gt;New EVM Opcodes&lt;&#x2F;h3&gt;
&lt;h4 id=&quot;payrent-amount-addr&quot;&gt;&lt;code&gt;PAYRENT &amp;lt;amount&amp;gt; &amp;lt;addr&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;At any time, the &lt;code&gt;rent balance&lt;&#x2F;code&gt; of an account may be topped up by the &lt;code&gt;PAYRENT&lt;&#x2F;code&gt; opcode.
&lt;code&gt;PAYRENT&lt;&#x2F;code&gt; deducts the given amount of &lt;code&gt;ether&lt;&#x2F;code&gt; from the account executing the opcode and adds
it to the &lt;code&gt;rent balance&lt;&#x2F;code&gt; of the address specified as beneficiary.&lt;&#x2F;p&gt;
&lt;p&gt;Any participant can pay the rent for any other participant.&lt;&#x2F;p&gt;
&lt;p&gt;Gas cost: TBD&lt;&#x2F;p&gt;
&lt;h4 id=&quot;rentbalance-addr&quot;&gt;&lt;code&gt;RENTBALANCE &amp;lt;addr&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;rent balance&lt;&#x2F;code&gt; of an account may be queried through the &lt;code&gt;RENTBALANCE&lt;&#x2F;code&gt; opcode. It pushes the
&lt;code&gt;rentbalance&lt;&#x2F;code&gt; field of the given address to the stack.&lt;&#x2F;p&gt;
&lt;p&gt;Gas cost: like &lt;code&gt;EXTCODEHASH&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;ssize-addr&quot;&gt;&lt;code&gt;SSIZE &amp;lt;addr&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;This opcode pushes the &lt;code&gt;storagesize&lt;&#x2F;code&gt; field of the given account to the stack.&lt;&#x2F;p&gt;
&lt;p&gt;Gas cost: like &lt;code&gt;EXTCODEHASH&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;restoreto-addr-codeaddr&quot;&gt;&lt;code&gt;RESTORETO &amp;lt;addr&amp;gt; &amp;lt;codeaddr&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;This opcode restores the inactive account at the given address. This is a bit like
&lt;code&gt;SELFDESTRUCT&lt;&#x2F;code&gt; but has more specific semantics.&lt;&#x2F;p&gt;
&lt;p&gt;The account at &lt;code&gt;addr&lt;&#x2F;code&gt; must be &lt;code&gt;inactive&lt;&#x2F;code&gt; (i.e. have &lt;code&gt;storagesize&lt;&#x2F;code&gt; zero) and its
&lt;code&gt;storageroot&lt;&#x2F;code&gt; must match the &lt;code&gt;storageroot&lt;&#x2F;code&gt; of the contract executing &lt;code&gt;RESTORETO&lt;&#x2F;code&gt;. The
&lt;code&gt;codeaddr&lt;&#x2F;code&gt; specifies the address of a contract from which code is taken. The code of the
&lt;code&gt;codeaddr&lt;&#x2F;code&gt; account must match the &lt;code&gt;codehash&lt;&#x2F;code&gt; of &lt;code&gt;addr&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;If all these preconditions are met, &lt;code&gt;RESTORETO&lt;&#x2F;code&gt; transfers the storage of the account
executing the opcode to &lt;code&gt;addr&lt;&#x2F;code&gt; and resets its &lt;code&gt;storagesize&lt;&#x2F;code&gt; to the full size of the
storage. The code of &lt;code&gt;addr&lt;&#x2F;code&gt; is restored as well. &lt;code&gt;RESTORETO&lt;&#x2F;code&gt; also transfers any remaining
balance and rent balance to &lt;code&gt;addr&lt;&#x2F;code&gt;. The contract executing &lt;code&gt;RESTORETO&lt;&#x2F;code&gt; is deleted.&lt;&#x2F;p&gt;
&lt;p&gt;Gas cost: TBD&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;why-do-we-need-a-separate-rent-balance&quot;&gt;Why do we need a separate rent balance?&lt;&#x2F;h3&gt;
&lt;p&gt;Accounts need a separate rent balance because some contracts are non-payable, i.e. they
reject regular value transfers. Such contracts might not be able to keep themselves alive,
but users of those contracts can keep them alive by paying rent for them.&lt;&#x2F;p&gt;
&lt;p&gt;Having the additional balance also makes things easier for contracts that hold balance on
behalf of a user. Consider the canonical crowdfunding example, a contract which changes
behavior once a certain balance is reached and which tracks individual user&#x27;s balances.
Deducting rent from the main balance of the contract would mess up the contract&#x27;s
accounting, leaving it unable to pay back users accurately if the threshold balance isn&#x27;t
reached.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;why-restoration&quot;&gt;Why restoration?&lt;&#x2F;h3&gt;
&lt;p&gt;One of the fundamental guarantees provided by Ethereum is that changes to contract storage
can only be made by the contract itself and storage will persist forever. If you hold a
token balance in a contract, you&#x27;ll have those tokens forever. By adding restoration, we
can maintain this guarantee to a certain extent.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;implementation-impact&quot;&gt;Implementation Impact&lt;&#x2F;h3&gt;
&lt;p&gt;The proposed changes tries to fit within the existing state transition model. Note that
there is no mechanism for deactivating accounts the moment they can&#x27;t pay rent. Users must
touch accounts to ensure their storage is removed because we&#x27;d need to track all accounts
and their rent requirements in an auxlilary data structure otherwise.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;TBA&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;p&gt;TBA&lt;&#x2F;p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;TBA&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Transparent Contract Standard</title>
        <published>2018-10-31T00:00:00+00:00</published>
        <updated>2026-02-11T14:48:25+00:00</updated>
	
	
	<author>
		<name>Nick Mudge</name><email>nick@perfectabstractions.com</email>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/1538/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://github.com/ethereum/EIPs/issues/1538" />
        

        <id>https://wg-eips.ritovision.com/1538/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="erc"
                label="ERC" />
            
        

        
        <category
            term="tag:eip:1538"
            label="ERC-1538" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/1538/">&lt;p&gt;Replaced by &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2535&#x2F;&quot;&gt;EIP-2535 Diamond Standard&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;This standard provides a contract architecture that makes upgradeable contracts flexible, unlimited in size, and transparent.&lt;&#x2F;p&gt;
&lt;p&gt;A transparent contract publicly documents the full history of all changes made to it.&lt;&#x2F;p&gt;
&lt;p&gt;All changes to a transparent contract are reported in a standard format.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;A transparent contract is a proxy contract design pattern that provides the following:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;A way to add, replace and remove multiple functions of a contract atomically (at the same time).&lt;&#x2F;li&gt;
&lt;li&gt;Standard events to show what functions are added, replaced and removed from a contract, and why the changes are made.&lt;&#x2F;li&gt;
&lt;li&gt;A standard way to query a contract to discover and retrieve information about all functions exposed by it.&lt;&#x2F;li&gt;
&lt;li&gt;Solves the 24KB maximum contract size limitation, making the maximum contract size of a transparent contract practically unlimited. This standard makes the worry about contract size a thing of the past.&lt;&#x2F;li&gt;
&lt;li&gt;Enables an upgradeable contract to become immutable in the future if desired.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;A fundamental benefit of Ethereum contracts is that their code is immutable, thereby acquiring trust by trustlessness. People do not have to trust others if it is not possible for a contract to be changed.&lt;&#x2F;p&gt;
&lt;p&gt;However, a fundamental problem with trustless contracts that cannot be changed is that they cannot be changed.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;bugs&quot;&gt;Bugs&lt;&#x2F;h4&gt;
&lt;p&gt;Bugs and security vulnerabilities are unwittingly written into immutable contracts that ruin them.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;improvements&quot;&gt;Improvements&lt;&#x2F;h4&gt;
&lt;p&gt;Immutable, trustless contracts cannot be improved, resulting in increasingly inferior contracts over time.&lt;&#x2F;p&gt;
&lt;p&gt;Contract standards evolve, new ones come out. People, groups and organizations learn over time what people want and what is better and what should be built next. Contracts that cannot be improved not only hold back the authors that create them, but everybody who uses them.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;upgradeable-contracts-vs-centralized-private-database&quot;&gt;Upgradeable Contracts vs. Centralized Private Database&lt;&#x2F;h4&gt;
&lt;p&gt;Why have an upgradeable contract instead of a centralized, private, mutable database?
Here are some reasons:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Because of the openness of storage data and verified code, it is possible to show a provable history of trustworthiness.&lt;&#x2F;li&gt;
&lt;li&gt;Because of the openness, bad behavior can be spotted and reported when it happens.&lt;&#x2F;li&gt;
&lt;li&gt;Independent security and domain experts can review the change history of contracts and vouch for their history of trustworthiness.&lt;&#x2F;li&gt;
&lt;li&gt;It is possible for an upgradeable contract to become immutable and trustless.&lt;&#x2F;li&gt;
&lt;li&gt;An upgradeable contract can have parts of it that are not upgradeable and so are partially immutable and trustless.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h4 id=&quot;immutability&quot;&gt;Immutability&lt;&#x2F;h4&gt;
&lt;p&gt;In some cases immutable, trustless contracts are the right fit. This is the case when a contract is only needed for a short time or it is known ahead of time that there will never be any reason to change or improve it.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;middle-ground&quot;&gt;Middle Ground&lt;&#x2F;h3&gt;
&lt;p&gt;Transparent contracts provide a middle ground between immutable trustless contracts that can&#x27;t be improved and upgradeable contracts that can&#x27;t be trusted.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;purposes&quot;&gt;Purposes&lt;&#x2F;h3&gt;
&lt;ol&gt;
&lt;li&gt;Create upgradeable contracts that earn trust by showing a provable history of trustworthiness.&lt;&#x2F;li&gt;
&lt;li&gt;Document the development of contracts so their development and change is provably public and can be understood.&lt;&#x2F;li&gt;
&lt;li&gt;Create upgradeable contracts that can become immutable in the future if desired.&lt;&#x2F;li&gt;
&lt;li&gt;Create contracts that are not limited by a max size.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;benefits-use-cases&quot;&gt;Benefits &amp;amp; Use Cases&lt;&#x2F;h3&gt;
&lt;p&gt;This standard is for use cases that benefit from the following:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;The ability to add, replace or remove multiple functions of a contract atomically (at the same time).&lt;&#x2F;li&gt;
&lt;li&gt;Each time a function is added, replaced or removed, it is documented with events.&lt;&#x2F;li&gt;
&lt;li&gt;Build trust over time by showing all changes made to a contract.&lt;&#x2F;li&gt;
&lt;li&gt;Unlimited contract size.&lt;&#x2F;li&gt;
&lt;li&gt;The ability to query information about functions currently supported by the contract.&lt;&#x2F;li&gt;
&lt;li&gt;One contract address that provides all needed functionality and never needs to be replaced by another contract address.&lt;&#x2F;li&gt;
&lt;li&gt;The ability for a contract to be upgradeable for a time, and then become immutable.&lt;&#x2F;li&gt;
&lt;li&gt;Add trustless guarantees to a contract with &quot;unchangeable functions&quot;.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;new-software-possibilities&quot;&gt;New Software Possibilities&lt;&#x2F;h3&gt;
&lt;p&gt;This standard enables a form of contract version control software to be written.&lt;&#x2F;p&gt;
&lt;p&gt;Software and user interfaces can be written to filter the &lt;code&gt;FunctionUpdate&lt;&#x2F;code&gt; and &lt;code&gt;CommitMessage&lt;&#x2F;code&gt; events of a contract address. Such software can show the full history of changes of any contract that implements this standard.&lt;&#x2F;p&gt;
&lt;p&gt;User interfaces and software can also use this standard to assist or automate changes of contracts.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;&#x2F;strong&gt;
The solidity &lt;code&gt;delegatecall&lt;&#x2F;code&gt; opcode enables a contract to execute a function from another contract, but it is executed as if the function was from the calling contract. Essentially &lt;code&gt;delegatecall&lt;&#x2F;code&gt; enables a contract to &quot;borrow&quot; another contract&#x27;s function. Functions executed with &lt;code&gt;delegatecall&lt;&#x2F;code&gt; affect the storage variables of the calling contract, not the contract where the functions are defined.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h3 id=&quot;general-summary&quot;&gt;General Summary&lt;&#x2F;h3&gt;
&lt;p&gt;A transparent contract delegates or forwards function calls to it to other contracts using &lt;code&gt;delegatecode&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;A transparent contract has an &lt;code&gt;updateContract&lt;&#x2F;code&gt; function that enables multiple functions to be added, replaced or removed.&lt;&#x2F;p&gt;
&lt;p&gt;An event is emitted for every function that is added, replaced or removed so that all changes to a contract can be tracked in a standard way.&lt;&#x2F;p&gt;
&lt;p&gt;A transparent contract is a contract that implements and complies with the design points below.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;terms&quot;&gt;Terms&lt;&#x2F;h3&gt;
&lt;ol&gt;
&lt;li&gt;In this standard a &lt;strong&gt;delegate contract&lt;&#x2F;strong&gt; is a contract that a transparent contract fallback function forwards function calls to using &lt;code&gt;delegatecall&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;In this standard an &lt;strong&gt;unchangeable function&lt;&#x2F;strong&gt; is a function that is defined directly in a transparent contract and so cannot be replaced or removed.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;design-points&quot;&gt;Design Points&lt;&#x2F;h3&gt;
&lt;p&gt;A contract is a transparent contract if it implements the following design points:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;A transparent contract is a contract that contains a fallback function, a constructor, and zero or more unchangeable functions that are defined directly within it.&lt;&#x2F;li&gt;
&lt;li&gt;The constructor of a transparent contract associates the &lt;code&gt;updateContract&lt;&#x2F;code&gt; function with a contract that implements the ERC1538 interface. The &lt;code&gt;updateContract&lt;&#x2F;code&gt; function can be an &quot;unchangeable function&quot; that is defined directly in the transparent contract or it can be defined in a delegate contract. Other functions can also be associated with contracts in the constructor.&lt;&#x2F;li&gt;
&lt;li&gt;After a transparent contract is deployed functions are added, replaced and removed by calling the &lt;code&gt;updateContract&lt;&#x2F;code&gt; function.&lt;&#x2F;li&gt;
&lt;li&gt;The &lt;code&gt;updateContract&lt;&#x2F;code&gt; function associates functions with contracts that implement those functions, and emits the &lt;code&gt;CommitMessage&lt;&#x2F;code&gt; and &lt;code&gt;FunctionUpdate&lt;&#x2F;code&gt; events that document function changes.&lt;&#x2F;li&gt;
&lt;li&gt;The &lt;code&gt;FunctionUpdate&lt;&#x2F;code&gt; event is emitted for each function that is added, replaced or removed. The &lt;code&gt;CommitMessage&lt;&#x2F;code&gt; event is emitted one time for each time the &lt;code&gt;updateContract&lt;&#x2F;code&gt; function is called and is emitted after any &lt;code&gt;FunctionUpdate&lt;&#x2F;code&gt; events are emitted.&lt;&#x2F;li&gt;
&lt;li&gt;The &lt;code&gt;updateContract&lt;&#x2F;code&gt; function can take a list of multiple function signatures in its &lt;code&gt;_functionSignatures&lt;&#x2F;code&gt; parameter and so add&#x2F;replace&#x2F;remove multiple functions at the same time.&lt;&#x2F;li&gt;
&lt;li&gt;When a function is called on a transparent contract it executes immediately if it is an &quot;unchangeable function&quot;. Otherwise the fallback function is executed. The fallback function finds the delegate contract associated with the function and executes the function using &lt;code&gt;delegatecall&lt;&#x2F;code&gt;. If there is no delegate contract for the function then execution reverts.&lt;&#x2F;li&gt;
&lt;li&gt;The source code of a transparent contract and all delegate contracts used by it are publicly viewable and verified.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;The transparent contract address is the address that users interact with. The transparent contract address never changes. Only delegate addresses can change by using the &lt;code&gt;updateContracts&lt;&#x2F;code&gt; function.&lt;&#x2F;p&gt;
&lt;p&gt;Typically some kind of authentication is needed for adding&#x2F;replacing&#x2F;removing functions from a transparent contract, &lt;strong&gt;however the scheme for authentication or ownership is not part of this standard&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;example&quot;&gt;Example&lt;&#x2F;h3&gt;
&lt;p&gt;Here is an example of an implementation of a transparent contract. Please note that the example below is an &lt;strong&gt;example only.  It is not the standard&lt;&#x2F;strong&gt;. A contract is a transparent contract when it implements and complies with the design points listed above.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;solidity&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;pragma&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt; solidity&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; ^0.5.7&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;contract&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; ExampleTransparentContract&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; owner of the contract&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;  address&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; internal&lt;&#x2F;span&gt;&lt;span&gt; contractOwner&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  event&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; OwnershipTransferred&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; previousOwner&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; newOwner&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; maps functions to the delegate contracts that execute the functions&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; funcId =&amp;gt; delegate contract&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  mapping&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;bytes4&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; address&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; internal&lt;&#x2F;span&gt;&lt;span&gt; delegates&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; maps each function signature to its position in the funcSignatures array.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; signature =&amp;gt; index+1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  mapping&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;bytes&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; uint256&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; internal&lt;&#x2F;span&gt;&lt;span&gt; funcSignatureToIndex&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  event&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; CommitMessage&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;string&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; message&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  event&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; FunctionUpdate&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;bytes4&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; functionId&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; oldDelegate&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; newDelegate&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;string&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; functionSignature&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; this is an example of an &amp;quot;unchangeable function&amp;quot;.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; return the delegate contract address for the supplied function signature&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; delegateAddress&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;string&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; calldata&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _functionSignature&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; view&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;funcSignatureToIndex&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;bytes&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_functionSignature&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; !=&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &amp;quot;Function signature not found.&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span&gt; delegates&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;bytes4&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;keccak256&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;bytes&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_functionSignature&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; add a function using the updateContract function&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; this is an internal helper function&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; addFunction&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _erc1538Delegate&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; contractAddress&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; string&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; memory&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _functionSignatures&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; string&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; memory&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _commitMessage&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; internal&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;    &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; 0x03A9BCCF == bytes4(keccak256(&amp;quot;updateContract(address,string,string)&amp;quot;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    bytes&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; memory&lt;&#x2F;span&gt;&lt;span&gt; funcdata &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-language&quot;&gt; abi&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;encodeWithSelector&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;0x03A9BCCF&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; contractAddress&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; _functionSignatures&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; _commitMessage&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    bool&lt;&#x2F;span&gt;&lt;span&gt; success&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    assembly&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      success &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:=&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; delegatecall&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;gas&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; _erc1538Delegate&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; add&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;funcdata&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0x20&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; mload&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;funcdata&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; funcdata&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;success&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &amp;quot;Adding a function failed&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt;   &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  constructor&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _erc1538Delegate&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; public&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    contractOwner &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-language&quot;&gt; msg.sender&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    emit&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; OwnershipTransferred&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-language&quot;&gt; msg.sender&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;    &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; adding ERC1538 updateContract function&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    bytes&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; memory&lt;&#x2F;span&gt;&lt;span&gt; signature &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &amp;quot;updateContract(address,string,string)&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    bytes4&lt;&#x2F;span&gt;&lt;span&gt; funcId &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; bytes4&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;keccak256&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;signature&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    delegates&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;funcId&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _erc1538Delegate&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    emit&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; FunctionUpdate&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;funcId&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; address&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; _erc1538Delegate&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; string&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;signature&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    emit&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; CommitMessage&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&amp;quot;Added ERC1538 updateContract function at contract creation&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;    &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; associate &amp;quot;unchangeable functions&amp;quot; with this transparent contract address&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;    &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; prevents function selector clashes with delegate contract functions&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;    &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; uses the updateContract function&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    string&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; memory&lt;&#x2F;span&gt;&lt;span&gt; functions &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &amp;quot;delegateAddress(string)&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;    addFunction&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_erc1538Delegate&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; address&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-language&quot;&gt;this&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; functions&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &amp;quot;Associating unchangeable functions&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;    &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; adding ERC1538Query interface functions&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    functions &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &amp;quot;functionByIndex(uint256)functionExists(string)delegateAddresses()delegateFunctionSignatures(address)functionById(bytes4)functionBySignature(string)functionSignatures()totalFunctions()&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;    &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; &amp;quot;0x01234567891011121314&amp;quot; is an example address of an ERC1538Query delegate contract&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;    addFunction&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_erc1538Delegate&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0x01234567891011121314&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; functions&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &amp;quot;Adding ERC1538Query functions&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;    &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; additional functions could be added at this point&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Making the fallback function payable makes it work for delegate contract functions &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; that are payable and not payable.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; payable&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;    &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Delegate every function call to a delegate contract&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    address&lt;&#x2F;span&gt;&lt;span&gt; delegate &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; delegates&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-language&quot;&gt;msg&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;sig&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;delegate &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;!=&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; address&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &amp;quot;Function does not exist.&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    assembly&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;      let&lt;&#x2F;span&gt;&lt;span&gt; ptr &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:=&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; mload&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;0x40&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;      calldatacopy&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;ptr&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; calldatasize&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;      let&lt;&#x2F;span&gt;&lt;span&gt; result &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:=&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; delegatecall&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;gas&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; delegate&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ptr&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; calldatasize&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;      let&lt;&#x2F;span&gt;&lt;span&gt; size &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:=&lt;&#x2F;span&gt;&lt;span&gt; returndatasize&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;      returndatacopy&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;ptr&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; size&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      switch result&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      case &lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;revert&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;ptr&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; size&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      default &lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;return&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span&gt;ptr&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; size&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;As can be seen in the above example, every function call is delegated to a delegate contract, unless the function is defined directly in the transparent contract (making it an unchangeable function).&lt;&#x2F;p&gt;
&lt;p&gt;The constructor function adds the &lt;code&gt;updateContract&lt;&#x2F;code&gt; function to the transparent contract, which is then used to add other functions to the transparent contract.&lt;&#x2F;p&gt;
&lt;p&gt;Each time a function is added to a transparent contract the events &lt;code&gt;CommitMessage&lt;&#x2F;code&gt; and &lt;code&gt;FunctionUpdate&lt;&#x2F;code&gt; are emitted to document exactly what functions where added or replaced and why.&lt;&#x2F;p&gt;
&lt;p&gt;The delegate contract that implements the &lt;code&gt;updateContract&lt;&#x2F;code&gt; function implements the following interface:&lt;&#x2F;p&gt;
&lt;h3 id=&quot;erc1538-interface&quot;&gt;ERC1538 Interface&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;solidity&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;pragma&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt; solidity&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; ^0.5.7&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;&#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @title&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; ERC1538 Transparent Contract Standard&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;&#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @dev&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Required interface&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;&#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;  Note&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;: the ERC-165 identifier for this interface is 0x61455567&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;interface&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; ERC1538&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @dev&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; This emits when one or a set of functions are updated in a transparent contract.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  The message string should give a short description of the change and why&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  the change was made.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  event&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; CommitMessage&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;string&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; message&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @dev&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; This emits for each function that is updated in a transparent contract.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  functionId is the bytes4 of the keccak256 of the function signature.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  oldDelegate is the delegate contract address of the old delegate contract if&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  the function is being replaced or removed.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  oldDelegate is the zero value address(0) if a function is being added for the&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  first time.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  newDelegate is the delegate contract address of the new delegate contract if &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  the function is being added for the first time or if the function is being &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  replaced.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  newDelegate is the zero value address(0) if the function is being removed.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  event&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; FunctionUpdate&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    bytes4&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; functionId&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    address&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; oldDelegate&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    address&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; newDelegate&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    string&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; functionSignature&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  )&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Updates functions in a transparent contract.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @dev&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; If the value of _delegate is zero then the functions specified &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  in _functionSignatures are removed.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  If the value of _delegate is a delegate contract address then the functions &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  specified in _functionSignatures will be delegated to that address.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; _delegate&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The address of a delegate contract to delegate to or zero&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;        to remove functions.      &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; _functionSignatures&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; A list of function signatures listed one after the other&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; _commitMessage&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; A short description of the change and why it is made&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;        This message is passed to the CommitMessage event.          &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; updateContract&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _delegate&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; string&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; calldata&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _functionSignatures&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; string&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; calldata&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _commitMessage&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;function-signatures-string-format&quot;&gt;Function Signatures String Format&lt;&#x2F;h3&gt;
&lt;p&gt;The text format for the &lt;code&gt;_functionSignatures&lt;&#x2F;code&gt; parameter is simply a string of function signatures. For example: &lt;code&gt;&quot;myFirstFunction()mySecondFunction(string)&quot;&lt;&#x2F;code&gt; This format is easy to parse and is concise.&lt;&#x2F;p&gt;
&lt;p&gt;Here is an example of calling the &lt;code&gt;updateContract&lt;&#x2F;code&gt; function that adds the ERC721 standard functions to a transparent contract:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;functionSignatures&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;approve(address,uint256)balanceOf(address)getApproved(uint256)isApprovedForAll(address,address)ownerOf(uint256)safeTransferFrom(address,address,uint256)safeTransferFrom(address,address,uint256,bytes)setApprovalForAll(address,bool)transferFrom(address,address,uint256)&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;tx&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; await&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; transparentContract&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;updateContract&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;erc721Delegate&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;address&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; functionSignatures&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Adding ERC721 functions&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;removing-functions&quot;&gt;Removing Functions&lt;&#x2F;h3&gt;
&lt;p&gt;Functions are removed by passing &lt;code&gt;address(0)&lt;&#x2F;code&gt; as the first argument to the &lt;code&gt;updateContract&lt;&#x2F;code&gt; function. The list of functions that are passed in are removed.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;source-code-verification&quot;&gt;Source Code Verification&lt;&#x2F;h3&gt;
&lt;p&gt;The transparent contract source code and the source code for the delegate contracts should be verified in a provable way by a third party source such as etherscan.io.&lt;&#x2F;p&gt;
&lt;!--
A transparent contract must implement the [ERC-165 Standard Interface Detection standard](.&#x2F;00165.md) via a delegate contract by adding the `supportsInterface` function using the `updateContract` function. The interfaceID for the ERC1538 standard is `0x61455567`.
--&gt;
&lt;h3 id=&quot;function-selector-clash&quot;&gt;Function Selector Clash&lt;&#x2F;h3&gt;
&lt;p&gt;A function selector clash occurs when a function is added to a contract that hashes to the same four-byte hash as an existing function. This is unlikely to occur but should be prevented in the implementation of the &lt;code&gt;updateContract&lt;&#x2F;code&gt; function. See the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;mudgen&#x2F;transparent-contracts-erc1538&quot;&gt;reference implementation of ERC1538&lt;&#x2F;a&gt; to see an example of how function clashes can be prevented.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;erc1538query&quot;&gt;ERC1538Query&lt;&#x2F;h3&gt;
&lt;p&gt;Optionally, the function signatures of a transparent contract can be stored in an array in the transparent contract and queried to get what functions the transparent contract supports and what their delegate contract addresses are.&lt;&#x2F;p&gt;
&lt;p&gt;The following is an optional interface for querying function information from a transparent contract:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;solidity&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;pragma&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt; solidity&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; ^0.5.7&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;interface&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; ERC1538Query&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Gets the total number of functions the transparent contract has.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @return&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; The&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; number of functions the transparent contract has,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  not including the fallback function.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; totalFunctions&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; view&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Gets information about a specific function&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @dev&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Throws if `_index` &amp;gt;= `totalFunctions()`&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; _index&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The index position of a function signature that is stored in an array&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @return&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; The&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; function signature, the function selector and the delegate contract address&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; functionByIndex&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _index&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    external&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    view&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    returns&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;      string&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; memory&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; functionSignature&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;      bytes4&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; functionId&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;      address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; delegate&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    )&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Checks to see if a function exists&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; The&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; function signature to check&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @return&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; True&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; if the function exists, false otherwise&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; functionExists&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;string&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; calldata&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _functionSignature&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; view&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;bool&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Gets all the function signatures of functions supported by the transparent contract&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @return&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; A&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; string containing a list of function signatures&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; functionSignatures&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; view&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;string&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; memory&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Gets all the function signatures supported by a specific delegate contract&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; _delegate&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The delegate contract address&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @return&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; A&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; string containing a list of function signatures&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; delegateFunctionSignatures&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _delegate&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; view&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;string&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; memory&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Gets the delegate contract address that supports the given function signature&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; The&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; function signature&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @return&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; The&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; delegate contract address&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; delegateAddress&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;string&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; calldata&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _functionSignature&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; view&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Gets information about a function&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @dev&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Throws if no function is found&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; _functionId&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The id of the function to get information about&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @return&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; The&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; function signature and the contract address&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; functionById&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;bytes4&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _functionId&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    external&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    view&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    returns&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;      string&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; memory&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; signature&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;      address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; delegate&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    )&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Get all the delegate contract addresses used by the transparent contract&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;  &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @return&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; An&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; array of all delegate contract addresses&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; delegateAddresses&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; view&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; memory&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;See the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;mudgen&#x2F;transparent-contracts-erc1538&quot;&gt;reference implementation of ERC1538&lt;&#x2F;a&gt; to see how this is implemented.&lt;&#x2F;p&gt;
&lt;p&gt;The text format for the list of function signatures returned from the &lt;code&gt;delegateFunctionSignatures&lt;&#x2F;code&gt; and &lt;code&gt;functionSignatures&lt;&#x2F;code&gt; functions is simply a string of function signatures. Here is an example of such a string: &lt;code&gt;&quot;approve(address,uint256)balanceOf(address)getApproved(uint256)isApprovedForAll(address,address)ownerOf(uint256)safeTransferFrom(address,address,uint256)safeTransferFrom(address,address,uint256,bytes)setApprovalForAll(address,bool)transferFrom(address,address,uint256)&quot;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;how-to-deploy-a-transparent-contract&quot;&gt;How To Deploy A Transparent Contract&lt;&#x2F;h3&gt;
&lt;ol&gt;
&lt;li&gt;Create and deploy to a blockchain a contract that implements the ERC1538 interface. You can skip this step if there is already such a contract deployed to the blockchain.&lt;&#x2F;li&gt;
&lt;li&gt;Create your transparent contract with a fallback function as given above. Your transparent contract also needs a constructor that adds the &lt;code&gt;updateContract&lt;&#x2F;code&gt; function.&lt;&#x2F;li&gt;
&lt;li&gt;Deploy your transparent contract to a blockchain. Pass in the address of the ERC1538 delegate contract to your constructor if it requires it.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;See the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;mudgen&#x2F;transparent-contracts-erc1538&quot;&gt;reference implementation&lt;&#x2F;a&gt; for examples of these contracts.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;wrapper-contract-for-delegate-contracts-that-depend-on-other-delegate-contracts&quot;&gt;Wrapper Contract for Delegate Contracts that Depend on Other Delegate Contracts&lt;&#x2F;h3&gt;
&lt;p&gt;In some cases some delegate contracts may need to call external&#x2F;public functions that reside in other delegate contracts. A convenient way to solve this problem is to create a contract that contains empty implementations of functions that are needed and import and extend this contract in delegate contracts that call functions from other delegate contracts. This enables delegate contracts to compile without having to provide implementations of the functions that are already given in other delegate contracts. This is a way to save gas, prevent reaching the max contract size limit, and prevent duplication of code. This strategy was given by @amiromayer. &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;EIPs&#x2F;issues&#x2F;1538#issuecomment-451985155&quot;&gt;See his comment for more information.&lt;&#x2F;a&gt; Another way to solve this problem is to use assembly to call functions provided by other delegate contracts.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;decentralized-authority&quot;&gt;Decentralized Authority&lt;&#x2F;h3&gt;
&lt;p&gt;It is possible to extend this standard to add consensus functionality such as an approval function that multiple different people call to approve changes before they are submitted with the &lt;code&gt;updateContract&lt;&#x2F;code&gt; function. Changes only go into effect when the changes are fully approved. The &lt;code&gt;CommitMessage&lt;&#x2F;code&gt; and &lt;code&gt; FunctionUpdate&lt;&#x2F;code&gt; events should only be emitted when changes go into effect.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security&quot;&gt;Security&lt;&#x2F;h2&gt;
&lt;blockquote&gt;
&lt;p&gt;This standard refers to &lt;strong&gt;owner(s)&lt;&#x2F;strong&gt; as one or more individuals that have the power to add&#x2F;replace&#x2F;remove functions of an upgradeable contract.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h3 id=&quot;general&quot;&gt;General&lt;&#x2F;h3&gt;
&lt;p&gt;The owners(s) of an upgradeable contract have the ability to alter, add or remove data from the contract&#x27;s data storage. Owner(s) of a contract can also execute any arbitrary code in the contract on behalf of any address. Owners(s) can do these things by adding a function to the contract that they call to execute arbitrary code. This is an issue for upgradeable contracts in general and is not specific to transparent contracts.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;&#x2F;strong&gt; The design and implementation of contract ownership is &lt;strong&gt;not&lt;&#x2F;strong&gt; part of this standard. The examples given in this standard and in the reference implementation are just &lt;strong&gt;examples&lt;&#x2F;strong&gt; of how it could be done.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h3 id=&quot;unchangeable-functions&quot;&gt;Unchangeable Functions&lt;&#x2F;h3&gt;
&lt;p&gt;&quot;Unchangeable functions&quot; are functions defined in a transparent contract itself and not in a delegate contract. The owner(s) of a transparent contract are not able to replace these functions. The use of unchangeable functions is limited because in some cases they can still be manipulated if they read or write data to the storage of the transparent contract. Data read from the transparent contract&#x27;s storage could have been altered by the owner(s) of the contract. Data written to the transparent contract&#x27;s storage can be undone or altered by the owner(s) of the contract.&lt;&#x2F;p&gt;
&lt;p&gt;In some cases unchangeble functions add trustless guarantees to a transparent contract.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;transparency&quot;&gt;Transparency&lt;&#x2F;h3&gt;
&lt;p&gt;Contracts that implement this standard emit an event every time a function is added, replaced or removed. This enables people and software to monitor the changes to a contract. If any bad acting function is added to a contract then it can be seen. To comply with this standard all source code of a transparent contract and delegate contracts must be publicly available and verified.&lt;&#x2F;p&gt;
&lt;p&gt;Security and domain experts can review the history of change of any transparent contract to detect any history of foul play.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;string-of-function-signatures-instead-of-bytes4-array-of-function-selectors&quot;&gt;String of Function Signatures Instead of bytes4[] Array of Function Selectors&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;updateContract&lt;&#x2F;code&gt; function takes a &lt;code&gt;string&lt;&#x2F;code&gt; list of functions signatures as an argument instead of a &lt;code&gt;bytes4[]&lt;&#x2F;code&gt; array of function selectors for three reasons:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Passing in function signatures enables the implementation of &lt;code&gt;updateContract&lt;&#x2F;code&gt; to prevent selector clashes.&lt;&#x2F;li&gt;
&lt;li&gt;A major part of this standard is to make upgradeable contracts more transparent by making it easier to see what has changed over time and why. When a function is added, replaced or removed its function signature is included in the FunctionUpdate event that is emitted. This makes it relatively easy to write software that filters the events of a contract to display to people what functions have been added&#x2F;removed and changed over time without needing access to the source code or ABI of the contract. If only four-byte function selectors were provided this would not be possible.&lt;&#x2F;li&gt;
&lt;li&gt;By looking at the source code of a transparent contract it is not possible to see all the functions that it supports. This is why the ERC1538Query interface exists, so that people and software have a way to look up and examine or show all functions currently supported by a transparent contract. Function signatures are used so that ERC1538Query functions can show them.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;gas-considerations&quot;&gt;Gas Considerations&lt;&#x2F;h3&gt;
&lt;p&gt;Delegating function calls does have some gas overhead. This is mitigated in two ways:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Delegate contracts can be small, reducing gas costs. Because it costs more gas to call a function in a contract with many functions than a contract with few functions.&lt;&#x2F;li&gt;
&lt;li&gt;Because transparent contracts do not have a max size limitation it is possible to add gas optimizing functions for use cases. For example someone could use a transparent contract to implement the ERC721 standard and implement batch transfer functions from the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;EIPs&#x2F;issues&#x2F;1412&quot;&gt;ERC1412 standard&lt;&#x2F;a&gt; to help reduce gas (and make batch transfers more convenient).&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;storage&quot;&gt;Storage&lt;&#x2F;h3&gt;
&lt;p&gt;The standard does not specify how data is stored or organized by a transparent contract. But here are some suggestions:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Inherited Storage&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The storage variables of a transparent contract consist of the storage variables defined in the transparent contract source code and the source code of delegate contracts that have been added.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;A delegate contract can use any storage variable that exists in a transparent contract as long as it defines within it all the storage variables that exist, in the order that they exist, up to and including the ones being used.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;A delegate contract can create new storage variables as long as it has defined, in the same order, all storage variables that exist in the transparent contract.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Here is a simple way inherited storage could be implemented:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Create a storage contract that contains the storage variables that your transparent contract and delegate contracts will use.&lt;&#x2F;li&gt;
&lt;li&gt;Make your delegate contracts inherit the storage contract.&lt;&#x2F;li&gt;
&lt;li&gt;If you want to add a new delegate contract that adds new storage variables then create a new storage contract that adds the new storage variables and inherits from the old storage contract. Use your new storage contract with your new delegate contract.&lt;&#x2F;li&gt;
&lt;li&gt;Repeat steps 2 or 3 for every new delegate contract.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;&lt;strong&gt;Unstructured Storage&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Assembly is used to store and read data at specific storage locations. An advantage to this approach is that previously used storage locations don&#x27;t have to be defined or mentioned in a delegate contract if they aren&#x27;t used by it.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Eternal Storage&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Data can be stored using a generic API based on the type of data. &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;EIPs&#x2F;issues&#x2F;930&quot;&gt;See ERC930 for more information.&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;becoming-immutable&quot;&gt;Becoming Immutable&lt;&#x2F;h3&gt;
&lt;p&gt;It is possible to make a transparent contract become immutable. This is done by calling the &lt;code&gt;updateContract&lt;&#x2F;code&gt; function to remove the &lt;code&gt;updateContract&lt;&#x2F;code&gt; function. With this gone it is no longer possible to add, replace and remove functions.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;versions-of-functions&quot;&gt;Versions of Functions&lt;&#x2F;h3&gt;
&lt;p&gt;Software or a user can verify what version of a function is called by getting the delegate contract address of the function. This can be done by calling the &lt;code&gt;delegateAddress&lt;&#x2F;code&gt; function from the ERC1538Query interface if it is implemented. This function takes a function signature as an argument and returns the delegate contract address where it is implemented.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;best-practices-tools-and-more-information&quot;&gt;Best Practices, Tools and More Information&lt;&#x2F;h3&gt;
&lt;blockquote&gt;
&lt;p&gt;More information, tools, tutorials and best practices concerning transparent contracts need to be developed and published.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Below is a growing list of articles concerning transparent contracts and their use.  If you have an article about transparent contracts you would like to share then please submit a comment to this issue about it to get it added.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;coinjournal.net&#x2F;erc1538-future-proofing-smart-contacts-and-tokens&#x2F;&quot;&gt;ERC1538: Future Proofing Smart Contracts and Tokens&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.crypto-economy.net&#x2F;en&#x2F;ethereum-eth-erc1538-transparent-contract-standard&#x2F;&quot;&gt;The ERC1538 improving towards the “transparent contract” standard&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;inspiration&quot;&gt;Inspiration&lt;&#x2F;h3&gt;
&lt;p&gt;This standard was inspired by ZeppelinOS&#x27;s implementation of &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;zeppelinos&#x2F;labs&#x2F;tree&#x2F;master&#x2F;upgradeability_with_vtable&quot;&gt;Upgradeability with vtables&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;This standard was also inspired by the design and implementation of the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;etherscan.io&#x2F;address&#x2F;0xc1eab49cf9d2e23e43bcf23b36b2be14fc2f8838#code&quot;&gt;Mokens contract&lt;&#x2F;a&gt; from the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;Mokens&#x2F;MIPs&#x2F;blob&#x2F;master&#x2F;MIPS&#x2F;mip-2-Goals-and-Objectives.md&quot;&gt;Mokens project&lt;&#x2F;a&gt;. The Mokens contract has been &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;etherscan.io&#x2F;address&#x2F;0x0ac5637fe62ec14fd9e237a81a9679d4adef701f#code&quot;&gt;upgraded to implement this standard&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;This standard makes a contract compatible with future standards and functionality because new functions can be added and existing functions can be replaced or removed.&lt;&#x2F;p&gt;
&lt;p&gt;This standard future proofs a contract.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;A reference implementation of this standard is given in the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;mudgen&#x2F;transparent-contracts-erc1538&quot;&gt;transparent-contracts-erc1538&lt;&#x2F;a&gt; repository.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Ethash 1a</title>
        <published>2018-08-26T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Paweł Bylica</name><uri>https://github.com/chfast</uri>
	</author>
	
	<author>
		<name>Jean M. Cyr</name><uri>https://github.com/jean-m-cyr</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/1355/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-1355-ethash-1a/1167" />
        

        <id>https://wg-eips.ritovision.com/1355/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        

        
        <category
            term="tag:eip:1355"
            label="EIP-1355" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/1355/">&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;Provide minimal set of changes to Ethash algorithm to hinder and delay the adoption of ASIC based mining.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Define hash function &lt;code&gt;fnv1a()&lt;&#x2F;code&gt; as&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;def&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; fnv1a&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt;v1&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; v2&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;v1&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; ^&lt;&#x2F;span&gt;&lt;span&gt; v2&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; *&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; FNV1A_PRIME&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; %&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;**&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;32&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;where &lt;code&gt;FNV1A_PRIME&lt;&#x2F;code&gt; is 16777499 or 16777639.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Change the hash function that determines the DAG item index in Ethash algorithm from &lt;code&gt;fnv()&lt;&#x2F;code&gt; to new &lt;code&gt;fnv1a()&lt;&#x2F;code&gt;.
In &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;eth-wiki&#x2F;blob&#x2F;master&#x2F;concepts&#x2F;ethash&#x2F;ethash.md#main-loop&quot;&gt;Main Loop&lt;&#x2F;a&gt; change&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;p&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; fnv&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;i&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; ^&lt;&#x2F;span&gt;&lt;span&gt; s&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; mix&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;i&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; %&lt;&#x2F;span&gt;&lt;span&gt; w&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; %&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span&gt;n&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt; mixhashes&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; *&lt;&#x2F;span&gt;&lt;span&gt; mixhashes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;to&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;p&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; fnv1a&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;i&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; ^&lt;&#x2F;span&gt;&lt;span&gt; s&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; mix&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;i&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; %&lt;&#x2F;span&gt;&lt;span&gt; w&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; %&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span&gt;n&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt; mixhashes&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; *&lt;&#x2F;span&gt;&lt;span&gt; mixhashes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;The usual argument for decentralization and network security.&lt;&#x2F;p&gt;
&lt;p&gt;Unless programmable, an ASIC is hardwired to perform sequential operations in a given order. fnv1a changes the order in which an exclusive-or and a multiply are applied, effectively disabling the current wave of ASICS. A second objective is minimize ethash changes to be the least disruptive, to facilitate rapid development, and to lower the analysis and test requirements. Minimizing changes to ethash reduces risk associated with updating all affected network components, and also reduces the risk of detuning existing GPUs. It&#x27;s expected that this specific change would have no effect on existing GPU performance.&lt;&#x2F;p&gt;
&lt;p&gt;Changing fnv to fnv1a has no cryptographic implications. It is merely an efficient hash function with good dispersion characteristics used to scramble DAG indexing. We remain focused on risk mitigation by reducing the need for rigorous cryptographic analysis.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;fnv-primes&quot;&gt;FNV Primes&lt;&#x2F;h3&gt;
&lt;p&gt;The 16777639 satisfies all requirements from &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV_prime&quot;&gt;Wikipedia&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The 16777499 is preferred by FNV authors but not used in the reference FNV implementation because of historical reasons.
See &lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;www.isthe.com&#x2F;chongo&#x2F;tech&#x2F;comp&#x2F;fnv&#x2F;index.html#fnv-prime&quot;&gt;A few remarks on FNV primes&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;This work is licensed under a &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;creativecommons.org&#x2F;licenses&#x2F;by-nc-sa&#x2F;4.0&#x2F;&quot;&gt;Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Remove Difficulty Bomb</title>
        <published>2018-07-21T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Micah Zoltu</name><uri>https://github.com/MicahZoltu</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/1240/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/difficulty-bomb-removal/832" />
        

        <id>https://wg-eips.ritovision.com/1240/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        

        
        <category
            term="tag:eip:1240"
            label="EIP-1240" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/1240/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;The average block times are increasing due to the difficulty bomb (also known as the &quot;&lt;em&gt;ice age&lt;&#x2F;em&gt;&quot;) slowly accelerating. This EIP proposes to remove the difficulty increase over time and replace it with a fixed difficulty targeting 15 second blocks.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;Starting with &lt;code&gt;FORK_BLOCK_NUMBER&lt;&#x2F;code&gt; the client will calculate the difficulty without considering the current block number.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;The difficulty bomb operates under the assumption that miners decide what code economic participants are running, rather than economic participants deciding for themselves.  In reality, miners will mine whatever chain is most profitable and the most profitable chain is the one that economic participants use.  If 99% of miners mine a chain that no economic participants use then that chain will have no value and the miners will cease mining of it in favor of some other chain that does have economic participants.  Another way to put this is that miners will follow economic participants, not the other way around.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;h4 id=&quot;remove-difficulty&quot;&gt;Remove Difficulty&lt;&#x2F;h4&gt;
&lt;p&gt;For the purposes of &lt;code&gt;calc_difficulty&lt;&#x2F;code&gt;, if &lt;code&gt;block.number &amp;gt;= FORK_BLOCK_NUMBER&lt;&#x2F;code&gt; then change the epsilon component to &lt;code&gt;0&lt;&#x2F;code&gt; rather than having it be a function of block number.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;With the difficulty bomb removed, when Casper is released it will be up to economic participants to decide whether they want the features that Casper enables or not.  If they do not want Casper, they are free to continue running unpatched clients and participating in the Ethereum network as it exists today.  This freedom of choice is the cornerstone of DLTs and making it hard for people to make that choice (by creating an artificial pressure) does not work towards that goal of freedom of choice.  If the development team is not confident that economic participants will want Casper, then they should re-evaluate their priorities rather than trying to force Casper onto users.&lt;&#x2F;p&gt;
&lt;p&gt;Author Personal Note: I think we will see almost all economic participants in Ethereum switch to PoS&#x2F;Sharding without any extra pressure beyond client defaults.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;This EIP is not forward compatible and introduces backwards incompatibilities in the difficulty calculation. Therefore, it should be included in a scheduled hardfork at a certain block number.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;p&gt;Test cases shall be created once the specification is to be accepted by the developers or implemented by the clients.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;implementations&quot;&gt;Implementations&lt;&#x2F;h2&gt;
&lt;p&gt;The yellow paper implements this change in https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;yellowpaper&#x2F;pull&#x2F;710&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Oracle Interface</title>
        <published>2018-06-13T00:00:00+00:00</published>
        <updated>2026-02-11T14:48:25+00:00</updated>
	
	
	<author>
		<name>Alan Lu</name><uri>https://github.com/cag</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/1154/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://github.com/ethereum/EIPs/issues/1161" />
        

        <id>https://wg-eips.ritovision.com/1154/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="erc"
                label="ERC" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        

        
        <category
            term="tag:eip:1154"
            label="ERC-1154" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/1154/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;A standard interface for oracles.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;In order for ethereum smart contracts to interact with off-chain systems, oracles must be used. These oracles report values which are normally off-chain, allowing smart contracts to react to the state of off-chain systems. A distinction and a choice is made between push and pull based oracle systems. Furthermore, a standard interface for oracles is described here, allowing different oracle implementations to be interchangeable.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;The Ethereum ecosystem currently has many different oracle implementations available, but they do not provide a unified interface. Smart contract systems would be locked into a single set of oracle implementations, or they would require developers to write adapters&#x2F;ports specific to the oracle system chosen in a given project.&lt;&#x2F;p&gt;
&lt;p&gt;Beyond naming differences, there is also the issue of whether or not an oracle report-resolving transaction &lt;em&gt;pushes&lt;&#x2F;em&gt; state changes by calling affected contracts, or changes the oracle state allowing dependent contracts to &lt;em&gt;pull&lt;&#x2F;em&gt; the updated value from the oracle. These differing system semantics could introduce inefficiencies when adapting between them.&lt;&#x2F;p&gt;
&lt;p&gt;Ultimately, the value in different oracle systems comes from their underlying resolution mechanics, and points where these systems are virtually identical should be standardized.&lt;&#x2F;p&gt;
&lt;p&gt;These oracles may be used for answering questions about &quot;real-world events&quot;, where each ID can be correlated with a specification of a question and its answers (so most likely for prediction markets, basically).&lt;&#x2F;p&gt;
&lt;p&gt;Another use case could be for decision-making processes, where the results given by the oracle represent decisions made by the oracle (e.g. futarchies). DAOs may require their use in decision making processes.&lt;&#x2F;p&gt;
&lt;p&gt;Both the ID and the results are intentionally unstructured so that things like time series data (via splitting the ID) and different sorts of results (like one of a few, any subset of up to 256, or some value in a range with up to 256 bits of granularity) can be represented.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;dl&gt;
  &lt;dt&gt;Oracle&lt;&#x2F;dt&gt;
  &lt;dd&gt;An entity which reports data to the blockchain.&lt;&#x2F;dd&gt;
  &lt;dt&gt;Oracle consumer&lt;&#x2F;dt&gt;
  &lt;dd&gt;A smart contract which receives data from an oracle.&lt;&#x2F;dd&gt;
  &lt;dt&gt;ID&lt;&#x2F;dt&gt;
  &lt;dd&gt;A way of indexing the data which an oracle reports. May be derived from or tied to a question for which the data provides the answer.&lt;&#x2F;dd&gt;
  &lt;dt&gt;Result&lt;&#x2F;dt&gt;
  &lt;dd&gt;Data associated with an id which is reported by an oracle. This data oftentimes will be the answer to a question tied to the id. Other equivalent terms that have been used include: answer, data, outcome.&lt;&#x2F;dd&gt;
  &lt;dt&gt;Report&lt;&#x2F;dt&gt;
  &lt;dd&gt;A pair (ID, result) which an oracle sends to an oracle consumer.&lt;&#x2F;dd&gt;
&lt;&#x2F;dl&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;solidity&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;interface&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; OracleConsumer&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; receiveResult&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; id&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; bytes&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; result&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;receiveResult&lt;&#x2F;code&gt; MUST revert if the &lt;code&gt;msg.sender&lt;&#x2F;code&gt; is not an oracle authorized to provide the &lt;code&gt;result&lt;&#x2F;code&gt; for that &lt;code&gt;id&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;receiveResult&lt;&#x2F;code&gt; MUST revert if &lt;code&gt;receiveResult&lt;&#x2F;code&gt; has been called with the same &lt;code&gt;id&lt;&#x2F;code&gt; before.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;receiveResult&lt;&#x2F;code&gt; MAY revert if the &lt;code&gt;id&lt;&#x2F;code&gt; or &lt;code&gt;result&lt;&#x2F;code&gt; cannot be handled by the consumer.&lt;&#x2F;p&gt;
&lt;p&gt;Consumers MUST coordinate with oracles to determine how to encode&#x2F;decode results to and from &lt;code&gt;bytes&lt;&#x2F;code&gt;. For example, &lt;code&gt;abi.encode&lt;&#x2F;code&gt; and &lt;code&gt;abi.decode&lt;&#x2F;code&gt; may be used to implement a codec for results in Solidity. &lt;code&gt;receiveResult&lt;&#x2F;code&gt; SHOULD revert if the consumer receives a unexpected result format from the oracle.&lt;&#x2F;p&gt;
&lt;p&gt;The oracle can be any Ethereum account.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;The specs are currently very similar to what is implemented by ChainLink (which can use any arbitrarily-named callback) and Oraclize (which uses &lt;code&gt;__callback&lt;&#x2F;code&gt;).&lt;&#x2F;p&gt;
&lt;p&gt;With this spec, the oracle &lt;em&gt;pushes&lt;&#x2F;em&gt; state to the consumer, which must react accordingly to the updated state. An alternate &lt;em&gt;pull&lt;&#x2F;em&gt;-based interface can be prescribed, as follows:&lt;&#x2F;p&gt;
&lt;h3 id=&quot;alternate-pull-based-interface&quot;&gt;Alternate Pull-based Interface&lt;&#x2F;h3&gt;
&lt;p&gt;Here are alternate specs loosely based on Gnosis prediction market contracts v1. Reality Check also exposes a similar endpoint (&lt;code&gt;getFinalAnswer&lt;&#x2F;code&gt;).&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;solidity&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;interface&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Oracle&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; resultFor&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; id&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; view&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;bytes&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; result&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;resultFor&lt;&#x2F;code&gt; MUST revert if the result for an &lt;code&gt;id&lt;&#x2F;code&gt; is not available yet.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;resultFor&lt;&#x2F;code&gt; MUST return the same result for an &lt;code&gt;id&lt;&#x2F;code&gt; after that result is available.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;push-vs-pull&quot;&gt;Push vs Pull&lt;&#x2F;h3&gt;
&lt;p&gt;Note that push-based interfaces may be adapted into pull-based interfaces. Simply deploy an oracle consumer which stores the result received and implements &lt;code&gt;resultFor&lt;&#x2F;code&gt; accordingly.&lt;&#x2F;p&gt;
&lt;p&gt;Similarly, every pull-based system can be adapted into a push-based system: just add a method on the oracle smart contract which takes an oracle consumer address and calls &lt;code&gt;receiveResult&lt;&#x2F;code&gt; on that address.&lt;&#x2F;p&gt;
&lt;p&gt;In both cases, an additional transaction would have to be performed, so the choice to go with push or pull should be based on the dominant use case for these oracles.&lt;&#x2F;p&gt;
&lt;p&gt;In the simple case where a single account has the authority to decide the outcome of an oracle question, there is no need to deploy an oracle contract and store the outcome on that oracle contract. Similarly, in the case where the outcome comes down to a vote, existing multisignature wallets can be used as the authorized oracle.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;multiple-oracle-consumers&quot;&gt;Multiple Oracle Consumers&lt;&#x2F;h4&gt;
&lt;p&gt;In the case that many oracle consumers depend on a single oracle result and all these consumers expect the result to be pushed to them, the push and pull adaptations mentioned before may be combined if the pushing oracle cannot be trusted to send the same result to every consumer (in a sense, this forwards the trust to the oracle adaptor implementation).&lt;&#x2F;p&gt;
&lt;p&gt;In a pull-based system, each of the consumers would have to be called to pull the result from the oracle contract, but in the proposed push-based system, the adapted oracle would have to be called to push the results to each of the consumers.&lt;&#x2F;p&gt;
&lt;p&gt;Transaction-wise, both systems are roughly equivalent in efficiency in this scenario, but in the push-based system, there&#x27;s a need for the oracle consumers to store the results again, whereas in the pull-based system, the consumers may continue to refer to the oracle for the results. Although this may be somewhat less efficient, requiring the consumers to store the results can also provide security guarantees, especially with regards to result immutability.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;result-immutability&quot;&gt;Result Immutability&lt;&#x2F;h4&gt;
&lt;p&gt;In both the proposed specification and the alternate specification, results are immutable once they are determined. This is due to the expectation that typical consumers will require results to be immutable in order to determine a resulting state consistently. With the proposed push-based system, the consumer enforces the result immutability requirement, whereas in the alternate pull-based system, either the oracle would have to be trusted to implement the spec correctly and enforce the immutability requirement, or the consumer would also have to handle result immutability.&lt;&#x2F;p&gt;
&lt;p&gt;For data which mutates over time, the &lt;code&gt;id&lt;&#x2F;code&gt; field may be structured to specify &quot;what&quot; and &quot;when&quot; for the data (using 128 bits to specify &quot;when&quot; is still safe for many millennia).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;levelkdev&#x2F;tidbit&quot;&gt;Tidbit&lt;&#x2F;a&gt; tracks this EIP.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Revised Ethereum Smart Contract Packaging Standard</title>
        <published>2018-06-01T00:00:00+00:00</published>
        <updated>2026-02-11T14:48:25+00:00</updated>
	
	
	<author>
		<name>g. nicholas d’andrea</name><uri>https://github.com/gnidan</uri>
	</author>
	
	<author>
		<name>Piper Merriam</name><uri>https://github.com/pipermerriam</uri>
	</author>
	
	<author>
		<name>Nick Gheorghita</name><uri>https://github.com/njgheorghita</uri>
	</author>
	
	<author>
		<name>Danny Ryan</name><uri>https://github.com/djrtwo</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/1123/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://github.com/ethereum/EIPs/issues/1123" />
        

        <id>https://wg-eips.ritovision.com/1123/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="erc"
                label="ERC" />
            
        

        
        <category
            term="tag:eip:1123"
            label="ERC-1123" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/1123/">&lt;p&gt;This ERC has been abandoned in favor of the EthPM V3 smart contract packaging standard defined in &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;2678&#x2F;&quot;&gt;ERC-2678&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h1&gt;
&lt;p&gt;A data format describing a smart contract software package.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h1&gt;
&lt;p&gt;This EIP defines a data format for &lt;em&gt;package manifest&lt;&#x2F;em&gt; documents,
representing a package of one or more smart contracts, optionally
including source code and any&#x2F;all deployed instances across multiple
networks. Package manifests are minified JSON objects, to be distributed
via content addressable storage networks, such as IPFS.&lt;&#x2F;p&gt;
&lt;p&gt;This document presents a natural language description of a formal
specification for version &lt;strong&gt;2&lt;&#x2F;strong&gt; of this format.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h1&gt;
&lt;p&gt;This standard aims to encourage the Ethereum development ecosystem
towards software best practices around code reuse. By defining an open,
community-driven package data format standard, this effort seeks to
provide support for package management tools development by offering a
general-purpose solution that has been designed with observed common
practices in mind.&lt;&#x2F;p&gt;
&lt;p&gt;As version 2 of this specification, this standard seeks to address a
number of areas of improvement found for the previous version (defined
in
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;190&#x2F;&quot;&gt;EIP-190&lt;&#x2F;a&gt;).
This version:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Generalizes storage URIs to represent any content addressable URI
scheme, not only IPFS.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Renames &lt;em&gt;release lockfile&lt;&#x2F;em&gt; to &lt;em&gt;package manifest&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Adds support for languages other than Solidity by generalizing the
compiler information format.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Redefines link references to be more flexible, to represent
arbitrary gaps in bytecode (besides only addresses), in a more
straightforward way.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Forces format strictness, requiring that package manifests contain
no extraneous whitespace, and sort object keys in alphabetical
order, to prevent hash mismatches.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;div id=&quot;package-specification&quot;&gt;&lt;&#x2F;div&gt;
&lt;h1 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h1&gt;
&lt;p&gt;This document defines the specification for an EthPM package manifest. A
package manifest provides metadata about a &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-package&quot;&gt;Package&lt;&#x2F;a&gt;, and
in most cases should provide sufficient information about the packaged
contracts and its dependencies to do bytecode verification of its
contracts.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;A &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ethpm.github.io&#x2F;ethpm-spec&quot;&gt;hosted
version&lt;&#x2F;a&gt; of this
specification is available via GitHub Pages. This EIP and the hosted
HTML document were both autogenerated from the same documentation
source.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h2 id=&quot;guiding-principles&quot;&gt;Guiding Principles&lt;&#x2F;h2&gt;
&lt;p&gt;This specification makes the following assumptions about the document
lifecycle.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Package manifests are intended to be generated programmatically by
package management software as part of the release process.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Package manifests will be consumed by package managers during tasks
like installing package dependencies or building and deploying new
releases.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Package manifests will typically &lt;strong&gt;not&lt;&#x2F;strong&gt; be stored alongside the
source, but rather by package registries &lt;em&gt;or&lt;&#x2F;em&gt; referenced by package
registries and stored in something akin to IPFS.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;conventions&quot;&gt;Conventions&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;rfc2119&quot;&gt;RFC2119&lt;&#x2F;h3&gt;
&lt;p&gt;The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”,
“SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this
document are to be interpreted as described in RFC 2119.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.ietf.org&#x2F;rfc&#x2F;rfc2119.txt&quot;&gt;https:&#x2F;&#x2F;www.ietf.org&#x2F;rfc&#x2F;rfc2119.txt&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;prefixed-vs-unprefixed&quot;&gt;Prefixed vs Unprefixed&lt;&#x2F;h3&gt;
&lt;p&gt;A &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-prefixed&quot;&gt;prefixed&lt;&#x2F;a&gt; hexadecimal value begins with &lt;code&gt;0x&lt;&#x2F;code&gt;.
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-unprefixed&quot;&gt;Unprefixed&lt;&#x2F;a&gt; values have no prefix. Unless otherwise
specified, all hexadecimal values &lt;strong&gt;should&lt;&#x2F;strong&gt; be represented with the
&lt;code&gt;0x&lt;&#x2F;code&gt; prefix.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Prefixed&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;0xdeadbeef&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Unprefixed&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;deadbeef&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h2 id=&quot;document-format&quot;&gt;Document Format&lt;&#x2F;h2&gt;
&lt;p&gt;The canonical format is a single JSON object. Packages &lt;strong&gt;must&lt;&#x2F;strong&gt; conform
to the following serialization rules.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The document &lt;strong&gt;must&lt;&#x2F;strong&gt; be tightly packed, meaning no linebreaks or
extra whitespace.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;The keys in all objects must be sorted alphabetically.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Duplicate keys in the same object are invalid.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;The document &lt;strong&gt;must&lt;&#x2F;strong&gt; use
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;UTF-8&quot;&gt;UTF-8&lt;&#x2F;a&gt;
encoding.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;The document &lt;strong&gt;must&lt;&#x2F;strong&gt; not have a trailing newline.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;document-specification&quot;&gt;Document Specification&lt;&#x2F;h2&gt;
&lt;p&gt;The following fields are defined for the package. Custom fields &lt;strong&gt;may&lt;&#x2F;strong&gt;
be included. Custom fields &lt;strong&gt;should&lt;&#x2F;strong&gt; be prefixed with &lt;code&gt;x-&lt;&#x2F;code&gt; to prevent
name collisions with future versions of the specification.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;See Also&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Formalized (&lt;a href=&quot;https:&#x2F;&#x2F;json-schema.org&quot;&gt;JSON-Schema&lt;&#x2F;a&gt;) version of this specification: &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethpm&#x2F;ethpm-spec&#x2F;tree&#x2F;v2.0.0&#x2F;spec&#x2F;package.spec.json&quot;&gt;package.spec.json&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Jump To&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;a href=&quot;#definitions&quot;&gt;Definitions&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;div id=&quot;manifest-version&quot;&gt;&lt;&#x2F;div&gt;
&lt;h3 id=&quot;ethpm-manifest-version-manifest-version&quot;&gt;EthPM Manifest Version: &lt;code&gt;manifest_version&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;manifest_version&lt;&#x2F;code&gt; field defines the specification version that this
document conforms to. Packages &lt;strong&gt;must&lt;&#x2F;strong&gt; include this field.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Yes&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;manifest_version&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Allowed Values&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;2&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;div id=&quot;package-names&quot;&gt;&lt;&#x2F;div&gt;
&lt;h3 id=&quot;package-name-package-name&quot;&gt;Package Name: &lt;code&gt;package_name&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;package_name&lt;&#x2F;code&gt; field defines a human readable name for this package.
Packages &lt;strong&gt;must&lt;&#x2F;strong&gt; include this field. Package names &lt;strong&gt;must&lt;&#x2F;strong&gt; begin with
a lowercase letter and be comprised of only lowercase letters, numeric
characters, and the dash character &lt;code&gt;-&lt;&#x2F;code&gt;. Package names &lt;strong&gt;must&lt;&#x2F;strong&gt; not
exceed 214 characters in length.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Yes&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;package_name&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;strong&gt;must&lt;&#x2F;strong&gt; match the regular expression &lt;code&gt;^[a-zA-Z][a-zA-Z0-9_]{0,255}$&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h3 id=&quot;package-meta-meta&quot;&gt;Package Meta: &lt;code&gt;meta&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;meta&lt;&#x2F;code&gt; field defines a location for metadata about the package which
is not integral in nature for package installation, but may be important
or convenient to have on-hand for other reasons. This field &lt;strong&gt;should&lt;&#x2F;strong&gt;
be included in all Packages.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;meta&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;a href=&quot;#package-meta-object&quot;&gt;Package Meta Object&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h3 id=&quot;version-version&quot;&gt;Version: &lt;code&gt;version&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;version&lt;&#x2F;code&gt; field declares the version number of this release. This
value &lt;strong&gt;must&lt;&#x2F;strong&gt; be included in all Packages. This value &lt;strong&gt;should&lt;&#x2F;strong&gt;
conform to the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;semver.org&#x2F;&quot;&gt;semver&lt;&#x2F;a&gt; version
numbering specification.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Yes&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;version&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h3 id=&quot;sources-sources&quot;&gt;Sources: &lt;code&gt;sources&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;sources&lt;&#x2F;code&gt; field defines a source tree that &lt;strong&gt;should&lt;&#x2F;strong&gt; comprise the
full source tree necessary to recompile the contracts contained in this
release. Sources are declared in a key&#x2F;value mapping.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;sources&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Object (String: String)&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;See Below.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;format&quot;&gt;Format&lt;&#x2F;h4&gt;
&lt;p&gt;Keys &lt;strong&gt;must&lt;&#x2F;strong&gt; be relative filesystem paths beginning with a &lt;code&gt;.&#x2F;&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Paths &lt;strong&gt;must&lt;&#x2F;strong&gt; resolve to a path that is within the current working
directory.&lt;&#x2F;p&gt;
&lt;p&gt;Values &lt;strong&gt;must&lt;&#x2F;strong&gt; conform to &lt;em&gt;one of&lt;&#x2F;em&gt; the following formats.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Source string.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-content-addressable-uri&quot;&gt;Content Addressable URI&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;When the value is a source string the key should be interpreted as a
file path.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;If the resulting document is a directory the key should be
interpreted as a directory path.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;If the resulting document is a file the key should be interpreted as
a file path.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;contract-types-contract-types&quot;&gt;Contract Types: &lt;code&gt;contract_types&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;contract_types&lt;&#x2F;code&gt; field holds the &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-type&quot;&gt;Contract
Types&lt;&#x2F;a&gt; which have been included in this release.
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-package&quot;&gt;Packages&lt;&#x2F;a&gt; &lt;strong&gt;should&lt;&#x2F;strong&gt; only include contract types that
can be found in the source files for this package. Packages &lt;strong&gt;should
not&lt;&#x2F;strong&gt; include contract types from dependencies. Packages &lt;strong&gt;should not&lt;&#x2F;strong&gt;
include abstract contracts in the contract types section of a release.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;contract_types&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Object (String: &lt;a href=&quot;#contract-type-object&quot;&gt;Contract Type Object&lt;&#x2F;a&gt;)&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Keys &lt;strong&gt;must&lt;&#x2F;strong&gt; be valid &lt;a href=&quot;#term-contract-alias&quot;&gt;Contract Aliases&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Values &lt;strong&gt;must&lt;&#x2F;strong&gt; conform to the &lt;a href=&quot;#contract-type-object&quot;&gt;Contract Type Object&lt;&#x2F;a&gt; definition.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h3 id=&quot;deployments-deployments&quot;&gt;Deployments: &lt;code&gt;deployments&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;deployments&lt;&#x2F;code&gt; field holds the information for the chains on which
this release has &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-instance&quot;&gt;Contract Instances&lt;&#x2F;a&gt; as well
as the &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-type&quot;&gt;Contract Types&lt;&#x2F;a&gt; and other deployment
details for those deployed contract instances. The set of chains defined
by the &lt;code&gt;*BIP122 URI &amp;lt;#bip122-uris&amp;gt;*&lt;&#x2F;code&gt; keys for this object &lt;strong&gt;must&lt;&#x2F;strong&gt; be
unique.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;deployments&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Object (String: Object(String: &lt;a href=&quot;#contract-instance-object&quot;&gt;Contract Instance Object&lt;&#x2F;a&gt;))&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;See Below.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;format-1&quot;&gt;Format&lt;&#x2F;h4&gt;
&lt;p&gt;Keys &lt;strong&gt;must&lt;&#x2F;strong&gt; be a valid BIP122 URI chain definition.&lt;&#x2F;p&gt;
&lt;p&gt;Values &lt;strong&gt;must&lt;&#x2F;strong&gt; be objects which conform to the following format.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Keys &lt;strong&gt;must&lt;&#x2F;strong&gt; be valid &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-instance-name&quot;&gt;Contract Instance
Names&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Values &lt;strong&gt;must&lt;&#x2F;strong&gt; be a valid &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#contract-instance-object&quot;&gt;Contract Instance
Object&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;build-dependencies-build-dependencies&quot;&gt;Build Dependencies: &lt;code&gt;build_dependencies&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;build_dependencies&lt;&#x2F;code&gt; field defines a key&#x2F;value mapping of Ethereum
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-package&quot;&gt;Packages&lt;&#x2F;a&gt; that this project depends on.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;build_dependencies&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Object (String: String)&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Keys &lt;strong&gt;must&lt;&#x2F;strong&gt; be valid &lt;a href=&quot;#package-names&quot;&gt;package names&lt;&#x2F;a&gt; matching the regular expression &lt;code&gt;[a-z][-a-z0-9]{0,213}&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Values &lt;strong&gt;must&lt;&#x2F;strong&gt; be valid IPFS URIs which resolve to a valid package.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h2 id=&quot;definitions&quot;&gt;Definitions&lt;&#x2F;h2&gt;
&lt;p&gt;Definitions for different objects used within the Package. All objects
allow custom fields to be included. Custom fields &lt;strong&gt;should&lt;&#x2F;strong&gt; be prefixed
with &lt;code&gt;x-&lt;&#x2F;code&gt; to prevent name collisions with future versions of the
specification.&lt;&#x2F;p&gt;
&lt;div id=&quot;link-reference-object&quot;&gt;&lt;&#x2F;div&gt;
&lt;h3 id=&quot;the-link-reference-object&quot;&gt;The &lt;em&gt;Link Reference&lt;&#x2F;em&gt; Object&lt;&#x2F;h3&gt;
&lt;p&gt;A &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-link-reference&quot;&gt;Link Reference&lt;&#x2F;a&gt; object has the following
key&#x2F;value pairs. All link references are assumed to be associated with
some corresponding &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-bytecode&quot;&gt;Bytecode&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;offsets-offsets&quot;&gt;Offsets: &lt;code&gt;offsets&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;offsets&lt;&#x2F;code&gt; field is an array of integers, corresponding to each of
the start positions where the link reference appears in the bytecode.
Locations are 0-indexed from the beginning of the bytes representation
of the corresponding bytecode. This field is invalid if it references a
position that is beyond the end of the bytecode.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Yes&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Array&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;length-length&quot;&gt;Length: &lt;code&gt;length&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;length&lt;&#x2F;code&gt; field is an integer which defines the length in bytes of
the link reference. This field is invalid if the end of the defined link
reference exceeds the end of the bytecode.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Yes&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Integer&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;name-name&quot;&gt;Name: &lt;code&gt;name&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;name&lt;&#x2F;code&gt; field is a string which &lt;strong&gt;must&lt;&#x2F;strong&gt; be a valid
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-identifier&quot;&gt;Identifier&lt;&#x2F;a&gt;. Any link references which &lt;strong&gt;should&lt;&#x2F;strong&gt; be
linked with the same link value &lt;strong&gt;should&lt;&#x2F;strong&gt; be given the same name.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;strong&gt;must&lt;&#x2F;strong&gt; conform to the &lt;a href=&quot;#term-identifier&quot;&gt;Identifier&lt;&#x2F;a&gt; format.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;div id=&quot;link-value-object&quot;&gt;&lt;&#x2F;div&gt;
&lt;h3 id=&quot;the-link-value-object&quot;&gt;The &lt;em&gt;Link Value&lt;&#x2F;em&gt; Object&lt;&#x2F;h3&gt;
&lt;p&gt;Describes a single &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-link-value&quot;&gt;Link Value&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;A &lt;strong&gt;Link Value object&lt;&#x2F;strong&gt; is defined to have the following key&#x2F;value
pairs.&lt;&#x2F;p&gt;
&lt;div id=&quot;offset-offset-1&quot;&gt;&lt;&#x2F;div&gt;
&lt;h4 id=&quot;offsets-offsets-1&quot;&gt;Offsets: &lt;code&gt;offsets&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;offsets&lt;&#x2F;code&gt; field defines the locations within the corresponding
bytecode where the &lt;code&gt;value&lt;&#x2F;code&gt; for this link value was written. These
locations are 0-indexed from the beginning of the bytes representation
of the corresponding bytecode.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Yes&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Integer&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;See Below.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;p&gt;&lt;strong&gt;Format&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Array of integers, where each integer &lt;strong&gt;must&lt;&#x2F;strong&gt; conform to all of the
following.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;greater than or equal to zero&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;strictly less than the length of the unprefixed hexadecimal
representation of the corresponding bytecode.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h4 id=&quot;type-type&quot;&gt;Type: &lt;code&gt;type&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;type&lt;&#x2F;code&gt; field defines the &lt;code&gt;value&lt;&#x2F;code&gt; type for determining what is
encoded when &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-linking&quot;&gt;linking&lt;&#x2F;a&gt; the corresponding bytecode.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Yes&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Allowed Values&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;&amp;quot;literal&amp;quot;&lt;&#x2F;code&gt; for bytecode literals&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&amp;quot;reference&amp;quot;&lt;&#x2F;code&gt; for named references to a particular &lt;a href=&quot;#term-contract-instance&quot;&gt;Contract Instance&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;value-value&quot;&gt;Value: &lt;code&gt;value&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;value&lt;&#x2F;code&gt; field defines the value which should be written when
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-linking&quot;&gt;linking&lt;&#x2F;a&gt; the corresponding bytecode.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Yes&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Determined based on &lt;code&gt;type&lt;&#x2F;code&gt;, see below.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;p&gt;&lt;strong&gt;Format&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;For static value &lt;em&gt;literals&lt;&#x2F;em&gt; (e.g. address), value &lt;strong&gt;must&lt;&#x2F;strong&gt; be a &lt;em&gt;byte
string&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;To reference the address of a &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-instance&quot;&gt;Contract
Instance&lt;&#x2F;a&gt; from the current package the value
should be the name of that contract instance.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;This value &lt;strong&gt;must&lt;&#x2F;strong&gt; be a valid contract instance name.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;The chain definition under which the contract instance that this
link value belongs to must contain this value within its keys.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;This value &lt;strong&gt;may not&lt;&#x2F;strong&gt; reference the same contract instance that
this link value belongs to.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;To reference a contract instance from a &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-package&quot;&gt;Package&lt;&#x2F;a&gt; from
somewhere within the dependency tree the value is constructed as
follows.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Let &lt;code&gt;[p1, p2, .. pn]&lt;&#x2F;code&gt; define a path down the dependency tree.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Each of &lt;code&gt;p1, p2, pn&lt;&#x2F;code&gt; &lt;strong&gt;must&lt;&#x2F;strong&gt; be valid package names.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;p1&lt;&#x2F;code&gt; &lt;strong&gt;must&lt;&#x2F;strong&gt; be present in keys of the &lt;code&gt;build_dependencies&lt;&#x2F;code&gt; for the
current package.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;For every &lt;code&gt;pn&lt;&#x2F;code&gt; where &lt;code&gt;n &amp;gt; 1&lt;&#x2F;code&gt;, &lt;code&gt;pn&lt;&#x2F;code&gt; &lt;strong&gt;must&lt;&#x2F;strong&gt; be present in the keys
of the &lt;code&gt;build_dependencies&lt;&#x2F;code&gt; of the package for &lt;code&gt;pn-1&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;The value is represented by the string
&lt;code&gt;&amp;lt;p1&amp;gt;:&amp;lt;p2&amp;gt;:&amp;lt;...&amp;gt;:&amp;lt;pn&amp;gt;:&amp;lt;contract-instance&amp;gt;&lt;&#x2F;code&gt; where all of &lt;code&gt;&amp;lt;p1&amp;gt;&lt;&#x2F;code&gt;,
&lt;code&gt;&amp;lt;p2&amp;gt;&lt;&#x2F;code&gt;, &lt;code&gt;&amp;lt;pn&amp;gt;&lt;&#x2F;code&gt; are valid package names and &lt;code&gt;&amp;lt;contract-instance&amp;gt;&lt;&#x2F;code&gt; is
a valid &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-name&quot;&gt;Contract Name&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;code&gt;&amp;lt;contract-instance&amp;gt;&lt;&#x2F;code&gt; value &lt;strong&gt;must&lt;&#x2F;strong&gt; be a valid &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-instance-name&quot;&gt;Contract
Instance Name&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Within the package of the dependency defined by &lt;code&gt;&amp;lt;pn&amp;gt;&lt;&#x2F;code&gt;, all of the
following must be satisfiable:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;There &lt;strong&gt;must&lt;&#x2F;strong&gt; be &lt;em&gt;exactly&lt;&#x2F;em&gt; one chain defined under the
&lt;code&gt;deployments&lt;&#x2F;code&gt; key which matches the chain definition that this
link value is nested under.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;code&gt;&amp;lt;contract-instance&amp;gt;&lt;&#x2F;code&gt; value &lt;strong&gt;must&lt;&#x2F;strong&gt; be present in the keys
of the matching chain.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;the-bytecode-object&quot;&gt;The &lt;em&gt;Bytecode&lt;&#x2F;em&gt; Object&lt;&#x2F;h3&gt;
&lt;p&gt;A bytecode object has the following key&#x2F;value pairs.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;bytecode-bytecode&quot;&gt;Bytecode: &lt;code&gt;bytecode&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;bytecode&lt;&#x2F;code&gt; field is a string containing the &lt;code&gt;0x&lt;&#x2F;code&gt; prefixed
hexadecimal representation of the bytecode.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Yes&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;0x&lt;&#x2F;code&gt; prefixed hexadecimal.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;link-references-link-references&quot;&gt;Link References: &lt;code&gt;link_references&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;link_references&lt;&#x2F;code&gt; field defines the locations in the corresponding
bytecode which require &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-linking&quot;&gt;linking&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Array&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;All values &lt;strong&gt;must&lt;&#x2F;strong&gt; be valid &lt;a href=&quot;#link-reference-object&quot;&gt;Link Reference objects&lt;&#x2F;a&gt;. See also below.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;p&gt;&lt;strong&gt;Format&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;This field is considered invalid if &lt;em&gt;any&lt;&#x2F;em&gt; of the &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-link-reference&quot;&gt;Link
References&lt;&#x2F;a&gt; are invalid when applied to the
corresponding &lt;code&gt;bytecode&lt;&#x2F;code&gt; field, &lt;em&gt;or&lt;&#x2F;em&gt; if any of the link references
intersect.&lt;&#x2F;p&gt;
&lt;p&gt;Intersection is defined as two link references which overlap.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;link-dependencies-link-dependencies&quot;&gt;Link Dependencies: &lt;code&gt;link_dependencies&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;link_dependencies&lt;&#x2F;code&gt; defines the &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-link-value&quot;&gt;Link Values&lt;&#x2F;a&gt; that
have been used to link the corresponding bytecode.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Array&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;All values &lt;strong&gt;must&lt;&#x2F;strong&gt; be valid &lt;a href=&quot;#link-value-object&quot;&gt;Link Value objects&lt;&#x2F;a&gt;. See also below.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;p&gt;&lt;strong&gt;Format&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Validation of this field includes the following:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Two link value objects &lt;strong&gt;must not&lt;&#x2F;strong&gt; contain any of the same values
for &lt;code&gt;offsets&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Each &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#link-value-object&quot;&gt;link value object&lt;&#x2F;a&gt; &lt;strong&gt;must&lt;&#x2F;strong&gt; have a
corresponding &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#link-reference-object&quot;&gt;link reference object&lt;&#x2F;a&gt; under
the &lt;code&gt;link_references&lt;&#x2F;code&gt; field.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;The length of the resolved &lt;code&gt;value&lt;&#x2F;code&gt; &lt;strong&gt;must&lt;&#x2F;strong&gt; be equal to the &lt;code&gt;length&lt;&#x2F;code&gt;
of the corresponding &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-link-reference&quot;&gt;Link Reference&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;div id=&quot;package-meta-object&quot;&gt;&lt;&#x2F;div&gt;
&lt;h3 id=&quot;the-package-meta-object&quot;&gt;The &lt;em&gt;Package Meta&lt;&#x2F;em&gt; Object&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;em&gt;Package Meta&lt;&#x2F;em&gt; object is defined to have the following key&#x2F;value
pairs.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;authors-authors&quot;&gt;Authors: &lt;code&gt;authors&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;authors&lt;&#x2F;code&gt; field defines a list of human readable names for the
authors of this package. Packages &lt;strong&gt;may&lt;&#x2F;strong&gt; include this field.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;authors&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Array (String)&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;license-license&quot;&gt;License: &lt;code&gt;license&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;license&lt;&#x2F;code&gt; field declares the license under which this package is
released. This value &lt;strong&gt;should&lt;&#x2F;strong&gt; conform to the
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Software_Package_Data_Exchange&quot;&gt;SPDX&lt;&#x2F;a&gt;
format. Packages &lt;strong&gt;should&lt;&#x2F;strong&gt; include this field.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;license&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;description-description&quot;&gt;Description: &lt;code&gt;description&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;description&lt;&#x2F;code&gt; field provides additional detail that may be relevant
for the package. Packages &lt;strong&gt;may&lt;&#x2F;strong&gt; include this field.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;description&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;keywords-keywords&quot;&gt;Keywords: &lt;code&gt;keywords&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;keywords&lt;&#x2F;code&gt; field provides relevant keywords related to this package.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;keywords&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;List of Strings&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;links-links&quot;&gt;Links: &lt;code&gt;links&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;links&lt;&#x2F;code&gt; field provides URIs to relevant resources associated with
this package. When possible, authors &lt;strong&gt;should&lt;&#x2F;strong&gt; use the following keys
for the following common resources.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;website&lt;&#x2F;code&gt;: Primary website for the package.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;documentation&lt;&#x2F;code&gt;: Package Documentation&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;repository&lt;&#x2F;code&gt;: Location of the project source code.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;links&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Object (String: String)&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;div id=&quot;contract-type-object&quot;&gt;&lt;&#x2F;div&gt;
&lt;h3 id=&quot;the-contract-type-object&quot;&gt;The &lt;em&gt;Contract Type&lt;&#x2F;em&gt; Object&lt;&#x2F;h3&gt;
&lt;p&gt;A &lt;em&gt;Contract Type&lt;&#x2F;em&gt; object is defined to have the following key&#x2F;value
pairs.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;contract-name-contract-name&quot;&gt;Contract Name: &lt;code&gt;contract_name&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;contract_name&lt;&#x2F;code&gt; field defines the &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-name&quot;&gt;Contract
Name&lt;&#x2F;a&gt; for this &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-type&quot;&gt;Contract
Type&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;If the &lt;a href=&quot;#term-contract-name&quot;&gt;Contract Name&lt;&#x2F;a&gt; and &lt;a href=&quot;#term-contract-alias&quot;&gt;Contract Alias&lt;&#x2F;a&gt; are not the same.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;strong&gt;must&lt;&#x2F;strong&gt; be a valid &lt;a href=&quot;#term-contract-name&quot;&gt;Contract Name&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;deployment-bytecode-deployment-bytecode&quot;&gt;Deployment Bytecode: &lt;code&gt;deployment_bytecode&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;deployment_bytecode&lt;&#x2F;code&gt; field defines the bytecode for this &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-type&quot;&gt;Contract
Type&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Object&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;strong&gt;must&lt;&#x2F;strong&gt; conform to &lt;a href=&quot;#the-bytecode-object&quot;&gt;the Bytecode Object&lt;&#x2F;a&gt; format.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;runtime-bytecode-runtime-bytecode&quot;&gt;Runtime Bytecode: &lt;code&gt;runtime_bytecode&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;runtime_bytecode&lt;&#x2F;code&gt; field defines the unlinked &lt;code&gt;0x&lt;&#x2F;code&gt;-prefixed runtime
portion of &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-bytecode&quot;&gt;Bytecode&lt;&#x2F;a&gt; for this &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-type&quot;&gt;Contract
Type&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Object&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;strong&gt;must&lt;&#x2F;strong&gt; conform to &lt;a href=&quot;#the-bytecode-object&quot;&gt;the Bytecode Object&lt;&#x2F;a&gt; format.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;abi-abi&quot;&gt;ABI: &lt;code&gt;abi&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;List&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;strong&gt;must&lt;&#x2F;strong&gt; conform to the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;wiki&#x2F;wiki&#x2F;Ethereum-Contract-ABI#json&quot;&gt;Ethereum Contract ABI JSON format&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;natspec-natspec&quot;&gt;Natspec: &lt;code&gt;natspec&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Object&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;The union of the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;wiki&#x2F;wiki&#x2F;Ethereum-Natural-Specification-Format#user-documentation&quot;&gt;UserDoc&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;wiki&#x2F;wiki&#x2F;Ethereum-Natural-Specification-Format#developer-documentation&quot;&gt;DevDoc&lt;&#x2F;a&gt; formats.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;compiler-compiler&quot;&gt;Compiler: &lt;code&gt;compiler&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Object&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;strong&gt;must&lt;&#x2F;strong&gt; conform to &lt;a href=&quot;#the-compiler-information-object&quot;&gt;the Compiler Information object&lt;&#x2F;a&gt; format.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;div id=&quot;contract-instance-object&quot;&gt;&lt;&#x2F;div&gt;
&lt;h3 id=&quot;the-contract-instance-object&quot;&gt;The &lt;em&gt;Contract Instance&lt;&#x2F;em&gt; Object&lt;&#x2F;h3&gt;
&lt;p&gt;A &lt;strong&gt;Contract Instance Object&lt;&#x2F;strong&gt; represents a single deployed &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-instance&quot;&gt;Contract
Instance&lt;&#x2F;a&gt; and is defined to have the following
key&#x2F;value pairs.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;contract-type-contract-type&quot;&gt;Contract Type: &lt;code&gt;contract_type&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;contract_type&lt;&#x2F;code&gt; field defines the &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-type&quot;&gt;Contract
Type&lt;&#x2F;a&gt; for this &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-instance&quot;&gt;Contract
Instance&lt;&#x2F;a&gt;. This can reference any of the
contract types included in this &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-package&quot;&gt;Package&lt;&#x2F;a&gt; &lt;em&gt;or&lt;&#x2F;em&gt; any of the
contract types found in any of the package dependencies from the
&lt;code&gt;build_dependencies&lt;&#x2F;code&gt; section of the &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-package-manifest&quot;&gt;Package
Manifest&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Yes&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;See Below.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;p&gt;&lt;strong&gt;Format&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Values for this field &lt;strong&gt;must&lt;&#x2F;strong&gt; conform to &lt;em&gt;one of&lt;&#x2F;em&gt; the two formats
herein.&lt;&#x2F;p&gt;
&lt;p&gt;To reference a contract type from this Package, use the format
&lt;code&gt;&amp;lt;contract-alias&amp;gt;&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The &lt;code&gt;&amp;lt;contract-alias&amp;gt;&lt;&#x2F;code&gt; value &lt;strong&gt;must&lt;&#x2F;strong&gt; be a valid &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-alias&quot;&gt;Contract
Alias&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;The value &lt;strong&gt;must&lt;&#x2F;strong&gt; be present in the keys of the &lt;code&gt;contract_types&lt;&#x2F;code&gt;
section of this Package.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;To reference a contract type from a dependency, use the format
&lt;code&gt;&amp;lt;package-name&amp;gt;:&amp;lt;contract-alias&amp;gt;&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The &lt;code&gt;&amp;lt;package-name&amp;gt;&lt;&#x2F;code&gt; value &lt;strong&gt;must&lt;&#x2F;strong&gt; be present in the keys of the
&lt;code&gt;build_dependencies&lt;&#x2F;code&gt; of this Package.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;code&gt;&amp;lt;contract-alias&amp;gt;&lt;&#x2F;code&gt; value &lt;strong&gt;must&lt;&#x2F;strong&gt; be a valid &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-alias&quot;&gt;Contract
Alias&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;The resolved package for &lt;code&gt;&amp;lt;package-name&amp;gt;&lt;&#x2F;code&gt; must contain the
&lt;code&gt;&amp;lt;contract-alias&amp;gt;&lt;&#x2F;code&gt; value in the keys of the &lt;code&gt;contract_types&lt;&#x2F;code&gt;
section.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h4 id=&quot;address-address&quot;&gt;Address: &lt;code&gt;address&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;address&lt;&#x2F;code&gt; field defines the &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-address&quot;&gt;Address&lt;&#x2F;a&gt; of the
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-instance&quot;&gt;Contract Instance&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Yes&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Hex encoded &lt;code&gt;0x&lt;&#x2F;code&gt; prefixed Ethereum address matching the regular expression &lt;code&gt;0x[0-9a-fA-F]{40}&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;transaction-transaction&quot;&gt;Transaction: &lt;code&gt;transaction&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;transaction&lt;&#x2F;code&gt; field defines the transaction hash in which this
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-instance&quot;&gt;Contract Instance&lt;&#x2F;a&gt; was created.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;0x&lt;&#x2F;code&gt; prefixed hex encoded transaction hash.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;block-block&quot;&gt;Block: &lt;code&gt;block&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;block&lt;&#x2F;code&gt; field defines the block hash in which this the transaction
which created this &lt;em&gt;contract instance&lt;&#x2F;em&gt; was mined.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;0x&lt;&#x2F;code&gt; prefixed hex encoded block hash.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;div id=&quot;runtime-bytecode-runtime-bytecode-1&quot;&gt;&lt;&#x2F;div&gt;
&lt;h4 id=&quot;runtime-bytecode-runtime-bytecode-1&quot;&gt;Runtime Bytecode: &lt;code&gt;runtime_bytecode&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;runtime_bytecode&lt;&#x2F;code&gt; field defines the runtime portion of bytecode for
this &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-instance&quot;&gt;Contract Instance&lt;&#x2F;a&gt;. When present, the
value from this field supersedes the &lt;code&gt;runtime_bytecode&lt;&#x2F;code&gt; from the
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-type&quot;&gt;Contract Type&lt;&#x2F;a&gt; for this &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-instance&quot;&gt;Contract
Instance&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Object&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;strong&gt;must&lt;&#x2F;strong&gt; conform to &lt;a href=&quot;#the-bytecode-object&quot;&gt;the Bytecode Object&lt;&#x2F;a&gt; format.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;p&gt;Every entry in the &lt;code&gt;link_references&lt;&#x2F;code&gt; for this bytecode &lt;strong&gt;must&lt;&#x2F;strong&gt; have a
corresponding entry in the &lt;code&gt;link_dependencies&lt;&#x2F;code&gt; section.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;compiler-compiler-1&quot;&gt;Compiler: &lt;code&gt;compiler&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;compiler&lt;&#x2F;code&gt; field defines the compiler information that was used
during compilation of this &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-instance&quot;&gt;Contract Instance&lt;&#x2F;a&gt;.
This field &lt;strong&gt;should&lt;&#x2F;strong&gt; be present in all &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-type&quot;&gt;Contract
Types&lt;&#x2F;a&gt; which include &lt;code&gt;bytecode&lt;&#x2F;code&gt; or
&lt;code&gt;runtime_bytecode&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Object&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Format&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;strong&gt;must&lt;&#x2F;strong&gt; conform to the &lt;a href=&quot;#compiler-information-object&quot;&gt;Compiler Information Object&lt;&#x2F;a&gt; format.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;div id=&quot;compiler-information-object&quot;&gt;&lt;&#x2F;div&gt;
&lt;h3 id=&quot;the-compiler-information-object&quot;&gt;The &lt;em&gt;Compiler Information&lt;&#x2F;em&gt; Object&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;compiler&lt;&#x2F;code&gt; field defines the compiler information that was used
during compilation of this &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-instance&quot;&gt;Contract Instance&lt;&#x2F;a&gt;.
This field &lt;strong&gt;should&lt;&#x2F;strong&gt; be present in all contract instances that locally
declare &lt;code&gt;runtime_bytecode&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;A &lt;em&gt;Compiler Information&lt;&#x2F;em&gt; object is defined to have the following
key&#x2F;value pairs.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;name-name-1&quot;&gt;Name &lt;code&gt;name&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;name&lt;&#x2F;code&gt; field defines which compiler was used in compilation.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Yes&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;name&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;version-version-1&quot;&gt;Version: &lt;code&gt;version&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;version&lt;&#x2F;code&gt; field defines the version of the compiler. The field
&lt;strong&gt;should&lt;&#x2F;strong&gt; be OS agnostic (OS not included in the string) and take the
form of either the stable version in
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;semver.org&#x2F;&quot;&gt;semver&lt;&#x2F;a&gt; format or if built on a
nightly should be denoted in the form of &lt;code&gt;&amp;lt;semver&amp;gt;-&amp;lt;commit-hash&amp;gt;&lt;&#x2F;code&gt; ex:
&lt;code&gt;0.4.8-commit.60cc1668&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Yes&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;version&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;String&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h4 id=&quot;settings-settings&quot;&gt;Settings: &lt;code&gt;settings&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;The &lt;code&gt;settings&lt;&#x2F;code&gt; field defines any settings or configuration that was used
in compilation. For the &lt;code&gt;&quot;solc&quot;&lt;&#x2F;code&gt; compiler, this &lt;strong&gt;should&lt;&#x2F;strong&gt; conform to
the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;solidity.readthedocs.io&#x2F;en&#x2F;latest&#x2F;using-the-compiler.html#compiler-input-and-output-json-description&quot;&gt;Compiler Input and Output
Description&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Required&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;No&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Key&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;settings&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Type&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Object&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h3 id=&quot;bip122-uris&quot;&gt;BIP122 URIs&lt;&#x2F;h3&gt;
&lt;p&gt;BIP122 URIs are used to define a blockchain via a subset of the
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;bitcoin&#x2F;bips&#x2F;blob&#x2F;master&#x2F;bip-0122.mediawiki&quot;&gt;BIP-122&lt;&#x2F;a&gt;
spec.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;blockchain:&#x2F;&#x2F;&amp;lt;genesis_hash&amp;gt;&#x2F;block&#x2F;&amp;lt;latest confirmed block hash&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;&amp;lt;genesis hash&amp;gt;&lt;&#x2F;code&gt; represents the blockhash of the first block on the
chain, and &lt;code&gt;&amp;lt;latest confirmed block hash&amp;gt;&lt;&#x2F;code&gt; represents the hash of the
latest block that’s been reliably confirmed (package managers should be
free to choose their desired level of confirmations).&lt;&#x2F;p&gt;
&lt;h1 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h1&gt;
&lt;p&gt;The following use cases were considered during the creation of this
specification.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;owned&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;A package which contains contracts which are not meant to be used by themselves but rather as base contracts to provide functionality to other contracts through inheritance.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;transferable&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;A package which has a single dependency.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;standard-token&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;A package which contains a reusable contract.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;safe-math-lib&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;A package which contains deployed instance of one of the package contracts.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;piper-coin&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;A package which contains a deployed instance of a reusable contract from a dependency.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;escrow&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;A package which contains a deployed instance of a local contract which is linked against a deployed instance of a local library.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;wallet&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;A package with a deployed instance of a local contract which is linked against a deployed instance of a library from a dependency.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;wallet-with-send&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;A package with a deployed instance which links against a deep dependency.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;p&gt;Each use case builds incrementally on the previous one.&lt;&#x2F;p&gt;
&lt;p&gt;A full listing of &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ethpm.github.io&#x2F;ethpm-spec&#x2F;use-cases.html&quot;&gt;Use
Cases&lt;&#x2F;a&gt;
can be found on the hosted version of this specification.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;glossary&quot;&gt;Glossary&lt;&#x2F;h1&gt;
&lt;div id=&quot;term-abi&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;abi&quot;&gt;ABI&lt;&#x2F;h2&gt;
&lt;p&gt;The JSON representation of the application binary interface. See the
official
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;solidity.readthedocs.io&#x2F;en&#x2F;develop&#x2F;abi-spec.html&quot;&gt;specification&lt;&#x2F;a&gt;
for more information.&lt;&#x2F;p&gt;
&lt;div id=&quot;term-address&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;address&quot;&gt;Address&lt;&#x2F;h2&gt;
&lt;p&gt;A public identifier for an account on a particular chain&lt;&#x2F;p&gt;
&lt;div id=&quot;term-bytecode&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;bytecode&quot;&gt;Bytecode&lt;&#x2F;h2&gt;
&lt;p&gt;The set of EVM instructions as produced by a compiler. Unless otherwise
specified this should be assumed to be hexadecimal encoded, representing
a whole number of bytes, and &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-prefixed&quot;&gt;prefixed&lt;&#x2F;a&gt; with &lt;code&gt;0x&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Bytecode can either be linked or unlinked. (see
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-linking&quot;&gt;Linking&lt;&#x2F;a&gt;)&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Unlinked Bytecode&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;The hexadecimal representation of a contract’s EVM instructions that contains sections of code that requires &lt;a href=&quot;#term-linking&quot;&gt;linking&lt;&#x2F;a&gt; for the contract to be functional.&lt;&#x2F;p&gt;
&lt;p&gt;The sections of code which are unlinked &lt;strong&gt;must&lt;&#x2F;strong&gt; be filled in with zero bytes.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;&#x2F;strong&gt;: &lt;code&gt;0x606060405260e06000730000000000000000000000000000000000000000634d536f&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;Linked Bytecode&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;The hexadecimal representation of a contract’s EVM instructions which has had all &lt;a href=&quot;#term-link-reference&quot;&gt;Link References&lt;&#x2F;a&gt; replaced with the desired &lt;a href=&quot;#term-link-value&quot;&gt;Link Values&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;&#x2F;strong&gt;: &lt;code&gt;0x606060405260e06000736fe36000604051602001526040518160e060020a634d536f&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;div id=&quot;term-chain-definition&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;chain-definition&quot;&gt;Chain Definition&lt;&#x2F;h2&gt;
&lt;p&gt;This definition originates from &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;bitcoin&#x2F;bips&#x2F;blob&#x2F;master&#x2F;bip-0122.mediawiki&quot;&gt;BIP122
URI&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;A URI in the format &lt;code&gt;blockchain:&#x2F;&#x2F;&amp;lt;chain_id&amp;gt;&#x2F;block&#x2F;&amp;lt;block_hash&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;chain_id&lt;&#x2F;code&gt; is the unprefixed hexadecimal representation of the
genesis hash for the chain.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;block_hash&lt;&#x2F;code&gt; is the unprefixed hexadecimal representation of the
hash of a block on the chain.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;A chain is considered to match a chain definition if the genesis
block hash matches the &lt;code&gt;chain_id&lt;&#x2F;code&gt; and the block defined by &lt;code&gt;block_hash&lt;&#x2F;code&gt;
can be found on that chain. It is possible for multiple chains to match
a single URI, in which case all chains are considered valid matches&lt;&#x2F;p&gt;
&lt;div id=&quot;term-content-addressable-uri&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;content-addressable-uri&quot;&gt;Content Addressable URI&lt;&#x2F;h2&gt;
&lt;p&gt;Any URI which contains a cryptographic hash which can be used to verify
the integrity of the content found at the URI.&lt;&#x2F;p&gt;
&lt;p&gt;The URI format is defined in RFC3986&lt;&#x2F;p&gt;
&lt;p&gt;It is &lt;strong&gt;recommended&lt;&#x2F;strong&gt; that tools support IPFS and Swarm.&lt;&#x2F;p&gt;
&lt;div id=&quot;term-contract-alias&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;contract-alias&quot;&gt;Contract Alias&lt;&#x2F;h2&gt;
&lt;p&gt;This is a name used to reference a specific &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-type&quot;&gt;Contract
Type&lt;&#x2F;a&gt;. Contract aliases &lt;strong&gt;must&lt;&#x2F;strong&gt; be unique within a
single &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-package&quot;&gt;Package&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The contract alias &lt;strong&gt;must&lt;&#x2F;strong&gt; use &lt;em&gt;one of&lt;&#x2F;em&gt; the following naming schemes:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;contract-name&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;contract-name&amp;gt;[&amp;lt;identifier&amp;gt;]&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The &lt;code&gt;&amp;lt;contract-name&amp;gt;&lt;&#x2F;code&gt; portion &lt;strong&gt;must&lt;&#x2F;strong&gt; be the same as the &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-name&quot;&gt;Contract
Name&lt;&#x2F;a&gt; for this contract type.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;code&gt;[&amp;lt;identifier&amp;gt;]&lt;&#x2F;code&gt; portion &lt;strong&gt;must&lt;&#x2F;strong&gt; match the regular expression
&lt;code&gt;\[[-a-zA-Z0-9]{1,256}]&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;div id=&quot;term-contract-instance&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;contract-instance&quot;&gt;Contract Instance&lt;&#x2F;h2&gt;
&lt;p&gt;A contract instance a specific deployed version of a &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-type&quot;&gt;Contract
Type&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;All contract instances have an &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-address&quot;&gt;Address&lt;&#x2F;a&gt; on some specific
chain.&lt;&#x2F;p&gt;
&lt;div id=&quot;term-contract-instance-name&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;contract-instance-name&quot;&gt;Contract Instance Name&lt;&#x2F;h2&gt;
&lt;p&gt;A name which refers to a specific &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-instance&quot;&gt;Contract
Instance&lt;&#x2F;a&gt; on a specific chain from the
deployments of a single &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-package&quot;&gt;Package&lt;&#x2F;a&gt;. This name &lt;strong&gt;must&lt;&#x2F;strong&gt; be
unique across all other contract instances for the given chain. The name
must conform to the regular expression &lt;code&gt;[a-zA-Z][a-zA-Z0-9_]{0,255}&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;In cases where there is a single deployed instance of a given &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-type&quot;&gt;Contract
Type&lt;&#x2F;a&gt;, package managers &lt;strong&gt;should&lt;&#x2F;strong&gt; use the
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-alias&quot;&gt;Contract Alias&lt;&#x2F;a&gt; for that contract type for this
name.&lt;&#x2F;p&gt;
&lt;p&gt;In cases where there are multiple deployed instances of a given contract
type, package managers &lt;strong&gt;should&lt;&#x2F;strong&gt; use a name which provides some added
semantic information as to help differentiate the two deployed instances
in a meaningful way.&lt;&#x2F;p&gt;
&lt;div id=&quot;term-contract-name&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;contract-name&quot;&gt;Contract Name&lt;&#x2F;h2&gt;
&lt;p&gt;The name found in the source code that defines a specific &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-contract-type&quot;&gt;Contract
Type&lt;&#x2F;a&gt;. These names &lt;strong&gt;must&lt;&#x2F;strong&gt; conform to the regular
expression &lt;code&gt;[a-zA-Z][-a-zA-Z0-9_]{0,255}&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;There can be multiple contracts with the same contract name in a
projects source files.&lt;&#x2F;p&gt;
&lt;div id=&quot;term-contract-type&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;contract-type&quot;&gt;Contract Type&lt;&#x2F;h2&gt;
&lt;p&gt;Refers to a specific contract in the package source. This term can be
used to refer to an abstract contract, a normal contract, or a library.
Two contracts are of the same contract type if they have the same
bytecode.&lt;&#x2F;p&gt;
&lt;p&gt;Example:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;contract Wallet {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;A deployed instance of the &lt;code&gt;Wallet&lt;&#x2F;code&gt; contract would be of type
&lt;code&gt;Wallet&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;div id=&quot;term-identifier&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;identifier&quot;&gt;Identifier&lt;&#x2F;h2&gt;
&lt;p&gt;Refers generally to a named entity in the &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-package&quot;&gt;Package&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;A string matching the regular expression &lt;code&gt;[a-zA-Z][-_a-zA-Z0-9]{0,255}&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;div id=&quot;term-link-reference&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;link-reference&quot;&gt;Link Reference&lt;&#x2F;h2&gt;
&lt;p&gt;A location within a contract’s bytecode which needs to be linked. A link
reference has the following properties.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;offset&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Defines the location within the bytecode where the link reference begins.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;length&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;Defines the length of the reference.&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;name&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;(optional.) A string to identify the reference&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;div id=&quot;term-link-value&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;link-value&quot;&gt;Link Value&lt;&#x2F;h2&gt;
&lt;p&gt;A link value is the value which can be inserted in place of a &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-link-reference&quot;&gt;Link
Reference&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;div id=&quot;term-linking&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;linking&quot;&gt;Linking&lt;&#x2F;h2&gt;
&lt;p&gt;The act of replacing &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-link-reference&quot;&gt;Link References&lt;&#x2F;a&gt; with &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-link-value&quot;&gt;Link
Values&lt;&#x2F;a&gt; within some &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-bytecode&quot;&gt;Bytecode&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;div id=&quot;term-package&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;package&quot;&gt;Package&lt;&#x2F;h2&gt;
&lt;p&gt;Distribution of an application’s source or compiled bytecode along with
metadata related to authorship, license, versioning, et al.&lt;&#x2F;p&gt;
&lt;p&gt;For brevity, the term &lt;strong&gt;Package&lt;&#x2F;strong&gt; is often used metonymously to mean
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-package-manifest&quot;&gt;Package Manifest&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;div id=&quot;term-package-manifest&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;package-manifest&quot;&gt;Package Manifest&lt;&#x2F;h2&gt;
&lt;p&gt;A machine-readable description of a package (See
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#package-specification&quot;&gt;Specification&lt;&#x2F;a&gt; for information about the format
for package manifests.)&lt;&#x2F;p&gt;
&lt;div id=&quot;term-prefixed&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;prefixed&quot;&gt;Prefixed&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-bytecode&quot;&gt;Bytecode&lt;&#x2F;a&gt; string with leading &lt;code&gt;0x&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Example&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;0xdeadbeef&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;div id=&quot;term-unprefixed&quot;&gt;&lt;&#x2F;div&gt;
&lt;h2 id=&quot;unprefixed&quot;&gt;Unprefixed&lt;&#x2F;h2&gt;
&lt;p&gt;Not &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#term-prefixed&quot;&gt;Prefixed&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;col style=&quot;width: 50%&quot; &#x2F;&gt;
&lt;&#x2F;colgroup&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;p&gt;Example&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;td&gt;&lt;p&gt;&lt;code&gt;deadbeef&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;
&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;
&lt;&#x2F;table&gt;
&lt;h1 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h1&gt;
&lt;p&gt;This specification supports backwards compatibility by use of the
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#manifest-version&quot;&gt;manifest_version&lt;&#x2F;a&gt; property. This
specification corresponds to version &lt;code&gt;2&lt;&#x2F;code&gt; as the value for that field.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;implementations&quot;&gt;Implementations&lt;&#x2F;h1&gt;
&lt;p&gt;This submission aims to coincide with development efforts towards
widespread implementation in commonly-used development tools.&lt;&#x2F;p&gt;
&lt;p&gt;The following tools are known to have begun or are nearing completion of
a supporting implementation.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;trufflesuite.com&#x2F;&quot;&gt;Truffle&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;populus.readthedocs.io&#x2F;en&#x2F;latest&#x2F;&quot;&gt;Populus&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;embark.status.im&#x2F;&quot;&gt;Embark&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Full support in implementation &lt;strong&gt;may&lt;&#x2F;strong&gt; require &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1123&#x2F;#further-work&quot;&gt;Further
Work&lt;&#x2F;a&gt;, specified below.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;further-work&quot;&gt;Further Work&lt;&#x2F;h1&gt;
&lt;p&gt;This EIP addresses only the data format for package descriptions.
Excluded from the scope of this specification are:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Package registry interface definition&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Tooling integration, or how packages are stored on disk.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;These efforts &lt;strong&gt;should&lt;&#x2F;strong&gt; be considered separate, warranting future
dependent EIP submssions.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;acknowledgements&quot;&gt;Acknowledgements&lt;&#x2F;h1&gt;
&lt;p&gt;The authors of this document would like to thank the original authors of
&lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;190&#x2F;&quot;&gt;EIP-190&lt;&#x2F;a&gt;,
&lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;ethprize.io&#x2F;&quot;&gt;ETHPrize&lt;&#x2F;a&gt; for their funding
support, all community
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethpm&#x2F;ethpm-spec&#x2F;graphs&#x2F;contributors&quot;&gt;contributors&lt;&#x2F;a&gt;,
and the Ethereum community at large.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h1&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Restore Contract Code at 0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4</title>
        <published>2018-04-04T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Afri Schoedon</name><uri>https://github.com/5chdn</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/999/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-999-restore-contract-code-at-0x863df6bfa4/130" />
        

        <id>https://wg-eips.ritovision.com/999/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        

        
        <category
            term="tag:eip:999"
            label="EIP-999" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/999/">&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;This document proposes to restore the contract code of the &lt;code&gt;WalletLibrary&lt;&#x2F;code&gt;
contract at &lt;code&gt;0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4&lt;&#x2F;code&gt; with a patched version.
The contract was accidentally self-destructed and renders a significant amount
of Ether inaccessible.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;The &lt;code&gt;WalletLibrary&lt;&#x2F;code&gt; contract was used by the
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.parity.io&#x2F;&quot;&gt;Parity Wallet&lt;&#x2F;a&gt; to reduce gas costs for users deploying
multi-signature wallets on the Ethereum blockchain. It contained basic
functionality such as confirming or revoking multi-signature transactions for
any wallet deployed that depends on this library. The
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;paritytech&#x2F;parity&#x2F;issues&#x2F;6995&quot;&gt;accidental self-destruction&lt;&#x2F;a&gt;
of the library contract caused significant amounts of Ether and other assets
owned by many different parties to be inaccessible. This proposal suggests
restoring the &lt;code&gt;WalletLibrary&lt;&#x2F;code&gt; by a
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;parity-contracts&#x2F;0x863df6bfa4&quot;&gt;patched&lt;&#x2F;a&gt; version to allow the
owners of the dependent multi-signature wallets regain access to their assets.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;This proposal is necessary because the Ethereum protocol does not allow the
restoration of self-destructed contracts and there is no other simple way to
enable the affected users and companies regaining access to their tokens and
Ether. In opposite to previously discussed proposals, this will not change any
EVM semantics and tries to achieve the goal of unfreezing the funds by a single
state transition as specified in the next section.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;The self-destructed contract code at
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;etherscan.io&#x2F;address&#x2F;0x863df6bfa4469f3ead0be8f9f2aae51c91a907b4#code&quot;&gt;&lt;code&gt;0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;
shall be replaced with a patched version of the
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;parity-contracts&#x2F;0x863df6bfa4&#x2F;blob&#x2F;master&#x2F;contracts&#x2F;walletLibrary.sol&quot;&gt;&lt;code&gt;walletLibrary.sol&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;
as reviewed, tested, and approved in
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;parity-contracts&#x2F;0x863df6bfa4&quot;&gt;parity-contracts&#x2F;0x863df6bfa4&lt;&#x2F;a&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;	&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;object&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;606060405234156200000d57fe5b5b6000808054806001018281620000259190620002d9565b916000526020600020900160005b6000909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506200012081805480602002602001604051908101604052809291908181526020018280548015620000fd57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311620000b2575b505050505060016000620001286401000000000262001d46176401000000009004565b5b5062000330565b600060015411156200013a5760006000fd5b6200015981620001806401000000000262001d71176401000000009004565b620001798383620001c26401000000000262001d9c176401000000009004565b5b5b505050565b60006001541115620001925760006000fd5b80600281905550620001b7620002c16401000000000262001bcf176401000000009004565b6004819055505b5b50565b600060006001541115620001d65760006000fd5b600082111515620001e75760006000fd5b81835110151515620001f95760006000fd5b8251600181905550600090505b8251811015620002b35782818151811015156200021f57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff16600582600101610100811015156200025357fe5b0160005b508190555080600101610105600085848151811015156200027457fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b80600101905062000206565b816000819055505b5b505050565b60006201518042811515620002d257fe5b0490505b90565b815481835581811511620003035781836000526020600020918201910162000302919062000308565b5b505050565b6200032d91905b80821115620003295760008160009055506001016200030f565b5090565b90565b611ebf80620003406000396000f300606060405236156100ef576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063173825d91461016d5780632f54bf6e146101a35780634123cb6b146101f157806352375093146102175780635c52c2f51461023d578063659010e71461024f5780637065cb4814610275578063746c9171146102ab578063797af627146102d1578063b20d30a91461030d578063b61d27f61461032d578063b75c7dc61461039c578063ba51a6df146103c0578063c2cf7326146103e0578063c41a360a1461043b578063f00d4b5d1461049b578063f1736d86146104f0575b61016b5b6000341115610168577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3334604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5b565b005b341561017557fe5b6101a1600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610516565b005b34156101ab57fe5b6101d7600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610659565b604051808215151515815260200191505060405180910390f35b34156101f957fe5b610201610691565b6040518082815260200191505060405180910390f35b341561021f57fe5b610227610697565b6040518082815260200191505060405180910390f35b341561024557fe5b61024d61069d565b005b341561025757fe5b61025f6106d7565b6040518082815260200191505060405180910390f35b341561027d57fe5b6102a9600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106dd565b005b34156102b357fe5b6102bb610829565b6040518082815260200191505060405180910390f35b34156102d957fe5b6102f360048080356000191690602001909190505061082f565b604051808215151515815260200191505060405180910390f35b341561031557fe5b61032b6004808035906020019091905050610dcc565b005b341561033557fe5b61037e600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919080359060200190820180359060200191909192905050610e06565b60405180826000191660001916815260200191505060405180910390f35b34156103a457fe5b6103be60048080356000191690602001909190505061127d565b005b34156103c857fe5b6103de6004808035906020019091905050611392565b005b34156103e857fe5b61042160048080356000191690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061141a565b604051808215151515815260200191505060405180910390f35b341561044357fe5b610459600480803590602001909190505061149c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104a357fe5b6104ee600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506114bf565b005b34156104f857fe5b610500611672565b6040518082815260200191505060405180910390f35b600060003660405180838380828437820191505092505050604051809103902061053f81611678565b156106535761010560008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549150600082141561057f57610652565b600160015403600054111561059357610652565b6000600583610100811015156105a557fe5b0160005b5081905550600061010560008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506105e6611890565b6105ee6119d0565b7f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da83604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b5b5b505050565b6000600061010560008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541190505b919050565b60015481565b60045481565b6000366040518083838082843782019150509250505060405180910390206106c481611678565b156106d35760006003819055505b5b5b50565b60035481565b60003660405180838380828437820191505092505050604051809103902061070481611678565b156108245761071282610659565b1561071c57610823565b610724611890565b60fa600154101515610739576107386119d0565b5b60fa60015410151561074a57610823565b6001600081548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff1660056001546101008110151561078557fe5b0160005b508190555060015461010560008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c382604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b5b5b5050565b60005481565b600060008261083d81611678565b15610dc45760006101086000866000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415806108c757506000610108600086600019166000191681526020019081526020016000206001015414155b80610906575060006101086000866000191660001916815260200190815260200160002060020180546001816001161561010002031660029004905014155b15610dc25760006101086000866000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610a5057610a496101086000866000191660001916815260200190815260200160002060010154610108600087600019166000191681526020019081526020016000206002018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a3f5780601f10610a1457610100808354040283529160200191610a3f565b820191906000526020600020905b815481529060010190602001808311610a2257829003601f168201915b5050505050611b37565b9150610b71565b6101086000856000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166101086000866000191660001916815260200190815260200160002060010154610108600087600019166000191681526020019081526020016000206002016040518082805460018160011615610100020316600290048015610b4a5780601f10610b1f57610100808354040283529160200191610b4a565b820191906000526020600020905b815481529060010190602001808311610b2d57829003601f168201915b505091505060006040518083038185876185025a03f1925050501515610b705760006000fd5b5b7fe3a3a4111a84df27d76b68dc721e65c7711605ea5eee4afd3a9c58195217365c338561010860008860001916600019168152602001908152602001600020600101546101086000896000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661010860008a6000191660001916815260200190815260200160002060020187604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200186600019166000191681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015610d475780601f10610d1c57610100808354040283529160200191610d47565b820191906000526020600020905b815481529060010190602001808311610d2a57829003601f168201915b505097505050505050505060405180910390a16101086000856000191660001916815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160009055600282016000610db79190611be6565b505060019250610dc3565b5b5b5b5050919050565b600036604051808383808284378201915050925050506040518091039020610df381611678565b15610e0157816002819055505b5b5b5050565b60006000610e1333610659565b1561127357600084849050148015610e305750610e2f85611b51565b5b80610e3d57506001600054145b15610fed5760008673ffffffffffffffffffffffffffffffffffffffff161415610ea457610e9d8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050611b37565b9050610ef3565b8573ffffffffffffffffffffffffffffffffffffffff168585856040518083838082843782019150509250505060006040518083038185876185025a03f1925050501515610ef25760006000fd5b5b7f9738cd1a8777c86b011f7b01d87d484217dc6ab5154a9d41eda5d14af8caf292338688878786604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281038252858582818152602001925080828437820191505097505050505050505060405180910390a1611271565b6000364360405180848480828437820191505082815260200193505050506040518091039020915060006101086000846000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148015611099575060006101086000846000191660001916815260200190815260200160002060010154145b80156110d85750600061010860008460001916600019168152602001908152602001600020600201805460018160011615610100020316600290049050145b1561118f57856101086000846000191660001916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550846101086000846000191660001916815260200190815260200160002060010181905550838361010860008560001916600019168152602001908152602001600020600201919061118d929190611c2e565b505b6111988261082f565b1515611270577f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf328233878988886040518087600019166000191681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b5b5b5b5b50949350505050565b60006000600061010560003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054925060008314156112be5761138c565b8260020a9150610106600085600019166000191681526020019081526020016000209050600082826001015416111561138b5780600001600081548092919060010191905055508181600101600082825403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b3385604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182600019166000191681526020019250505060405180910390a15b5b50505050565b6000366040518083838082843782019150509250505060405180910390206113b981611678565b15611415576001548211156113cd57611414565b816000819055506113dc611890565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da826040518082815260200191505060405180910390a15b5b5b5050565b600060006000600061010660008760001916600019168152602001908152602001600020925061010560008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549150600082141561147f5760009350611493565b8160020a9050600081846001015416141593505b50505092915050565b6000600560018301610100811015156114b157fe5b0160005b505490505b919050565b60006000366040518083838082843782019150509250505060405180910390206114e881611678565b1561166b576114f683610659565b156115005761166a565b61010560008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549150600082141561153b5761166a565b611543611890565b8273ffffffffffffffffffffffffffffffffffffffff166005836101008110151561156a57fe5b0160005b5081905550600061010560008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508161010560008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c8484604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b5b5b50505050565b60025481565b600060006000600061010560003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054925060008314156116bb57611888565b6101066000866000191660001916815260200190815260200160002091506000826000015414156117455760005482600001819055506000826001018190555061010780548091906001016117109190611cae565b826002018190555084610107836002015481548110151561172d57fe5b906000526020600020900160005b5081600019169055505b8260020a90506000818360010154161415611887577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda3386604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182600019166000191681526020019250505060405180910390a16001826000015411151561185e57610107610106600087600019166000191681526020019081526020016000206002015481548110151561180a57fe5b906000526020600020900160005b5060009055610106600086600019166000191681526020019081526020016000206000600082016000905560018201600090556002820160009055505060019350611888565b8160000160008154809291906001900391905055508082600101600082825417925050819055505b5b5b505050919050565b60006000610107805490509150600090505b818110156119bc576101086000610107838154811015156118bf57fe5b906000526020600020900160005b50546000191660001916815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560018201600090556002820160006119269190611be6565b505060006001026101078281548110151561193d57fe5b906000526020600020900160005b5054600019161415156119b05761010660006101078381548110151561196d57fe5b906000526020600020900160005b505460001916600019168152602001908152602001600020600060008201600090556001820160009055600282016000905550505b5b8060010190506118a2565b61010760006119cb9190611cda565b5b5050565b6000600190505b600154811015611b33575b60015481108015611a095750600060058261010081101515611a0057fe5b0160005b505414155b15611a1b5780806001019150506119e2565b5b6001600154118015611a4557506000600560015461010081101515611a3d57fe5b0160005b5054145b15611a625760016000815480929190600190039190505550611a1c565b60015481108015611a8b57506000600560015461010081101515611a8257fe5b0160005b505414155b8015611aac5750600060058261010081101515611aa457fe5b0160005b5054145b15611b2e57600560015461010081101515611ac357fe5b0160005b505460058261010081101515611ad957fe5b0160005b508190555080610105600060058461010081101515611af857fe5b0160005b50548152602001908152602001600020819055506000600560015461010081101515611b2457fe5b0160005b50819055505b6119d7565b5b50565b600081516020830184f09050803b15610000575b92915050565b6000611b5c33610659565b15611bc957600454611b6c611bcf565b1115611b89576000600381905550611b82611bcf565b6004819055505b600354826003540110158015611ba55750600254826003540111155b15611bc3578160036000828254019250508190555060019050611bc8565b600090505b5b5b919050565b60006201518042811515611bdf57fe5b0490505b90565b50805460018160011615610100020316600290046000825580601f10611c0c5750611c2b565b601f016020900490600052602060002090810190611c2a9190611cfc565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611c6f57803560ff1916838001178555611c9d565b82800160010185558215611c9d579182015b82811115611c9c578235825591602001919060010190611c81565b5b509050611caa9190611cfc565b5090565b815481835581811511611cd557818360005260206000209182019101611cd49190611d21565b5b505050565b5080546000825590600052602060002090810190611cf89190611d21565b5b50565b611d1e91905b80821115611d1a576000816000905550600101611d02565b5090565b90565b611d4391905b80821115611d3f576000816000905550600101611d27565b5090565b90565b60006001541115611d575760006000fd5b611d6081611d71565b611d6a8383611d9c565b5b5b505050565b60006001541115611d825760006000fd5b80600281905550611d91611bcf565b6004819055505b5b50565b600060006001541115611daf5760006000fd5b600082111515611dbf5760006000fd5b81835110151515611dd05760006000fd5b8251600181905550600090505b8251811015611e85578281815181101515611df457fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1660058260010161010081101515611e2757fe5b0160005b50819055508060010161010560008584815181101515611e4757fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b806001019050611ddd565b816000819055505b5b5050505600a165627a7a7230582016889f0740f073d397f9d00b0d19900fb050b957e3e2942f861085beb9baab180029&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;	&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;opcodes&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;PUSH1 0x60 PUSH1 0x40 MSTORE CALLVALUE ISZERO PUSH3 0xD JUMPI INVALID JUMPDEST JUMPDEST PUSH1 0x0 DUP1 DUP1 SLOAD DUP1 PUSH1 0x1 ADD DUP3 DUP2 PUSH3 0x25 SWAP2 SWAP1 PUSH3 0x2D9 JUMP JUMPDEST SWAP2 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP1 ADD PUSH1 0x0 JUMPDEST PUSH1 0x0 SWAP1 SWAP2 SWAP1 SWAP2 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP PUSH3 0x120 DUP2 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH3 0xFD JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP1 JUMPDEST DUP2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 DUP1 DUP4 GT PUSH3 0xB2 JUMPI JUMPDEST POP POP POP POP POP PUSH1 0x1 PUSH1 0x0 PUSH3 0x128 PUSH5 0x100000000 MUL PUSH3 0x1D46 OR PUSH5 0x100000000 SWAP1 DIV JUMP JUMPDEST JUMPDEST POP PUSH3 0x330 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 SLOAD GT ISZERO PUSH3 0x13A JUMPI PUSH1 0x0 PUSH1 0x0 REVERT JUMPDEST PUSH3 0x159 DUP2 PUSH3 0x180 PUSH5 0x100000000 MUL PUSH3 0x1D71 OR PUSH5 0x100000000 SWAP1 DIV JUMP JUMPDEST PUSH3 0x179 DUP4 DUP4 PUSH3 0x1C2 PUSH5 0x100000000 MUL PUSH3 0x1D9C OR PUSH5 0x100000000 SWAP1 DIV JUMP JUMPDEST JUMPDEST JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 SLOAD GT ISZERO PUSH3 0x192 JUMPI PUSH1 0x0 PUSH1 0x0 REVERT JUMPDEST DUP1 PUSH1 0x2 DUP2 SWAP1 SSTORE POP PUSH3 0x1B7 PUSH3 0x2C1 PUSH5 0x100000000 MUL PUSH3 0x1BCF OR PUSH5 0x100000000 SWAP1 DIV JUMP JUMPDEST PUSH1 0x4 DUP2 SWAP1 SSTORE POP JUMPDEST JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 PUSH1 0x1 SLOAD GT ISZERO PUSH3 0x1D6 JUMPI PUSH1 0x0 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 DUP3 GT ISZERO ISZERO PUSH3 0x1E7 JUMPI PUSH1 0x0 PUSH1 0x0 REVERT JUMPDEST DUP2 DUP4 MLOAD LT ISZERO ISZERO ISZERO PUSH3 0x1F9 JUMPI PUSH1 0x0 PUSH1 0x0 REVERT JUMPDEST DUP3 MLOAD PUSH1 0x1 DUP2 SWAP1 SSTORE POP PUSH1 0x0 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH3 0x2B3 JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH3 0x21F JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x5 DUP3 PUSH1 0x1 ADD PUSH2 0x100 DUP2 LT ISZERO ISZERO PUSH3 0x253 JUMPI INVALID JUMPDEST ADD PUSH1 0x0 JUMPDEST POP DUP2 SWAP1 SSTORE POP DUP1 PUSH1 0x1 ADD PUSH2 0x105 PUSH1 0x0 DUP6 DUP5 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH3 0x274 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 DUP2 SWAP1 SSTORE POP JUMPDEST DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH3 0x206 JUMP JUMPDEST DUP2 PUSH1 0x0 DUP2 SWAP1 SSTORE POP JUMPDEST JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0x15180 TIMESTAMP DUP2 ISZERO ISZERO PUSH3 0x2D2 JUMPI INVALID JUMPDEST DIV SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST DUP2 SLOAD DUP2 DUP4 SSTORE DUP2 DUP2 ISZERO GT PUSH3 0x303 JUMPI DUP2 DUP4 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP2 DUP3 ADD SWAP2 ADD PUSH3 0x302 SWAP2 SWAP1 PUSH3 0x308 JUMP JUMPDEST JUMPDEST POP POP POP JUMP JUMPDEST PUSH3 0x32D SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH3 0x329 JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SWAP1 SSTORE POP PUSH1 0x1 ADD PUSH3 0x30F JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST SWAP1 JUMP JUMPDEST PUSH2 0x1EBF DUP1 PUSH3 0x340 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x60 PUSH1 0x40 MSTORE CALLDATASIZE ISZERO PUSH2 0xEF JUMPI PUSH1 0x0 CALLDATALOAD PUSH29 0x100000000000000000000000000000000000000000000000000000000 SWAP1 DIV PUSH4 0xFFFFFFFF AND DUP1 PUSH4 0x173825D9 EQ PUSH2 0x16D JUMPI DUP1 PUSH4 0x2F54BF6E EQ PUSH2 0x1A3 JUMPI DUP1 PUSH4 0x4123CB6B EQ PUSH2 0x1F1 JUMPI DUP1 PUSH4 0x52375093 EQ PUSH2 0x217 JUMPI DUP1 PUSH4 0x5C52C2F5 EQ PUSH2 0x23D JUMPI DUP1 PUSH4 0x659010E7 EQ PUSH2 0x24F JUMPI DUP1 PUSH4 0x7065CB48 EQ PUSH2 0x275 JUMPI DUP1 PUSH4 0x746C9171 EQ PUSH2 0x2AB JUMPI DUP1 PUSH4 0x797AF627 EQ PUSH2 0x2D1 JUMPI DUP1 PUSH4 0xB20D30A9 EQ PUSH2 0x30D JUMPI DUP1 PUSH4 0xB61D27F6 EQ PUSH2 0x32D JUMPI DUP1 PUSH4 0xB75C7DC6 EQ PUSH2 0x39C JUMPI DUP1 PUSH4 0xBA51A6DF EQ PUSH2 0x3C0 JUMPI DUP1 PUSH4 0xC2CF7326 EQ PUSH2 0x3E0 JUMPI DUP1 PUSH4 0xC41A360A EQ PUSH2 0x43B JUMPI DUP1 PUSH4 0xF00D4B5D EQ PUSH2 0x49B JUMPI DUP1 PUSH4 0xF1736D86 EQ PUSH2 0x4F0 JUMPI JUMPDEST PUSH2 0x16B JUMPDEST PUSH1 0x0 CALLVALUE GT ISZERO PUSH2 0x168 JUMPI PUSH32 0xE1FFFCC4923D04B559F4D29A8BFC6CDA04EB5B0D3C460751C2402C5C5CC9109C CALLER CALLVALUE PUSH1 0x40 MLOAD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMPDEST JUMPDEST JUMP JUMPDEST STOP JUMPDEST CALLVALUE ISZERO PUSH2 0x175 JUMPI INVALID JUMPDEST PUSH2 0x1A1 PUSH1 0x4 DUP1 DUP1 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 PUSH1 0x20 ADD SWAP1 SWAP2 SWAP1 POP POP PUSH2 0x516 JUMP JUMPDEST STOP JUMPDEST CALLVALUE ISZERO PUSH2 0x1AB JUMPI INVALID JUMPDEST PUSH2 0x1D7 PUSH1 0x4 DUP1 DUP1 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 PUSH1 0x20 ADD SWAP1 SWAP2 SWAP1 POP POP PUSH2 0x659 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 ISZERO ISZERO ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x1F9 JUMPI INVALID JUMPDEST PUSH2 0x201 PUSH2 0x691 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x21F JUMPI INVALID JUMPDEST PUSH2 0x227 PUSH2 0x697 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x245 JUMPI INVALID JUMPDEST PUSH2 0x24D PUSH2 0x69D JUMP JUMPDEST STOP JUMPDEST CALLVALUE ISZERO PUSH2 0x257 JUMPI INVALID JUMPDEST PUSH2 0x25F PUSH2 0x6D7 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x27D JUMPI INVALID JUMPDEST PUSH2 0x2A9 PUSH1 0x4 DUP1 DUP1 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 PUSH1 0x20 ADD SWAP1 SWAP2 SWAP1 POP POP PUSH2 0x6DD JUMP JUMPDEST STOP JUMPDEST CALLVALUE ISZERO PUSH2 0x2B3 JUMPI INVALID JUMPDEST PUSH2 0x2BB PUSH2 0x829 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x2D9 JUMPI INVALID JUMPDEST PUSH2 0x2F3 PUSH1 0x4 DUP1 DUP1 CALLDATALOAD PUSH1 0x0 NOT AND SWAP1 PUSH1 0x20 ADD SWAP1 SWAP2 SWAP1 POP POP PUSH2 0x82F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 ISZERO ISZERO ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x315 JUMPI INVALID JUMPDEST PUSH2 0x32B PUSH1 0x4 DUP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP2 SWAP1 POP POP PUSH2 0xDCC JUMP JUMPDEST STOP JUMPDEST CALLVALUE ISZERO PUSH2 0x335 JUMPI INVALID JUMPDEST PUSH2 0x37E PUSH1 0x4 DUP1 DUP1 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 PUSH1 0x20 ADD SWAP1 SWAP2 SWAP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP2 SWAP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP3 ADD DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 SWAP1 SWAP2 SWAP3 SWAP1 POP POP PUSH2 0xE06 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x3A4 JUMPI INVALID JUMPDEST PUSH2 0x3BE PUSH1 0x4 DUP1 DUP1 CALLDATALOAD PUSH1 0x0 NOT AND SWAP1 PUSH1 0x20 ADD SWAP1 SWAP2 SWAP1 POP POP PUSH2 0x127D JUMP JUMPDEST STOP JUMPDEST CALLVALUE ISZERO PUSH2 0x3C8 JUMPI INVALID JUMPDEST PUSH2 0x3DE PUSH1 0x4 DUP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP2 SWAP1 POP POP PUSH2 0x1392 JUMP JUMPDEST STOP JUMPDEST CALLVALUE ISZERO PUSH2 0x3E8 JUMPI INVALID JUMPDEST PUSH2 0x421 PUSH1 0x4 DUP1 DUP1 CALLDATALOAD PUSH1 0x0 NOT AND SWAP1 PUSH1 0x20 ADD SWAP1 SWAP2 SWAP1 DUP1 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 PUSH1 0x20 ADD SWAP1 SWAP2 SWAP1 POP POP PUSH2 0x141A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 ISZERO ISZERO ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x443 JUMPI INVALID JUMPDEST PUSH2 0x459 PUSH1 0x4 DUP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP2 SWAP1 POP POP PUSH2 0x149C JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x4A3 JUMPI INVALID JUMPDEST PUSH2 0x4EE PUSH1 0x4 DUP1 DUP1 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 PUSH1 0x20 ADD SWAP1 SWAP2 SWAP1 DUP1 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 PUSH1 0x20 ADD SWAP1 SWAP2 SWAP1 POP POP PUSH2 0x14BF JUMP JUMPDEST STOP JUMPDEST CALLVALUE ISZERO PUSH2 0x4F8 JUMPI INVALID JUMPDEST PUSH2 0x500 PUSH2 0x1672 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD DUP1 DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY DUP3 ADD SWAP2 POP POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 SHA3 PUSH2 0x53F DUP2 PUSH2 0x1678 JUMP JUMPDEST ISZERO PUSH2 0x653 JUMPI PUSH2 0x105 PUSH1 0x0 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 SLOAD SWAP2 POP PUSH1 0x0 DUP3 EQ ISZERO PUSH2 0x57F JUMPI PUSH2 0x652 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 SLOAD SUB PUSH1 0x0 SLOAD GT ISZERO PUSH2 0x593 JUMPI PUSH2 0x652 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x5 DUP4 PUSH2 0x100 DUP2 LT ISZERO ISZERO PUSH2 0x5A5 JUMPI INVALID JUMPDEST ADD PUSH1 0x0 JUMPDEST POP DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH2 0x105 PUSH1 0x0 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 DUP2 SWAP1 SSTORE POP PUSH2 0x5E6 PUSH2 0x1890 JUMP JUMPDEST PUSH2 0x5EE PUSH2 0x19D0 JUMP JUMPDEST PUSH32 0x58619076ADF5BB0943D100EF88D52D7C3FD691B19D3A9071B555B651FBF418DA DUP4 PUSH1 0x40 MLOAD DUP1 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMPDEST JUMPDEST JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 PUSH2 0x105 PUSH1 0x0 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 SLOAD GT SWAP1 POP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x4 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD DUP1 DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY DUP3 ADD SWAP2 POP POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 SHA3 PUSH2 0x6C4 DUP2 PUSH2 0x1678 JUMP JUMPDEST ISZERO PUSH2 0x6D3 JUMPI PUSH1 0x0 PUSH1 0x3 DUP2 SWAP1 SSTORE POP JUMPDEST JUMPDEST JUMPDEST POP JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD DUP1 DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY DUP3 ADD SWAP2 POP POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 SHA3 PUSH2 0x704 DUP2 PUSH2 0x1678 JUMP JUMPDEST ISZERO PUSH2 0x824 JUMPI PUSH2 0x712 DUP3 PUSH2 0x659 JUMP JUMPDEST ISZERO PUSH2 0x71C JUMPI PUSH2 0x823 JUMP JUMPDEST PUSH2 0x724 PUSH2 0x1890 JUMP JUMPDEST PUSH1 0xFA PUSH1 0x1 SLOAD LT ISZERO ISZERO PUSH2 0x739 JUMPI PUSH2 0x738 PUSH2 0x19D0 JUMP JUMPDEST JUMPDEST PUSH1 0xFA PUSH1 0x1 SLOAD LT ISZERO ISZERO PUSH2 0x74A JUMPI PUSH2 0x823 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 DUP2 SLOAD DUP1 SWAP3 SWAP2 SWAP1 PUSH1 0x1 ADD SWAP2 SWAP1 POP SSTORE POP DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x5 PUSH1 0x1 SLOAD PUSH2 0x100 DUP2 LT ISZERO ISZERO PUSH2 0x785 JUMPI INVALID JUMPDEST ADD PUSH1 0x0 JUMPDEST POP DUP2 SWAP1 SSTORE POP PUSH1 0x1 SLOAD PUSH2 0x105 PUSH1 0x0 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 DUP2 SWAP1 SSTORE POP PUSH32 0x994A936646FE87FFE4F1E469D3D6AA417D6B855598397F323DE5B449F765F0C3 DUP3 PUSH1 0x40 MLOAD DUP1 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMPDEST JUMPDEST JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 DUP3 PUSH2 0x83D DUP2 PUSH2 0x1678 JUMP JUMPDEST ISZERO PUSH2 0xDC4 JUMPI PUSH1 0x0 PUSH2 0x108 PUSH1 0x0 DUP7 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO DUP1 PUSH2 0x8C7 JUMPI POP PUSH1 0x0 PUSH2 0x108 PUSH1 0x0 DUP7 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x1 ADD SLOAD EQ ISZERO JUMPDEST DUP1 PUSH2 0x906 JUMPI POP PUSH1 0x0 PUSH2 0x108 PUSH1 0x0 DUP7 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x2 ADD DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 POP EQ ISZERO JUMPDEST ISZERO PUSH2 0xDC2 JUMPI PUSH1 0x0 PUSH2 0x108 PUSH1 0x0 DUP7 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0xA50 JUMPI PUSH2 0xA49 PUSH2 0x108 PUSH1 0x0 DUP7 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x1 ADD SLOAD PUSH2 0x108 PUSH1 0x0 DUP8 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x2 ADD DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV DUP1 ISZERO PUSH2 0xA3F JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xA14 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xA3F JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xA22 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP PUSH2 0x1B37 JUMP JUMPDEST SWAP2 POP PUSH2 0xB71 JUMP JUMPDEST PUSH2 0x108 PUSH1 0x0 DUP6 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x108 PUSH1 0x0 DUP7 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x1 ADD SLOAD PUSH2 0x108 PUSH1 0x0 DUP8 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x2 ADD PUSH1 0x40 MLOAD DUP1 DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV DUP1 ISZERO PUSH2 0xB4A JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xB1F JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xB4A JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xB2D JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP SWAP2 POP POP PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 PUSH2 0x8502 GAS SUB CALL SWAP3 POP POP POP ISZERO ISZERO PUSH2 0xB70 JUMPI PUSH1 0x0 PUSH1 0x0 REVERT JUMPDEST JUMPDEST PUSH32 0xE3A3A4111A84DF27D76B68DC721E65C7711605EA5EEE4AFD3A9C58195217365C CALLER DUP6 PUSH2 0x108 PUSH1 0x0 DUP9 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x1 ADD SLOAD PUSH2 0x108 PUSH1 0x0 DUP10 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x108 PUSH1 0x0 DUP11 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x2 ADD DUP8 PUSH1 0x40 MLOAD DUP1 DUP8 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP7 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP5 DUP2 DUP2 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV DUP1 ISZERO PUSH2 0xD47 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xD1C JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xD47 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xD2A JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP SWAP8 POP POP POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 PUSH2 0x108 PUSH1 0x0 DUP6 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x0 PUSH1 0x0 DUP3 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 SSTORE PUSH1 0x1 DUP3 ADD PUSH1 0x0 SWAP1 SSTORE PUSH1 0x2 DUP3 ADD PUSH1 0x0 PUSH2 0xDB7 SWAP2 SWAP1 PUSH2 0x1BE6 JUMP JUMPDEST POP POP PUSH1 0x1 SWAP3 POP PUSH2 0xDC3 JUMP JUMPDEST JUMPDEST JUMPDEST JUMPDEST POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD DUP1 DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY DUP3 ADD SWAP2 POP POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 SHA3 PUSH2 0xDF3 DUP2 PUSH2 0x1678 JUMP JUMPDEST ISZERO PUSH2 0xE01 JUMPI DUP2 PUSH1 0x2 DUP2 SWAP1 SSTORE POP JUMPDEST JUMPDEST JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 PUSH2 0xE13 CALLER PUSH2 0x659 JUMP JUMPDEST ISZERO PUSH2 0x1273 JUMPI PUSH1 0x0 DUP5 DUP5 SWAP1 POP EQ DUP1 ISZERO PUSH2 0xE30 JUMPI POP PUSH2 0xE2F DUP6 PUSH2 0x1B51 JUMP JUMPDEST JUMPDEST DUP1 PUSH2 0xE3D JUMPI POP PUSH1 0x1 PUSH1 0x0 SLOAD EQ JUMPDEST ISZERO PUSH2 0xFED JUMPI PUSH1 0x0 DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0xEA4 JUMPI PUSH2 0xE9D DUP6 DUP6 DUP6 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY DUP3 ADD SWAP2 POP POP POP POP POP POP PUSH2 0x1B37 JUMP JUMPDEST SWAP1 POP PUSH2 0xEF3 JUMP JUMPDEST DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP6 DUP6 DUP6 PUSH1 0x40 MLOAD DUP1 DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY DUP3 ADD SWAP2 POP POP SWAP3 POP POP POP PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 PUSH2 0x8502 GAS SUB CALL SWAP3 POP POP POP ISZERO ISZERO PUSH2 0xEF2 JUMPI PUSH1 0x0 PUSH1 0x0 REVERT JUMPDEST JUMPDEST PUSH32 0x9738CD1A8777C86B011F7B01D87D484217DC6AB5154A9D41EDA5D14AF8CAF292 CALLER DUP7 DUP9 DUP8 DUP8 DUP7 PUSH1 0x40 MLOAD DUP1 DUP8 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP7 DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP6 DUP6 DUP3 DUP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP DUP1 DUP3 DUP5 CALLDATACOPY DUP3 ADD SWAP2 POP POP SWAP8 POP POP POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 PUSH2 0x1271 JUMP JUMPDEST PUSH1 0x0 CALLDATASIZE NUMBER PUSH1 0x40 MLOAD DUP1 DUP5 DUP5 DUP1 DUP3 DUP5 CALLDATACOPY DUP3 ADD SWAP2 POP POP DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP4 POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 SHA3 SWAP2 POP PUSH1 0x0 PUSH2 0x108 PUSH1 0x0 DUP5 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 ISZERO PUSH2 0x1099 JUMPI POP PUSH1 0x0 PUSH2 0x108 PUSH1 0x0 DUP5 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x1 ADD SLOAD EQ JUMPDEST DUP1 ISZERO PUSH2 0x10D8 JUMPI POP PUSH1 0x0 PUSH2 0x108 PUSH1 0x0 DUP5 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x2 ADD DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 POP EQ JUMPDEST ISZERO PUSH2 0x118F JUMPI DUP6 PUSH2 0x108 PUSH1 0x0 DUP5 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x0 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP5 PUSH2 0x108 PUSH1 0x0 DUP5 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x1 ADD DUP2 SWAP1 SSTORE POP DUP4 DUP4 PUSH2 0x108 PUSH1 0x0 DUP6 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x2 ADD SWAP2 SWAP1 PUSH2 0x118D SWAP3 SWAP2 SWAP1 PUSH2 0x1C2E JUMP JUMPDEST POP JUMPDEST PUSH2 0x1198 DUP3 PUSH2 0x82F JUMP JUMPDEST ISZERO ISZERO PUSH2 0x1270 JUMPI PUSH32 0x1733CBB53659D713B79580F79F3F9FF215F78A7C7AA45890F3B89FC5CDDFBF32 DUP3 CALLER DUP8 DUP10 DUP9 DUP9 PUSH1 0x40 MLOAD DUP1 DUP8 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP5 DUP5 DUP3 DUP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP DUP1 DUP3 DUP5 CALLDATACOPY DUP3 ADD SWAP2 POP POP SWAP8 POP POP POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMPDEST JUMPDEST JUMPDEST JUMPDEST JUMPDEST POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 PUSH1 0x0 PUSH2 0x105 PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 SLOAD SWAP3 POP PUSH1 0x0 DUP4 EQ ISZERO PUSH2 0x12BE JUMPI PUSH2 0x138C JUMP JUMPDEST DUP3 PUSH1 0x2 EXP SWAP2 POP PUSH2 0x106 PUSH1 0x0 DUP6 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 SWAP1 POP PUSH1 0x0 DUP3 DUP3 PUSH1 0x1 ADD SLOAD AND GT ISZERO PUSH2 0x138B JUMPI DUP1 PUSH1 0x0 ADD PUSH1 0x0 DUP2 SLOAD DUP1 SWAP3 SWAP2 SWAP1 PUSH1 0x1 ADD SWAP2 SWAP1 POP SSTORE POP DUP2 DUP2 PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD SUB SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH32 0xC7FB647E59B18047309AA15AAD418E5D7CA96D173AD704F1031A2C3D7591734B CALLER DUP6 PUSH1 0x40 MLOAD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMPDEST JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD DUP1 DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY DUP3 ADD SWAP2 POP POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 SHA3 PUSH2 0x13B9 DUP2 PUSH2 0x1678 JUMP JUMPDEST ISZERO PUSH2 0x1415 JUMPI PUSH1 0x1 SLOAD DUP3 GT ISZERO PUSH2 0x13CD JUMPI PUSH2 0x1414 JUMP JUMPDEST DUP2 PUSH1 0x0 DUP2 SWAP1 SSTORE POP PUSH2 0x13DC PUSH2 0x1890 JUMP JUMPDEST PUSH32 0xACBDB084C721332AC59F9B8E392196C9EB0E4932862DA8EB9BEAF0DAD4F550DA DUP3 PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMPDEST JUMPDEST JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 PUSH1 0x0 PUSH1 0x0 PUSH2 0x106 PUSH1 0x0 DUP8 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 SWAP3 POP PUSH2 0x105 PUSH1 0x0 DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 SLOAD SWAP2 POP PUSH1 0x0 DUP3 EQ ISZERO PUSH2 0x147F JUMPI PUSH1 0x0 SWAP4 POP PUSH2 0x1493 JUMP JUMPDEST DUP2 PUSH1 0x2 EXP SWAP1 POP PUSH1 0x0 DUP2 DUP5 PUSH1 0x1 ADD SLOAD AND EQ ISZERO SWAP4 POP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x5 PUSH1 0x1 DUP4 ADD PUSH2 0x100 DUP2 LT ISZERO ISZERO PUSH2 0x14B1 JUMPI INVALID JUMPDEST ADD PUSH1 0x0 JUMPDEST POP SLOAD SWAP1 POP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD DUP1 DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY DUP3 ADD SWAP2 POP POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 SHA3 PUSH2 0x14E8 DUP2 PUSH2 0x1678 JUMP JUMPDEST ISZERO PUSH2 0x166B JUMPI PUSH2 0x14F6 DUP4 PUSH2 0x659 JUMP JUMPDEST ISZERO PUSH2 0x1500 JUMPI PUSH2 0x166A JUMP JUMPDEST PUSH2 0x105 PUSH1 0x0 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 SLOAD SWAP2 POP PUSH1 0x0 DUP3 EQ ISZERO PUSH2 0x153B JUMPI PUSH2 0x166A JUMP JUMPDEST PUSH2 0x1543 PUSH2 0x1890 JUMP JUMPDEST DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x5 DUP4 PUSH2 0x100 DUP2 LT ISZERO ISZERO PUSH2 0x156A JUMPI INVALID JUMPDEST ADD PUSH1 0x0 JUMPDEST POP DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH2 0x105 PUSH1 0x0 DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 DUP2 SWAP1 SSTORE POP DUP2 PUSH2 0x105 PUSH1 0x0 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 DUP2 SWAP1 SSTORE POP PUSH32 0xB532073B38C83145E3E5135377A08BF9AAB55BC0FD7C1179CD4FB995D2A5159C DUP5 DUP5 PUSH1 0x40 MLOAD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMPDEST JUMPDEST JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 PUSH1 0x0 PUSH1 0x0 PUSH2 0x105 PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 SLOAD SWAP3 POP PUSH1 0x0 DUP4 EQ ISZERO PUSH2 0x16BB JUMPI PUSH2 0x1888 JUMP JUMPDEST PUSH2 0x106 PUSH1 0x0 DUP7 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 SWAP2 POP PUSH1 0x0 DUP3 PUSH1 0x0 ADD SLOAD EQ ISZERO PUSH2 0x1745 JUMPI PUSH1 0x0 SLOAD DUP3 PUSH1 0x0 ADD DUP2 SWAP1 SSTORE POP PUSH1 0x0 DUP3 PUSH1 0x1 ADD DUP2 SWAP1 SSTORE POP PUSH2 0x107 DUP1 SLOAD DUP1 SWAP2 SWAP1 PUSH1 0x1 ADD PUSH2 0x1710 SWAP2 SWAP1 PUSH2 0x1CAE JUMP JUMPDEST DUP3 PUSH1 0x2 ADD DUP2 SWAP1 SSTORE POP DUP5 PUSH2 0x107 DUP4 PUSH1 0x2 ADD SLOAD DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x172D JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP1 ADD PUSH1 0x0 JUMPDEST POP DUP2 PUSH1 0x0 NOT AND SWAP1 SSTORE POP JUMPDEST DUP3 PUSH1 0x2 EXP SWAP1 POP PUSH1 0x0 DUP2 DUP4 PUSH1 0x1 ADD SLOAD AND EQ ISZERO PUSH2 0x1887 JUMPI PUSH32 0xE1C52DC63B719ADE82E8BEA94CC41A0D5D28E4AAF536ADB5E9CCCC9FF8C1AEDA CALLER DUP7 PUSH1 0x40 MLOAD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 PUSH1 0x1 DUP3 PUSH1 0x0 ADD SLOAD GT ISZERO ISZERO PUSH2 0x185E JUMPI PUSH2 0x107 PUSH2 0x106 PUSH1 0x0 DUP8 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x2 ADD SLOAD DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x180A JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP1 ADD PUSH1 0x0 JUMPDEST POP PUSH1 0x0 SWAP1 SSTORE PUSH2 0x106 PUSH1 0x0 DUP7 PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x0 PUSH1 0x0 DUP3 ADD PUSH1 0x0 SWAP1 SSTORE PUSH1 0x1 DUP3 ADD PUSH1 0x0 SWAP1 SSTORE PUSH1 0x2 DUP3 ADD PUSH1 0x0 SWAP1 SSTORE POP POP PUSH1 0x1 SWAP4 POP PUSH2 0x1888 JUMP JUMPDEST DUP2 PUSH1 0x0 ADD PUSH1 0x0 DUP2 SLOAD DUP1 SWAP3 SWAP2 SWAP1 PUSH1 0x1 SWAP1 SUB SWAP2 SWAP1 POP SSTORE POP DUP1 DUP3 PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD OR SWAP3 POP POP DUP2 SWAP1 SSTORE POP JUMPDEST JUMPDEST JUMPDEST POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 PUSH2 0x107 DUP1 SLOAD SWAP1 POP SWAP2 POP PUSH1 0x0 SWAP1 POP JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x19BC JUMPI PUSH2 0x108 PUSH1 0x0 PUSH2 0x107 DUP4 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x18BF JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP1 ADD PUSH1 0x0 JUMPDEST POP SLOAD PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x0 PUSH1 0x0 DUP3 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 SSTORE PUSH1 0x1 DUP3 ADD PUSH1 0x0 SWAP1 SSTORE PUSH1 0x2 DUP3 ADD PUSH1 0x0 PUSH2 0x1926 SWAP2 SWAP1 PUSH2 0x1BE6 JUMP JUMPDEST POP POP PUSH1 0x0 PUSH1 0x1 MUL PUSH2 0x107 DUP3 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x193D JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP1 ADD PUSH1 0x0 JUMPDEST POP SLOAD PUSH1 0x0 NOT AND EQ ISZERO ISZERO PUSH2 0x19B0 JUMPI PUSH2 0x106 PUSH1 0x0 PUSH2 0x107 DUP4 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x196D JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP1 ADD PUSH1 0x0 JUMPDEST POP SLOAD PUSH1 0x0 NOT AND PUSH1 0x0 NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 PUSH1 0x0 PUSH1 0x0 DUP3 ADD PUSH1 0x0 SWAP1 SSTORE PUSH1 0x1 DUP3 ADD PUSH1 0x0 SWAP1 SSTORE PUSH1 0x2 DUP3 ADD PUSH1 0x0 SWAP1 SSTORE POP POP JUMPDEST JUMPDEST DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH2 0x18A2 JUMP JUMPDEST PUSH2 0x107 PUSH1 0x0 PUSH2 0x19CB SWAP2 SWAP1 PUSH2 0x1CDA JUMP JUMPDEST JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST PUSH1 0x1 SLOAD DUP2 LT ISZERO PUSH2 0x1B33 JUMPI JUMPDEST PUSH1 0x1 SLOAD DUP2 LT DUP1 ISZERO PUSH2 0x1A09 JUMPI POP PUSH1 0x0 PUSH1 0x5 DUP3 PUSH2 0x100 DUP2 LT ISZERO ISZERO PUSH2 0x1A00 JUMPI INVALID JUMPDEST ADD PUSH1 0x0 JUMPDEST POP SLOAD EQ ISZERO JUMPDEST ISZERO PUSH2 0x1A1B JUMPI DUP1 DUP1 PUSH1 0x1 ADD SWAP2 POP POP PUSH2 0x19E2 JUMP JUMPDEST JUMPDEST PUSH1 0x1 PUSH1 0x1 SLOAD GT DUP1 ISZERO PUSH2 0x1A45 JUMPI POP PUSH1 0x0 PUSH1 0x5 PUSH1 0x1 SLOAD PUSH2 0x100 DUP2 LT ISZERO ISZERO PUSH2 0x1A3D JUMPI INVALID JUMPDEST ADD PUSH1 0x0 JUMPDEST POP SLOAD EQ JUMPDEST ISZERO PUSH2 0x1A62 JUMPI PUSH1 0x1 PUSH1 0x0 DUP2 SLOAD DUP1 SWAP3 SWAP2 SWAP1 PUSH1 0x1 SWAP1 SUB SWAP2 SWAP1 POP SSTORE POP PUSH2 0x1A1C JUMP JUMPDEST PUSH1 0x1 SLOAD DUP2 LT DUP1 ISZERO PUSH2 0x1A8B JUMPI POP PUSH1 0x0 PUSH1 0x5 PUSH1 0x1 SLOAD PUSH2 0x100 DUP2 LT ISZERO ISZERO PUSH2 0x1A82 JUMPI INVALID JUMPDEST ADD PUSH1 0x0 JUMPDEST POP SLOAD EQ ISZERO JUMPDEST DUP1 ISZERO PUSH2 0x1AAC JUMPI POP PUSH1 0x0 PUSH1 0x5 DUP3 PUSH2 0x100 DUP2 LT ISZERO ISZERO PUSH2 0x1AA4 JUMPI INVALID JUMPDEST ADD PUSH1 0x0 JUMPDEST POP SLOAD EQ JUMPDEST ISZERO PUSH2 0x1B2E JUMPI PUSH1 0x5 PUSH1 0x1 SLOAD PUSH2 0x100 DUP2 LT ISZERO ISZERO PUSH2 0x1AC3 JUMPI INVALID JUMPDEST ADD PUSH1 0x0 JUMPDEST POP SLOAD PUSH1 0x5 DUP3 PUSH2 0x100 DUP2 LT ISZERO ISZERO PUSH2 0x1AD9 JUMPI INVALID JUMPDEST ADD PUSH1 0x0 JUMPDEST POP DUP2 SWAP1 SSTORE POP DUP1 PUSH2 0x105 PUSH1 0x0 PUSH1 0x5 DUP5 PUSH2 0x100 DUP2 LT ISZERO ISZERO PUSH2 0x1AF8 JUMPI INVALID JUMPDEST ADD PUSH1 0x0 JUMPDEST POP SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 DUP2 SWAP1 SSTORE POP PUSH1 0x0 PUSH1 0x5 PUSH1 0x1 SLOAD PUSH2 0x100 DUP2 LT ISZERO ISZERO PUSH2 0x1B24 JUMPI INVALID JUMPDEST ADD PUSH1 0x0 JUMPDEST POP DUP2 SWAP1 SSTORE POP JUMPDEST PUSH2 0x19D7 JUMP JUMPDEST JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD PUSH1 0x20 DUP4 ADD DUP5 CREATE SWAP1 POP DUP1 EXTCODESIZE ISZERO PUSH2 0x0 JUMPI JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1B5C CALLER PUSH2 0x659 JUMP JUMPDEST ISZERO PUSH2 0x1BC9 JUMPI PUSH1 0x4 SLOAD PUSH2 0x1B6C PUSH2 0x1BCF JUMP JUMPDEST GT ISZERO PUSH2 0x1B89 JUMPI PUSH1 0x0 PUSH1 0x3 DUP2 SWAP1 SSTORE POP PUSH2 0x1B82 PUSH2 0x1BCF JUMP JUMPDEST PUSH1 0x4 DUP2 SWAP1 SSTORE POP JUMPDEST PUSH1 0x3 SLOAD DUP3 PUSH1 0x3 SLOAD ADD LT ISZERO DUP1 ISZERO PUSH2 0x1BA5 JUMPI POP PUSH1 0x2 SLOAD DUP3 PUSH1 0x3 SLOAD ADD GT ISZERO JUMPDEST ISZERO PUSH2 0x1BC3 JUMPI DUP2 PUSH1 0x3 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x1 SWAP1 POP PUSH2 0x1BC8 JUMP JUMPDEST PUSH1 0x0 SWAP1 POP JUMPDEST JUMPDEST JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0x15180 TIMESTAMP DUP2 ISZERO ISZERO PUSH2 0x1BDF JUMPI INVALID JUMPDEST DIV SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST POP DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV PUSH1 0x0 DUP3 SSTORE DUP1 PUSH1 0x1F LT PUSH2 0x1C0C JUMPI POP PUSH2 0x1C2B JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP1 DUP2 ADD SWAP1 PUSH2 0x1C2A SWAP2 SWAP1 PUSH2 0x1CFC JUMP JUMPDEST JUMPDEST POP JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0x1C6F JUMPI DUP1 CALLDATALOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x1C9D JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x1C9D JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x1C9C JUMPI DUP3 CALLDATALOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x1C81 JUMP JUMPDEST JUMPDEST POP SWAP1 POP PUSH2 0x1CAA SWAP2 SWAP1 PUSH2 0x1CFC JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST DUP2 SLOAD DUP2 DUP4 SSTORE DUP2 DUP2 ISZERO GT PUSH2 0x1CD5 JUMPI DUP2 DUP4 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x1CD4 SWAP2 SWAP1 PUSH2 0x1D21 JUMP JUMPDEST JUMPDEST POP POP POP JUMP JUMPDEST POP DUP1 SLOAD PUSH1 0x0 DUP3 SSTORE SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 SHA3 SWAP1 DUP2 ADD SWAP1 PUSH2 0x1CF8 SWAP2 SWAP1 PUSH2 0x1D21 JUMP JUMPDEST JUMPDEST POP JUMP JUMPDEST PUSH2 0x1D1E SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x1D1A JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SWAP1 SSTORE POP PUSH1 0x1 ADD PUSH2 0x1D02 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST SWAP1 JUMP JUMPDEST PUSH2 0x1D43 SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x1D3F JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SWAP1 SSTORE POP PUSH1 0x1 ADD PUSH2 0x1D27 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 SLOAD GT ISZERO PUSH2 0x1D57 JUMPI PUSH1 0x0 PUSH1 0x0 REVERT JUMPDEST PUSH2 0x1D60 DUP2 PUSH2 0x1D71 JUMP JUMPDEST PUSH2 0x1D6A DUP4 DUP4 PUSH2 0x1D9C JUMP JUMPDEST JUMPDEST JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 SLOAD GT ISZERO PUSH2 0x1D82 JUMPI PUSH1 0x0 PUSH1 0x0 REVERT JUMPDEST DUP1 PUSH1 0x2 DUP2 SWAP1 SSTORE POP PUSH2 0x1D91 PUSH2 0x1BCF JUMP JUMPDEST PUSH1 0x4 DUP2 SWAP1 SSTORE POP JUMPDEST JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 PUSH1 0x1 SLOAD GT ISZERO PUSH2 0x1DAF JUMPI PUSH1 0x0 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 DUP3 GT ISZERO ISZERO PUSH2 0x1DBF JUMPI PUSH1 0x0 PUSH1 0x0 REVERT JUMPDEST DUP2 DUP4 MLOAD LT ISZERO ISZERO ISZERO PUSH2 0x1DD0 JUMPI PUSH1 0x0 PUSH1 0x0 REVERT JUMPDEST DUP3 MLOAD PUSH1 0x1 DUP2 SWAP1 SSTORE POP PUSH1 0x0 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x1E85 JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x1DF4 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x5 DUP3 PUSH1 0x1 ADD PUSH2 0x100 DUP2 LT ISZERO ISZERO PUSH2 0x1E27 JUMPI INVALID JUMPDEST ADD PUSH1 0x0 JUMPDEST POP DUP2 SWAP1 SSTORE POP DUP1 PUSH1 0x1 ADD PUSH2 0x105 PUSH1 0x0 DUP6 DUP5 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x1E47 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SHA3 DUP2 SWAP1 SSTORE POP JUMPDEST DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH2 0x1DDD JUMP JUMPDEST DUP2 PUSH1 0x0 DUP2 SWAP1 SSTORE POP JUMPDEST JUMPDEST POP POP POP JUMP STOP LOG1 PUSH6 0x627A7A723058 SHA3 AND DUP9 SWAP16 SMOD BLOCKHASH CREATE PUSH20 0xD397F9D00B0D19900FB050B957E3E2942F861085 0xbe 0xb9 0xba 0xab XOR STOP 0x29 &lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;	&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;sourceMap&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;2715:10853:0:-;;;3523:112;;;;;;;3552:18;3574:8;:27;;;;;;;;;;;:::i;:::-;;;;;;;;;;;3596:3;3574:27;;;;;;;;;;;;;;;;;;;;;;;3605:26;3616:8;3605:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3626:1;3629;3605:10;;;;;:26;;;:::i;:::-;3523:112;;2715:10853;;7697:168;7585:1;7571:11;;:15;7567:26;;;7588:5;;;7567:26;7800:23;7813:9;7800:12;;;;;:23;;;:::i;:::-;7827:34;7842:7;7851:9;7827:14;;;;;:34;;;:::i;:::-;7595:1;7697:168;;;;:::o;6966:115::-;7585:1;7571:11;;:15;7567:26;;;7588:5;;;7567:26;7048:6;7033:12;:21;;;;7070:7;:5;;;;;:7;;;:::i;:::-;7058:9;:19;;;;7595:1;6966:115;;:::o;3977:349::-;4171:6;7585:1;7571:11;;:15;7567:26;;;7588:5;;;7567:26;4088:1;4076:9;:13;4068:22;;;;;;;;4120:9;4102:7;:14;:27;;4094:36;;;;;;;;4148:7;:14;4134:11;:28;;;;4180:1;4171:10;;4166:131;4187:7;:14;4183:1;:18;4166:131;;;4238:7;4246:1;4238:10;;;;;;;;;;;;;;;;;;4233:16;;4215:8;4228:1;4224;:5;4215:15;;;;;;;;;;;;:34;;;;;4291:1;4287;:5;4254:12;:30;4272:7;4280:1;4272:10;;;;;;;;;;;;;;;;;;4267:16;;4254:30;;;;;;;;;;;:38;;;;4166:131;4203:3;;;;;4166:131;;;4313:9;4300:10;:22;;;;7595:1;3977:349;;;;:::o;12529:73::-;12572:4;12593:6;12587:3;:12;;;;;;;;12580:19;;12529:73;;:::o;2715:10853::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;	&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;linkReferences&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To verify the byte-code above, a patched version is deployed at
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;etherscan.io&#x2F;address&#x2F;0x21C9E434c669c4d73f55215A6F2130A185E127AC#code&quot;&gt;&lt;code&gt;0x21C9E434c669c4d73f55215A6F2130A185E127AC&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;
to be reviewed. The compiler settings used can be extracted from the following
meta-data:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;compiler&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;version&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;0.4.10+commit.f0d539ae&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;language&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Solidity&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;output&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;abi&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_owner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;removeOwner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_addr&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;isOwner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bool&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;m_numOwners&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;m_lastDay&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;resetSpentToday&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;m_spentToday&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_owner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;addOwner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;m_required&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_h&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;confirm&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;o_success&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bool&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_newLimit&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;setDailyLimit&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_to&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_value&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_data&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bytes&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;execute&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;o_hash&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_operation&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;revoke&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_newRequired&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;changeRequirement&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_operation&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_owner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;hasConfirmed&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bool&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;ownerIndex&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;getOwner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_from&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_to&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;changeOwner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;m_dailyLimit&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;outputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;function&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;constructor&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;payable&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;fallback&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;anonymous&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;owner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;operation&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Confirmation&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;event&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;anonymous&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;owner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;operation&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Revoke&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;event&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;anonymous&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;oldOwner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;newOwner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;OwnerChanged&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;event&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;anonymous&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;newOwner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;OwnerAdded&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;event&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;anonymous&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;oldOwner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;OwnerRemoved&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;event&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;anonymous&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;newRequirement&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;RequirementChanged&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;event&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;anonymous&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_from&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;value&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Deposit&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;event&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;anonymous&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;owner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;value&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;to&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;data&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bytes&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;created&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;SingleTransact&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;event&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;anonymous&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;owner&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;operation&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;value&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;to&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;data&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bytes&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;created&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;MultiTransact&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;event&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;anonymous&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;operation&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;initiator&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;value&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;to&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;data&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bytes&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;ConfirmationNeeded&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;type&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;event&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;devdoc&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;methods&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;userdoc&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;methods&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;settings&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;compilationTarget&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;browser&#x2F;WalletLibrary.sol&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;WalletLibrary&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;libraries&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;optimizer&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;enabled&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;runs&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;200&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;remappings&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;sources&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;browser&#x2F;WalletLibrary.sol&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;keccak256&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;0xf72fcdc85e15f93172878ca6a61fb81604d1052e9e724bc3896d65b3b4ab1bb0&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;urls&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bzzr:&#x2F;&#x2F;009bd59bd78f59804eaffb6111d341caea58888f8e5b5f75aebdf009fc6136c0&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;version&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The differences to the originally deployed contract code can be reviewed at:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;parity-contracts&#x2F;0x863df6bfa4&#x2F;pull&#x2F;2&quot;&gt;parity-contracts&#x2F;0x863df6bfa4#2&lt;&#x2F;a&gt;:
Remove the &lt;code&gt;selfdestruct()&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;parity-contracts&#x2F;0x863df6bfa4&#x2F;pull&#x2F;3&quot;&gt;parity-contracts&#x2F;0x863df6bfa4#3&lt;&#x2F;a&gt;:
Initialize the library owner to &lt;code&gt;0x0&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The following sections propose two equivalent specifications, 999a and 999b,
which technically achieve the same results. To implement this proposal only one
of them has to be applied.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;direct-state-transition-via-bytecode-999a&quot;&gt;Direct State Transition via Bytecode (999a)&lt;&#x2F;h3&gt;
&lt;p&gt;At &lt;code&gt;CNSTNTNPL_FORK_BLKNUM&lt;&#x2F;code&gt;, directly recreate the account
&lt;code&gt;0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4&lt;&#x2F;code&gt; with the following parameters:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Nonce: &lt;code&gt;0x1&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Code:&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;0x606060405236156100ef576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063173825d91461016d5780632f54bf6e146101a35780634123cb6b146101f157806352375093146102175780635c52c2f51461023d578063659010e71461024f5780637065cb4814610275578063746c9171146102ab578063797af627146102d1578063b20d30a91461030d578063b61d27f61461032d578063b75c7dc61461039c578063ba51a6df146103c0578063c2cf7326146103e0578063c41a360a1461043b578063f00d4b5d1461049b578063f1736d86146104f0575b61016b5b6000341115610168577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3334604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5b565b005b341561017557fe5b6101a1600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610516565b005b34156101ab57fe5b6101d7600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610659565b604051808215151515815260200191505060405180910390f35b34156101f957fe5b610201610691565b6040518082815260200191505060405180910390f35b341561021f57fe5b610227610697565b6040518082815260200191505060405180910390f35b341561024557fe5b61024d61069d565b005b341561025757fe5b61025f6106d7565b6040518082815260200191505060405180910390f35b341561027d57fe5b6102a9600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106dd565b005b34156102b357fe5b6102bb610829565b6040518082815260200191505060405180910390f35b34156102d957fe5b6102f360048080356000191690602001909190505061082f565b604051808215151515815260200191505060405180910390f35b341561031557fe5b61032b6004808035906020019091905050610dcc565b005b341561033557fe5b61037e600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919080359060200190820180359060200191909192905050610e06565b60405180826000191660001916815260200191505060405180910390f35b34156103a457fe5b6103be60048080356000191690602001909190505061127d565b005b34156103c857fe5b6103de6004808035906020019091905050611392565b005b34156103e857fe5b61042160048080356000191690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061141a565b604051808215151515815260200191505060405180910390f35b341561044357fe5b610459600480803590602001909190505061149c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104a357fe5b6104ee600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506114bf565b005b34156104f857fe5b610500611672565b6040518082815260200191505060405180910390f35b600060003660405180838380828437820191505092505050604051809103902061053f81611678565b156106535761010560008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549150600082141561057f57610652565b600160015403600054111561059357610652565b6000600583610100811015156105a557fe5b0160005b5081905550600061010560008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506105e6611890565b6105ee6119d0565b7f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da83604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b5b5b505050565b6000600061010560008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541190505b919050565b60015481565b60045481565b6000366040518083838082843782019150509250505060405180910390206106c481611678565b156106d35760006003819055505b5b5b50565b60035481565b60003660405180838380828437820191505092505050604051809103902061070481611678565b156108245761071282610659565b1561071c57610823565b610724611890565b60fa600154101515610739576107386119d0565b5b60fa60015410151561074a57610823565b6001600081548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff1660056001546101008110151561078557fe5b0160005b508190555060015461010560008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c382604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b5b5b5050565b60005481565b600060008261083d81611678565b15610dc45760006101086000866000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415806108c757506000610108600086600019166000191681526020019081526020016000206001015414155b80610906575060006101086000866000191660001916815260200190815260200160002060020180546001816001161561010002031660029004905014155b15610dc25760006101086000866000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610a5057610a496101086000866000191660001916815260200190815260200160002060010154610108600087600019166000191681526020019081526020016000206002018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a3f5780601f10610a1457610100808354040283529160200191610a3f565b820191906000526020600020905b815481529060010190602001808311610a2257829003601f168201915b5050505050611b37565b9150610b71565b6101086000856000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166101086000866000191660001916815260200190815260200160002060010154610108600087600019166000191681526020019081526020016000206002016040518082805460018160011615610100020316600290048015610b4a5780601f10610b1f57610100808354040283529160200191610b4a565b820191906000526020600020905b815481529060010190602001808311610b2d57829003601f168201915b505091505060006040518083038185876185025a03f1925050501515610b705760006000fd5b5b7fe3a3a4111a84df27d76b68dc721e65c7711605ea5eee4afd3a9c58195217365c338561010860008860001916600019168152602001908152602001600020600101546101086000896000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661010860008a6000191660001916815260200190815260200160002060020187604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200186600019166000191681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015610d475780601f10610d1c57610100808354040283529160200191610d47565b820191906000526020600020905b815481529060010190602001808311610d2a57829003601f168201915b505097505050505050505060405180910390a16101086000856000191660001916815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160009055600282016000610db79190611be6565b505060019250610dc3565b5b5b5b5050919050565b600036604051808383808284378201915050925050506040518091039020610df381611678565b15610e0157816002819055505b5b5b5050565b60006000610e1333610659565b1561127357600084849050148015610e305750610e2f85611b51565b5b80610e3d57506001600054145b15610fed5760008673ffffffffffffffffffffffffffffffffffffffff161415610ea457610e9d8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050611b37565b9050610ef3565b8573ffffffffffffffffffffffffffffffffffffffff168585856040518083838082843782019150509250505060006040518083038185876185025a03f1925050501515610ef25760006000fd5b5b7f9738cd1a8777c86b011f7b01d87d484217dc6ab5154a9d41eda5d14af8caf292338688878786604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281038252858582818152602001925080828437820191505097505050505050505060405180910390a1611271565b6000364360405180848480828437820191505082815260200193505050506040518091039020915060006101086000846000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148015611099575060006101086000846000191660001916815260200190815260200160002060010154145b80156110d85750600061010860008460001916600019168152602001908152602001600020600201805460018160011615610100020316600290049050145b1561118f57856101086000846000191660001916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550846101086000846000191660001916815260200190815260200160002060010181905550838361010860008560001916600019168152602001908152602001600020600201919061118d929190611c2e565b505b6111988261082f565b1515611270577f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf328233878988886040518087600019166000191681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b5b5b5b5b50949350505050565b60006000600061010560003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054925060008314156112be5761138c565b8260020a9150610106600085600019166000191681526020019081526020016000209050600082826001015416111561138b5780600001600081548092919060010191905055508181600101600082825403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b3385604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182600019166000191681526020019250505060405180910390a15b5b50505050565b6000366040518083838082843782019150509250505060405180910390206113b981611678565b15611415576001548211156113cd57611414565b816000819055506113dc611890565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da826040518082815260200191505060405180910390a15b5b5b5050565b600060006000600061010660008760001916600019168152602001908152602001600020925061010560008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549150600082141561147f5760009350611493565b8160020a9050600081846001015416141593505b50505092915050565b6000600560018301610100811015156114b157fe5b0160005b505490505b919050565b60006000366040518083838082843782019150509250505060405180910390206114e881611678565b1561166b576114f683610659565b156115005761166a565b61010560008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549150600082141561153b5761166a565b611543611890565b8273ffffffffffffffffffffffffffffffffffffffff166005836101008110151561156a57fe5b0160005b5081905550600061010560008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508161010560008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c8484604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b5b5b50505050565b60025481565b600060006000600061010560003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054925060008314156116bb57611888565b6101066000866000191660001916815260200190815260200160002091506000826000015414156117455760005482600001819055506000826001018190555061010780548091906001016117109190611cae565b826002018190555084610107836002015481548110151561172d57fe5b906000526020600020900160005b5081600019169055505b8260020a90506000818360010154161415611887577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda3386604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182600019166000191681526020019250505060405180910390a16001826000015411151561185e57610107610106600087600019166000191681526020019081526020016000206002015481548110151561180a57fe5b906000526020600020900160005b5060009055610106600086600019166000191681526020019081526020016000206000600082016000905560018201600090556002820160009055505060019350611888565b8160000160008154809291906001900391905055508082600101600082825417925050819055505b5b5b505050919050565b60006000610107805490509150600090505b818110156119bc576101086000610107838154811015156118bf57fe5b906000526020600020900160005b50546000191660001916815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560018201600090556002820160006119269190611be6565b505060006001026101078281548110151561193d57fe5b906000526020600020900160005b5054600019161415156119b05761010660006101078381548110151561196d57fe5b906000526020600020900160005b505460001916600019168152602001908152602001600020600060008201600090556001820160009055600282016000905550505b5b8060010190506118a2565b61010760006119cb9190611cda565b5b5050565b6000600190505b600154811015611b33575b60015481108015611a095750600060058261010081101515611a0057fe5b0160005b505414155b15611a1b5780806001019150506119e2565b5b6001600154118015611a4557506000600560015461010081101515611a3d57fe5b0160005b5054145b15611a625760016000815480929190600190039190505550611a1c565b60015481108015611a8b57506000600560015461010081101515611a8257fe5b0160005b505414155b8015611aac5750600060058261010081101515611aa457fe5b0160005b5054145b15611b2e57600560015461010081101515611ac357fe5b0160005b505460058261010081101515611ad957fe5b0160005b508190555080610105600060058461010081101515611af857fe5b0160005b50548152602001908152602001600020819055506000600560015461010081101515611b2457fe5b0160005b50819055505b6119d7565b5b50565b600081516020830184f09050803b15610000575b92915050565b6000611b5c33610659565b15611bc957600454611b6c611bcf565b1115611b89576000600381905550611b82611bcf565b6004819055505b600354826003540110158015611ba55750600254826003540111155b15611bc3578160036000828254019250508190555060019050611bc8565b600090505b5b5b919050565b60006201518042811515611bdf57fe5b0490505b90565b50805460018160011615610100020316600290046000825580601f10611c0c5750611c2b565b601f016020900490600052602060002090810190611c2a9190611cfc565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611c6f57803560ff1916838001178555611c9d565b82800160010185558215611c9d579182015b82811115611c9c578235825591602001919060010190611c81565b5b509050611caa9190611cfc565b5090565b815481835581811511611cd557818360005260206000209182019101611cd49190611d21565b5b505050565b5080546000825590600052602060002090810190611cf89190611d21565b5b50565b611d1e91905b80821115611d1a576000816000905550600101611d02565b5090565b90565b611d4391905b80821115611d3f576000816000905550600101611d27565b5090565b90565b60006001541115611d575760006000fd5b611d6081611d71565b611d6a8383611d9c565b5b5b505050565b60006001541115611d825760006000fd5b80600281905550611d91611bcf565b6004819055505b5b50565b600060006001541115611daf5760006000fd5b600082111515611dbf5760006000fd5b81835110151515611dd05760006000fd5b8251600181905550600090505b8251811015611e85578281815181101515611df457fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1660058260010161010081101515611e2757fe5b0160005b50819055508060010161010560008584815181101515611e4757fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b806001019050611ddd565b816000819055505b5b5050505600a165627a7a7230582084feb3505964efa62a6ffa78d913a175fe7bc168dd50067d25b1d5ddb6d10a1e0029&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Storage:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;0x0000000000000000000000000000000000000000000000000000000000000000&lt;&#x2F;code&gt;:
&lt;code&gt;0x0000000000000000000000000000000000000000000000000000000000000001&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;0x0000000000000000000000000000000000000000000000000000000000000001&lt;&#x2F;code&gt;:
&lt;code&gt;0x0000000000000000000000000000000000000000000000000000000000000001&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;0x0000000000000000000000000000000000000000000000000000000000000004&lt;&#x2F;code&gt;:
&lt;code&gt;0x00000000000000000000000000000000000000000000000000000000000044e1&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;0xa5baec7d73105a3c7298203bb205bbc41b63fa384ae73a6016b890a7ca29ae2d&lt;&#x2F;code&gt;:
&lt;code&gt;0x0000000000000000000000000000000000000000000000000000000000000001&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The balance of the account shall be left unchanged.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;alternate-specification-via-codehash-999b&quot;&gt;Alternate Specification via Codehash (999b)&lt;&#x2F;h3&gt;
&lt;p&gt;At &lt;code&gt;CNSTNTNPL_FORK_BLKNUM&lt;&#x2F;code&gt;, directly recreate the account
&lt;code&gt;0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4&lt;&#x2F;code&gt; with the following parameters:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Nonce: &lt;code&gt;0x1&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Storage:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;0x0000000000000000000000000000000000000000000000000000000000000000&lt;&#x2F;code&gt;:
&lt;code&gt;0x0000000000000000000000000000000000000000000000000000000000000001&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;0x0000000000000000000000000000000000000000000000000000000000000001&lt;&#x2F;code&gt;:
&lt;code&gt;0x0000000000000000000000000000000000000000000000000000000000000001&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;0x0000000000000000000000000000000000000000000000000000000000000004&lt;&#x2F;code&gt;:
&lt;code&gt;0x00000000000000000000000000000000000000000000000000000000000044e1&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;0xa5baec7d73105a3c7298203bb205bbc41b63fa384ae73a6016b890a7ca29ae2d&lt;&#x2F;code&gt;:
&lt;code&gt;0x0000000000000000000000000000000000000000000000000000000000000001&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;In addition, the codehash at that address shall be replaced by the codehash at
address &lt;code&gt;0x21C9E434c669c4d73f55215A6F2130A185E127AC&lt;&#x2F;code&gt;. The codehash is
&lt;code&gt;0x6209d55547da7b035d54ef8d73275e863d3072b91da6ace1614fa6381f4e2c09&lt;&#x2F;code&gt;. The
balance of the account shall be left unchanged.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;The design decision to restore the &lt;code&gt;WalletLibrary&lt;&#x2F;code&gt; contract code in a single
state transition was made after lengthy discussions of
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gist.github.com&#x2F;5chdn&#x2F;a9bb8617cc8523a030126a3d1c60baf3&quot;&gt;alternate proposals&lt;&#x2F;a&gt;
that explored different ways to improve the Ethereum protocol to allow contract
revivals by adding different built-in contracts. It was eventually concluded
that all of these proposals changing the EVM semantics around self-destructed
contracts were introducing unwanted side-effects and
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;medium.com&#x2F;@weka&#x2F;on-paritys-proposed-changes-to-selfdestruct-behaviour-c3f0e5bc0f49&quot;&gt;potential risks&lt;&#x2F;a&gt;
to the existing smart-contract ecosystem on the Ethereum platform.&lt;&#x2F;p&gt;
&lt;p&gt;The total supply of Ether is neither changed nor does this proposal require the
transfer of any tokens or assets including Ether. It is assumed that this change
is aligned with the interests both of (A) Parity Technologies that intended to
provide a smart-contracts library for multi-signature wallets to last forever
for its users and (B) the users of the multi-signature wallets that meant to
safely store their assets in a contract accessible any time they desire. Lastly,
the client-side implementation cost of this proposal is estimated to be low. A
sample implementation will be attached and linked in the following sections.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;This proposal introduces backwards incompatibilities in the state of the
contract at &lt;code&gt;0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4&lt;&#x2F;code&gt;. The Ethereum protocol
does not allow the restoration of self-destructed contracts. To implement this
on the Ethereum blockchain, it is recommended to add the necessary state
transition in a future hard-fork at a well-defined block number, e.g.,
&lt;code&gt;CNSTNTNPL_FORK_BLKNUM&lt;&#x2F;code&gt; for the Constantinople milestone which is supposed to be
the next scheduled hard-fork on the Ethereum road-map.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;A proof-of-concept implementation is available for the Parity client on branch
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;paritytech&#x2F;parity&#x2F;compare&#x2F;a5-eip999-poc&quot;&gt;&lt;code&gt;a5-eip999-poc&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;
(&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;paritytech&#x2F;parity&#x2F;pull&#x2F;8406&quot;&gt;#8406&lt;&#x2F;a&gt;). A sample chain
configuration for Parity can be found at the same branch in
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;paritytech&#x2F;parity&#x2F;blob&#x2F;891e633021eec78dd62104bf5a99af50f66b06c7&#x2F;ethcore&#x2F;res&#x2F;ethereum&#x2F;multisig_test.json#L38-L51&quot;&gt;&lt;code&gt;multisig_test.json&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;
describing the state change as specified above.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Reward clients for a sustainable network</title>
        <published>2018-03-01T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>James Ray</name><uri>https://github.com/jamesray1</uri>
	</author>
	
	<author>
		<name>Micah Zoltu</name><uri>https://github.com/MicahZoltu</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/908/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://ethereum-magicians.org/t/eip-908-reward-full-nodes-and-clients/241" />
        

        <id>https://wg-eips.ritovision.com/908/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        

        
        <category
            term="tag:eip:908"
            label="EIP-908" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/908/">&lt;h2 id=&quot;a-reward-for-running-a-full-node-is-deprecated-but-the-proposal-for-a-reward-for-clients-remains&quot;&gt;A reward for running a full node is deprecated, but the proposal for a reward for clients remains&lt;&#x2F;h2&gt;
&lt;p&gt;While Casper validators are incentivized to validate transactions, there are still no incentives for relaying blocks and storing data (which includes state). This paper is more a high-level analysis and discussion rather than attempting to provide a concrete solution. &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.pokt.network&#x2F;&quot;&gt;Pocket Network&lt;&#x2F;a&gt; is a separate blockchain being designed as of Sept 2018 that incentivises relaying transactions, that is intended to be compatible with other blockchains. Note also that &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rocket-pool&#x2F;rocketpool&quot;&gt;Rocket Pool&lt;&#x2F;a&gt; is under development and is planned to be a pool for Casper, which will help to incentivise running a full node. Another alternative is &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;vipnode&#x2F;vipnode.org&quot;&gt;VIPnode&lt;&#x2F;a&gt; which charges fees to light clients for full nodes that serve them. In light of these solutions being developed, perhaps a more appropriate approach to generally rewarding clients would be to incentivize bandwidth (relaying and downloading), storage and I&#x2F;O (while computation is already incentivized with gas for miners and will be for proposers under sharding and Casper). Note also that notaries will be incentivized to download collations under sharding. Outdated (Casper FFG will be implemented with Ethereum 2.0 with sharding: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;notes.ethereum.org&#x2F;SCIg8AH5SA-O4C1G1LYZHQ#&quot;&gt;shasper&lt;&#x2F;a&gt;): given that it looks like Casper FFG will be implemented soon, to minimize undue complexity to the protocol, incentivizing validation in the mean time may be considered not worthwhile. For a previous version of the proposal containing a proposal for rewarding a full node, refer to &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;EIPs&#x2F;commit&#x2F;97e235d0ba4a88b4ce29834aa2b94107b8d91e12#diff-9a43a8739b5a9e1dec427324cb264921&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;simple-summary&quot;&gt;Simple Summary&lt;&#x2F;h2&gt;
&lt;p&gt;When each transaction is validated, give a reward to clients for developing the client.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;The tragedy of the commons is a phenomenon that is well known in many sectors, most notably in regard to sustainability. It involves the over-utilization of shared finite resources, which detriments all participants and stakeholders involved (which in the case of a global public good can be everyone, including future generations). Without proper management of public resources, a tragedy of the commons can occur. Internalizing externalities (where externalities can be broadly defined as effects that are not accounted for in the intrinsic price of a good, service or resource) is one way of incentivizing the proper management of resources, although other methods that actually properly manage them are necessary. This EIP proposes to make a change to the protocol to provide a reward to clients for providing the software that enables Ethereum to function, where the reward can include a proportion of transaction fees (reducing the full proportion that the miner currently receives), and some newly minted ETH. Thus, clients are incentivized to maintain and improve the security and health of the Ethereum protocol and ecosystem. To summarize the mechanism in the proposal, a user agent is attached to a transaction, where this user agent contains a vector with the index of a client address in an access list. The client address could be inserted by the client and verified that it is the same as a read-only constant in the client&#x27;s storage.&lt;&#x2F;p&gt;
&lt;p&gt;Reward mechanisms that are external to being built in to the protocol are beyond the scope of this EIP. Such extra-protocol reward methods include state channel payments for extra services such as light client servers providing faster information such as receipts; state channel payments for buying state reads from full nodes; archival services (which is only applicable to future proposed versions of Ethereum with stateless clients); and tokens for the client and running full nodes.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;Currently there is a lack of incentives for anyone to run a full node, while joining a mining pool is not really economical if one has to purchase a mining rig (several GPUs) now, since there is unlikely to be a return on investment by the time that Ethereum transitions to hybrid Proof-of-Work&#x2F;Proof-of-Stake with &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1011&#x2F;&quot;&gt;Casper FFG&lt;&#x2F;a&gt;, then full PoS with &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;research&#x2F;blob&#x2F;master&#x2F;papers&#x2F;CasperTFG&#x2F;CasperTFG.pdf&quot;&gt;CBC Casper&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Additionally, providing a reward for clients gives a revenue stream that is independent of state channels or other layer 2 mechanisms, which are less secure, although this insecurity can be offset by mechanisms such as insurance, bonded payments and time locks. Rationalising that investors may invest in a client because it is an enabler for the Ethereum ecosystem (and thus opening up investment opportunities) may not scale very well, and it seems that it is more sustainable to monetize the client as part of the service(s) that it provides.&lt;&#x2F;p&gt;
&lt;p&gt;While it may be argued that the funds raised by the Ethereum pre-mine (the pre-ICO and the ICO) can be used to fund client development, that argument is questionable, since Parity is VC-funded, and other clients such as Prysmatic Labs &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;medium.com&#x2F;@XYOracleNetwork?source=search_post&quot;&gt;1&lt;&#x2F;a&gt;, &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;twitter.com&#x2F;prylabs&#x2F;status&#x2F;996391036753666050&quot;&gt;2&lt;&#x2F;a&gt;, &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;medium.com&#x2F;prysmatic-labs&#x2F;biweekly-development-update-2-d29d0c91e7d0&quot;&gt;3&lt;&#x2F;a&gt; and &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;medium.com&#x2F;compound-finance&#x2F;introducing-exthereum-the-newest-ethereum-client-7a5e30d4d6aa&quot;&gt;exthereum&lt;&#x2F;a&gt; have received funding from other parties, whereas perhaps they would not have needed to do so if there was sufficient funding from the Ethereum pre-mine funds. &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;Drops-of-Diamond&#x2F;diamond_drops&quot;&gt;Drops of Diamond&lt;&#x2F;a&gt; is yet to receive any funding.&lt;&#x2F;p&gt;
&lt;p&gt;Incentivizing client development would more directly incentivize resource provision in the protocol, preventing a tragedy of the commons, where there is an extreme lack of supply and excess demand, leading to the protocol being unusable.&lt;&#x2F;p&gt;
&lt;p&gt;See &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;eprint.iacr.org&#x2F;2014&#x2F;452.pdf#subsection.2.1&quot;&gt;here&lt;&#x2F;a&gt; for an analysis in the context of Bitcoin, PoW, and a hybrid PoW&#x2F;PoS protocol. While Ethereum has a gas limit, the section points out that this is not enough as the market cap increases and the incentive to attack the network increases, while the ratio of security costs to transaction fees does not, while PoS will further alleviate the problem. However, the section points out that PoS is not enough, since the costs of propagating, verifying and storing transactions are not incentivised. Note that the &quot;Proof of Activity: Extending Bitcoin’s Proof of Work via Proof of Stake&quot; paper also contains a scheme for incentivizing a target participation level.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;The word “activity” in the phrase Proof of  Activity emphasizes the point that only active stakeholders who maintain a full online node get rewarded, in exchange for the vital services that they provide for the network.  This stands in contrast to earlier Proof  of  Stake schemes in which offline stake can accumulate weight over time, and may ultimately be utilized in double-spending attacks.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;We can also incentivize full nodes to propagate transactions and to store transactions or state, in addition to verifying them. While these first two incentivizations are outside the scope of this EIP, there are proposals &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ethresear.ch&#x2F;t&#x2F;incentivizing-a-robust-p2p-network-relay-layer&#x2F;1438&quot;&gt;here&lt;&#x2F;a&gt; and &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ethresear.ch&#x2F;t&#x2F;incentivizing-full-state-nodes&#x2F;1640&quot;&gt;here&lt;&#x2F;a&gt;, respectively.&lt;&#x2F;p&gt;
&lt;p&gt;Implementing this as a layer 2 solution may not ensure the sustainability of the protocol, since not everyone would use it; if the protocol doesn&#x27;t have any cost for full nodes to validate transactions, then people will take advantage of that and not use the layer 2 solution. It seems that you should at least have the part where the reward is provided in protocol, but then that and the user agent signature doesn&#x27;t really add anything else to the protocol, so doing some part in-protocol and some part e.g. the verification or a verification-game off-protocol could be done, but it&#x27;s already done in protocol. Note also that some computationally expensive tasks are too challenging to feasibly do in protocol, e.g. due to not fitting in the gas limit, could be done with Truebit, where verifiers have an incentive.&lt;&#x2F;p&gt;
&lt;p&gt;Not providing incentives for clients is an issue now as there is less incentive to build a client that aligns with the needs of users, funds need to be raised externally to the protocol to fund client development, which is not as decentralized. If only a smaller subset is able to fund client development, such as VCs, angel investors and institutional investors, that may not align well with the interests of all current and potential stakeholders of Ethereum (which includes future stakeholders). Ostensibly, one of the goals of Ethereum is to decentralize everything, including wealth, or in other words, to improve wealth equality. Not providing incentives for full nodes validating transactions may not seem like as much of an issue now, but not doing so could hinder the growth of the protocol. Of course, incentives aren&#x27;t enough, it also needs to be technically decentralized so that it is ideally possible for a low-end mainstream computer or perhaps even a mobile or embedded IoT device to be a verifying full node, or at least to be able to help with securing the network if it is deemed impractical for them to be a full node.&lt;&#x2F;p&gt;
&lt;p&gt;Note that with a supply cap (as in &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;EIPs&#x2F;issues&#x2F;960&quot;&gt;EIP-960&lt;&#x2F;a&gt;, the issuance can be prevented from increasing indefinitely. Alternatively, it could at least be reduced (still potentially but not necessarily to zero, or to the same rate at which Ether is burnt when slashing participants, such as validators under a Casper PoS scheme or notaries under a sharding scheme), e.g. by hard forks, or as per &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1015&#x2F;&quot;&gt;EIP-1015&lt;&#x2F;a&gt;, an on-chain contract governed by a decision assembly that gets signalling from other contracts that represent some set of stakeholders.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;Add a new field to each block called &lt;code&gt;PrevBlockVerifications&lt;&#x2F;code&gt;, which is an arbitrary, unlimited size byte array. When a client verifies that a previous block is &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ethereum.github.io&#x2F;yellowpaper&#x2F;paper.pdf#subsubsection.4.3.2&quot;&gt;valid&lt;&#x2F;a&gt;, the client appends a user agent to PrevBlockVerifications via an opcode in a transaction, PREV_BLOCK_VERIF. The user agent is a vector with the  immutable fields: the blockhash of the block that is validated, and the index of a client address in an access list (details are below). A miner validates a transaction before including it in a block, however they are not able to change these fields of the vector because they&#x27;re immutable.&lt;&#x2F;p&gt;
&lt;p&gt;Send 0.15 ETH to the client (see the rationale below), when the block is processed. The amounts could include a proportion of transaction fees (while the miner would then receive less), which would reduce newly issued ETH. These amounts are specified in new &lt;code&gt;ClientReward&lt;&#x2F;code&gt; fields in the block.&lt;&#x2F;p&gt;
&lt;p&gt;In order to only incentivize verifying recent blocks, assert that the block number corresponding to a blockhash is less than 400 blocks ago.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;attacks-and-added-specifications-to-prevent-them&quot;&gt;Attacks and added specifications to prevent them&lt;&#x2F;h3&gt;
&lt;p&gt;A miner could create a client and fill their block with transactions that only contain the PREV_BLOCK_VERIF opcode (or alternatively, arbitrarily complex transactions, still with the opcode), with previous blockhashes that they have validated and the address of their client. To prevent this, state would have to store a list containing lists, with each sublist listing the blockhashes up to 400 blocks ago that correspond to a miner, then a miner (or a proposer under Casper CBC) could have to put down a deposit, and be slashed if the proposer inserts such a transaction (that contains a blockhash which they have already proposed, not just in a block but at any time previously). Updating the state to remove blockhashes more than 400 blocks ago would add additional overhead, although you could add an extra window for older blocks, say 120,000 blocks (roughly every 3 weeks), still ignore blocks that are older than 400 blocks ago, and remove these older 120,000 blocks every 120,000 blocks. An attacker could bribe a miner&#x2F;proposer to include transactions like above that contain an address of a client in the access list which they own. However, the above slashing condition should disincentivize this.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;more-details-on-the-access-list&quot;&gt;More details on the access list&lt;&#x2F;h3&gt;
&lt;p&gt;The access list prevents anyone inserting any address to the first element of the vector, where there may be a way to prevent censorship and centralization of authority of who decides to register new addresses in the list, e.g. on-chain governance with signalling (possibly similar to &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;1015&#x2F;&quot;&gt;EIP-1015&lt;&#x2F;a&gt;, which also specifies an alternative way of sending funds) or a layer 2 proof of authority network where new addresses can be added via a smart contract. Note that there may be serious drawbacks to implementing either of these listed examples. There is a refutation of &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;medium.com&#x2F;@Vlad_Zamfir&#x2F;against-on-chain-governance-a4ceacd040ca&quot;&gt;on-chain governance&lt;&#x2F;a&gt; as well as of &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;vitalik.ca&#x2F;general&#x2F;2018&#x2F;03&#x2F;28&#x2F;plutocracy.html&quot;&gt;plutocracy&lt;&#x2F;a&gt;. &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Proof-of-authority&quot;&gt;Proof of Authority&lt;&#x2F;a&gt; isn&#x27;t suitable for a public network since it doesn&#x27;t distribute trust well. However, using signalling in layer 2 contracts is more acceptable, but Vlad Zamfir argues that using that to influence outcomes in the protocol can disenfranchise miners from being necessary participants in the governance process. Thus, in light of these counterpoints, having an access list may not be suitable until a decentralized, trustless way of maintaining it is implemented and ideally accepted by the majority of a random sample that represents the population of Ethereum users.&lt;&#x2F;p&gt;
&lt;p&gt;However, another alternative to managing the access list would be to have decentralized verification that the address produced from querying an index in the access list does correspond to that of a &quot;legitimate&quot; client. Part of this verification would involve checking that there is a client that claims that this address is owned by them, that they are happy to receive funds in this manner and agree or arranged to putting the address in the access list, and that the client passes all tests in the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ethereum&#x2F;tests&quot;&gt;Ethereum test suite&lt;&#x2F;a&gt;. However, this last proviso would then preclude new clients being funded from the start of development, although such would-be clients would not be able to receive funds in-protocol until they implement the client anyway (as an aside, they could raise funds in various ways—a DAII, pronounced die-yee, is recommended, while a platform for DAIIs is under development by &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;dogezer.com&#x2F;&quot;&gt;Dogezer&lt;&#x2F;a&gt;). All of this could be done off-chain, and if anyone found that some address in the access list was not legitimate, then they could challenge that address with a proof of illegitimacy, and the participant that submitted the address to the access list could be slashed (while they must hold a deposit in order to register and keep an address in the access list).&lt;&#x2F;p&gt;
&lt;p&gt;Additionally, it should help with being only able to read the client&#x27;s address from the client, and the whole transaction could revert if the address is not in the access list. You could provide the index of the address in the access list, and then you could &lt;code&gt;assert&lt;&#x2F;code&gt; that the address found at that index matches that which can be read by the client (where the latter would be a read-only address).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;a-rough-qualitative-analysis-of-fees&quot;&gt;A rough qualitative analysis of fees&lt;&#x2F;h3&gt;
&lt;p&gt;As of May 4 2018, there are &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20180504051128&#x2F;https:&#x2F;&#x2F;ethernodes.org&#x2F;network&#x2F;1&quot;&gt;16428 nodes&lt;&#x2F;a&gt;. Assume that an annual cost for an average client developer organisation is $1 million per annum. Projecting forward (and noting that the number of nodes should increase substantially if this EIP was implemented, thus aiding Ethereum&#x27;s goal of decentralizing everything) assume that there are 10 clients. Thus let us assume that the number of nodes doubles to 30000 nodes within 5 years (this assumption is probably conservative, even if it is forward looking). Assume for simplicity that the costs of a client are entirely covered by this block reward.&lt;&#x2F;p&gt;
&lt;p&gt;Average cost per client = number of nodes * Block reward per client &#x2F; number of clients&lt;&#x2F;p&gt;
&lt;p&gt;Block reward per client (worse case for ETH price) = Average revenue per client * number of clients &#x2F; (ETH exchange rate * number of nodes)&lt;&#x2F;p&gt;
&lt;p&gt;= $2,000,000 * 10 &#x2F; (500 * 30,000)&lt;&#x2F;p&gt;
&lt;p&gt;= 1.333333333 ETH&lt;&#x2F;p&gt;
&lt;p&gt;Block reward per client (better case) = $1,000,000 * 10 &#x2F; (2000 * 30,000) = 0.166666667 ETH&lt;&#x2F;p&gt;
&lt;p&gt;Suppose that we use a block reward of 0.15 ETH for clients.&lt;&#x2F;p&gt;
&lt;!--There are more than 5552465 blocks and counting. With a reward of 0.001 ETH for each block, a full state node that verified every block would receive 5552.465 ETH. However, the difficulty of verifying blocks increases over time, so--&gt;
&lt;h3 id=&quot;more-rationale-outdated-by-above&quot;&gt;More rationale (outdated by above)&lt;&#x2F;h3&gt;
&lt;p&gt;The amount of computation to validate a transaction will be the same as a miner, since the transaction will need to be executed. Thus, if there would be transaction fees for validating full nodes and clients, and transactions need to be executed by validators just like miners have to, it makes sense to have them calculated in the same way as gas fees for miners. This would controversially increase the amount of transaction fees a lot, since there can be many validators for a transaction. In other words, it is controversial whether to provide the same amount of transaction fee for a full node validator as for a miner (which in one respect is fair, since the validator has to do the same amount of computation), or prevent transaction fees from rising much higher, and have a transaction fee for a full node as, say, the transaction fee for a miner, divided by the average number of full nodes validating a transaction. The latter option seems even more controversial (but is still better than the status quo), since while there would be more of an incentive to run a full node than there is now with no incentive, validators would be paid less for performing the same amount of computation.&lt;&#x2F;p&gt;
&lt;p&gt;And as for the absolute amounts, this will require data analysis, but clearly a full node should receive much less than a miner for processing a transaction in a block, since there are many transactions in a block, and there are many confirmations of a block. Data analysis could involve calculating the average number of full nodes verifying transactions in a block. Macroeconomic analysis could entail the economic security benefit that full nodes provide to the network.&lt;&#x2F;p&gt;
&lt;p&gt;Now, as to the ratio of rewards to the client vs the full node, as an initial guess I would suggest something like 99:1. Why such a big difference? Well, I would guess that clients spend roughly 99 times more time on developing and maintaining the client than a full node user spends running and maintaining a full node. During a week there might be several full-time people working on the client, but a full node might only spend half an hour (or less) initially setting it up, plus running it, plus electricity and internet costs. Full node operators probably don&#x27;t need to upgrade their computer (and buying a mining rig isn&#x27;t worth it with Casper PoS planning on being implemented soon).&lt;&#x2F;p&gt;
&lt;p&gt;However, on further analysis, clients would also get the benefit of a large volume of rewards from every full node running the client, so to incentivise full node operation further, the ratio could change to say, 4:1, or even 1:1, and of course could be adjusted with even further actual data analysis, rather than speculation.&lt;&#x2F;p&gt;
&lt;p&gt;Providing rewards to full node validators and to clients would increase the issuance. In order to maintain the issuance at current levels, this EIP could also reduce the mining reward (despite being reduced previously with the Byzantium release in October 2017 from 5 ETH to 3 ETH), but that would generate more controversy and discussion.&lt;&#x2F;p&gt;
&lt;p&gt;Another potential point of controversy with rewarding clients and full nodes is that the work previously done by them has not been paid for until now (except of course by the Ethereum Foundation or Parity VCs funding the work), so existing clients may say that this EIP gives an advantage to new entrants. However, this doesn&#x27;t hold up well, because existing clients have the first mover advantage, with much development to create useful and well-used products.&lt;&#x2F;p&gt;
&lt;p&gt;There is a tradeoff. Higher fees means you may cut out poor people and people who just don&#x27;t want to pay fees. But if a laptop can run a full node and get paid for it then that would offset the fees through usage. Full nodes do provide a security benefit, so the total fees given could at least be some fraction of this benefit. Fees that go towards client development incentivise a higher quality client. To me, I think it makes more sense to internalize costs as much as possible: for computation, storage, bandwidth, I&#x2F;O, client development, running full nodes, mining&#x2F;validating, etc. You avoid a tragedy of the commons through externalizing costs. The more you internalize costs, the more sustainable it is, and the less you rely on rich people being generous, etc. (Although, getting philosophical, ultimately you can&#x27;t force rich people to be generous, they have to do so out of the kindness of their hearts.)&lt;&#x2F;p&gt;
&lt;p&gt;Regarding rewards for full nodes, in the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ethresear.ch&#x2F;t&#x2F;sharding-phase-1-spec&#x2F;1407&quot;&gt;draft phase 1 sharding spec&lt;&#x2F;a&gt; proposers acting as full nodes have rewards for proposing blobs (without execution) or later in phase 3 transactions (with execution) to be included into collations&#x2F;blocks. So that would help. However, full nodes that do not act as proposers and just verify transactions, or &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ethresear.ch&#x2F;t&#x2F;incentivizing-full-state-nodes&#x2F;1640&quot;&gt;full state nodes&lt;&#x2F;a&gt;, are still not incentivized.&lt;&#x2F;p&gt;
&lt;p&gt;Note that while further quantitative analysis to specify fees should be done, some level of experimentation after implementing this method on-chain may be necessary.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;security&quot;&gt;Security&lt;&#x2F;h3&gt;
&lt;p&gt;All of the below struck out information should be prevented via using an access list and verifying that the read-only address provided by the client matches with an address in the access list, as well as using a layer 2 solution such as a PoA network for censorship resistance and minimization of centralization in the access list.&lt;&#x2F;p&gt;
&lt;p&gt;Further discussion is at https:&#x2F;&#x2F;ethresear.ch&#x2F;t&#x2F;incentives-for-running-full-ethereum-nodes&#x2F;1239.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backwards-compatibility&quot;&gt;Backwards Compatibility&lt;&#x2F;h2&gt;
&lt;p&gt;Introducing in-protocol fees is a backwards-incompatible change, so would be introduced in a hard-fork.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-cases&quot;&gt;Test Cases&lt;&#x2F;h2&gt;
&lt;p&gt;TODO&lt;&#x2F;p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;TODO&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Simpler NFT standard with batching and native atomic swaps</title>
        <published>2018-02-08T00:00:00+00:00</published>
        <updated>2026-02-11T14:48:25+00:00</updated>
	
	
	<author>
		<name>Weiwu Zhang</name><email>a@colourful.land</email>
	</author>
	
	<author>
		<name>James Sangalli</name><email>j.l.sangalli@gmail.com</email>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/875/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://github.com/ethereum/EIPs/issues/875" />
        

        <id>https://wg-eips.ritovision.com/875/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="erc"
                label="ERC" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        

        
        <category
            term="tag:eip:875"
            label="ERC-875" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/875/">&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;&#x2F;h2&gt;
&lt;p&gt;A simple non fungible token standard that allows batching tokens into lots and settling p2p atomic transfers in one transaction. You can test out an example implementation on rinkeby here: https:&#x2F;&#x2F;rinkeby.etherscan.io&#x2F;address&#x2F;0xffab5ce7c012bc942f5ca0cd42c3c2e1ae5f0005 and view the repo here: https:&#x2F;&#x2F;github.com&#x2F;alpha-wallet&#x2F;ERC-Example&lt;&#x2F;p&gt;
&lt;h2 id=&quot;purpose&quot;&gt;Purpose&lt;&#x2F;h2&gt;
&lt;p&gt;While other standards allow the user to transfer a non-fungible token, they require one transaction per token, this is heavy on gas and partially responsible for clogging the ethereum network. There are also few definitions for how to do a simple atomic swap.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rinkeby-example&quot;&gt;Rinkeby example&lt;&#x2F;h2&gt;
&lt;p&gt;This standard has been implemented in an example contract on rinkeby: https:&#x2F;&#x2F;rinkeby.etherscan.io&#x2F;address&#x2F;0xffab5ce7c012bc942f5ca0cd42c3c2e1ae5f0005&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;function-name-constant-returns-string-name&quot;&gt;function name() constant returns (string name)&lt;&#x2F;h3&gt;
&lt;p&gt;returns the name of the contract e.g. CarLotContract&lt;&#x2F;p&gt;
&lt;h3 id=&quot;function-symbol-constant-returns-string-symbol&quot;&gt;function symbol() constant returns (string symbol)&lt;&#x2F;h3&gt;
&lt;p&gt;Returns a short string of the symbol of the in-fungible token, this should be short and generic as each token is non-fungible.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;function-balanceof-address-owner-public-view-returns-uint256-balance&quot;&gt;function balanceOf(address _owner) public view returns (uint256[] balance)&lt;&#x2F;h3&gt;
&lt;p&gt;Returns an array of the users balance.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;function-transfer-address-to-uint256-tokens-public&quot;&gt;function transfer(address _to, uint256[] _tokens) public;&lt;&#x2F;h3&gt;
&lt;p&gt;Transfer your unique tokens to an address by adding an array of the token indices. This compares favourable to ERC721 as you can transfer a bulk of tokens in one go rather than one at a time. This has a big gas saving as well as being more convenient.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;function-transferfrom-address-from-address-to-uint256-tokens-public&quot;&gt;function transferFrom(address _from, address _to, uint256[] _tokens) public;&lt;&#x2F;h3&gt;
&lt;p&gt;Transfer a variable amount of tokens from one user to another. This can be done from an authorised party with a specified key e.g. contract owner.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;optional-functions&quot;&gt;Optional functions&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;function-totalsupply-constant-returns-uint256-totalsupply&quot;&gt;function totalSupply() constant returns (uint256 totalSupply);&lt;&#x2F;h3&gt;
&lt;p&gt;Returns the total amount of tokens in the given contract, this should be optional as assets might be allocated and issued on the fly. This means that supply is not always fixed.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;function-ownerof-uint256-tokenid-public-view-returns-address-owner&quot;&gt;function ownerOf(uint256 _tokenId) public view returns (address _owner);&lt;&#x2F;h3&gt;
&lt;p&gt;Returns the owner of a particular token, I think this should be optional as not every token contract will need to track the owner of a unique token and it costs gas to loop and map the token id owners each time the balances change.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;function-trade-uint256-expirytimestamp-uint256-tokenindices-uint8-v-bytes32-r-bytes32-s-public-payable&quot;&gt;function trade(uint256 expiryTimeStamp, uint256[] tokenIndices, uint8 v, bytes32 r, bytes32 s) public payable&lt;&#x2F;h3&gt;
&lt;p&gt;A function which allows a user to sell a batch of non-fungible tokens without paying for the gas fee (only the buyer has to) in a p2p atomic swap. This is achieved by signing an attestation containing the amount of tokens to sell, the contract address, an expiry timestamp, the price and a prefix containing the ERC spec name and chain id. A buyer can then pay for the deal in one transaction by attaching the appropriate ether to satisfy the deal.&lt;&#x2F;p&gt;
&lt;p&gt;This design is also more efficient as it allows orders to be done offline until settlement as opposed to creating orders in a smart contract and updating them. The expiry timestamp protects the seller against people using old orders.&lt;&#x2F;p&gt;
&lt;p&gt;This opens up the gates for a p2p atomic swap but should be optional to this standard as some may not have use for it.&lt;&#x2F;p&gt;
&lt;p&gt;Some protections need to be added to the message such as encoding the chain id, contract address and the ERC spec name to prevent replays and spoofing people into signing message that allow a trade.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;interface&quot;&gt;Interface&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;solidity&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;contract&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; ERC165&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;            &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @notice&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Query if a contract implements an interface&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;            &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @param&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; interfaceID&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The interface identifier, as specified in ERC-165&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;            &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @dev&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Interface identification is specified in ERC-165. This function&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;            &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  uses less than 30,000 gas.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;            &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; @return&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; `true` if the contract implements `interfaceID` and&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;            &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;  `interfaceID` is not 0xffffffff, `false` otherwise&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;            function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; supportsInterface&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;bytes4&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; interfaceID&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; external&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; view&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;bool&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;interface&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; ERC875&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; &#x2F;*&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; is ERC165 &lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;*&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  event&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Transfer&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; _from&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; indexed&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; _to&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; tokenIndices&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; name&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; public&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;string&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; name&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; symbol&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; constant&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; public&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;string&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; symbol&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; balanceOf&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _owner&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; public&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; view&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; returns&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;uint256&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _balances&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; transfer&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _to&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; uint256&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _tokens&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; public&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; transferFrom&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _from&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; address&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _to&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; uint256&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt; _tokens&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; public&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt;If you want the standard functions with atomic swap trading added&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;interface&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; ERC875WithAtomicSwapTrading&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage&quot;&gt; is&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; ERC875&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; trade&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        uint256&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; expiryTimeStamp&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        uint256&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; tokenIndices&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        uint8&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; v&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; r&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;        bytes32&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; s&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    )&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; public&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; payable&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;example-implementation&quot;&gt;Example implementation&lt;&#x2F;h2&gt;
&lt;p&gt;Please visit this &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;alpha-wallet&#x2F;ERC875&quot;&gt;repo&lt;&#x2F;a&gt; to see an example implementation&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>URI Scheme with Metadata, Value and Bytecode</title>
        <published>2016-02-17T00:00:00+00:00</published>
        <updated>2026-02-11T14:48:25+00:00</updated>
	
	
	<author>
		<name>Alex Van de Sande</name><uri>https://github.com/alexvansande</uri>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/67/" type="text/html"/>
        
        
        <link rel="replies" type="text/html" href="https://github.com/ethereum/EIPs/issues/67" />
        

        <id>https://wg-eips.ritovision.com/67/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="erc"
                label="ERC" />
            
        

        
        <category
            term="tag:eip:67"
            label="ERC-67" />
        

        
        

        
        <summary type="html">Format for encoding transactions into a URI</summary>
        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/67/">&lt;h2 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h2&gt;
&lt;p&gt;This proposal (inspired by BIP 21) defines a format for encoding a transaction into a URI, including a recipient, number of ethers (possibly zero), and optional bytecode.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;Imagine these scenarios:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;* An exchange or a instant converter like ShapeShift wants to create a single Ethereum address for payments that will be converted into credit in their internal system or output bitcoin to an address.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;* A store wants to show a QR code to a client that will pop up a payment for exactly 12.34 ethers, which contains metadata on the product being bought.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;* A betting site wants to provide a link that the user can click on his site and it will open a default Ethereum wallet and execute a specific contract with given parameters.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;* A dapp in Mist wants to simply ask the user to sign a transaction with a specific ABI in a single call.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In all these scenarios, the provider wants to internally set up a transaction, with a recipient, an associated number of ethers (or none) and optional bytecode, all without requiring any fuss from the end user that is expected simply to choose a sender and authorise the transaction.&lt;&#x2F;p&gt;
&lt;p&gt;Currently implementations for this are wonky: ShapeShift creates tons of temporary addresses and uses an internal system to check which one correspond to which metadata, there isn&#x27;t any standard way for stores that want payment in ether to put specific metadata about price on the call and any app implementing contracts will have to use different solutions depending on the client they are targeting.&lt;&#x2F;p&gt;
&lt;p&gt;The proposal goes beyond address, and also includes optional bytecode and value. Of course this would make the link longer, but it should not be something visible to the user. Instead it should be shown as a visual code (QR or otherwise), a link, or some other way to pass the information.&lt;&#x2F;p&gt;
&lt;p&gt;If properly implemented in all wallets, this should make execution of contracts directly from wallets much simpler as the wallet client only needs to put the bytecode obtained by reading the QR code.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h2&gt;
&lt;p&gt;If we follow the bitcoin standard, the result would be:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; ethereum:&amp;lt;address&amp;gt;[?value=&amp;lt;value&amp;gt;][?gas=&amp;lt;suggestedGas&amp;gt;][?data=&amp;lt;bytecode&amp;gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Other data could be added, but ideally the client should take them from elsewhere in the blockchain, so instead of having a &lt;code&gt;label&lt;&#x2F;code&gt; or a &lt;code&gt;message&lt;&#x2F;code&gt; to be displayed to the users, these should be read from an identity system or metadata on the transaction itself.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;example-1&quot;&gt;Example 1&lt;&#x2F;h3&gt;
&lt;p&gt;Clicking this link would open a transaction that would try to send &lt;em&gt;5 unicorns&lt;&#x2F;em&gt; to address &lt;em&gt;deadbeef&lt;&#x2F;em&gt;. The user would then simply approve, based on each wallet UI.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; ethereum:0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7?gas=100000&amp;amp;data=0xa9059cbb00000000000000000000000000000000000000000000000000000000deadbeef0000000000000000000000000000000000000000000000000000000000000005&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;without-bytecode&quot;&gt;Without Bytecode&lt;&#x2F;h4&gt;
&lt;p&gt;Alternatively, the bytecode could be generated by the client and the request would be in plain text:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; ethereum:&amp;lt;address&amp;gt;[?value=&amp;lt;value&amp;gt;][?gas=&amp;lt;suggestedGas&amp;gt;][?function=nameOfFunction(param)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;example-2&quot;&gt;Example 2&lt;&#x2F;h3&gt;
&lt;p&gt;This is the same function as above, to send 5 unicorns from he sender to &lt;em&gt;deadbeef&lt;&#x2F;em&gt;, but now with a more readable function, which the client converts to bytecode.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; ethereum:0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7?gas=100000&amp;amp;function=transfer(address 0xdeadbeef, uint 5)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h2&gt;
&lt;p&gt;TODO&lt;&#x2F;p&gt;
&lt;h2 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;&#x2F;h2&gt;
&lt;p&gt;TODO&lt;&#x2F;p&gt;
&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;&#x2F;h2&gt;
&lt;p&gt;Copyright and related rights waived via &lt;a href=&quot;https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;license&#x2F;&quot;&gt;CC0&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Addition of CALLDEPTH opcode</title>
        <published>2015-11-19T00:00:00+00:00</published>
        <updated>2026-02-11T14:49:27+00:00</updated>
	
	
	<author>
		<name>Martin Holst Swende</name><email>martin@swende.se</email>
	</author>
	
	
        <link rel="alternate" href="https://wg-eips.ritovision.com/3/" type="text/html"/>
        

        <id>https://wg-eips.ritovision.com/3/</id>
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;status&#x2F;"
                term="withdrawn"
                label="Withdrawn" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;category&#x2F;"
                term="core"
                label="Core" />
            
        
            
            
            
            <category
                scheme="https:&#x2F;&#x2F;wg-eips.ritovision.com&#x2F;type&#x2F;"
                term="standards-track"
                label="Standards Track" />
            
        

        
        <category
            term="tag:eip:3"
            label="EIP-3" />
        

        
        

        
        <content type="html"  xml:base="https://wg-eips.ritovision.com/3/">&lt;h1 id=&quot;abstract&quot;&gt;Abstract&lt;&#x2F;h1&gt;
&lt;p&gt;This is a proposal to add a new opcode, &lt;code&gt;CALLDEPTH&lt;&#x2F;code&gt;. The &lt;code&gt;CALLDEPTH&lt;&#x2F;code&gt; opcode would return the remaining available call stack depth.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h1&gt;
&lt;p&gt;There is a limit specifying how deep contracts can call other contracts; the call stack. The limit is currently &lt;code&gt;256&lt;&#x2F;code&gt;. If a contract invokes another contract (either via &lt;code&gt;CALL&lt;&#x2F;code&gt; or &lt;code&gt;CALLCODE&lt;&#x2F;code&gt;), the operation will fail if the call stack depth limit has been reached.&lt;&#x2F;p&gt;
&lt;p&gt;This behaviour makes it possible to subject a contract to a &quot;call stack attack&quot; [1]. In such an attack, an attacker first creates a suitable depth of the stack, e.g. by recursive calls. After this step, the attacker invokes the targeted contract. If the targeted calls another contract, that call will fail. If the return value is not properly checked to see if the call was successful, the consequences could be damaging.&lt;&#x2F;p&gt;
&lt;p&gt;Example:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Contract &lt;code&gt;A&lt;&#x2F;code&gt; wants to be invoked regularly, and pays Ether to the invoker in every block.&lt;&#x2F;li&gt;
&lt;li&gt;When contract &lt;code&gt;A&lt;&#x2F;code&gt; is invoked, it calls contracts &lt;code&gt;B&lt;&#x2F;code&gt; and &lt;code&gt;C&lt;&#x2F;code&gt;, which consumes a lot of gas. After invocation, contract &lt;code&gt;A&lt;&#x2F;code&gt; pays Ether to the caller.&lt;&#x2F;li&gt;
&lt;li&gt;Malicious user &lt;code&gt;X&lt;&#x2F;code&gt; ensures that the stack depth is shallow before invoking A. Both calls to &lt;code&gt;B&lt;&#x2F;code&gt; and &lt;code&gt;C&lt;&#x2F;code&gt; fail, but &lt;code&gt;X&lt;&#x2F;code&gt; can still collect the reward.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;It is possible to defend against this in two ways:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Check return value after invocation.&lt;&#x2F;li&gt;
&lt;li&gt;Check call stack depth experimentally. A library [2] by Piper Merriam exists for this purpose. This method is quite costly in gas.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;[1] a.k.a &quot;shallow stack attack&quot; and &quot;stack attack&quot;. However, to be precise, the word &#x27;&#x27;stack&#x27;&#x27; has a different meaning within the EVM, and is not to be confused with the &#x27;&#x27;call stack&#x27;&#x27;.&lt;&#x2F;p&gt;
&lt;p&gt;[2] https:&#x2F;&#x2F;github.com&#x2F;pipermerriam&#x2F;ethereum-stack-depth-lib&lt;&#x2F;p&gt;
&lt;h1 id=&quot;specification&quot;&gt;Specification&lt;&#x2F;h1&gt;
&lt;p&gt;The opcode &lt;code&gt;CALLDEPTH&lt;&#x2F;code&gt; should return the remaining call stack depth. A value of &lt;code&gt;0&lt;&#x2F;code&gt; means that the call stack is exhausted, and no further calls can be made.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h1&gt;
&lt;p&gt;The actual call stack depth, as well as the call stack depth limit, are present in the EVM during execution, but just not available within the EVM. The implementation should be fairly simple and would provide a cheap and way to protect against call stack attacks.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h1&gt;
&lt;p&gt;Not implemented.&lt;&#x2F;p&gt;
</content>
    </entry>
</feed>
