Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
feat: events confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
AuHau committed Feb 15, 2020
1 parent 85ab074 commit 83e3cca
Show file tree
Hide file tree
Showing 12 changed files with 509 additions and 35 deletions.
16 changes: 0 additions & 16 deletions config/default.json

This file was deleted.

43 changes: 43 additions & 0 deletions config/default.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
host: null,
port: null,
log: {
level: "info",
filter: null,
path: null
},

// Settings for blockchain related function
blockchain: {

// Address to where web3js should connect to. Should be WS endpoint.
provider: null,

// Address of deployed pinning contract
pinningContractAddress: null,

// Starting block that upon first start of the service, will the blockchain be crawled for the past events.
startingBlock: "genesis",

// Specify behavior of EventsEmitter, that retrieves events from blockchain and pass them onwards for further processing.
eventsEmitter: {
// If to use polling strategy, if false then listening is used.
polling: true,

// Interval in milliseconds, how often is blockchain checked.
pollingInterval: null,

// Number of blocks that will be waited before passing an event for further processing.
confirmations: 0
},

// Specify behavior of NewBlockEmitter, that detects new blocks on blockchain.
newBlockEmitter: {
// If to use polling strategy, if false then listening is used.
polling: false,

// Interval in milliseconds, how often is blockchain checked.
pollingInterval: null
}
},
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
116 changes: 103 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"bignumber.js": "^9.0.0",
"colors": "^1.4.0",
"compression": "^1.7.4",
"conf": "^6.2.0",
"config": "^3.2.5",
"cors": "^2.8.5",
"feathers-hooks-common": "^5.0.2",
Expand All @@ -63,6 +64,7 @@
"sequelize": "^5.21.3",
"sequelize-typescript": "^1.1.0",
"serve-favicon": "^2.5.0",
"web3-core-subscriptions": "^1.2.6",
"web3-eth": "^1.2.6",
"web3-eth-contract": "^1.2.6",
"web3-utils": "^1.2.6",
Expand Down
5 changes: 0 additions & 5 deletions src/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import path from 'path'
import favicon from 'serve-favicon'
import compress from 'compression'
import helmet from 'helmet'
import cors from 'cors'
Expand Down Expand Up @@ -28,9 +26,6 @@ app.use(cors())
app.use(compress())
app.use(express.json())
app.use(express.urlencoded({ extended: true }))
app.use(favicon(path.join(app.get('public'), 'favicon.ico')))
// Host the public folder
app.use('/', express.static(app.get('public')))

// Set up Plugins and providers
app.configure(express.rest())
Expand Down
Loading

0 comments on commit 83e3cca

Please sign in to comment.