Skip to content

Commit ebae531

Browse files
authored
feat:(liquid) Added force_update_exchange_rate that can change exchange rate via gov (#4494)
2 parents 6e0bf5c + 26394de commit ebae531

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

code/parachain/frame/liquid-staking/src/lib.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,16 @@ pub mod pallet {
11741174
Self::deposit_event(Event::<T>::SetMembers { members });
11751175
Ok(())
11761176
}
1177+
1178+
#[pallet::call_index(27)]
1179+
#[pallet::weight(<T as Config>::WeightInfo::update_incentive())]
1180+
#[transactional]
1181+
pub fn force_update_exchange_rate(origin: OriginFor<T>, rate: Rate) -> DispatchResult {
1182+
T::UpdateOrigin::ensure_origin(origin)?;
1183+
ExchangeRate::<T>::put(rate);
1184+
Self::deposit_event(Event::<T>::ExchangeRateUpdated(rate));
1185+
Ok(())
1186+
}
11771187
}
11781188

11791189
#[pallet::hooks]

code/parachain/runtime/composable/src/version.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
1313
// The version of the runtime specification. A full node will not attempt to use its native
1414
// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`,
1515
// `spec_version`, and `authoring_version` are the same between Wasm and native.
16-
spec_version: 10044,
16+
spec_version: 10045,
1717
impl_version: 0,
1818
apis: RUNTIME_API_VERSIONS,
1919
transaction_version: 2,

code/parachain/runtime/picasso/src/version.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
1616
// The version of the runtime specification. A full node will not attempt to use its native
1717
// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`,
1818
// `spec_version`, and `authoring_version` are the same between Wasm and native.
19-
spec_version: 10044,
19+
spec_version: 10045,
2020
impl_version: 0,
2121
apis: RUNTIME_API_VERSIONS,
2222
transaction_version: 1,

0 commit comments

Comments
 (0)