@noblocknoparty/blockparty-contracts v0.9.0
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
- geth
- nodejs
- npm
- webpack
- ganache-cli = v6.0.3 (ganache-core: 2.0.2) for local use
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.
6 years ago