Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.08 KB

README.md

File metadata and controls

53 lines (39 loc) · 1.08 KB

Blockchain Listener

Blockchain Listener is a service that will listen for blockchain events and publish them to queue.

Quick Start

Clone code into local machine:

git clone git@github.com:KyberNetwork/evmlistener.git
cd evmlistener

Create environment file with following content, listener.env:

export WS_RPC="wss://polygon.kyberengineering.io"
export HTTP_RPC="https://polygon.kyberengineering.io"
export SANITY_NODE_RPC="https://polygon.kyberengineering.io"
export SANITY_CHECK_INTERVAL=10s
export LOG_LEVEL="debug"

export SENTRY_DNS=""
export SENTRY_LEVEL="error"

export REDIS_MASTER_NAME=""
export REDIS_ADDRS="localhost:6379"
export REDIS_DB=0
export REDIS_USERNAME=""
export REIDS_PASSWORD=""
export REDIS_KEY_PREFIX="test-listener-polygon:"
export REDIS_READ_TIMEOUT=0
export REIDS_WRITE_TIMEOUT=0

export PUBLISHER_TOPIC="test-listener-polygon-topic"
export PUBLISHER_MAX_LEN=10

export MAX_NUM_BLOCKS=128
export BLOCK_EXPIRATION=10m

Start docker for redis:

docker-compose up -d

Run service:

source listener.env
go run ./cmd/listener/main.go