-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathdeploy_ProdStack.s.sol
More file actions
49 lines (37 loc) · 1.75 KB
/
Copy pathdeploy_ProdStack.s.sol
File metadata and controls
49 lines (37 loc) · 1.75 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
39
40
41
42
43
44
45
46
47
48
49
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.0 <0.9.0;
import {Script} from "forge-std/Script.sol";
// ExtensibleFallbackHandler
import {ExtensibleFallbackHandler} from "../lib/safe/contracts/handler/ExtensibleFallbackHandler.sol";
// ComposableCoW
import {ComposableCoW} from "../src/ComposableCoW.sol";
// Order types
import {TWAP} from "../src/types/twap/TWAP.sol";
import {GoodAfterTime} from "../src/types/GoodAfterTime.sol";
import {PerpetualStableSwap} from "../src/types/PerpetualStableSwap.sol";
import {TradeAboveThreshold} from "../src/types/TradeAboveThreshold.sol";
import {StopLoss} from "../src/types/StopLoss.sol";
import {ComposableCowPoller} from "../src/types/ComposableCowPoller.sol";
// Value factories
import {CurrentBlockTimestampFactory} from "../src/value_factories/CurrentBlockTimestampFactory.sol";
contract DeployProdStack is Script {
function run() external {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
address settlement = vm.envAddress("SETTLEMENT");
vm.startBroadcast(deployerPrivateKey);
// Deploy ExtensibleFallbackHandler
new ExtensibleFallbackHandler{salt: "v1.0.0"}();
// Deploy ComposableCoW
ComposableCoW composableCow = new ComposableCoW{salt: "v1.0.0"}(settlement);
// Deploy order types
new TWAP{salt: "v1.0.0"}(composableCow);
new GoodAfterTime{salt: "v1.0.0"}();
new PerpetualStableSwap{salt: "v1.0.0"}();
new TradeAboveThreshold{salt: "v1.0.0"}();
new StopLoss{salt: "v1.0.0"}();
// Deploy the just-in-time funding poller
new ComposableCowPoller{salt: "v1.0.0"}(composableCow);
// Deploy value factories
new CurrentBlockTimestampFactory{salt: "v1.0.0"}();
}
}