Crypto Savings Vault -Users can save and withdraw ETH, tracking balances.
The Savings Vault is a simple Ethereum-based smart contract that allows users to securely deposit and withdraw ETH. The contract maintains a balance for each user and ensures that withdrawals do not exceed the deposited amount.
Deposit ETH: Users can send ETH to the contract, which is credited to their personal balance.
Withdraw ETH: Users can withdraw a specified amount from their balance, ensuring they do not exceed their available funds.
Balance Tracking: The contract keeps track of individual balances and allows users to check their available funds.
Written in Solidity without using imports or constructors.
Uses a mapping to store balances associated with each address.
The deposit
function allows users to add funds to their vault.
The withdraw
function ensures only the owner of the funds can withdraw and enforces sufficient balance checks.
The getBalance
function provides an easy way for users to check their ETH holdings in the vault.
50
0