Skip to content

Commit

Permalink
Command cli sync script for gamma defender (#453)
Browse files Browse the repository at this point in the history
Co-authored-by: aparnakr <[email protected]>
  • Loading branch information
DemolaJames and aparnakr authored Feb 9, 2022
1 parent 63a0c9c commit 1b3c62d
Show file tree
Hide file tree
Showing 15 changed files with 7,530 additions and 8,045 deletions.
69 changes: 69 additions & 0 deletions autotask/README.md
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
```



,
Loading

0 comments on commit 1b3c62d

Please sign in to comment.