-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Immutably owned clones #19
Comments
Made a bunch of improvements. |
Hey @wysenynja, thanks for sharing your findings here. I need immutable ownership as well so this is helpful. Any chance you could update the links you shared? They lead to "404 Not Found" pages now. Pro tip: if you hit Y while viewing a file in a repo, GitHub will add the current commit to the browser URL. |
Could you shed some light on this? Is it that only your set up requires an I'm still coming to grips with how this clone factory works. Update: I figured it out on my own after reading the explanation shared by Nate Welch here. Having to use an |
My cloned proxy deploys costs less the 1/10th of what they did before I found EIP 1167, so thanks for the awesome contract!
Some projects with vote locking (such as https://dao.curve.fi) require smart wallets to have restrictions on transfer in order to be approved. I've been thinking of how to accomplish this and I have a working, but likely not optimal, solution (which also uses CREATE2 and so is one way to solve #18).
At first I was just going to remove the functions for changing the owner, but because the proxy contract has a delegatecall, it would be able to change the state anyway.
Then I was going to try using the new
immutable
keyword, but we are using aninit
function instead of a standard constructor to do the setup.Here's my current solution:
https://github.com/SatoshiAndKin/argobytes-contracts-brownie/blob/slim/contracts/abstract/clonefactory/CloneFactory.sol#L56
https://github.com/SatoshiAndKin/argobytes-contracts-brownie/blob/slim/contracts/abstract/ArgobytesAuth.sol#L41
My testnet deploy script works and I'm working on adding more tests this week. I wanted to post this here in case this is helpful for someone else (or in case its a terrible idea and I should be stopped). I'm very new to assembly and so this is probably not perfect. Any suggestions are welcome.
The text was updated successfully, but these errors were encountered: