Closed jtriley-eth closed 1 year ago
Adds huff compiler support.
Adds a huff library and Huffc structure with the following fields:
huff
Huffc
compilerPath
huffc
filePath
outputPath
mainName
MAIN
constructorName
CONSTRUCTOR
onlyRuntime
false
constantOverrides
"<constant_name>=<hex_literal>"
Setting any value may be done via a set<Field> API and adding values to lists may be done via an add<Field> API.
set<Field>
add<Field>
Can be run directly via compile or converted to a Command via toCommand methods.
compile
Command
toCommand
huff.create() .setCompilerPath("diffhuff") .setFilePath("./filePath.huff") .setOutputPath("./outputPath.json") .setMainName("ALT_MAIN") .setConstructorName("ALT_CONSTRUCTOR") .setOnlyRuntime(true) .addConstantOverride("SLOT", SLOT) .addConstantOverride("OTHER_SLOT", OTHER_SLOT) .compile();
Added documentation, reference, and github action to run huff compilation tests.
Overview
Adds huff compiler support.
Additions
Adds a
huff
library andHuffc
structure with the following fields:compilerPath
: path of compiler (Default:huffc
)filePath
: path of input file (Required)outputPath
: path of artifacts (Optional)mainName
: name of alternateMAIN
macro (Optional)constructorName
: name of alternateCONSTRUCTOR
macro (Optional)onlyRuntime
: if true, only the runtime bytecode will be returned (Default:false
)constantOverrides
: list of key value pairs in the format"<constant_name>=<hex_literal>"
Setting any value may be done via a
set<Field>
API and adding values to lists may be done via anadd<Field>
API.Can be run directly via
compile
or converted to aCommand
viatoCommand
methods.Added documentation, reference, and github action to run huff compilation tests.