https://github.com/ocdbytes/huff-lang
♞
https://github.com/ocdbytes/huff-lang
Last synced: 8 months ago
JSON representation
♞
- Host: GitHub
- URL: https://github.com/ocdbytes/huff-lang
- Owner: ocdbytes
- Created: 2024-04-07T12:33:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-07T12:57:59.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T10:46:07.993Z (almost 2 years ago)
- Language: Solidity
- Homepage:
- Size: 305 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Huff
```sh
// =========================================
// EVM assembly description (ADD TWO NUMS)
// =========================================
// BYTECODE MNEMONIC STACK ACTION
// 60 00 // PUSH1 0x00 // [0x00]
// 35 // CALLDATALOAD // [number1] Store the first 32 bytes on the stack
// 60 20 // PUSH1 0x20 // [0x20, number1]
// 35 // CALLDATALOAD // [number2, number1] Store the second 32 bytes on the stack
// 01 // ADD // [number2+number1] Take two stack inputs and add the result
// 60 00 // PUSH1 0x00 // [0x0, (n2+n1)]
// 52 // MSTORE // [] Store (n2+n1) in the first 32 bytes of memory
// 60 20 // PUSH1 0x20 // [0x20]
// 60 00 // PUSH1 0x00 // [0x00, 0x20]
// f3 // RETURN // [] Return the first 32 bytes of memory
```