// File: contracts/Proposal.sol



// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.18;

contract Proposal {
    address payable public sean;
    address payable public lynette;

    event WillYouMarryMe(address who);
    event Yes();
    event No();

    constructor() payable {
        sean = payable(msg.sender);
    }

    function propose(address who) payable public {
        require(msg.sender == sean, "You aren't Sean");

        lynette = payable(who);
        emit WillYouMarryMe(lynette);
    }

    function yes() public {
        require(msg.sender == lynette, "You aren't Lynette");

        emit Yes();

        (bool sent, bytes memory data) = lynette.call{value: address(this).balance}("");
        require(sent, "Failed to send Ether");
    }

    function no() public {
        require(msg.sender == lynette, "You aren't Lynette");

        emit No();

        (bool sent, bytes memory data) = sean.call{value: address(this).balance}("");
        require(sent, "Failed to send Ether");
    }
}