Simple lottery in solidity.
It' using pseudo random number. Chainlink VRF would be a better option, but that's how this example is made.
You need the following .env
file to make it work :
MNEMONICS='12 random words to generate your account'
INFURA_ENDPOINT="https://rinkeby.infura.io/v3/YOUR_PROJECT_ID"