wormhole/node/hack/governor
bruce-riley de16e0fd5d
Node/Governor: Regenerate token list and floor prices (#2465)
* node_update_governor_tokens_and_prices

Change-Id: If4e3b31c97ad85fd59ca8743458a2eef137a946a

* Node/Gov: Update token list

Change-Id: I2379d43afa7777488ae3f37e6d4227b4c966deab

* Add test for empty symbol back in

Change-Id: I6d5f1f55c1b7865144e7accc395e484b47381ef0
2023-04-17 14:43:14 -05:00
..
src Node/Governor: Regenerate token list and floor prices (#2465) 2023-04-17 14:43:14 -05:00
.gitignore Chain governor (#1277) 2022-07-19 14:08:06 -04:00
README.md Governor: Reworking manual token handling (#1844) 2022-11-03 10:45:16 -05:00
check_query.go node: governor auto release (#1452) 2022-08-30 11:28:18 -05:00
include_list.csv Node/Governor: Regenerate token list and floor prices (#2465) 2023-04-17 14:43:14 -05:00
package-lock.json Governor: Reworking manual token handling (#1844) 2022-11-03 10:45:16 -05:00
package.json Governor: Reworking manual token handling (#1844) 2022-11-03 10:45:16 -05:00
tsconfig.json Chain governor (#1277) 2022-07-19 14:08:06 -04:00

README.md

Overview

This tool can be used to generate the list of tokens to be monitored by the chain governor. It works by querying the notional TVL data from Portal and populating the generated_tokens.go file in the governor package with everything over the hard coded minimal notional value.

Configuration

To update the minimal notional value, edit src/index.ts and change the value of MinNotional.

Always Included Tokens

Additionally, you can create an include_list.csv file in this directory where the contents are of the form ",", and all tokens listed there will be included in the generated token list, regardless of their notional value.

Running the script

To run this tool, do:

npm ci
npm run start

Manually Included Tokens

The governor also makes use of a list of manually added tokens. These are tokens that do not exist in the notional TVL data. These tokens are listed in wormhole/node/pkg/governor/manual_tokens.go

Verifying the Token Lists

To verify that the Coin Gecko query still works with the new token list, do:

go run check_query.go

Before committing the generated file, you should run the governor tests and ensure that they pass:

cd wormhole/node/pkg/governor
go test

Committing the Changes

You can then commit the updated version of node/pkg/governor/generated_tokens.go.