mirror of
https://github.com/alexgo-io/redstone-node.git
synced 2026-01-12 22:43:31 +08:00
6.1 KiB
6.1 KiB
How to prepare a new manifest
Manifest is a public JSON file that defines the provider's obligation regarding the data that they provide. It sets fetching interval, tokens, sources and other public technical details for the provided data.
Examples
These are examples of ready-to-use manifests:
- main.json - 1000+ tokens, used by the main redstone provider
- rapid.json - 10 most popular tokens, used by
redstone-rapidprovider - coingecko.json - 203 tokens, uses only coingecko fetcher
Manifest structure
| Param | Optionality | Type | Description |
|---|---|---|---|
| interval | required | Number | Data fetching interval in milliseconds |
| priceAggregator | required | String | Aggregator id. Currently only median aggregator is supported |
| defaultSource | optional | String[] | Array of fetcher names that will be used by default for tokens that have no specified sources |
| sourceTimeout | required | Number | Default timeout in milliseconds for sources |
| maxPriceDeviationPercent | required | Number | Default maximum price deviation percent for tokens. It may also be set for each token separately |
| evmChainId | required | Number | EVM chain id, that will be used during EVM price signing. Pass 1 if you're not sure, it will point to the Ethereum Mainnet. |
| httpBroadcasterURLs | optional | ["http://localhost:9000"] | array of urls for broadcasters to which prices should be sent |
| enableStreamrBroadcaster | optional | false | if set to true, single prices and prices packages will be sent to Streamr |
| disableSinglePricesBroadcastingInStreamr | optional | true | if set to true, single prices will not be sent to Streamr |
| tokens | required | Object | Object with tokens in the following format: { "TOKEN_SYMBOL": { "source": ["source-name-1", "source-name-2", ...], "maxPriceDeviationPercent": 25 }, ... }. Note that source and maxPriceDeviationPercent params per token are optional. This is also a correct tokens configuration: { "TOKEN_SYMBOL_1": {}, "TOKEN_SYMBOL_2": {} } |
Manifest file
You should place your JSON manifest file inside the manifests folder. The manifest file should be named using kebab case, i.e: manifest.json, good-manifest.json, or your-source.json.
You can also publish your manifest to the Arweave smart contracts using this manifest deployment guide.
Available sources
You can find a list of available sources along with its stability details in the RedStone Web app: app.redstone.finance/#/app/sources.
