John Saigle 45fc9e69e6 node(governor): Exclude tokens from deprecated chains from hack script (#4454) пре 1 месец
..
src 45fc9e69e6 node(governor): Exclude tokens from deprecated chains from hack script (#4454) пре 1 месец
.gitignore 80f5b75e58 node: Updated governor token list update script (#3588) пре 1 година
README.md 8bbf8a19b5 Governor: Reworking manual token handling (#1844) пре 3 година
check_query.go bfeaa93716 node: governor auto release (#1452) пре 3 година
include_list.csv 9f450c1a93 Node/Gov: Update floor prices (#3255) пре 2 година
package-lock.json e90146b321 Update elliptic to >= 6.6.1 (#4272) пре 8 месеци
package.json e90146b321 Update elliptic to >= 6.6.1 (#4272) пре 8 месеци
tsconfig.json 7402259fc7 Chain governor (#1277) пре 3 година

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.