Questions tagged [huff]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
28 views

Append data in a storage array in huff

How would one append data to a storage array in huff? Let's say for example we start off with an array that looks like: [0] And want to end with an array that looks like: [0,1]
user avatar
0 votes
1 answer
15 views

Get the return of another macro in huff

Let's say I have two macros: #define macro TOTAL_SUPPLY() = takes (0) returns (0) { [TOTAL_SUPPLY_LOCATION] sload // [supply] 0x00 mstore // [] 0x20 0x00 return ...
user avatar
0 votes
0 answers
30 views

Huff deployer deployed more than one contract with foundry script

I have a foundry solidity script for deploying my huff code. function run() external { vm.startBroadcast(); MyContract( HuffDeployer .config() ...
user avatar
0 votes
1 answer
35 views

Call another contract with huff?

How do I call another contract with huff? And then bonus points... Return the data from the call. Let's say I have a solidity-style contract with a function as such: NumberGetter.sol uint256 myNumber =...
user avatar
0 votes
1 answer
16 views

How to return a constant variable in huff

Let's say I have a constant variable in huff: #define constant myAddress = 0x0000000000000000000000000000000000000000 How would I make a macro to read it? Since it doesn't have a storage slot, I ...
user avatar
0 votes
2 answers
46 views

Solidity immutable equivalent in huff

In the huff language, I am able to specify a constant variable with the constant keyword. (huff docs) #define constant NUM = 0x420 #define constant HELLO_WORLD = 0x48656c6c6f2c20576f726c6421 #define ...
user avatar