Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove long fully qualified syntax
  • Loading branch information
TheLedgerOfJoudi committed Nov 2, 2023
commit 4aba023619fc17b97c98c311d73e45a2b133a609
4 changes: 2 additions & 2 deletions pallets/ceres-launchpad/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ pub mod pallet {
};

ensure!(
!<T as pallet::Config>::TradingPairSourceManager::is_trading_pair_enabled(
!<T as Config>::TradingPairSourceManager::is_trading_pair_enabled(
&dex_id,
&base_asset,
&asset_id
Expand Down Expand Up @@ -738,7 +738,7 @@ pub mod pallet {
DEXId::PolkaswapXSTUSD.into()
};
// Register trading pair
<T as pallet::Config>::TradingPairSourceManager::register_pair(
<T as Config>::TradingPairSourceManager::register_pair(
dex_id,
ilo_info.base_asset,
asset_id,
Expand Down
2 changes: 1 addition & 1 deletion pallets/farming/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fn prepare_pools<T: Config>(count: u32) -> (Vec<T::AccountId>, Vec<T::AssetId>)
.unwrap();

assert_ok!(
<T as pallet::Config>::TradingPairSourceManager::register_pair(
<T as Config>::TradingPairSourceManager::register_pair(
Default::default(),
xor_asset.clone(),
other_asset.clone(),
Expand Down
12 changes: 6 additions & 6 deletions pallets/multicollateral-bonding-curve-pool/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ benchmarks! {
None,
None
).unwrap();
<T as pallet::Config>::TradingPairSourceManager::register_pair(
<T as Config>::TradingPairSourceManager::register_pair(
common::DEXId::Polkaswap.into(),
XOR.into(),
USDT.into()
Expand Down Expand Up @@ -242,7 +242,7 @@ benchmarks! {
None,
None
).unwrap();
<T as pallet::Config>::TradingPairSourceManager::register_pair( common::DEXId::Polkaswap.into(), XOR.into(), USDT.into()).unwrap();
<T as Config>::TradingPairSourceManager::register_pair( common::DEXId::Polkaswap.into(), XOR.into(), USDT.into()).unwrap();
MBCPool::<T>::initialize_pool(RawOrigin::Signed(caller.clone()).into(), USDT.into()).unwrap();
}: {
Pallet::<T>::set_optional_reward_multiplier(
Expand Down Expand Up @@ -331,7 +331,7 @@ benchmarks! {
None,
)
.unwrap();
<T as pallet::Config>::TradingPairSourceManager::register_pair(
<T as Config>::TradingPairSourceManager::register_pair(
common::DEXId::Polkaswap.into(),
XOR.into(),
USDT.into(),
Expand Down Expand Up @@ -390,7 +390,7 @@ benchmarks! {
balance!(50000000),
)
.unwrap();
<T as pallet::Config>::TradingPairSourceManager::register_pair(
<T as Config>::TradingPairSourceManager::register_pair(
common::DEXId::Polkaswap.into(),
XOR.into(),
USDT.into(),
Expand Down Expand Up @@ -448,7 +448,7 @@ benchmarks! {
None,
None
).unwrap();
<T as pallet::Config>::TradingPairSourceManager::register_pair(
<T as Config>::TradingPairSourceManager::register_pair(
common::DEXId::Polkaswap.into(),
XOR.into(),
USDT.into()
Expand Down Expand Up @@ -497,7 +497,7 @@ benchmarks! {
balance!(50000000),
)
.unwrap();
<T as pallet::Config>::TradingPairSourceManager::register_pair(
<T as Config>::TradingPairSourceManager::register_pair(
common::DEXId::Polkaswap.into(),
XOR.into(),
USDT.into(),
Expand Down
6 changes: 3 additions & 3 deletions pallets/multicollateral-bonding-curve-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -872,13 +872,13 @@ impl<T: Config> Pallet<T> {
Error::<T>::PoolAlreadyInitializedForPair
);
T::PriceToolsPallet::register_asset(&collateral_asset_id)?;
<T as pallet::Config>::EnsureTradingPairExists::ensure_trading_pair_exists(
<T as Config>::EnsureTradingPairExists::ensure_trading_pair_exists(
&DEXId::Polkaswap.into(),
&T::GetBaseAssetId::get(),
&collateral_asset_id,
)?;

<T as pallet::Config>::TradingPairSourceManager::enable_source_for_trading_pair(
<T as Config>::TradingPairSourceManager::enable_source_for_trading_pair(
&DEXId::Polkaswap.into(),
&T::GetBaseAssetId::get(),
&collateral_asset_id,
Expand Down Expand Up @@ -1424,7 +1424,7 @@ impl<T: Config> Pallet<T> {
let price = if asset_id == &reference_asset_id || asset_id == &common::TBCD.into() {
balance!(1)
} else {
<T as pallet::Config>::PriceToolsPallet::get_average_price(
<T as Config>::PriceToolsPallet::get_average_price(
asset_id,
&reference_asset_id,
price_variant,
Expand Down
2 changes: 1 addition & 1 deletion pallets/price-tools/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fn create_pair_with_xor<T: Config>(
) {
assets::Pallet::<T>::mint(origin.clone(), asset, owner, balance!(1000000)).unwrap();

<T as pallet::Config>::TradingPairSourceManager::register_pair(
<T as Config>::TradingPairSourceManager::register_pair(
DEXId::Polkaswap.into(),
XOR.into(),
asset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ fn validate_dispatch<T: crate::Config>(call: Call<T>) -> Result<(), &'static str
benchmarks! {
where_clause {
where
<T as pallet::Config>::Submitter: From<Public>,
<T as pallet::Config>::ImportSignature: From<Signature>,
<T as Config>::Submitter: From<Public>,
<T as Config>::ImportSignature: From<Signature>,
}
// Benchmark `import_header` extrinsic under worst case conditions:
// * Import will set a new best block.
Expand All @@ -85,7 +85,7 @@ benchmarks! {
validate_unsigned_then_import_header {
// We don't care about security but just about calculation time
let caller_public = sp_io::crypto::sr25519_generate(123.into(), None);
let caller = <T as pallet::Config>::Submitter::from(caller_public).into_account();
let caller = <T as Config>::Submitter::from(caller_public).into_account();

let descendants_until_final = T::DescendantsUntilFinalized::get();

Expand Down Expand Up @@ -114,7 +114,7 @@ benchmarks! {
proof: header_proof,
mix_nonce: header_mix_nonce,
submitter: caller,
signature: <T as pallet::Config>::ImportSignature::from(digest_signature::<T>(&caller_public, &EthNetworkConfig::Mainnet.chain_id(), &header))
signature: <T as Config>::ImportSignature::from(digest_signature::<T>(&caller_public, &EthNetworkConfig::Mainnet.chain_id(), &header))
};
}: { validate_dispatch(call)? }
verify {
Expand Down Expand Up @@ -152,7 +152,7 @@ benchmarks! {
// re-insert using <HeadersByNumber<T>>::insert.
import_header_not_new_finalized_with_max_prune {
let caller_public = sp_io::crypto::sr25519_generate(123.into(), None);
let caller = <T as pallet::Config>::Submitter::from(caller_public).into_account();
let caller = <T as Config>::Submitter::from(caller_public).into_account();

let descendants_until_final = T::DescendantsUntilFinalized::get();

Expand Down Expand Up @@ -187,7 +187,7 @@ benchmarks! {
proof: header_proof,
mix_nonce: header_mix_nonce,
submitter: caller,
signature: <T as pallet::Config>::ImportSignature::from(digest_signature::<T>(&caller_public, &EthNetworkConfig::Mainnet.chain_id(), &header))
signature: <T as Config>::ImportSignature::from(digest_signature::<T>(&caller_public, &EthNetworkConfig::Mainnet.chain_id(), &header))
};
}: { validate_dispatch(call)? }
verify {
Expand Down Expand Up @@ -221,7 +221,7 @@ benchmarks! {
// * Import will prune a single old header with no siblings.
import_header_new_finalized_with_single_prune {
let caller_public = sp_io::crypto::sr25519_generate(123.into(), None);
let caller = <T as pallet::Config>::Submitter::from(caller_public).into_account();
let caller = <T as Config>::Submitter::from(caller_public).into_account();

let descendants_until_final = T::DescendantsUntilFinalized::get();

Expand Down Expand Up @@ -251,7 +251,7 @@ benchmarks! {
proof: header_proof,
mix_nonce: header_mix_nonce,
submitter: caller,
signature: <T as pallet::Config>::ImportSignature::from(digest_signature::<T>(&caller_public, &EthNetworkConfig::Mainnet.chain_id(), &header))
signature: <T as Config>::ImportSignature::from(digest_signature::<T>(&caller_public, &EthNetworkConfig::Mainnet.chain_id(), &header))
};
}: { validate_dispatch(call)? }
verify {
Expand Down Expand Up @@ -282,7 +282,7 @@ benchmarks! {
// * Import will prune a single old header with no siblings.
import_header_not_new_finalized_with_single_prune {
let caller_public = sp_io::crypto::sr25519_generate(123.into(), None);
let caller = <T as pallet::Config>::Submitter::from(caller_public).into_account();
let caller = <T as Config>::Submitter::from(caller_public).into_account();

let descendants_until_final = T::DescendantsUntilFinalized::get();

Expand Down Expand Up @@ -317,7 +317,7 @@ benchmarks! {
proof: header_proof,
mix_nonce: header_mix_nonce,
submitter: caller,
signature: <T as pallet::Config>::ImportSignature::from(digest_signature::<T>(&caller_public, &EthNetworkConfig::Mainnet.chain_id(), &header))
signature: <T as Config>::ImportSignature::from(digest_signature::<T>(&caller_public, &EthNetworkConfig::Mainnet.chain_id(), &header))
};
}: { validate_dispatch(call)? }
verify {
Expand Down Expand Up @@ -353,7 +353,7 @@ benchmarks! {
let header_mix_nonce = data::header_mix_nonce(header.compute_hash()).unwrap();

let caller_public = sp_io::crypto::sr25519_generate(123.into(), None);
let caller = <T as pallet::Config>::Submitter::from(caller_public).into_account();
let caller = <T as Config>::Submitter::from(caller_public).into_account();

assert_ok!(EthereumLightClient::<T>::import_header(
RawOrigin::None.into(),
Expand All @@ -362,7 +362,7 @@ benchmarks! {
header_proof,
header_mix_nonce,
caller,
<T as pallet::Config>::ImportSignature::from(digest_signature::<T>(&caller_public, &EthNetworkConfig::Mainnet.chain_id(), &header))
<T as Config>::ImportSignature::from(digest_signature::<T>(&caller_public, &EthNetworkConfig::Mainnet.chain_id(), &header))
));
}

Expand Down
2 changes: 1 addition & 1 deletion pallets/xst/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ impl<T: Config> Pallet<T> {
/// Used for converting XST fee to XOR
fn convert_fee(fee_amount: Balance) -> Result<Balance, DispatchError> {
let output_to_base: FixedWrapper =
<T as pallet::Config>::PriceToolsPallet::get_average_price(
<T as Config>::PriceToolsPallet::get_average_price(
&T::GetSyntheticBaseAssetId::get(),
&T::GetBaseAssetId::get(),
// Since `Buy` is more expensive in case if we are buying XOR
Expand Down