-
Notifications
You must be signed in to change notification settings - Fork 55
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
Example One Click Deployer #240
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for storybook-component-library canceled.
|
❌ Deploy Preview for op-dapp-console-preview failed. Why did it fail? →
|
Deploying superchain-paymaster-nft-mint-example with Cloudflare Pages
|
nitaliano
commented
Apr 5, 2024
|
||
import {StdUtils} from "forge-std/StdUtils.sol"; | ||
|
||
contract Create2Factory { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just for an example we should never actually use this contract without adding real safety/auth logic to it
Closing this out since it was part of our hackathon. We'll be using this as a reference going forward. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a very slimmed down version of what the MVP for a 1 click deployer could look like and it's just built against anvil for now. This just shows how we can connect a github action to our dapp console api that can communicate with a Create2Factory deployer that we have onchain that will allow us to deploy any contract just based on it's bytecode and initialization arguments.
Example Action Interface for an ERC20
MVP using a database to store deployment info
MVP using a EAS to store deployment info
Upgradability
This PR doesn't have anything regarding upgradability. I did explore what we need to do and will add more about this in our scoping document. All we'll need to do is update the
Create2Factory
to also deploy a proxy contract so we can always add a new implemention contract to it. Generally I think we would use an already existing ERC1967Factory that would allow us to deploy a proxy contract alongside the initial implementation contract. This will require contracts that want upgradability to not have a constructor and instead have aninitalize
function that we end up calling after deployment with the initialization arguments supplied in the action.