// Deposit funds in contract function deposit(uint amount) public payable { require(msg.value == amount, 'msg.value must be equal to amount'); balance[msg.sender] = amount; }
// Withdraw funds from contract function withdraw(uint amount) public { require(amount <= balance[msg.sender], 'amount must be less than balance');