Video Demo is here
Deploy this contract on Sepolia
Detailed guide is here
Remember to create a .env
file with the following content:
SEPOLIA_API_URL = "https://eth-sepolia.g.alchemy.com/v2/[THE-API-KEY]"
SEPOLIA_PRIVATE_KEY = 'METAMASK-PRIVATE-KEY'
Since the smart contract is deployed for 1-week long duration, we setup a specific version of the contract for testing purposes.
contracts/Lotto_test_version.sol
is for testingcontracts/Lotto.sol
is for deploying
The round duration is set to shorter time for testing purposes.
Next, run the following commands:
npm install
npx hardhat test
npx hardhat run scripts/deploy.ts --network sepolia
You will see a deployed message with the contract address. Copy the address and paste it in the lotto.ts
file in the frontend folder.
Check the frontend readme under the directory frontend
to see how to run the frontend.