File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,21 @@ export SEQUENCER_MONITORING_PORT=${SEQUENCER_MONITORING_PORT:-8082}
1212export SEQUENCER_CONFIG_PATH=${SEQUENCER_CONFIG_PATH:-/ config/ node_0/ config.json}
1313export SEQUENCER_ROOT_DIR=${SEQUENCER_ROOT_DIR:- $(git -C " $( dirname -- " $( readlink -f -- " ${BASH_SOURCE[0]} " ) " ) " rev-parse --show-toplevel)}
1414
15+ # Exchange-rate oracle source. When PRAGMA_API_KEY is set, point the node at the real Pragma
16+ # oracle so eth_to_strk (L1 gas price conversion) and strk_to_usd (SNIP-35 fee_target) track live
17+ # rates; otherwise fall back to the dummy constant-rate oracle (see docker-compose.yml
18+ # config_injector). This affects the local stack only; the integration-test harness stays on the
19+ # dummy so CI remains hermetic.
20+ export PRAGMA_ETH_STRK_URL=${PRAGMA_ETH_STRK_URL:- https:// api.production.pragma.build/ node/ v1/ data/ eth/ strk}
21+ export PRAGMA_STRK_USD_URL=${PRAGMA_STRK_USD_URL:- https:// api.production.pragma.build/ node/ v1/ data/ strk/ usd}
22+ if [ -n " ${PRAGMA_API_KEY:- } " ]; then
23+ export ETH_STRK_ORACLE_URL_HEADERS=" ${PRAGMA_ETH_STRK_URL} ,x-api-key^${PRAGMA_API_KEY} "
24+ export STRK_USD_ORACLE_URL_HEADERS=" ${PRAGMA_STRK_USD_URL} ,x-api-key^${PRAGMA_API_KEY} "
25+ echo " Exchange-rate oracle: Pragma (eth/strk + strk/usd)"
26+ else
27+ echo " Exchange-rate oracle: dummy (set PRAGMA_API_KEY to use the real Pragma oracle)"
28+ fi
29+
1530monitoring_dir=$( dirname -- " $( readlink -f -- " ${BASH_SOURCE[0]} " ) " )
1631export monitoring_dir
1732
Original file line number Diff line number Diff line change @@ -77,7 +77,10 @@ services:
7777 "cp /config/node_0/node_integration_test_config_changes.json ${SEQUENCER_CONFIG_PATH} \
7878 echo 'Injecting config changes...' && \
7979 jq '.\"recorder_url\" = \"http://dummy_recorder:8080\"' ${SEQUENCER_CONFIG_PATH} | sponge ${SEQUENCER_CONFIG_PATH} && \
80- jq '.\"l1_gas_price_provider_config.eth_to_strk_oracle_config.url_header_list\" = \"http://dummy_exchange_rate_oracle:9000/eth_to_strk_oracle\"' ${SEQUENCER_CONFIG_PATH} | sponge ${SEQUENCER_CONFIG_PATH} && \
80+ jq '.\"l1_gas_price_provider_config.eth_to_strk_oracle_config.url_header_list\" = \"${ETH_STRK_ORACLE_URL_HEADERS:-http://dummy_exchange_rate_oracle:9000/eth_to_strk_oracle}\"' ${SEQUENCER_CONFIG_PATH} | sponge ${SEQUENCER_CONFIG_PATH} && \
81+ jq '.\"l1_gas_price_provider_config.eth_to_strk_oracle_config.lag_interval_seconds\" = ${ETH_STRK_ORACLE_LAG_SECONDS:-60}' ${SEQUENCER_CONFIG_PATH} | sponge ${SEQUENCER_CONFIG_PATH} && \
82+ jq '.\"l1_gas_price_provider_config.strk_to_usd_oracle_config.url_header_list\" = \"${STRK_USD_ORACLE_URL_HEADERS:-http://dummy_exchange_rate_oracle:9000/eth_to_strk_oracle}\"' ${SEQUENCER_CONFIG_PATH} | sponge ${SEQUENCER_CONFIG_PATH} && \
83+ jq '.\"l1_gas_price_provider_config.strk_to_usd_oracle_config.lag_interval_seconds\" = ${STRK_USD_ORACLE_LAG_SECONDS:-60}' ${SEQUENCER_CONFIG_PATH} | sponge ${SEQUENCER_CONFIG_PATH} && \
8184 jq '.\"http_server_config.static_config.ip\" = \"0.0.0.0\"' ${SEQUENCER_CONFIG_PATH} | sponge ${SEQUENCER_CONFIG_PATH} && \
8285 jq '.\"http_server_config.static_config.port\" = ${SEQUENCER_HTTP_PORT}' ${SEQUENCER_CONFIG_PATH} | sponge ${SEQUENCER_CONFIG_PATH} && \
8386 jq '.\"monitoring_endpoint_config.port\" = ${SEQUENCER_MONITORING_PORT}' ${SEQUENCER_CONFIG_PATH} | sponge ${SEQUENCER_CONFIG_PATH} && \
You can’t perform that action at this time.
0 commit comments