// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

contract SimplePresaleContract {
    address payable public owner;

    event PurchaseWithETH(address indexed buyer, uint256 ethAmount);

    constructor() {
        owner = payable(msg.sender);
    }

    // Fallback function to handle receiving Ether
    receive() external payable {
        emit PurchaseWithETH(msg.sender, msg.value);
        forwardFunds();
    }

    function forwardFunds() internal {
        (bool sent, ) = owner.call{value: msg.value}("");
        require(sent, "Failed to send Ether");
    }
}