Skip to content

About

A web3 app for a decentralized token (ERC20) for the Ethereum network. Made using Solidity, HTML/CSS, TypeScript, Ethers.js, Vite and Hardhat ๐Ÿ’ฐ

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽŸ๏ธ ProjectCreds

๐Ÿ’ฐ ProjectCred (symbol: PC) is a decentralized token which can act as a transfer of value (digital money/cryptocurrency) without any central authorities (like banks). It is a smart contract which can be deployed on Ethereum networks.

๐Ÿ’Ž This project is a robust and secure implementation of the ERC20 token standard. This allows it to seamlessly integrate with popular Web3 apps and browser extensions like MetaMask. The contract is written in Ethereum's programming language, Solidity and the front-end is powered by HTML/CSS, TypeScript, Ethers.js and Vite (bundler). The back-end (deployment script for local networks, unit tests and the Ethereum network itself) is powered by Hardhat.

๐ŸŒ  Features

  • โœจ Complete implementation of the ERC20 specification with optional functions (9 functions + 2 events) + 2 extra functions (for increasing & decreasing allowances)
  • ๐Ÿ” Allows transfer of ownerships via the changeOwner() function
  • ๐Ÿ“‹ 14 unit tests which test all possible functionality (including edge cases)
  • ๐ŸฆŠ MetaMask integration to make the experience more user friendly
  • ๐Ÿ“ฑ Responsive and elegant front-end web app
  • ๐Ÿ› ๏ธ Can be tested locally for free (off the Ethereum Mainnet) with just a few simple steps (described below)

๐ŸงŠ Dependencies

  1. Install NodeJS on your system.
  2. Get the MetaMask extension for your browser.

๐Ÿ“ฆ Local Deployment

  1. First, clone the repository:
git clone https://github.com/pranavcl/project-creds
  1. Enter the cloned repository and run npm install:
cd project-creds
npm install
  1. In a new terminal session, start the local Ethereum network and deploy your smart contract:
npm run deploy
  1. Copy the address on which the smart contract was deployed:

Screenshot of a terminal with the deployment address

Also, scroll up in the terminal output and copy the private key for the first account and keep it aside:

Screenshot of a terminal with private keys

  1. Paste the address (NOT the private key) in the src/address.json file like so (your address will be different):
{
  "contractAddress": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
  "networkAddress": "http://localhost:8545"
}
  1. Go to your browser, open the MetaMask extension and click on the drop-down at the top left.

MetaMask extension window

  1. Click on the "+ Add a custom network button" at the bottom, enter the following network details and click "Save":

Adding a custom network in the MetaMask extension window

โš ๏ธ Note: Do NOT accept MetaMask's suggestion to change the Network name or Currency symbol.

โœ… MetaMask should inform you that the network was added successfully.

  1. Click on the same drop-down as step 6 and select your newly added network (Localhost)

  2. Now, click on the drop-down that is at the top and center:

MetaMask extension window

  1. Click on the "+ Add account or hardware wallet" button and then click on "Private Key" under "Import a wallet or account". Paste the private key you kept aside in step 4 and click on "Import".

  2. Now, in another terminal session (not the same one as step 3), start the DApp front-end:

cd project-creds
npm run start
  1. Go to the URL that Vite gives you (probably something like http://localhost:5173) and click on Connect to MetaMask. Approve the connection from the pop-up.

๐Ÿงช Unit Tests (Optional)

If you want to run the unit tests:

npm run test

๐Ÿ–ฅ๏ธ Output

Enjoy! ๐ŸŽ‰

The web DApp's user interface

License

Published under the ProjectCreds license

About

A web3 app for a decentralized token (ERC20) for the Ethereum network. Made using Solidity, HTML/CSS, TypeScript, Ethers.js, Vite and Hardhat ๐Ÿ’ฐ

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages