EYBlockchain / timber

Construct a Merkle Tree database from Ethereum logs.
Other
67 stars 19 forks source link

feat: added auto-starting option #35

Closed Westlad closed 3 years ago

Westlad commented 3 years ago

When deploying a new Timber instance to an existing network, it's good to have it just 'start' rather than having to make an http call from somewhere to start it. This PR enables one to specify an environment variable AUTOSTART=contract where 'contract' is the name of the contract that Timber should listen to events from. The setting of AUTOSTART in this way will cause Timber to start automatically. If TImber's configuration is such that it cannot infer the contract address from the contract name, this may be passed in via the environment variable CONTRACT_ADDRESS. Currently this option does not support multiple contracts or trees but it will work well for 'nightfall-like' deployments.

Westlad commented 3 years ago

Now modified along the lines discussed. The AUTOSTART option reads the config file and will start multiple contracts and treeIds if called upon to do so. If needed, the contract addresses can be added to the config. Thanks to @iAmMichaelConnor for excellent suggestion.

github-actions[bot] commented 3 years ago

:tada: This PR is included in version 3.2.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: