artemis
artemis copied to clipboard
Port The Strategy to Huff
Common @FrankieIsLost, we all know the closed source one uses huff, let's add a huff strategy here 🤠
👀
my huff skills are not quite up to the task, but would love to see some huff in the repo! @refcell is there any tooling for generating rust bindings for huff, or do people usually roll their own?
If anyone is interesting in writing a huff strategy, please ping me, happy to help get it across the line.
@FrankieIsLost
re huff-rust bindings: it depends. huff does include syntax for generating a json abi compatible with solc. however, it is common for huff contracts to include non-standard abi encoding schemes. bc of this, devs usually roll their own encoding.
re porting the sudo x opensea strat to huff : implementing it in accordance with the solc abi spec means we could just pass the deployed address into the cli with no compatibility issues
the questions/issues around this are:
- adding this to the repo either requires we hard code the huffc output or implicitly add huffc as a dependency to the arb contract directory. is there a preference between the two? note that the latter also requires ffi to be enabled for testing to pass.
- huff opens up a notable attack surface that solc abstracts away. currently the contract has a single test but migrating to huff demands a lot more contract tests given the risk.
if this is something that seems fit to add to the repo, i'd be happy to make a pr with the huffc contract.
re huff-rust bindings: it depends. huff does include syntax for generating a json abi compatible with solc. however, it is common for huff contracts to include non-standard abi encoding schemes. bc of this, devs usually roll their own encoding.
ah makes sense!
adding this to the repo either requires we hard code the huffc output or implicitly add huffc as a dependency to the arb contract directory. is there a preference between the two? note that the latter also requires ffi to be enabled for testing to pass.
Adding huffc as a dependency to the arb repo isn't a problem. What do you mean by hard code the huffc output
? Taking the huffc output using something like forge etch
to set it to a specific address? Seems a bit clunky but would prefer it to enabling FFI in the repo. Maybe there's a middle ground where we can run a setup script in CI to deploy the bytecode before running the tests instead of the broad FFI perms.
huff opens up a notable attack surface that solc abstracts away. currently the contract has a single test but migrating to huff demands a lot more contract tests given the risk.
Agree, and I'd be happy to help write some more tests here if helpful.
Overall, would love to see a huff implementation, and happy to support wherever helpful to see it happen :)