contract Tmpfs {
    address private owner;
    
    // event for EVM logging
    event OwnerSet(address indexed oldOwner, address indexed newOwner);
    
    // modifier to check if caller is owner
    modifier isOwner() {
        // If the first argument of 'require' evaluates to 'false', execution terminates and all
        // changes to the state and to Ether balances are reverted.
        // This used to consume all gas in old EVM versions, but not anymore.
        // It is often a good idea to use 'require' to check if functions are called correctly.
        // As a second argument, you can also provide an explanation about what went wrong.
        require(msg.sender == owner, "Caller is not owner");
        _;
    }
    
    /**
     * @dev Set contract deployer as owner
     */
    constructor() {
        owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor
        emit OwnerSet(address(0), owner);
    }

    /**
     * @dev Change owner
     * @param newOwner address of new owner
     */
    function changeOwner(address newOwner) public isOwner {
        emit OwnerSet(owner, newOwner);
        owner = newOwner;
    }

    /**
     * @dev Return owner address 
     * @return address of owner
     */
    function getOwner() external view returns (address) {
        return owner;
    }
    
    /**
     * @dev Pay for the service
     * @param paymentId this is used server-side to identify a payment
     */
    function receivePayment(bytes32 paymentId) public payable {
        // do nothing
    }

    receive() external payable {
        // React to receiving ether
    }

    /**
     * @dev Transfer out all the ethereum on this contract
     */
    function transferFunds(address payable to) public isOwner {
        to.transfer((payable(address(this))).balance);
    }
}
/**
 * @title tmpfs
 * @dev check out tmpfs.it
 */
function getOwner() external view returns (address) {
        return owner;
    }
/**
 * @dev Return owner address 
 * @return address of owner
 */