-
Notifications
You must be signed in to change notification settings - Fork 32
How to pass arguments to the constructor? #26
Comments
the as an example, a macro that performs basic addition would have the annotation if you want to pass an argument, you can do it as you do with a normal programming language. |
also note that the compiler does not enforce these annotations - they are purely for readability. |
Here is an ERC721 constructor example with the name and symbol: Constructor arguments are each padded to 32 bytes and appended to the end of the deployment bytecode. You should be able to access an address by extracting the first 32 byte constructor argument as follows.
|
@virtualjpeg , @JoshuaTrujillo15 Thank you for your help! The example was awesome, I might go ahead and add the name and symbol for the ERC20 example (ᵔᴥᵔ) |
⊂(◉‿◉)つ HI!
I saw Huff and wanted to give it a try, is there any documentation available that explains the
takes(0) returns (0)
syntax on the macros?Tried to do it this way:
and
But it says wrong number of arguments, expecting 0 got 1
The text was updated successfully, but these errors were encountered: