Skip to content
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

chore: [v0.8-develop] alpha.0 deploy prep #111

Merged
merged 4 commits into from
Jul 26, 2024

Conversation

adamegyed
Copy link
Contributor

Motivation

We want to deploy a non-final build of the RI to testnets.

Solution

Update compiler settings for deterministic builds

Bump up the optimization count while remaining under the 24kb size limit

Add a deploy script and tests for the deploy script.

Change the factory initialization to take in an owner address in the constructor, rather than using msg.sender.

@adamegyed adamegyed requested a review from a team July 24, 2024 17:03
@adamegyed adamegyed force-pushed the adam/add-validationconfig-test branch from 4de9f7b to 9a02710 Compare July 24, 2024 18:31
@adamegyed adamegyed force-pushed the adam/alpha0-deploy-prep branch from 5911793 to f643f61 Compare July 24, 2024 18:31
@adamegyed adamegyed force-pushed the adam/add-validationconfig-test branch from 9a02710 to 0a484ef Compare July 24, 2024 23:00
Base automatically changed from adam/add-validationconfig-test to v0.8-develop July 24, 2024 23:06
@adamegyed adamegyed force-pushed the adam/alpha0-deploy-prep branch from f643f61 to 6e5293e Compare July 24, 2024 23:07
@adamegyed adamegyed force-pushed the adam/alpha0-deploy-prep branch from 6e5293e to f94a910 Compare July 24, 2024 23:30
import {UpgradeableModularAccount} from "../src/account/UpgradeableModularAccount.sol";
import {SingleSignerValidation} from "../src/modules/validation/SingleSignerValidation.sol";

contract DeployScript is Script {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we update readme for this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add .env.example too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added both a .env.example with comments, and a section in the README for running the script.

address addr = Create2.computeAddress(
salt, keccak256(abi.encodePacked(type(UpgradeableModularAccount).creationCode, abi.encode(entryPoint)))
);
if (addr != expected) {
Copy link
Collaborator

@fangting-alchemy fangting-alchemy Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is necessary in RI. It is gonna make test deployment annoying as you will need to compute all the addresses first and put them in env (account impl, validation, etc.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just to prevent accidental drift between when it's calculated vs deployed, which can happen if using the wrong build profile, for example. For the first time pass, we can just run the script, and the error in console.log will tell us what address to put in.

@adamegyed adamegyed merged commit 27e00b5 into v0.8-develop Jul 26, 2024
3 checks passed
@adamegyed adamegyed deleted the adam/alpha0-deploy-prep branch July 26, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants