This repo includes the backend for the lottery-application, which is used to deploy smart-contracts within the Ethereum blockchain. The frontend was developed with Next.js, to find the configuration follow the next link: Lottery
- Next.js - Framework used for frontend
- TypeScript - Programming Language fo frontend
- Web3.js - Library to manage transactions among betters wihtin Next.js
- MetaMask - Virtual wallet to hold cryptocurrency
- Infura - API which connects projects to the Ethereum Blockchain
- Solidity - Programming Language for smart-contracts
- Truffle - Framework for deploying smart-contracts
- Create a .env file in the project which contains your Ethereum address and Infura's API Key (Infura Rinkeby)
// .env file
PRIVATE_KEY_1=Your Ethereum Address
INFURA_API_KEY=Your Infura's API key
- Metamask is essential since the program is implemented to use it
- To deploy smart-contracts a small amount of Ethereum is needed, so in the internet there are lot of pages to get Ethereum for Rinkeby's testnet
- To carry out the transactions, smart-contracts need LINKs which is a type of cryptocurrency, to get them you can go to ChainLink, after getting them, send those LINKs to the smart-contract's address
- Install the dependencies
Run the following command to execute and deploy your smart-contracts
truffle migrate --network rinkeby