diff --git a/config.yaml b/config-dev.yaml similarity index 84% rename from config.yaml rename to config-dev.yaml index 07a8dc5..5e8d9e8 100644 --- a/config.yaml +++ b/config-dev.yaml @@ -47,38 +47,34 @@ conversion_rate_apis: source: coinmarketcap enable: true url: https://pro-api.coinmarketcap.com/v2/cryptocurrency/quotes/latest? - api_key: 1408daf0-0777-4916-9fe4-20da5ee77560 domain_list: - - domain_id: 0 + - domain_id: 1 gas_price_apis: - implementation: etherscan source: etherscan enable: true url: https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey= - api_key: BZM7P395BQS1YFKQMA2AK2ACQKWGEW4JB3 decimals: 9 - - domain_id: 1 + - domain_id: 2 gas_price_apis: - implementation: etherscan - source: polygonscan + source: etherscan enable: true - url: https://api.polygonscan.com/api?module=gastracker&action=gasoracle&apikey= - api_key: BZM7P395BQS1YFKQMA2AK2ACQKWGEW4JB3 + url: https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey= decimals: 9 - - domain_id: 2 + - domain_id: 3 gas_price_apis: - implementation: moonscan source: moonscan - enable: true + enable: false url: https://api-moonbeam.moonscan.io/api?module=proxy&action=eth_gasPrice&apikey= - api_key: BZM7P395BQS1YFKQMA2AK2ACQKWGEW4JB3 decimals: # conversion_rate_pairs contains price pair for conversion rate # must be paired and follow the format of [ base, foreign, base, foreign, ... ] conversion_rate_pairs: - [ eth, usdt, eth, matic, matic, usdt, eth, glmr, glmr, usdt ] + [ eth, usdt ] # strategy defines the strategy on verify and aggregate data from store when fetched strategy: diff --git a/config-test.yaml b/config-test.yaml new file mode 100644 index 0000000..5e8d9e8 --- /dev/null +++ b/config-test.yaml @@ -0,0 +1,84 @@ +# Copyright 2021 ChainSafe Systems +# SPDX-License-Identifier: LGPL-3.0-only + +# app mode: debug, release +app_mode: release + +# env +env: dev # dev, production + +# Log level +log_level: 5 # 5 is debug level, use 4(info) in prod + +# Gin http server config +http_server: + mode: debug # or release, debug + port: :8091 + +# time in second before server shutdown +# this will allow server to finish running jobs before shutdown +finish_up_time: 3 + +# internal scheduled cronjob +cron_job: + update_conversion_rate_job: + name: conversion rate + enable: true + check_frequency: "* * * * *" + process_number: 1 + update_gas_price_job: + name: gas price + enable: true + check_frequency: "* * * * *" + process_number: 1 + +# store path +store: + path: ./lvldbdata + +# conversion_rate_apis contains the list of conversion rate api services +# implementation indicates the implementation of the oracle +# source is the source of the data, reflected the source of the api url +# url is the api url of gas price of the oracle +# api_key is the api key of the oracle +# enable is the flag to enable/disable the current api service, fee oracle will not instantiate this service if it is disabled +conversion_rate_apis: + - implementation: coinmarketcap + source: coinmarketcap + enable: true + url: https://pro-api.coinmarketcap.com/v2/cryptocurrency/quotes/latest? + +domain_list: + - domain_id: 1 + gas_price_apis: + - implementation: etherscan + source: etherscan + enable: true + url: https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey= + decimals: 9 + - domain_id: 2 + gas_price_apis: + - implementation: etherscan + source: etherscan + enable: true + url: https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey= + decimals: 9 + - domain_id: 3 + gas_price_apis: + - implementation: moonscan + source: moonscan + enable: false + url: https://api-moonbeam.moonscan.io/api?module=proxy&action=eth_gasPrice&apikey= + decimals: + +# conversion_rate_pairs contains price pair for conversion rate +# must be paired and follow the format of [ base, foreign, base, foreign, ... ] +conversion_rate_pairs: + [ eth, usdt ] + +# strategy defines the strategy on verify and aggregate data from store when fetched +strategy: + local: average + +# data_valid_interval defines how long the endpoint response data remains valid before sending it to fee handler contract +data_valid_interval: 3600 # second