forked from ithacaxyz/account
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeployAll.s.sol
More file actions
38 lines (33 loc) · 1.42 KB
/
Copy pathDeployAll.s.sol
File metadata and controls
38 lines (33 loc) · 1.42 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
30
31
32
33
34
35
36
37
38
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import {Script} from "forge-std/Script.sol";
import {Orchestrator} from "../src/Orchestrator.sol";
import {IthacaAccount} from "../src/IthacaAccount.sol";
import {LibEIP7702} from "solady/accounts/LibEIP7702.sol";
import {Simulator} from "../src/Simulator.sol";
import {SimpleFunder} from "../src/SimpleFunder.sol";
import {SimpleSettler} from "../src/SimpleSettler.sol";
import {Escrow} from "../src/Escrow.sol";
contract DeployAllScript is Script {
address public orchestrator;
address public accountImplementation;
address public accountProxy;
address public simulator;
address public funder;
address public simpleSettler;
address public escrow;
function run() external {
vm.startBroadcast();
orchestrator = address(new Orchestrator());
accountImplementation = address(new IthacaAccount(address(orchestrator)));
accountProxy = LibEIP7702.deployProxy(accountImplementation, address(0));
simulator = address(new Simulator());
funder = address(new SimpleFunder(vm.envAddress("FUNDER"), msg.sender));
address[] memory ocs = new address[](1);
ocs[0] = address(orchestrator);
SimpleFunder(payable(funder)).setOrchestrators(ocs, true);
simpleSettler = address(new SimpleSettler(vm.envAddress("SETTLER_OWNER")));
escrow = address(new Escrow());
vm.stopBroadcast();
}
}