File tree Expand file tree Collapse file tree 2 files changed +16
-27
lines changed
Expand file tree Collapse file tree 2 files changed +16
-27
lines changed Original file line number Diff line number Diff line change 3333
3434 multiplication:
3535 // Copy first argument in memory
36- 0x20
37- 0x04
38- 0x00
39- calldatacopy
40-
41- // Copy second argument in memory
42- 0x20
43- 0x24
44- 0x20
45- calldatacopy
46-
47- // load both argument a and check != 0
48- 0x00
49- mload
36+ 0x04 calldataload
5037 dup1
51- 0x00
52- eq
38+ iszero
5339 zero_case
5440 jumpi
55-
56- // load both argument b and check != 0
57- 0x20
58- mload
41+
42+ // Copy second argument in memory
43+ 0x24 calldataload
5944 dup1
60- 0x00
61- eq
45+ iszero
6246 zero_case
6347 jumpi
6448
6852
6953 // load first argument (a) and divide result by it
7054 // c / a
71- 0x00
72- mload
55+ 0x04 calldataload
7356 swap1
7457 div
7558
7659 // b == c / a ?
77- 0x20
78- mload
60+ 0x24 calldataload
7961 eq
8062
8163 end
Original file line number Diff line number Diff line change 99 */
1010
1111#define macro MAIN() = takes(0) returns(0) {
12-
12+ 0x00
13+ 0x00
14+ callvalue
15+ iszero
16+ novalue jumpi
17+ revert
18+ novalue:
19+ return
1320}
You can’t perform that action at this time.
0 commit comments