Skip to content

Instantly share code, notes, and snippets.

@hrkrshnn
Created March 22, 2021 11:15
Show Gist options
  • Select an option

  • Save hrkrshnn/e4c5b5830da1f66b885cd847f36e7643 to your computer and use it in GitHub Desktop.

Select an option

Save hrkrshnn/e4c5b5830da1f66b885cd847f36e7643 to your computer and use it in GitHub Desktop.
diff -u /tmp/mappingold.txt /tmp/mappingnew.txt
--- /tmp/mappingold.txt 2021-03-22 12:11:07.170537477 +0100
+++ /tmp/mappingnew.txt 2021-03-22 12:14:29.386786152 +0100
@@ -1,5 +1,3 @@
-#+begin_example
-
======= <stdin>:test =======
EVM assembly:
/* "<stdin>":0:848 contract test {... */
@@ -287,47 +285,57 @@
dup1
dup4
keccak256
- dup1
sload
0x01
/* "<stdin>":284:288 m[1] */
- swap1
- swap9
+ dup9
add
/* "<stdin>":284:293 m[1][key] */
- swap1
- swap3
+ dup1
+ dup5
mstore
- swap1
- swap2
+ dup3
+ dup6
keccak256
- dup1
sload
- not(0xff)
+ /* "<stdin>":303:312 m[0][key] */
+ swap9
+ dup5
+ mstore
+ dup3
+ dup6
+ keccak256
/* "<stdin>":303:321 m[0][key] = value1 */
dup1
- dup9
+ sload
+ swap8
+ dup10
and
- swap6
- dup8
+ not(0xff)
+ swap9
+ dup10
and
- swap6
- swap1
- swap6
or
swap1
- swap3
sstore
+ /* "<stdin>":331:340 m[1][key] */
+ swap1
+ swap3
+ mstore
+ swap1
+ swap2
+ keccak256
/* "<stdin>":331:349 m[1][key] = value2 */
dup1
sload
+ swap3
+ dup6
+ and
+ swap3
swap1
swap4
and
swap2
- dup5
- and
- swap2
swap1
swap2
or
@@ -335,7 +343,6 @@
swap2
sstore
/* "<stdin>":247:256 m[0][key] */
- swap2
dup2
and
swap3
@@ -526,7 +533,7 @@
pop
jump // out
- auxdata: 0xa2646970667358221220a0cbf6d022cd8e19010f74a70abc604a0232433fa208670f528fe4cd67f16e2464736f6c637827302e382e332d646576656c6f702e323032312e332e32322b636f6d6d69742e36363732396134660058
+ auxdata: 0xa26469706673582212204d61d2a31d5ce87a2b9426ce1458bd9aede587043cb4e33326069a96bf87301764736f6c63782b302e382e332d646576656c6f702e323032312e332e32322b636f6d6d69742e63336265636666652e6d6f64005c
}
#+end_example
Diff finished. Mon Mar 22 12:14:32 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment