Skip to content

Commit 3a04e3b

Browse files
committed
Deployment scripts
1 parent 6019624 commit 3a04e3b

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

script/DeployEthPixelWar.s.sol

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.13;
3+
4+
import {Script} from "forge-std/Script.sol";
5+
import {console} from "forge-std/console.sol";
6+
import {EthPixelWar} from "../src/EthPixelWar.sol";
7+
8+
contract DeployLiteMode is Script {
9+
address public initialOwner = msg.sender;
10+
uint16 public gridSize = 10;
11+
bool public liteMode = false;
12+
13+
function run() external returns (EthPixelWar) {
14+
vm.startBroadcast();
15+
EthPixelWar ethPixelWar = new EthPixelWar(gridSize, liteMode, initialOwner);
16+
vm.stopBroadcast();
17+
console.log("Deployed EthPixelWar contract at:", address(ethPixelWar));
18+
return ethPixelWar;
19+
}
20+
}

script/DeployEthPixelWarLite.s.sol

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.13;
3+
4+
import {Script} from "forge-std/Script.sol";
5+
import {console} from "forge-std/console.sol";
6+
import {EthPixelWar} from "../src/EthPixelWar.sol";
7+
8+
contract DeployLiteMode is Script {
9+
address public initialOwner = msg.sender;
10+
uint16 public gridSize = 10;
11+
bool public liteMode = true;
12+
13+
function run() external returns (EthPixelWar) {
14+
vm.startBroadcast();
15+
EthPixelWar ethPixelWar = new EthPixelWar(gridSize, liteMode, initialOwner);
16+
vm.stopBroadcast();
17+
console.log("Deployed EthPixelWar (lite) contract at:", address(ethPixelWar));
18+
return ethPixelWar;
19+
}
20+
}

0 commit comments

Comments
 (0)