Sign inSign up

smartcontract/deviator

By smartcontract

•Updated about 6 years ago

Image
0

100K+

smartcontract/deviator repository overview

⁠Flux Monitor

CircleCI

Track price deviatons of multiple off chain data feeds from on contract price.

⁠Installation
go install
⁠Documentation
$ fluxmonitor --help

Continuously checks if the price feeds deviate from contract price, and sends a Chainlink request if it does, using external initiator credentials. ENV variables can be set by prefixing flag with DV_: DV_ACCESSKEY

Usage:
  fluxmonitor [required flags] [flags]

Flags:
      --accesskey string     The external initiator access key
      --chainlink string     The URL of the Chainlink Core service (default "localhost:6688")
      --claccesskey string   The access key to identity the node to Chainlink
      --clsecret string      The secret to authenticate the node to Chainlink
      --databaseurl string   DatabaseURL configures the URL for chainlink to connect to. This must be a properly formatted URL, with a valid scheme (postgres://). (default "localhost:6688")
  -h, --help                 help for fluxmonitor
  -j, --json                 Whether or not to output logs as json
      --secret string        The external initiator secret

Note that all flags can be set with environment variables prefixed with DV_:

DV_ACCESSKEY=abc DV_SECRET=123 fluxmonitor ...
⁠Docker
make docker
docker run smartcontract/fluxmonitor:latest
⁠Development
go test -race ./...

To test against Postgres database:

DATABASE_URL="..." \
  go test -tags=postgres ./...
⁠Generate mocks
mockgen -source=eth.go -destination=mock_eth_test.go -package=main

Tag summary

Content type

Image

Digest

Size

12.5 MB

Last updated

almost 7 years ago

docker pull smartcontract/deviator