-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into update-auction-length
- Loading branch information
Showing
53 changed files
with
16,111 additions
and
8,287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Gamma Protocol Defender Bot CLI Sync Script | ||
|
||
Helps manage bots running on OZ's defender using auto task client (https://www.npmjs.com/package/defender-autotask-client) | ||
|
||
## Prequisites | ||
|
||
Currently, there is not way to add new bots via autotask client defender hence new bots will have to be added through the GUI for defender and pasted in the **defender-config.js** file: | ||
|
||
- Add your infura key in `.infuraKey` file | ||
- Add your dotenv key in `.env` file | ||
- You'll need the `ETHERSCAN_API`, `AUTOTASK_API_KEY`, `AUTOTASK_API_SECRET` added to the `.env` file | ||
|
||
## Managing Base Asset using Chainlink's Pricer Bot | ||
|
||
As a pre-requisite, you need: | ||
|
||
- Get Asset addreess | ||
- Get bot key for chainlink's pricer bot | ||
|
||
Add new base asset (run the **view-bots** commands to get botkeys): | ||
|
||
```sh | ||
$ npm run add-asset --asset=0x2xxxxxxxxxxxxxxxxx --bot=botkey | ||
``` | ||
|
||
View assets for a bot: | ||
|
||
```sh | ||
$ npm run view-bot --bot=botkey | ||
``` | ||
|
||
Remove base asset for a bot: | ||
|
||
```sh | ||
$ npm run remove-asset --asset=0xC0xxxxxxxxxxxxxxxxxxxx --bot=botkey | ||
``` | ||
|
||
## Managing Derived Asset Pricer Bot | ||
|
||
Add new derived asset (run the **view-bots** commands to get botkeys): | ||
|
||
```sh | ||
$ npm run update-asset --asset=0xa276xxxxxxxxxxxxxxxxxxxxxxxxxxx --bot=2 | ||
``` | ||
|
||
Override exist asset tied to this bot: | ||
|
||
```sh | ||
$ npm run update-asset --asset=0xa2xxxxxxxxxxxxxxxxxxxxxxxx --bot=2 --override=true | ||
``` | ||
|
||
|
||
## General Commands | ||
|
||
View all bots on defender: | ||
|
||
```sh | ||
$ npm run view-bots | ||
``` | ||
|
||
Push the changes to defender: | ||
|
||
```sh | ||
$ npm run sync-bot --bot=botkey | ||
``` | ||
|
||
|
||
|
||
, |
Oops, something went wrong.