https://github.com/codebatine/degen-contract
A project to practice React with Hardhat, Solidity smart contract, Metamask and Ethers.js.
https://github.com/codebatine/degen-contract
ethers ethersjs hardhat javascript metamask smart-contracts solidity
Last synced: 7 months ago
JSON representation
A project to practice React with Hardhat, Solidity smart contract, Metamask and Ethers.js.
- Host: GitHub
- URL: https://github.com/codebatine/degen-contract
- Owner: codebatine
- Created: 2024-03-15T00:41:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-16T23:28:17.000Z (about 2 years ago)
- Last Synced: 2025-01-20T21:56:55.952Z (about 1 year ago)
- Topics: ethers, ethersjs, hardhat, javascript, metamask, smart-contracts, solidity
- Language: JavaScript
- Homepage:
- Size: 257 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Degen Contract
## What is this?
A project to practice React with Hardhat, Solidity smart contract, Metamask and Ethers.js.
## Installation
1. Clone the Repository
`git clone https://github.com/codebatine/Degen-Contract.git`
2. Navigate to the Project Directory
`cd Degen-Contract`
3. Install Dependencies
`npm i -y`
4. Install Hardhat
`npm i hardhat`
5. Set Up Metamask
- Install the Metamask extension for your browser.
- Create an account or import an existing one.
- Connect to the Hardhat Network by clicking on the network dropdown (usually it will say "Ethereum Mainnet").
- Select "Custom RPC" to add the Hardhat Network details:
- Network Name: Hardhat
- New RPC URL: http://localhost:8545
- Chain ID: 31337
- Currency Symbol (optional): ETH
6. Compile your smart contracts with:
`npx hardhat compile`
7. Then deploy them to the Hardhat Network with:
`npx hardhat run --network localhost scripts/deploy.js`
Replace scripts/deploy.js with the path to your deployment script.
8. Update the Smart Contract Address
After deploying your smart contracts, Hardhat will output the address of the deployed contract. You need to take this address and update your application's configuration to use it.
Open the `config.js` file (or wherever your contract address is stored), and replace the existing contract address with the new one.
9. Run the Project
`npm run dev`
## Screenshot :camera_flash:
