This is an advanced lottery smart contract explaining some of the very useful CRUD operations required to create an application using solidity on Ethereum.
Uses very less amount of gas for doing operations such as deleting data from array, finding data from array, by using Struct to store index pointer to the array of data. A blog article would be better I guess to understand the contract. Please read the README of vuejs front-end for this contract to know all features of this contract.
$ git clone git@github.com:ashisherc/advanced-solidity-lottery-application.git
$ cd advanced-solidity-lottery-application/ethereum
$ npm install
open config.js file and make the changes accordingly.
SEED_WORDS: "12 WORD SEED HERE",
PROVIDER_URL: "Provider URL here, exp. from infura.io"
$ npm test
$ node compile
This will generate build files inside /build folder, required to deploy the contract and to use in front-end.
$ npm run deploy