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