/blockparty

NO BLOCK NO PARTY

Primary LanguageJavaScriptMIT LicenseMIT

What is this?

Demo

Demo Video

Have you ever encountered free party or meetup and realised that half the people registered did not actually turn up? BlockParty solves this problem by providing a simple incentive for people to register only if they mean it.

How does this work?

Simple. You pay small deposit when you register. You lose your deposit if you do not turn up. You will get your deposit back + we split the deposit of whom did not turn up. You go to party and may end up getting more money.

How to setup

Option 1: access from Mist

This is the standard way of accessing Dapp

Option 2: access from browser and Metamask Chrome extension

For those of you who have problem installing the Mist browser, or no time to download big blockchain, why don't you try out via this browser based extension

  • Step 1: Install Metamask Chrome extension
  • Step 2: Create an account on your metamask, and make sure you have some Ether.
  • Step 3: Refresh the page

Option 3: access from normal browser

This has been the standard way to access Dapp prior to Ethereum Wallet (lower than v 0.7)

geth --unlock 0 --rpc --rpcapi "eth,net,web3" --rpccorsdomain URL

NOTE: --unlock 0 will unlock with one account. --unlock 0 1 will unlock with two accounts.

How to play?

  • Type your twitter account, pick one of your address, then press 'Register'. It will take 10 to 30 seconds to get verified and you will receive notification.

FAQ

Can I cancel my registration?

No

What happens if I do not withdraw my payout?

If you do not withdraw your payout within one week after the event is end, the host (contract owner) will clear the balance from the contract and the remaining blance goes back to the host, so do not keep them hanging

What happens if the event is canceled?

In case the event is canceled, all registered people can withdraw their deposit. Make sure that you register with correct twitter account so that the host can notify you.

What if there is a bug in the contract!

If the bug is found before the contract is compromised, the host can kill the contract and all the deposit goes back to the host so he/she can manually return the deposit. If the contract is compromised and the deposit is stolen, or his/her private key is lost/stolen, I am afraid that the host cannot compensate for you. Please assess the risk before you participate the event.

Can I host my own event using BlockParty?

Please contact the author of this project if you are interested.

Terms and conditions

By downloading and deploying this software, you agree to our terms and conditions of use. We accept no responsibility whether in contract, tort or otherwise for any loss or damage arising out of or in connection with your use of our software and recommend that you ensure your devices are protected by using appropriate virus protection.

Hacking guide

If you are interested in contributing to blockparty, have a look into "help wanted" tag on Github issues. They are relatively easy and does not require so much application specific knowledges.

Prerequisite

Installation

  • Run npm

Running test

  • Run ganache-cli -a 300 in one console
  • Generate test public/secret key
cd tmp/
openssl genrsa 2048 > test_private.key
openssl rsa -pubout < test_private.key > test_public.key
  • Run npm run test

Running test coverage

./node_modules/.bin/solidity-coverage

Running locally

  • Run local node (geth, ganache test rpc, etc)
  • Run ./node_modules/.bin/truffle migrate --network development
  • Run npm run dev
  • Open http://localhost:8080

NOTE: If you have metamask, your account on ganache will not have ether to register. Either send it via terminal, or open the browser in the incognite mode, so you use default account on local node.

Building asset files to deploy

  • Run npm run build
  • Upload the content of files under build directory

Encryption (experimental)

By passing public key file location to parameter of Conference during migration, it can allow user to register with their user name encrypted.

Configurable values (experimental)

Event name is configurable as name

eg:

./node_modules/.bin/truffle migrate --config '{"name":"CodeUp No..", "encryption":"./tmp/test_public.key"}'

Deploying and running on real network

For ropsten and mainnet it now deploys via Infura. Pass the extra to set deployment specific

--network $NETWORK --mnemonic $SECRET

NOTE: ropsten and mainnet uses different gasPrice. Check truffle.js file and scripts/util/set_gas.js for the detail.