Skip to content

strange-labs-uk/ethereum-raffle

Repository files navigation

Ethereum HashKeyRaffle Demo

setup

First install nodejs and npm.

$ node --version
v9.11.1

Then install dependencies:

npm install
(cd frontend && npm install)

using ganache and truffle to compile and run tests

First - you need a development server in one window:

npm run ganache

Then in another window, you can run test:

npm run test

To deploy a contract to the blockchain after tests have passed:

npm run compile
npm run migrate
npm run initgame

Alternatively, run all three commands at the same time by doing:

npm run deploy

You can enter development console mode (previously truffle develop):

npm run console

run frontend

To run the frontend in hot reloading mode:

(cd frontend && npm run watch)

Then open your browser to http://localhost:1234