Skip to content

NEM Supernodes Crowdfunding system for the NEM Global Hackaton 2018

Notifications You must be signed in to change notification settings

mateuslopes/nemsupernodes-crowdfunding-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NEM SuperNode CrowdFunding System

This system is an autonomous NEM account that manages the crowdfunding of NEM supernodes. This project was made for the NEM Global Hackaton 2018.

Interacting with the system

Access NEM Supernodes Crowdfunding website to use this application.

Installation

  1. Clone this repo
  2. Run: npm install
  3. Rename file src/app/config.ts.bkp to src/app/config.ts
  4. Edit src/app/config.ts:
    1. Configure the network and active supernode variables
    2. Configure mongodb connection variables
    3. Configure app signature key variable
  5. Run: tsc
  6. Run: npm run mongo-install
  7. Open your mongo blocks_service collection and set block.first and block.last to the same block number you want to start tracking
  8. Create a multisigned account to serve as your supernode account, do some transactions to get a public key.
  9. Open your mongo supernodes collection and set all variables of your supernode account

Running the services

After compiling the code with the tsc command, you can run the following services on the ./scripts directory:

bash blocks-reader

Reads every block and adds it to mongo db server. All transactions are analysed on the database, not relying on sockets incoming transactions for now.

bash payments-incoming

Analyses new blocks searching for incoming transactions for the supernode account, and creates payments or messages actions according to each transaction.

bash payments-outgoing

Announces each payment to the supernode account, splits transactions if needed, control balances, locks and unlocks supernodes accounts.

bash payments-confirmations

Confirms outgoing payments that were waiting to be signed

bash map-xsn

Map all the accounts holding XSN to distribute profits and for community representative decision.

TODO: bash payments-profits-distribution

Sends profits distribution payments to all XSN holders

Releases

No releases published

Packages

No packages published