Created
July 9, 2021 03:16
-
-
Save JimLynchCodes/aef39d2c3b8301a408cfe3f82767c8e5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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