mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 19:51:02 +00:00
give real value to Rialto and Millau tokens (#1038)
This commit is contained in:
committed by
Bastian Köcher
parent
fd39d3519e
commit
166b5309e6
@@ -225,8 +225,8 @@ pub(crate) fn add_standalone_metrics(
|
||||
metrics_prefix,
|
||||
metrics_params,
|
||||
source_client,
|
||||
None,
|
||||
None,
|
||||
Some(crate::chains::MILLAU_ASSOCIATED_TOKEN_ID),
|
||||
Some(crate::chains::RIALTO_ASSOCIATED_TOKEN_ID),
|
||||
Some((
|
||||
sp_core::storage::StorageKey(millau_runtime::rialto_messages::RialtoToMillauConversionRate::key().to_vec()),
|
||||
millau_runtime::rialto_messages::INITIAL_RIALTO_TO_MILLAU_CONVERSION_RATE,
|
||||
|
||||
@@ -32,6 +32,15 @@ mod rococo;
|
||||
mod westend;
|
||||
mod wococo;
|
||||
|
||||
// Millau/Rialto tokens have no any real value, so the conversion rate we use is always 1:1. But we want to
|
||||
// test our code that is intended to work with real-value chains. So to keep it close to 1:1, we'll be treating
|
||||
// Rialto as BTC and Millau as wBTC (only in relayer).
|
||||
|
||||
/// The identifier of token, which value is associated with Rialto token value by relayer.
|
||||
pub(crate) const RIALTO_ASSOCIATED_TOKEN_ID: &str = "bitcoin";
|
||||
/// The identifier of token, which value is associated with Millau token value by relayer.
|
||||
pub(crate) const MILLAU_ASSOCIATED_TOKEN_ID: &str = "wrapped-bitcoin";
|
||||
|
||||
use relay_utils::metrics::{FloatJsonValueMetric, MetricsParams, PrometheusError, Registry};
|
||||
|
||||
pub(crate) fn add_polkadot_kusama_price_metrics<T: finality_relay::FinalitySyncPipeline>(
|
||||
|
||||
@@ -224,8 +224,8 @@ pub(crate) fn add_standalone_metrics(
|
||||
metrics_prefix,
|
||||
metrics_params,
|
||||
source_client,
|
||||
None,
|
||||
None,
|
||||
Some(crate::chains::RIALTO_ASSOCIATED_TOKEN_ID),
|
||||
Some(crate::chains::MILLAU_ASSOCIATED_TOKEN_ID),
|
||||
Some((
|
||||
sp_core::storage::StorageKey(rialto_runtime::millau_messages::MillauToRialtoConversionRate::key().to_vec()),
|
||||
rialto_runtime::millau_messages::INITIAL_MILLAU_TO_RIALTO_CONVERSION_RATE,
|
||||
|
||||
Reference in New Issue
Block a user