-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDeploy.s.sol
44 lines (30 loc) · 1.41 KB
/
Deploy.s.sol
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
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;
import { Script, console } from "forge-std/Script.sol";
import { LibRLP } from "solady/utils/LibRLP.sol";
import { CurtaGolf } from "src/CurtaGolf.sol";
import { Par } from "src/Par.sol";
import { PurityChecker } from "src/utils/PurityChecker.sol";
contract Deploy is Script {
// -------------------------------------------------------------------------
// Deployment addresses
// -------------------------------------------------------------------------
/// @notice The instance of `CurtaGolf` that will be deployed.
CurtaGolf public curtaGolf;
/// @notice The instance of `Par` that will be deployed.
Par public par;
/// @notice The instance of `PurityChecker` that will be deployed.
PurityChecker public purityChecker;
/// @notice The deployer address for `curta-golf`.
address public deployer = 0x5F3146D3D700245E998660dBCAe97DcD7a554c05;
function run() public {
vm.startBroadcast();
purityChecker = new PurityChecker();
// We get what the nonce will be after first deploying `Par.sol`.
address curtaGolfAddress = LibRLP.computeAddress(deployer, vm.getNonce(deployer) + 1);
par = new Par(curtaGolfAddress);
curtaGolf = new CurtaGolf(par, purityChecker);
curtaGolf.transferOwnership(0xA85572Cd96f1643458f17340b6f0D6549Af482F5);
vm.stopBroadcast();
}
}