Closed BlinkyStitt closed 10 months ago
appreciate this -- implemented it in this fork, along with simple receive()
directly inside the clone that only emits the event ReceiveETH(amount)
(no DELEGATECALL
to avoid gas issues w solidity transfers/sends)
happy to open a PR if there's interest
I really like including deterministic address to CWIA - should we add optionality between using create
and create2
?
in my fork I use clone
for create
& cloneDeterministic
for create2
(+ predictDeterministicAddress
) -- feel like it works pretty well and is easy to grok
nice, makes sense. I created a PR which just toggles between create
and create2
based on whether a salt hash is provided https://github.com/wighawag/clones-with-immutable-args/pull/11
it would also be cool if the library always uses the same init code, so the init code hash used in CREATE2 is a constant, and the init code instead reads the data
argument from a temporary storage variable in the contract at msg.sender
this is a little harder to put in a library because you temporarily need storage slots for the contract to read (or something like EIP-1153), but it's useful for contracts where the address is computed often by integrators
I really like this a lot! It was pretty similar to some code I have that uses create2, so I combined them. What do you think about these changes?