Skip to content

Commit

Permalink
feat: deploy latest audited PW MSCA contract on EP0.6 (#26)
Browse files Browse the repository at this point in the history
## Summary

Make some script updates and add deployment logs for the latest audited
versions of PW MSCA contracts. Contracts were deployed and verified on
all of the below chains:

- MATIC-AMOY
- ARB-SEPOLIA
- ETH-SEPOLIA
- MATIC
- ARB
- ETH

Addresses of the deployed contracts (same across all of the deployed
chains):
- PluginManager: 0x3169Ad878021B87C9CaA9b5CDA740ff3ca270Ce9
- SingleOwnerMSCAFactory: 0xa233b124D7b9CFF2D38cB62319e1A3f79144B490
- SingleOwnerMSCA: 0xeF3d10Df6e8eeAa925dA46ea12a6F17aB7F43B70

### Checklist
- [ ] Did you add new tests and confirm all tests pass? (`yarn test`)
- [ ] Did you update relevant docs? (docs are found in the `docs`
folder)
- [ ] Do your commits follow the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard?
- [x] Does your PR title also follow the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard?
- [ ] If you have a breaking change, is it [correctly reflected in your
commit
message](https://www.conventionalcommits.org/en/v1.0.0/#examples)? (e.g.
`feat!: breaking change`)
- [x] Did you run lint (`yarn lint`) and fix any issues?
- [x] Did you run formatter (`yarn format:check`) and fix any issues
(`yarn format:write`)?
  • Loading branch information
ashutosh-ukey authored Oct 22, 2024
1 parent f854da1 commit afa4a4d
Show file tree
Hide file tree
Showing 30 changed files with 1,321 additions and 544 deletions.
47 changes: 47 additions & 0 deletions broadcast/001_DeployPluginManager.s.sol/1/run-1729619418.json

Large diffs are not rendered by default.

42 changes: 20 additions & 22 deletions broadcast/001_DeployPluginManager.s.sol/1/run-latest.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions broadcast/001_DeployPluginManager.s.sol/11155111/run-latest.json

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions broadcast/001_DeployPluginManager.s.sol/137/run-1729618766.json

Large diffs are not rendered by default.

60 changes: 29 additions & 31 deletions broadcast/001_DeployPluginManager.s.sol/137/run-latest.json

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions broadcast/001_DeployPluginManager.s.sol/42161/run-1729619139.json

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions broadcast/001_DeployPluginManager.s.sol/42161/run-latest.json

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions broadcast/001_DeployPluginManager.s.sol/421614/run-1729617677.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions broadcast/001_DeployPluginManager.s.sol/421614/run-latest.json

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions broadcast/001_DeployPluginManager.s.sol/80002/run-1729612543.json

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions broadcast/001_DeployPluginManager.s.sol/80002/run-latest.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

85 changes: 40 additions & 45 deletions broadcast/003_DeploySingleOwnerMSCAFactory.s.sol/1/run-latest.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

101 changes: 48 additions & 53 deletions broadcast/003_DeploySingleOwnerMSCAFactory.s.sol/137/run-latest.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions script/000_ContractAddress.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
*/
pragma solidity 0.8.24;

address constant ENTRY_POINT = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;
address constant ENTRY_POINT = 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789;

// Use address(0) if unknown or deploying a new version of a contract.
address constant PLUGIN_MANAGER_ADDRESS = 0xBc17c439278c4E64C333beE4A890DE6d1f862dDb;
address constant PLUGIN_MANAGER_ADDRESS = 0x3169Ad878021B87C9CaA9b5CDA740ff3ca270Ce9;
address constant SINGLE_OWNER_MSCA_FACTORY_ADDRESS = 0xa233b124D7b9CFF2D38cB62319e1A3f79144B490;
address constant UPGRADABLE_MSCA_FACTORY_ADDRESS = 0x3e6b66A72B76850c372FBDf29f53268ad636B320;
address constant SINGLE_OWNER_PLUGIN_ADDRESS = 0x7af5E9DBe3e50F023a5b99f44002697cF8e1de2e;
address constant COLD_STORAGE_ADDRESS_BOOK_PLUGIN_ADDRESS = 0x3c95978Af08B6B2Fd82659B393be86AfB4bd3D6F;
Expand Down
11 changes: 6 additions & 5 deletions script/003_DeploySingleOwnerMSCAFactory.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,25 @@
pragma solidity 0.8.24;

import {SingleOwnerMSCAFactory} from "../src/msca/6900/v0.7/factories/semi/SingleOwnerMSCAFactory.sol";
import {ENTRY_POINT, PLUGIN_MANAGER_ADDRESS, SINGLE_OWNER_MSCA_FACTORY_ADDRESS} from "./000_ContractAddress.sol";
import {Script, console} from "forge-std/src/Script.sol";

contract DeploySingleOwnerMSCAFactoryScript is Script {
address internal constant PLUGIN_MANAGER = 0xc751A2bFA2A4a5b27E94ad735534c16a0999d871;
address payable internal constant EXPECTED_FACTORY_ADDRESS =
payable(address(0x1a1f5310eD7fF0B84Cef7E6d7D0f94Cc16D23013));
address internal constant PLUGIN_MANAGER = PLUGIN_MANAGER_ADDRESS;
address payable internal constant EXPECTED_FACTORY_ADDRESS = payable(SINGLE_OWNER_MSCA_FACTORY_ADDRESS);

function run() public {
address entryPoint = vm.envAddress("ENTRY_POINT");
address entryPoint = ENTRY_POINT;
uint256 key = vm.envUint("DEPLOYER_PRIVATE_KEY");
vm.startBroadcast(key);
SingleOwnerMSCAFactory factory;
if (EXPECTED_FACTORY_ADDRESS.code.length == 0) {
factory = new SingleOwnerMSCAFactory{salt: 0}(entryPoint, PLUGIN_MANAGER);
console.log("New single owner MSCA factory address: %s", address(factory));
} else {
factory = SingleOwnerMSCAFactory(EXPECTED_FACTORY_ADDRESS);
console.log("Found existing single owner MSCA factory at expected address: %s", address(factory));
}
console.log("Factory address: %s", address(factory));
console.log("Account implementation address: %s", address(factory.accountImplementation()));
vm.stopBroadcast();
}
Expand Down
2 changes: 1 addition & 1 deletion script/verify/PluginManager.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions script/verify/SingleOwnerMSCA/SingleOwnerMSCA.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions script/verify/SingleOwnerMSCA/abiEncodedConstructorArgs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d27890000000000000000000000003169ad878021b87c9caa9b5cda740ff3ca270ce9
238 changes: 1 addition & 237 deletions script/verify/SingleOwnerMSCAFactory.json

Large diffs are not rendered by default.

0 comments on commit afa4a4d

Please sign in to comment.