Skip to content

Commit

Permalink
chore: make ledger the admin
Browse files Browse the repository at this point in the history
  • Loading branch information
fedealconada committed Jan 23, 2024
1 parent 96e8d50 commit eff9f4e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions script/migrations/21-multiple_upgrade.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ contract KintoMigration21DeployScript is Create2Helper, ArtifactsReader, UserOp
abi.encodePacked(type(SponsorPaymasterV4).creationCode, abi.encode(_getChainDeployment("EntryPoint")));

vm.broadcast(deployerPrivateKey);
_paymasterImpl = _walletFactory.deployContract(vm.rememberKey(deployerPrivateKey), 0, bytecode, bytes32(0));
_paymasterImpl = _walletFactory.deployContract(vm.envAddress("LEDGER_ADMIN"), 0, bytecode, bytes32(0));

// (3). upgrade paymaster to new implementation
vm.broadcast(); // requires LEDGER_ADMIN
Expand All @@ -77,7 +77,7 @@ contract KintoMigration21DeployScript is Create2Helper, ArtifactsReader, UserOp

vm.broadcast(deployerPrivateKey);
_registryImpl =
_walletFactory.deployContract{value: 0}(vm.rememberKey(deployerPrivateKey), 0, bytecode, bytes32("1"));
_walletFactory.deployContract{value: 0}(vm.envAddress("LEDGER_ADMIN"), 0, bytecode, bytes32("1"));

// (2). upgrade registry to new implementation
_upgradeTo(payable(registryProxy), _registryImpl, deployerPrivateKey);
Expand All @@ -94,7 +94,7 @@ contract KintoMigration21DeployScript is Create2Helper, ArtifactsReader, UserOp
)
);
vm.broadcast(deployerPrivateKey);
_walletImpl = _walletFactory.deployContract(vm.rememberKey(deployerPrivateKey), 0, bytecode, bytes32(0));
_walletImpl = _walletFactory.deployContract(vm.envAddress("LEDGER_ADMIN"), 0, bytecode, bytes32(0));

// (2). upgrade all implementations
vm.broadcast(); // requires LEDGER_ADMIN
Expand All @@ -116,7 +116,7 @@ contract KintoMigration21DeployScript is Create2Helper, ArtifactsReader, UserOp
);

vm.broadcast(deployerPrivateKey);
_factoryImpl = _walletFactory.deployContract(vm.rememberKey(deployerPrivateKey), 0, bytecode, bytes32(0));
_factoryImpl = _walletFactory.deployContract(vm.envAddress("LEDGER_ADMIN"), 0, bytecode, bytes32(0));

// (2). upgrade factory to new implementation
vm.broadcast(); // requires LEDGER_ADMIN
Expand All @@ -135,7 +135,7 @@ contract KintoMigration21DeployScript is Create2Helper, ArtifactsReader, UserOp
);

vm.broadcast(deployerPrivateKey);
_kycViewer = _walletFactory.deployContract(vm.rememberKey(deployerPrivateKey), 0, bytecode, bytes32(0));
_kycViewer = _walletFactory.deployContract(vm.envAddress("LEDGER_ADMIN"), 0, bytecode, bytes32(0));

// (2). upgrade viewer to new implementation
vm.broadcast(); // requires LEDGER_ADMIN
Expand Down

0 comments on commit eff9f4e

Please sign in to comment.