/blockparty

NO BLOCK NO PARTY

Primary LanguageJavaScriptMIT LicenseMIT

Build Status Coverage Status

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.

Targetted users

The current users are mostly participants of Blockchain related events, such as conference pre/post dinner, meetups, and hackathons. The users are expected to own some Ether (a virtual currency, shorten for ETH), to pay the deposit of the event, as well as usage fee of its platform called [Ethereum](http://ethereum.org).

How to setup

Option 1: access from mobile browser

This is the recommended way. The easier step by step guide is here

  • Step 1: Download Status.im, Cipher Browser or Trust Wallet from App store/Google play
  • Step 2: Create an account on your wallet, and make sure you have some Ether.
  • Step 3: Type the event url on their built in browser

Option 2: access from desktop browser with Metamask Chrome extension

This is the most popular way right now.

  • 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 connecting to local node

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 'RSVP'. It will take 10 to 30 seconds to get verified and you will receive notification. Once registered, join the party! Your party host (the contract owner) will mark you as attend. Once the host clicks `payout`, then you are entitled to `withdraw` your payout.

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: Encrypt participant name

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

Changing number of participants

./node_modules/.bin/truffle migrate --config '{"name":"CodeUp No..", "limitOfParticipants":15}'

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.