Skip to content

juliatan/solidity-lottery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

  • This is a test project that I've written to learn Solidity.
  • It's a smart contract that allows players to enter a lottery that picks a random winner.
  • The corresponding front end React UI can be viewed here.

Packages

  • Web3 (JavaScript interface to Ethereum blockchain)
  • Ganache (testing)
  • Mocha (testing)
  • Infura (deploying to test network node)
  • Truffle (wallet + deployment provider)
  • dotenv (storing environment variables)

To run

  • npm run test - run test suite
  • node deploy.js - deploy contract to test network
    • You'll need to create a .env file with your INFURA_API and Metamask wallet MNEMONIC. This is parsed in compile.js, so that the variables are available when running node deploy.js.
    • If you get an error to do with ERR_OSSL_EVP_UNSUPPORTED, it'll be due to an issue with the node version you're using. I used nvm to switch to version 15.8.0, which does the trick. Alternatively if you don't want to do this, set this option export NODE_OPTIONS=--openssl-legacy-provider.

Resources

Releases

No releases published

Packages

No packages published