Commit 514c9eb0ce91f9e445870872bda792c000dc160b
inital commit
Joran committed on 5/17/2017, 5:12:23 AMFiles changed
.gitignore | added |
ReadMe.md | added |
index.js | added |
package.json | added |
ReadMe.md | ||
---|---|---|
@@ -1,0 +1,16 @@ | ||
1 … | +# ⏅EthWatcher | |
2 … | + | |
3 … | +◎ Know thyself for to not will leave thy confused | |
4 … | + | |
5 … | + | |
6 … | +### Introduction | |
7 … | + | |
8 … | +This thing watches an ethereum address for Events, then returns them to STDOUT ready for piping to other commands, like TWITTER or Secure Scuttlebutt | |
9 … | + | |
10 … | +### Run | |
11 … | + | |
12 … | +``` | |
13 … | +ethwatcher "0x27dcf986bc1151b39ceadd53660e4af56b0d5f84" \ | |
14 … | + -event "NewPotato" \ | |
15 … | + -abi ./potatoes.abi | |
16 … | +``` |
index.js | ||
---|---|---|
@@ -1,0 +1,12 @@ | ||
1 … | +#!/usr/bin/env node | |
2 … | +var program = require('commander'); | |
3 … | +var chalk = require('chalk'); | |
4 … | + | |
5 … | +program | |
6 … | +.arguments('<contract_address>') | |
7 … | +.option('-e, --event <event>', 'The event name to watch for') | |
8 … | +.option('-a, --abi <abi>', 'Path to the ABI definition') | |
9 … | +.action(function(address) { | |
10 … | + console.log(console.log(chalk.bold.cyan(`Watching address: ${address}`))) | |
11 … | +}) | |
12 … | +.parse(process.argv); |
package.json | ||
---|---|---|
@@ -1,0 +1,22 @@ | ||
1 … | +{ | |
2 … | + "name": "eth_watcher", | |
3 … | + "version": "1.0.0", | |
4 … | + "description": "Watch an Ethereum contract for events", | |
5 … | + "main": "index.js", | |
6 … | + "scripts": { | |
7 … | + "test": "echo \"Error: no test specified\" && exit 1" | |
8 … | + }, | |
9 … | + "keywords": [ | |
10 … | + "Ethereum", | |
11 … | + "Events" | |
12 … | + ], | |
13 … | + "author": "Joran Kikke", | |
14 … | + "license": "GPL-3.0", | |
15 … | + "bin": { | |
16 … | + "ethwatcher": "./index.js" | |
17 … | + }, | |
18 … | + "dependencies": { | |
19 … | + "chalk": "^1.1.3", | |
20 … | + "commander": "^2.9.0" | |
21 … | + } | |
22 … | +} |
Built with git-ssb-web