lurch
lurch copied to clipboard
Can rooted be extended to use a salt in address creation?
No, the way rooted works there is no “place” to put a salt. It uses the normal initcode, not a Solidity selector.
It would be easy to build a version which does, but then it would require a contract function call, instead of just changing the to address from null to “v0.rooted.eth”.
Does that make sense?
That does make sense. What would a contract call version look like?
It could be neat to couple rooted with minimal proxies if there was a way to clear the storage of the proxy.
It would prolly have a solidity signature like function deploy(bytes32 salt, bytes bytecode) payable. I only put the salt first because the code would be in EVM assembly and plucking items out after a dynamic object is trickier than before. :)
Then in ethers, you could use contract.deploy(salt, initcode).
It would be a fairly simple change to make if you wanted to dip your toes into the wonderful world of EVM assembly. :)
Feels a bit like diving in the deep end for an assembly noob like me....
Is it possible to call v0.rooted.eth from a smart contract?
function create(bytes bytecode) payable {
(bool success, bytes memory returnData) = address(v0.rooted.eth).call{value: msg.value}(bytecode);
require(success);
}
If so then I would probably spin up a different contract every time instead of using a salt