xbacked-fee-collector
v0.2.1
Published
A flexible and simple bot for collecting fees on the xBacked protocol
Downloads
1
Maintainers
Readme
xbacked-fee-collector
This module runs the collectFees method to distribute fees accrued in the vault to the DAO and stakers. The caller is rewarded with 0.5% of the accrued fees
Install
- Install from NPM:
npm i xbacked-fee-collector
- Clone this repository and run
npm install
from the cloned directory to install the required dependencies
Usage (NPM)
- Import taskRunner from xbacked-fee-collector
- Pass the required parameters to the taskRunner function
Usage (Github clone)
- Create a .env file and specify the required variables using the .env-example file
- Run
npm start
ornpm run dev
- for development purposes
env Parameters
- PASS_PHRASE: Mnemonic phrase for the wallet address to be used
- SLEEP_DURATION: How long should the interval between each call should last.
Must be in milliseconds e.g
5000
equivalent of 5s. (NB.: 1000 == 1s) - NETWORK: The network to connect to e.g TestNet, MainNet
Misc.
- Add
"type":"module"
to your package.json for the package to work
- Sample code (npm installation)