-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameDeployer.sol
More file actions
66 lines (55 loc) · 1.98 KB
/
GameDeployer.sol
File metadata and controls
66 lines (55 loc) · 1.98 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// File: GameDeployer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./BondingCurveToken.sol";
import "./StakingVault.sol";
import "./CommodityDAO.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract GameDeployer {
IERC20 public usdc;
address public devWallet;
// OIL
BondingCurveToken public oil;
StakingVault public oilVault;
CommodityDAO public oilDAO;
// GAS
BondingCurveToken public gasToken;
StakingVault public gasVault;
CommodityDAO public gasDAO;
// GOLD
BondingCurveToken public gold;
StakingVault public goldVault;
CommodityDAO public goldDAO;
// COFFEE
BondingCurveToken public coffee;
StakingVault public coffeeVault;
CommodityDAO public coffeeDAO;
constructor(
IERC20 _usdc,
address _devWallet,
uint256 totalSupply
) {
usdc = _usdc;
devWallet = _devWallet;
// Deploy OIL
oil = new BondingCurveToken("Oil", "OIL", usdc, totalSupply, 10000 * 1e6, devWallet);
oilVault = new StakingVault(oil);
oil.registerVault(address(oilVault));
oilDAO = new CommodityDAO(oil, oilVault);
// Deploy GAS
gasToken = new BondingCurveToken("Gas", "GAS", usdc, totalSupply, 10000 * 1e6, devWallet);
gasVault = new StakingVault(gasToken);
gasToken.registerVault(address(gasVault));
gasDAO = new CommodityDAO(gasToken, gasVault);
// Deploy GOLD
gold = new BondingCurveToken("Gold", "GOLD", usdc, totalSupply, 10000 * 1e6, devWallet);
goldVault = new StakingVault(gold);
gold.registerVault(address(goldVault));
goldDAO = new CommodityDAO(gold, goldVault);
// Deploy COFFEE
coffee = new BondingCurveToken("Coffee", "COFFEE", usdc, totalSupply, 10000 * 1e6, devWallet);
coffeeVault = new StakingVault(coffee);
coffee.registerVault(address(coffeeVault));
coffeeDAO = new CommodityDAO(coffee, coffeeVault);
}
}