Stored conversion rate updater (#1005)

* update conversion rate: initial commit

* Rialto=Polkadot && Millau=Kusama + actually update conversion rates

* update deployment scripts and readme

* allow non-zero difference between stored and real rates

* dummy commit

* Revert "dummy commit"

This reverts commit a438198180a8385feeaaca60c9d2da0950465215.

* clippy

* #[allow(clippy::float_cmp)] in conversion rate update

* dummy

* Revert "dummy"

This reverts commit 90cd6e47cda56f655e94dbef76138e6cc58d664a.

* spell

* shared_value_ref() -> get()

* Revert "shared_value_ref() -> get()"

This reverts commit 20aa30de6a59b2099cfba3e9676e71200b7bb468.
This commit is contained in:
Svyatoslav Nikolsky
2021-09-01 11:51:57 +03:00
committed by Bastian Köcher
parent fc9363619a
commit 3ef4574594
13 changed files with 464 additions and 24 deletions
+7 -2
View File
@@ -16,8 +16,8 @@
use bp_rialto::derive_account_from_millau_id;
use rialto_runtime::{
AccountId, BabeConfig, BalancesConfig, BridgeKovanConfig, BridgeRialtoPoaConfig, GenesisConfig, GrandpaConfig,
SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
AccountId, BabeConfig, BalancesConfig, BridgeKovanConfig, BridgeMillauMessagesConfig, BridgeRialtoPoaConfig,
GenesisConfig, GrandpaConfig, SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
};
use serde_json::json;
use sp_consensus_babe::AuthorityId as BabeId;
@@ -135,6 +135,7 @@ impl Alternative {
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
get_account_id_from_seed::<sr25519::Public>("George//stash"),
get_account_id_from_seed::<sr25519::Public>("Harry//stash"),
get_account_id_from_seed::<sr25519::Public>("MillauMessagesOwner"),
pallet_bridge_messages::Pallet::<
rialto_runtime::Runtime,
rialto_runtime::WithMillauMessagesInstance,
@@ -205,6 +206,10 @@ fn testnet_genesis(
.map(|x| (x.0.clone(), x.0.clone(), session_keys(x.1.clone(), x.2.clone())))
.collect::<Vec<_>>(),
},
bridge_millau_messages: BridgeMillauMessagesConfig {
owner: Some(get_account_id_from_seed::<sr25519::Public>("MillauMessagesOwner")),
..Default::default()
},
}
}
+1 -1
View File
@@ -559,7 +559,7 @@ construct_runtime!(
// Millau bridge modules.
BridgeMillauGrandpa: pallet_bridge_grandpa::{Pallet, Call, Storage},
BridgeDispatch: pallet_bridge_dispatch::{Pallet, Event<T>},
BridgeMillauMessages: pallet_bridge_messages::{Pallet, Call, Storage, Event<T>},
BridgeMillauMessages: pallet_bridge_messages::{Pallet, Call, Storage, Event<T>, Config<T>},
}
);