Ether Manager
Node.js scripts for setting up event listeners for Round Robin prototype. It
creates cron jobs
for reallocxation assignments among Amara linguists.
Installation
Ether Manager uses Infura to connect to Etherum. To run the manager it is
required to set up an Infura project, see here
- Install
Node.js
and npm
, see here - Clone the repository
git clone https://github.com/P2PModels/ether-manager.git
- Get into the directory
ether-manager
- Run
npm install
to install dependencies - Rename the file
.env.example
to .env
- Set Infura keys and project endpoint in
.env
- Run
npm run start
Docker
- Rename the file
.env.example
to .env
- Set Infura keys and project endpoint in
.env
- Create container image
docker image -t ether-manager .
- Execute container (in background)
docker run -d ether-manager
After starting Ether Manager listens for events emitted into the Ethereum
rinkedby network.
Restart contract
From time to time, it might be required to "reset" the state of the contract (i.e., remove
tasks, allocations, and users). To do, execute npm run restart-contract
. After
contract restarted, it might be needed to generate mock data, to do so run
npm run create-mock-data
.
Troubleshooting
Error 126, Permission denied
It happens when trying to run a script that does not have executable right.
Solution assign execution permission to the script. In UNIX-based operating systems
run the command chmod +x <script_name>
. For more information see here