-
-
Save KenMan79/1b4f6868615d6bb3753f905b01e51727 to your computer and use it in GitHub Desktop.
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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
contract EthMover is Ownable { | |
uint public totalDonations; | |
function donateEtherToContract() public payable { | |
totalDonations += msg.value; | |
} | |
function flushFunds() public payable onlyOwner { | |
payable(msg.sender).transfer(address(this).balance); | |
} | |
function fundsCurrentlyInContract() public view returns(uint) { | |
return address(this).balance; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment