-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create deploy script and change license
- Loading branch information
Showing
5 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.24; | ||
|
||
import {Script, console2} from "forge-std/Script.sol"; | ||
import {PODv2} from "../src/PODv2.sol"; | ||
|
||
contract Deploy is Script { | ||
address constant EXPECTED_POD = 0xB00B5D137709a301283E225e536E85882Cfadd55; | ||
address constant ownerSafe = vm.envAddress("OWNER_ADDRESS"); | ||
|
||
function run() public { | ||
console2.log("Deploying on chain ID", block.chainid); | ||
|
||
if (EXPECTED_POD.code.length == 0) { | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
vm.startBroadcast(deployerPrivateKey); | ||
PODv2 pod = new PODv2(ownerSafe); | ||
assert(address(pod) == EXPECTED_POD); | ||
vm.stopBroadcast(); | ||
console2.log("PODv2:", address(pod), "(deployed)"); | ||
} else { | ||
console2.log("PODv2:", EXPECTED_POD, "(exists)"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters