likecoin / likecoin-tx-poll

Firestore based service of polling eth status and resending tx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

likecoin-tx-poll

CircleCI Greenkeeper badge

A firestore based ETH tx status poller (and auto resender)

Folder structure

├── config
│   ├── config.js # config file
│   └── serviceAccountKey.json # firestore crendentials
├── util # helper functions
│   ├── db.js # firestore watch helper
│   ├── gcloudPub.js # optional gcloud pubsub log
│   └── web3.js # web3/tx related functions
├── poll.js # poller handler
├── retry.js # retry handler
└── index.js # main entry

Config setting

Please refer to comments in config.js for example and explanation.

Firestore required field

Except txHash, Most fields are optional but useful for log.

rawSignedTx and delegatorAddress is required for retrying tx.

{
      txHash,
      from,
      to,
      value,
      fromId,
      toId,
      currentBlock,
      nonce,
      rawSignedTx, // tx.rawTransaction
      delegatorAddress, // sender address for retrying, must match original sender
}

Dev Setup

# Remeber to setup config.js and serviceAccountKey.json first!

# install dependencies
npm install

# run the program
npm start

# ... or docker-based
docker-compose up

About

Firestore based service of polling eth status and resending tx

License:GNU General Public License v3.0


Languages

Language:JavaScript 99.1%Language:Shell 0.6%Language:Dockerfile 0.3%