Skip to content

whitenois3/huff-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Huff Runner

Minimal Huff Deployment Library.

The following functions are exposed by importing.

signature functionality
compile(Vm vm, string memory path) returns (bytes memory) compiles huff file by path
create(bytes bytecode, uint256 value) returns (address) deploys with create
create2(bytes bytecode, uint256 value, bytes32 salt) returns (bytes32) deploys with create2
appendArgs(bytes bytecode, bytes32[] memory args) appends args to bytecode

Usage

import "forge-std/Script.sol";
import {compile, create} from "huff-runner/Deploy.sol";

using { compile } for Vm;
using { create } for bytes;

contract HuffDeployScript is Script {
    function run() {
        vm.broadcast();

        address deployment = vm.compile("huff/MyContract.huff").create({value: 0});

        vm.stopBroadcast()
    }
}

About

Minimal Huff Deployer Library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published