The New Boston - Core Team Automated Payroll Script

To run:

  • clone repo and install dependencies
    • git clone git@github.com:nax3t/automated-payroll.git
    • cd automated-payroll
    • npm install
  • Rename example.env to .env and populate with required values
  • Change testing variable to false in app.js (if not already false)
  • Run the program with node app.js

Error key:

  • green: payment succeeded
  • red: payment failed (see error)
  • yellow: payment held for manual review due to amount over 10,000 TNBC

Script Notes:

  • The script will automatically pull up all the issues from thenewboston-github repositories, where payments need to do, with the Ready to pay label added to them and in the open state.
    • Check that 'Ready to pay' label added by correct user
    • Update ids being used for 'Ready to pay' label user check
    • Need to update the labels being used in the code to pull in Ready to Pay Timesheet issues from the API
  • Collect this info from issues and core members API:
    • Contributor account address
    • Hourly Rate
    • Total time spent
    • Types of payment: Core team payment / Bounty / Project
    • Issue id
  • Print any transactions where insufficient data is available to make a valid transaction, e.g., no hourly rate
  • Generate appropriate memo for each payment based on standard memo format
  • Print payment sheet. Highlight those issues with more than 10000TNBC to be sent at once.
  • Payer will run the pay command after reviewing the payment sheet.
    • Use either a mailer notification or create a new github issue for these kinds of manual verification payments
  • Payment by the script:
  • Send coins to the contributor
  • Confirm transaction is successful
  • Add Paid label to the issue
  • Remove Ready to pay label to the issue
  • Close the issue
  • Print all successful and failed payments
  • Use agenda js to create a background job that runs the script daily on a production server