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: deployments #27

Merged
merged 3 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 46 additions & 26 deletions Deployments.md

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions broadcast/Deploy_LightAccountFactory.s.sol/1/run-1704925372.json

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions broadcast/Deploy_LightAccountFactory.s.sol/10/run-1704916308.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

85 changes: 85 additions & 0 deletions broadcast/Deploy_LightAccountFactory.s.sol/137/run-1704924099.json

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions broadcast/Deploy_LightAccountFactory.s.sol/420/run-1704923473.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.

10 changes: 5 additions & 5 deletions script/Deploy_LightAccountFactory.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {IEntryPoint} from "account-abstraction/interfaces/IEntryPoint.sol";

import {LightAccountFactory} from "../src/LightAccountFactory.sol";

// @notice Deploys LightAccountFactory to the address `0x00000055C0b4fA41dde26A74435ff03692292FBD`
// @notice Deploys LightAccountFactory to the address `0x00004EC70002a32400f8ae005A26081065620D20`
// @dev Note: Script uses EntryPoint at address 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789
// @dev To run: `forge script script/Deploy_LightAccountFactory.s.sol:Deploy_LightAccountFactory --broadcast --rpc-url ${RPC_URL} --verify -vvvv`
contract Deploy_LightAccountFactory is Script {
Expand All @@ -18,15 +18,15 @@ contract Deploy_LightAccountFactory is Script {
vm.startBroadcast();

// Using entryPoint: 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789
// Correct as of Oct 3 2023, from https://docs.alchemy.com/reference/eth-supportedentrypoints
// Correct as of Jan 10 2024, from https://docs.alchemy.com/reference/eth-supportedentrypoints
IEntryPoint entryPoint = IEntryPoint(payable(0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789));

// Init code hash check
bytes32 initCodeHash = keccak256(
abi.encodePacked(type(LightAccountFactory).creationCode, bytes32(uint256(uint160(address(entryPoint)))))
);

if (initCodeHash != 0xd77df77274118ffc7c7b2edced505093b1f8695e3b5ced2b2fd2a5b27e4e2b78) {
if (initCodeHash != 0x23fb754854a6aa03057b1bae5d971963d92e534dc714fa59fff6c08a3617ba3e) {
revert InitCodeHashMismatch(initCodeHash);
}

Expand All @@ -40,11 +40,11 @@ contract Deploy_LightAccountFactory is Script {
console.log("********************************");

LightAccountFactory factory = new LightAccountFactory{
salt: 0x4e59b44847b379578588920ca78fbf26c0b4956c3406f3bdc271500000c2f72f
salt: 0x4e59b44847b379578588920ca78fbf26c0b4956c5528f3e2f146000008fabf77
}(entryPoint);

// Deployed address check
if (address(factory) != 0x00000055C0b4fA41dde26A74435ff03692292FBD) {
if (address(factory) != 0x00004EC70002a32400f8ae005A26081065620D20) {
revert DeployedAddressMismatch(address(factory));
}

Expand Down