Skip to content

Contract event listener for Star Notary dApp, listens to the smart contract and communicates with the backend!

License

Notifications You must be signed in to change notification settings

sergera/star-notary-listener

Repository files navigation

Star Notary Listener

this service listens to events from the Star Notary smart contract
and communicates with the star-notary-backend (to be announced)

Install

make install

Run

make run

Requirements

have Go installed and binary added to PATH

register at Infura or another RPC provider that exposes websocket endpoints

Environment Variables

locally, environment variables are declared in 'application.conf'

RPC_PROVIDER_WEBSOCKET_URL:

websocket url to deployed network provided by Infura or chosen RPC provider

CONTRACT_ADDRESS:

address of currently deployed smart contract

CONFIRMATION_BLOCKS:

number (integer) of confirmation blocks before an event is considered cannon

CONFIRMATION_SLEEP_SECONDS:

number (integer) of seconds that the service waits between RPC provider calls for event confirmation

LOG_PATH (optional):

full path to log directory

if not provided logs to project root directory

Go Contract Creation

make contract

to create a go contract, the following variables must be set in the Makefile:

TRUFFLE_PROJECT_ROOT_PATH:

full path to root directory of truffle project containing the solidity (.sol) smart contract file

SOLIDITY_VERSION:

version of solidity used in the smart contract

CONTRACT_NAME:

name of the solidity (.sol) smart contract file

About

Contract event listener for Star Notary dApp, listens to the smart contract and communicates with the backend!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published