Posts

Showing posts with the label ethereumlotterysmartcontract

Lottery Project Compiling: A Complete Tutorial

Image
In this tutorial, We are going to finally compile the lottery project . After making sure that it has been successfully compiled, we will run all the written tests to make sure everything works correctly in the contract. In the end, we will deploy the Decentralized Application on the Rinkeby test network. To be able to interact with the deployed contract, we will get some test Link tokens from Rinkeby Faucet. Compiling the Lottery Project Dapp In this part, we are going to finally compile, run and test our Lottery Dapp. Coppied to clipboard. brownie compile The result should be: Coppied to clipboard. Brownie v1.18.1 - Python development framework for Ethereum 1.33MiB [00:03, 402kiB/s] New compatible solc version available: 0.7.0 Compiling contracts... Solc version: 0.7.0 Optimizer: Enabled Runs: 200 EVM Version: Istanbul WARNING: Unable to compile OpenZeppelin/openzeppelin-contracts@3.4.0 due to a CompilerError - you ma...

Lottery Project Using Brownie: A Full Scale Dapp

Image
In this article, we are going to get started with the lottery project using Brownie. The main purpose of a lottery project in every network is to check the reliability of the randomness and use it for different purposes such as the lottery itself. In the lottery project, we are going to create a decentralized application using Brownie . In the end, we will be able to run the smart contract via Etherscan. Using Brownie for Lottery Project In this tutorial, we are going to first write a smart contract related to a lottery and write scripts related to testing and deploying the smart contract. We also want to make it a full-scale decentralized application, meaning that it is going to be an end-to-end Dapp with easy to use user experience. Every lottery needs a random variable. As randomness is a very complicated concept when it is going to be applied on the internet and here we are going to run it via the blockchain, it must be protected from hacks and cheating. What makes random...