Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix keccak256 typo in EVMStorage contract comments #326

Open
wants to merge 3 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contracts/src/evm/storage/EVMStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ contract EVMStorageDynamicArray {
}

contract EVMStorageMapping {
// slot of value = keccack256(key, slot where mapping is declared)
// slot of value = keccak256(key, slot where mapping is declared)
mapping(address => uint256) public map;

address public constant ADDR_1 = address(1);
Expand All @@ -453,7 +453,7 @@ contract EVMStorageMapping {

contract EVMStorageNestedMapping {
// key0 => key1 => val
// slot of value = keccak256(key1, keccack256(key0, slot where nested mapping is declared))
// slot of value = keccak256(key1, keccak256(key0, slot where nested mapping is declared))
mapping(address => mapping(address => uint256)) public map;

address public constant ADDR_1 = address(1);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/evm/storage/EVMStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ contract EVMStorageDynamicArray {
}

contract EVMStorageMapping {
// slot of value = keccack256(key, slot where mapping is declared)
// slot of value = keccak256(key, slot where mapping is declared)
mapping(address => uint256) public map;

address public constant ADDR_1 = address(1);
Expand All @@ -453,7 +453,7 @@ contract EVMStorageMapping {

contract EVMStorageNestedMapping {
// key0 => key1 => val
// slot of value = keccak256(key1, keccack256(key0, slot where nested mapping is declared))
// slot of value = keccak256(key1, keccak256(key0, slot where nested mapping is declared))
mapping(address => mapping(address => uint256)) public map;

address public constant ADDR_1 = address(1);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/evm/storage/index.html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ const html = `<p>Examples of</p>
}

<span class="hljs-class"><span class="hljs-keyword">contract</span> <span class="hljs-title">EVMStorageMapping</span> </span>{
<span class="hljs-comment">// slot of value = keccack256(key, slot where mapping is declared)</span>
<span class="hljs-comment">// slot of value = keccak256(key, slot where mapping is declared)</span>
<span class="hljs-keyword">mapping</span>(<span class="hljs-keyword">address</span> <span class="hljs-operator">=</span><span class="hljs-operator">&gt;</span> <span class="hljs-keyword">uint256</span>) <span class="hljs-keyword">public</span> map;

<span class="hljs-keyword">address</span> <span class="hljs-keyword">public</span> <span class="hljs-keyword">constant</span> ADDR_1 <span class="hljs-operator">=</span> <span class="hljs-keyword">address</span>(<span class="hljs-number">1</span>);
Expand All @@ -482,7 +482,7 @@ const html = `<p>Examples of</p>

<span class="hljs-class"><span class="hljs-keyword">contract</span> <span class="hljs-title">EVMStorageNestedMapping</span> </span>{
<span class="hljs-comment">// key0 =&gt; key1 =&gt; val</span>
<span class="hljs-comment">// slot of value = keccak256(key1, keccack256(key0, slot where nested mapping is declared))</span>
<span class="hljs-comment">// slot of value = keccak256(key1, keccak256(key0, slot where nested mapping is declared))</span>
<span class="hljs-keyword">mapping</span>(<span class="hljs-keyword">address</span> <span class="hljs-operator">=</span><span class="hljs-operator">&gt;</span> <span class="hljs-keyword">mapping</span>(<span class="hljs-keyword">address</span> <span class="hljs-operator">=</span><span class="hljs-operator">&gt;</span> <span class="hljs-keyword">uint256</span>)) <span class="hljs-keyword">public</span> map;

<span class="hljs-keyword">address</span> <span class="hljs-keyword">public</span> <span class="hljs-keyword">constant</span> ADDR_1 <span class="hljs-operator">=</span> <span class="hljs-keyword">address</span>(<span class="hljs-number">1</span>);
Expand Down