Skip to content

Commit

Permalink
restricted-xtokens: Update weights
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamian committed Dec 1, 2023
1 parent 0e2558e commit 59afbe5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pallets/restricted-xtokens/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Centrifuge Foundation (centrifuge.io).
// Copyright 2023 Centrifuge Foundation (centrifuge.io).
//
// This file is part of the Centrifuge chain project.
// Centrifuge is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -122,7 +122,7 @@ pub mod pallet {
/// by the network, and if the receiving chain would handle
/// messages correctly.
#[pallet::call_index(0)]
#[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer(currency_id.clone(), * amount, dest))]
#[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer(currency_id.clone(), * amount, dest) + T::DbWeight::get().reads(4))]
pub fn transfer(
origin: OriginFor<T>,
currency_id: T::CurrencyId,
Expand Down Expand Up @@ -164,7 +164,7 @@ pub mod pallet {
/// by the network, and if the receiving chain would handle
/// messages correctly.
#[pallet::call_index(1)]
#[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer_multiasset(asset, dest))]
#[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer_multiasset(asset, dest) + T::DbWeight::get().reads(4))]
pub fn transfer_multiasset(
origin: OriginFor<T>,
asset: Box<VersionedMultiAsset>,
Expand Down Expand Up @@ -210,7 +210,7 @@ pub mod pallet {
/// by the network, and if the receiving chain would handle
/// messages correctly.
#[pallet::call_index(2)]
#[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer(currency_id.clone(), * amount, dest))]
#[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer(currency_id.clone(), * amount, dest) + T::DbWeight::get().reads(4))]
pub fn transfer_with_fee(
origin: OriginFor<T>,
currency_id: T::CurrencyId,
Expand Down Expand Up @@ -264,7 +264,7 @@ pub mod pallet {
/// by the network, and if the receiving chain would handle
/// messages correctly.
#[pallet::call_index(3)]
#[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer_multiasset(asset, dest))]
#[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer_multiasset(asset, dest) + T::DbWeight::get().reads(4))]
pub fn transfer_multiasset_with_fee(
origin: OriginFor<T>,
asset: Box<VersionedMultiAsset>,
Expand Down Expand Up @@ -315,7 +315,7 @@ pub mod pallet {
/// by the network, and if the receiving chain would handle
/// messages correctly.
#[pallet::call_index(4)]
#[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer_multicurrencies(currencies, fee_item, dest))]
#[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer_multicurrencies(currencies, fee_item, dest) + T::DbWeight::get().reads(4))]
pub fn transfer_multicurrencies(
origin: OriginFor<T>,
currencies: Vec<(T::CurrencyId, T::Balance)>,
Expand Down Expand Up @@ -363,7 +363,7 @@ pub mod pallet {
/// by the network, and if the receiving chain would handle
/// messages correctly.
#[pallet::call_index(5)]
#[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer_multiassets(assets, fee_item, dest))]
#[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer_multiassets(assets, fee_item, dest) + T::DbWeight::get().reads(4))]
pub fn transfer_multiassets(
origin: OriginFor<T>,
assets: Box<VersionedMultiAssets>,
Expand Down

0 comments on commit 59afbe5

Please sign in to comment.