forked from CCTF/DCTF
1
0
Fork 0

Vault draft

main
six 2023-08-24 10:26:30 +00:00
parent 7d26cb80fb
commit c72ac688c9
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.17;
import "cctf.sol";
contract CCTF_Vault {
address ctf_manager;
modifier ctf_manager_only {
require(ctf_manager == msg.sender);
_;
}
constructor() payable {
}
function deposit() external payable {}
function pay_winners() external {
// 1. Require that CTF finished
// 2. Check the top players and pay them out (based on what ratios/how?)
//CryptoCTFX.getPlayerScore(1, address);
}
function emergency_withdraw() external ctf_manager_only {
(bool success, ) = msg.sender.call{value: address(this).balance}("");
require(success, "Failed to send Ether");
}
}