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

feat: factory stake during deploy #12

Merged
merged 1 commit 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
5 changes: 3 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
path = lib/openzeppelin-contracts
url = https://github.com/openzeppelin/openzeppelin-contracts
branch = v4.8.2
[submodule "lib/account-abstraction"]
[submodule "account-abstraction"]
path = lib/account-abstraction
url = https://github.com/lib/account-abstraction
url = https://github.com/eth-infinitism/account-abstraction
branch = ver0.6.0
6 changes: 5 additions & 1 deletion script/DeployFull.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {SecurityControlModule} from "src/modules/SecurityControlModule/SecurityC
import {SocialRecoveryModule} from "src/modules/SocialRecoveryModule/SocialRecoveryModule.sol";
import {TrueWallet} from "src/wallet/TrueWallet.sol";
import {TrueWalletFactory} from "src/wallet/TrueWalletFactory.sol";
import {MumbaiConfig} from "../config/MumbaiConfig.sol";


contract DeployFullScript is Script {
Expand All @@ -16,13 +17,15 @@ contract DeployFullScript is Script {
SocialRecoveryModule public recoveryModule;
TrueWallet public walletImplementation;
TrueWalletFactory public factory;
address public entryPoint;

address public owner;
uint256 public deployerPrivateKey;

function setUp() public {
owner = vm.envAddress("OWNER");
deployerPrivateKey = vm.envUint("PRIVATE_KEY_TESTNET");
entryPoint = MumbaiConfig.OFFICIAL_ENTRY_POINT;
}

function run() public {
Expand All @@ -37,7 +40,8 @@ contract DeployFullScript is Script {
contractManager.add(modules);

walletImplementation = new TrueWallet();
factory = new TrueWalletFactory(address(walletImplementation), owner, 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789);
factory = new TrueWalletFactory(address(walletImplementation), owner, entryPoint);
factory.addStake{value: 1 ether}(84600);

console.log("==securityModule addr=%s", address(securityModule));
console.log("==recoveryModule addr=%s", address(recoveryModule));
Expand Down