diff --git a/contracts/cctf_vault_draft.sol b/contracts/cctf_vault_draft.sol new file mode 100644 index 0000000..2d68509 --- /dev/null +++ b/contracts/cctf_vault_draft.sol @@ -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"); + } +} \ No newline at end of file