forked from CCTF/DCTF
1
0
Fork 0
DCTF/contracts/cctf_vault_draft.sol

30 lines
719 B
Solidity

// 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");
}
}