Skip to content

Command-line tool written in JavaScript to interact with the Ethereum Alarm Clock

Notifications You must be signed in to change notification settings

welbon/eac.js-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: eac.js is operational but still considered alpha software, released to the public for expirmentation and testing. We do not recommend using it on the mainnet as it will lose you money under certain situations.

npm version

eac.js-cli

Greenkeeper badge

This is a part of eac.js family that includes

Eac.js-cli is the command line tool that allows you to schedule transactions or run a timenode on the Ethereum Alarm Clock protocol.

Running

Download this repository locally using git clone and install packages from NPM:

git clone [email protected]:ethereum-alarm-clock/eac.js-cli.git
cd eac.jc-cli
npm i

You will need to install and run the latest version of the Parity client on the kovan network. Make sure to follow the steps to unlock a local account.

After starting up your Parity node, you can start the execution client (Timenode) by using the -c option. This will use your default unlocked account as the account from which to begin executing transactions from.

node bin/eac.js -c

If you would like to schedule instead you can use the -s flag to signify that you would like to enter the scheduling wizard. The wizard will walk you through the steps to enter in the required paramters for scheduling a new transaction with the alarm clock. If instead, you already know the parameters and would like to skip the wizard, use the --json flag and feed it a string of the JSON object containing some or all of the following parameters in the example input"

node bin/eac.js -s --json '{
    "temporalUnit": 1,
    "recipient": "0x75E7F640bf6968b6f32C47a3Cd82C3C2C9dCae68",
    "callData": "0x1337",
    "callGas": 23,
    "callValue": 1001,
    "windowStart": 7770777,
    "windowSize": 100,
    "gasPrice": 12,
    "fee": 9090,
    "bounty": 8080,
    "deposit": 707
}'

Tools

For testing purposes you can use tools/tester.js which provides 2 features:

  • node tools/tester.js -b -n 10 sends 10 transactions from and to web3.eth.defaultAccount

  • node tools/tester.js -s shows the information about tx sent by using script above (it recommended to combine with tools like watch for e.g. watch -n5 node tools/tester.js -s

Install From NPM

You can install globablly from NPM:

install globally: npm i -g eac.js-cli
run from command line: eac.js -c
view options: eac.js --h

Docker

Instructions

Contributing

Pull requests are always welcome. Not all functionalities of the Ethereum Alarm Clock smart contracts are translated to this library, it was mostly just utilities needed to write the client and grew from there. If you need some functionality and are not finding it in the API docs, please open a issue or contribute a pull request.

Questions or Concerns?

Since this is alpha software, we highly encourage you to test it, use it and try to break it. We would love your feedback if you get stuck somewhere or you think something is not working the way it should be. Please open an issue if you need to report a bug or would like to leave a suggestion. Pull requests are welcome.

About

Command-line tool written in JavaScript to interact with the Ethereum Alarm Clock

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%