-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathDeployKernel.s.sol
More file actions
29 lines (24 loc) · 1.03 KB
/
DeployKernel.s.sol
File metadata and controls
29 lines (24 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
pragma solidity ^0.8.0;
import "forge-std/Script.sol";
import "forge-std/console.sol";
import "src/Kernel.sol";
import "src/factory/KernelFactory.sol";
import "src/factory/FactoryStaker.sol";
contract DeployValidators is Script {
address constant ENTRYPOINT_0_7_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;
address constant DEPLOYER = 0x9775137314fE595c943712B0b336327dfa80aE8A;
address constant EXPECTED_STAKER = 0xd703aaE79538628d27099B8c4f621bE4CCd142d5;
function run() external {
vm.startBroadcast(DEPLOYER);
Kernel kernel = new Kernel{salt: 0}(IEntryPoint(ENTRYPOINT_0_7_ADDR));
console.log("Kernel : ", address(kernel));
KernelFactory factory = new KernelFactory{salt: 0}(address(kernel));
console.log("KernelFactory : ", address(factory));
FactoryStaker staker = FactoryStaker(EXPECTED_STAKER);
if (!staker.approved(factory)) {
staker.approveFactory(factory, true);
console.log("Approved");
}
vm.stopBroadcast();
}
}