Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit 2d6e9b2

Browse files
committed
[+] bytecode updated for EIP-3855 / fixed stack value missing from comments
[+] bytecode updated for EIP-3855 / fixed stack value missing from comments [+] bytecode updated for EIP-3855 / fixed stack value missing from comments [+] bytecode updated for EIP-3855 / fixed stack value missing from comments
1 parent c172169 commit 2d6e9b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tutorial/the-basics/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ The next thing we are going to create is the `MAIN macro`. This serves a single
2929
```Huff
3030
#define macro MAIN() = takes(0) returns(0) {
3131
0x00 calldataload // [number1] // load first 32 bytes onto the stack - number 1
32-
0x20 calldataload // [number2] // load second 32 bytes onto the stack - number 2
32+
0x20 calldataload // [number2, number1] // load second 32 bytes onto the stack - number 2
3333
add // [number1+number2] // add number 1 and 2 and put the result onto the stack
3434
35-
0x00 mstore // place [number1 + number2] in memory
35+
0x00 mstore // place [number1+number2] in memory
3636
0x20 0x00 return // return the result
3737
}
3838
```
@@ -45,10 +45,10 @@ Go ahead and copy the above macro into your `addTwo.huff` file. Run `huffc addTw
4545

4646
Congratulations you've just compiled your first contract!
4747

48-
The bytecode output of the compiler will echo the following into the console `600f8060093d393df36000356020350160005260206000f3`.
48+
The bytecode output of the compiler will echo the following into the console `600c8060093d393df35f35602035015f5260205ff3`.
4949

5050
When you deploy this contract code it will have the runtime bytecode of the main macro we just created! In the above snippet you will find it after the first `f3` (the preceding bytecode is boiler plate constructor logic.)
51-
That leaves us with this: `6000356020350160005260206000f3`
51+
That leaves us with this: `5f35602035015f5260205ff3`
5252
Below, this example dissembles what you have just created!
5353

5454
```

0 commit comments

Comments
 (0)