RON is a layer 2 token(ERC-20) deployed on Ropsten(ETH) TESTNET. The smart contract is written in solidity on truffle. The dApp is built using Next.js. Redis is used as the primary datastore. Deployed on Vercel platform. Used TypeScript with React for developing the frontend.
Wrote the ERC20 interface from EIP‐20: Token Standard. Created methods to imitate an Initial Coin Offering (ICO), where tokens are minted and sent automatically if ether transactions are made.
The directory is divided into two folders. /truffle
holds all files regarding the smart contract. /client
is for the next.js files for the dApp.
Directory | Link and Description |
---|---|
/truffle/contracts | Holds the ERC20 contracts and interfaces, RonaldoCoin contract. |
/truffle/test | Unit tests using Chai and Mocha. |
/client/pages/index | Holds the entrypoint to the next.js dApp. |
/client/lib | Ethereum provider setup with Metamask, for connecing to Ropsten. |
/client/lib/redis | Redis schema using Redis OM. |
/client/pages/api | API to communicate with redis cloud. |
-
Clone the project.
git clone https://github.com/SD170/ethereum-ronaldo-coin
-
Change directory.
cd client
-
Install the dependencies. Use
pnpm
.pnpm install
-
Add a ".env" file to the project root directory.
touch .env.local echo REDIS_URL=<your redis url> >> .env.local
-
Build project.
npm run build
-
run project.
npm start
- Solidity - For Smart contract development
- Truffle - For Smart contract development
- Next.Js - For dApp development
- Vercel - For dApp deployment