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

Add raw bytes to huff contract bytecode #285

@0x366

Description

@0x366

I want to add raw bytes of arbitrary length to bytecode of huff contract:
I.e. store these 0x0000000000000000000000000000000000000000000000000000000000000000aabbccdd
bytes of length 36. Currently there are 2 ways:

  1. compile huff contract and manually append these bytes to the end. Though testing with that approach is a complete nightmare
  2. Divide the bytes into 32byte words and store as constants, though huff will add push32 opcode infront of which word and bytes won't be continuous.

Would be great to have something like

#define macro MAIN() = takes (0) returns (0) {
    ...
}
[0x0000000000000000000000000000000000000000000000000000000000000000aabbccdd]

which will append these bytes to the end of contract bytecode

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions