Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
object "Create2Proxy" {
code {
let size := datasize("runtime")
datacopy(0, dataoffset("runtime"), size)
return(0, size)
object "runtime" {
code {
let salt := calldataload(0)
let size := sub(calldatasize(), 32)
calldatacopy(0, 32, size)
let addr := create2(callvalue(), 0, size, salt)
mstore(0, addr)
return(0, 32)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.