|
| 1 | +# Copyright 2021 ChainSafe Systems |
| 2 | +# SPDX-License-Identifier: LGPL-3.0-only |
| 3 | + |
| 4 | +# app mode: debug, release |
| 5 | +app_mode: release |
| 6 | + |
| 7 | +# env |
| 8 | +env: dev # dev, production |
| 9 | + |
| 10 | +# Log level |
| 11 | +log_level: 5 # 5 is debug level, use 4(info) in prod |
| 12 | + |
| 13 | +# Gin http server config |
| 14 | +http_server: |
| 15 | + mode: debug # or release, debug |
| 16 | + port: :8091 |
| 17 | + |
| 18 | +# time in second before server shutdown |
| 19 | +# this will allow server to finish running jobs before shutdown |
| 20 | +finish_up_time: 3 |
| 21 | + |
| 22 | +# internal scheduled cronjob |
| 23 | +cron_job: |
| 24 | + update_conversion_rate_job: |
| 25 | + name: conversion rate |
| 26 | + enable: true |
| 27 | + check_frequency: "* * * * *" |
| 28 | + process_number: 1 |
| 29 | + update_gas_price_job: |
| 30 | + name: gas price |
| 31 | + enable: true |
| 32 | + check_frequency: "* * * * *" |
| 33 | + process_number: 1 |
| 34 | + |
| 35 | +# store path |
| 36 | +store: |
| 37 | + path: ./lvldbdata |
| 38 | + |
| 39 | +# conversion_rate_apis contains the list of conversion rate api services |
| 40 | +# implementation indicates the implementation of the oracle |
| 41 | +# source is the source of the data, reflected the source of the api url |
| 42 | +# url is the api url of gas price of the oracle |
| 43 | +# api_key is the api key of the oracle |
| 44 | +# enable is the flag to enable/disable the current api service, fee oracle will not instantiate this service if it is disabled |
| 45 | +conversion_rate_apis: |
| 46 | + - implementation: coinmarketcap |
| 47 | + source: coinmarketcap |
| 48 | + enable: true |
| 49 | + url: https://pro-api.coinmarketcap.com/v2/cryptocurrency/quotes/latest? |
| 50 | + |
| 51 | +domain_list: |
| 52 | + - domain_id: 1 |
| 53 | + gas_price_apis: |
| 54 | + - implementation: etherscan |
| 55 | + source: etherscan |
| 56 | + enable: true |
| 57 | + url: https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey= |
| 58 | + decimals: 9 |
| 59 | + - domain_id: 2 |
| 60 | + gas_price_apis: |
| 61 | + - implementation: etherscan |
| 62 | + source: etherscan |
| 63 | + enable: true |
| 64 | + url: https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey= |
| 65 | + decimals: 9 |
| 66 | + - domain_id: 3 |
| 67 | + gas_price_apis: |
| 68 | + - implementation: moonscan |
| 69 | + source: moonscan |
| 70 | + enable: false |
| 71 | + url: https://api-moonbeam.moonscan.io/api?module=proxy&action=eth_gasPrice&apikey= |
| 72 | + decimals: |
| 73 | + |
| 74 | +# conversion_rate_pairs contains price pair for conversion rate |
| 75 | +# must be paired and follow the format of [ base, foreign, base, foreign, ... ] |
| 76 | +conversion_rate_pairs: |
| 77 | + [ eth, usdt ] |
| 78 | + |
| 79 | +# strategy defines the strategy on verify and aggregate data from store when fetched |
| 80 | +strategy: |
| 81 | + local: average |
| 82 | + |
| 83 | +# data_valid_interval defines how long the endpoint response data remains valid before sending it to fee handler contract |
| 84 | +data_valid_interval: 3600 # second |
0 commit comments