๐ฐ 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.
- โจ 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)
- First, clone the repository:
git clone https://github.com/pranavcl/project-creds- Enter the cloned repository and run
npm install:
cd project-creds
npm install- In a new terminal session, start the local Ethereum network and deploy your smart contract:
npm run deploy- Copy the address on which the smart contract was deployed:
Also, scroll up in the terminal output and copy the private key for the first account and keep it aside:
- Paste the address (NOT the private key) in the
src/address.jsonfile like so (your address will be different):
{
"contractAddress": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
"networkAddress": "http://localhost:8545"
}- Go to your browser, open the MetaMask extension and click on the drop-down at the top left.
- Click on the "+ Add a custom network button" at the bottom, enter the following network details and click "Save":
โ MetaMask should inform you that the network was added successfully.
-
Click on the same drop-down as step 6 and select your newly added network (Localhost)
-
Now, click on the drop-down that is at the top and center:
-
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".
-
Now, in another terminal session (not the same one as step 3), start the DApp front-end:
cd project-creds
npm run start- 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.
If you want to run the unit tests:
npm run testEnjoy! ๐
Published under the ProjectCreds license





