Skip to content

Instantly share code, notes, and snippets.

@Ultra-Tech-code
Created August 3, 2022 17:08
Show Gist options
  • Save Ultra-Tech-code/d1a68029e191b38d7f40680419a9c53b to your computer and use it in GitHub Desktop.
Save Ultra-Tech-code/d1a68029e191b38d7f40680419a9c53b to your computer and use it in GitHub Desktop.
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
contract fundContract{
mapping(address => uint) balances;
function deposit() public payable{
require(msg.value > 1, "Your deposit must be greater than 1 eth");
balances[msg.sender] += msg.value;
}
function getBalance() public view returns(uint){
return balances[msg.sender];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment