This repository contains my Metacrafters frontend DApp project that interacts with a Solidity smart contract deployed on the local Ethereum network. The DApp allows users to perform deposit and withdraw operations and also includes additional functionalities like calculating factorials and checking palindromes.
- Deposit: Users can deposit a specified amount into the smart contract.
- Withdraw: Users can withdraw a specified amount from the smart contract.
Make sure you have the following tools installed before running the DApp:
To set up the project, run the following commands in your terminal:
- Install the required dependencies:
npm install
- Start a local Ethereum network:
npx hardhat node
- Deploy the smart contract on the local network:
npx hardhat run scripts/deploy.js --network localhost
To run the DApp locally, use the following command:
npm run dev
Once the DApp is running, open your browser and navigate to http://localhost:3000 to access the DApp interface.
-
Connect Metamask: Ensure you have the MetaMask extension installed and connected to the local Ethereum network.
-
Wallet Connection: Click the "Please connect your Metamask wallet" button to connect your wallet to the DApp.
-
Deposit: Enter an amount in the input field and click the "Deposit" button to deposit the specified amount into the smart contract.
-
Withdraw: Enter an amount in the input field and click the "Withdraw" button to withdraw the specified amount from the smart contract.
-
Calculate Factorial: Enter a positive number in the input field and click the "Calculate Factorial" button to calculate the factorial of the entered number.
-
Check Palindrome: Enter a number in the input field and click the "Check Palindrome" button to check if the entered number is a palindrome.
-
Display My Info: Click the "Umesh Ola" button to display training and roll number information.