This repository contains a Solidity smart contract called BankATM which provides basic banking functionalities like deposit, withdraw, and getting the account balance. The contract also includes a frontend implementation to interact with the contract on the Ethereum blockchain.
BankATM Smart Contract This repository contains a Solidity smart contract called BankATM which provides basic banking functionalities like deposit, withdraw, and getting the account balance. The contract also includes a frontend implementation to interact with the contract on the Ethereum blockchain.
Smart Contract Details The BankATM contract has the following functions:
- deposit(uint256 _amount): Allows the owner to deposit Ether into the account.
- withdraw(uint256 _withdrawAmount): Allows the owner to withdraw Ether from the account.
- getBalance(): Returns the current account balance.
- getOwner(): Returns the address of the account owner.
Create a hardhat project and write the contract in it and then run your blockchain connect and deoloy it with goerli testnet now write the code for frontend and connect backend with frontend with help of the artifacts abi Now run the fronted and check all the functionality
Note: Every DEPLOYMENT you have a new contract address change it in the contract adress column in fronted
hardhat installation
-
npm install --save-dev hardhat
-
npx hardhat
-
Create a javascript project
-
write the contract
-
Run the blockchain
-
Deploy the contract npx hardhat run scripts/deploy.js --network goerli
-
Make a frontend page and implement all the function in the code
-
Now entere your contract address
-
enter you abi
-
run your project
-
Test the project by connecting your wallet
-
Make sure you have the testnet amount present in wallet whatever the network you are deploying
Kuldeep Yadav