Skip to content

Commit

Permalink
feat:(liquid) Added force_update_exchange_rate that can change exchan…
Browse files Browse the repository at this point in the history
…ge rate via gov (#4494)
  • Loading branch information
RustNinja authored Jun 4, 2024
2 parents 6e0bf5c + 26394de commit ebae531
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions code/parachain/frame/liquid-staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,16 @@ pub mod pallet {
Self::deposit_event(Event::<T>::SetMembers { members });
Ok(())
}

#[pallet::call_index(27)]
#[pallet::weight(<T as Config>::WeightInfo::update_incentive())]
#[transactional]
pub fn force_update_exchange_rate(origin: OriginFor<T>, rate: Rate) -> DispatchResult {
T::UpdateOrigin::ensure_origin(origin)?;
ExchangeRate::<T>::put(rate);
Self::deposit_event(Event::<T>::ExchangeRateUpdated(rate));
Ok(())
}
}

#[pallet::hooks]
Expand Down
2 changes: 1 addition & 1 deletion code/parachain/runtime/composable/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// The version of the runtime specification. A full node will not attempt to use its native
// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`,
// `spec_version`, and `authoring_version` are the same between Wasm and native.
spec_version: 10044,
spec_version: 10045,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down
2 changes: 1 addition & 1 deletion code/parachain/runtime/picasso/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// The version of the runtime specification. A full node will not attempt to use its native
// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`,
// `spec_version`, and `authoring_version` are the same between Wasm and native.
spec_version: 10044,
spec_version: 10045,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down

0 comments on commit ebae531

Please sign in to comment.