mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
* Fix APIs
* Reflect API changes
* Everything builds
* Fixes
* Fixes
* Update Cargo.toml
* Fixes
* Fixes
* No networks use freezes/holds
* update lockfile for {"polkadot", "substrate"}
* Fix test
ED cannot be zero anymore.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix test
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Generated
+327
-259
File diff suppressed because it is too large
Load Diff
@@ -60,3 +60,4 @@ opt-level = 3
|
|||||||
inherits = "release"
|
inherits = "release"
|
||||||
lto = true
|
lto = true
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,10 @@ impl pallet_balances::Config for Test {
|
|||||||
type MaxLocks = ();
|
type MaxLocks = ();
|
||||||
type MaxReserves = MaxReserves;
|
type MaxReserves = MaxReserves;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<0>;
|
||||||
|
type MaxFreezes = ConstU32<0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Author4;
|
pub struct Author4;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ use cumulus_pallet_parachain_system::AnyRelayNumber;
|
|||||||
use cumulus_primitives_core::{IsSystem, ParaId};
|
use cumulus_primitives_core::{IsSystem, ParaId};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{Everything, Nothing, OriginTrait},
|
traits::{ConstU32, Everything, Nothing, OriginTrait},
|
||||||
};
|
};
|
||||||
use frame_system::EnsureRoot;
|
use frame_system::EnsureRoot;
|
||||||
use sp_core::H256;
|
use sp_core::H256;
|
||||||
@@ -100,6 +100,10 @@ impl pallet_balances::Config for Test {
|
|||||||
type MaxLocks = ();
|
type MaxLocks = ();
|
||||||
type MaxReserves = MaxReserves;
|
type MaxReserves = MaxReserves;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<0>;
|
||||||
|
type MaxFreezes = ConstU32<0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_parachain_system::Config for Test {
|
impl cumulus_pallet_parachain_system::Config for Test {
|
||||||
|
|||||||
@@ -339,6 +339,10 @@ impl pallet_balances::Config for Runtime {
|
|||||||
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
|
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
|
||||||
type MaxReserves = ConstU32<50>;
|
type MaxReserves = ConstU32<50>;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<0>;
|
||||||
|
type MaxFreezes = ConstU32<0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
//! Taken from polkadot/runtime/common (at a21cd64) and adapted for parachains.
|
//! Taken from polkadot/runtime/common (at a21cd64) and adapted for parachains.
|
||||||
|
|
||||||
use frame_support::traits::{
|
use frame_support::traits::{
|
||||||
fungibles::{self, Balanced, CreditOf},
|
fungibles::{self, Balanced, Credit},
|
||||||
Contains, ContainsPair, Currency, Get, Imbalance, OnUnbalanced,
|
Contains, ContainsPair, Currency, Get, Imbalance, OnUnbalanced,
|
||||||
};
|
};
|
||||||
use pallet_asset_tx_payment::HandleCredit;
|
use pallet_asset_tx_payment::HandleCredit;
|
||||||
@@ -75,7 +75,7 @@ where
|
|||||||
R: pallet_authorship::Config + pallet_assets::Config<I>,
|
R: pallet_authorship::Config + pallet_assets::Config<I>,
|
||||||
AccountIdOf<R>: From<polkadot_primitives::AccountId> + Into<polkadot_primitives::AccountId>,
|
AccountIdOf<R>: From<polkadot_primitives::AccountId> + Into<polkadot_primitives::AccountId>,
|
||||||
{
|
{
|
||||||
fn handle_credit(credit: CreditOf<AccountIdOf<R>, pallet_assets::Pallet<R, I>>) {
|
fn handle_credit(credit: Credit<AccountIdOf<R>, pallet_assets::Pallet<R, I>>) {
|
||||||
if let Some(author) = pallet_authorship::Pallet::<R>::author() {
|
if let Some(author) = pallet_authorship::Pallet::<R>::author() {
|
||||||
// In case of error: Will drop the result triggering the `OnDrop` of the imbalance.
|
// In case of error: Will drop the result triggering the `OnDrop` of the imbalance.
|
||||||
let _ = pallet_assets::Pallet::<R, I>::resolve(&author, credit);
|
let _ = pallet_assets::Pallet::<R, I>::resolve(&author, credit);
|
||||||
@@ -111,13 +111,13 @@ mod tests {
|
|||||||
use super::*;
|
use super::*;
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{FindAuthor, ValidatorRegistration},
|
traits::{ConstU32, FindAuthor, ValidatorRegistration},
|
||||||
PalletId,
|
PalletId,
|
||||||
};
|
};
|
||||||
use frame_system::{limits, EnsureRoot};
|
use frame_system::{limits, EnsureRoot};
|
||||||
use pallet_collator_selection::IdentityCollator;
|
use pallet_collator_selection::IdentityCollator;
|
||||||
use polkadot_primitives::AccountId;
|
use polkadot_primitives::AccountId;
|
||||||
use sp_core::H256;
|
use sp_core::{ConstU64, H256};
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
testing::Header,
|
testing::Header,
|
||||||
traits::{BlakeTwo256, IdentityLookup},
|
traits::{BlakeTwo256, IdentityLookup},
|
||||||
@@ -179,12 +179,16 @@ mod tests {
|
|||||||
type Balance = u64;
|
type Balance = u64;
|
||||||
type RuntimeEvent = RuntimeEvent;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type DustRemoval = ();
|
type DustRemoval = ();
|
||||||
type ExistentialDeposit = ();
|
type ExistentialDeposit = ConstU64<1>;
|
||||||
type AccountStore = System;
|
type AccountStore = System;
|
||||||
type MaxLocks = ();
|
type MaxLocks = ();
|
||||||
type WeightInfo = ();
|
type WeightInfo = ();
|
||||||
type MaxReserves = MaxReserves;
|
type MaxReserves = MaxReserves;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<1>;
|
||||||
|
type MaxFreezes = ConstU32<1>;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct OneAuthor;
|
pub struct OneAuthor;
|
||||||
|
|||||||
@@ -197,6 +197,10 @@ impl pallet_balances::Config for Runtime {
|
|||||||
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
|
||||||
type MaxReserves = ConstU32<50>;
|
type MaxReserves = ConstU32<50>;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<0>;
|
||||||
|
type MaxFreezes = ConstU32<0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
@@ -1139,7 +1143,8 @@ mod tests {
|
|||||||
use pallet_balances::WeightInfo;
|
use pallet_balances::WeightInfo;
|
||||||
let block = RuntimeBlockWeights::get().max_block;
|
let block = RuntimeBlockWeights::get().max_block;
|
||||||
let base = RuntimeBlockWeights::get().get(DispatchClass::Normal).base_extrinsic;
|
let base = RuntimeBlockWeights::get().get(DispatchClass::Normal).base_extrinsic;
|
||||||
let transfer = base + weights::pallet_balances::WeightInfo::<Runtime>::transfer();
|
let transfer =
|
||||||
|
base + weights::pallet_balances::WeightInfo::<Runtime>::transfer_allow_death();
|
||||||
|
|
||||||
let fit = block.checked_div_per_component(&transfer).unwrap_or_default();
|
let fit = block.checked_div_per_component(&transfer).unwrap_or_default();
|
||||||
assert!(fit >= 1000, "{} should be at least 1000", fit);
|
assert!(fit >= 1000, "{} should be at least 1000", fit);
|
||||||
@@ -1150,7 +1155,8 @@ mod tests {
|
|||||||
fn sane_transfer_fee() {
|
fn sane_transfer_fee() {
|
||||||
use pallet_balances::WeightInfo;
|
use pallet_balances::WeightInfo;
|
||||||
let base = RuntimeBlockWeights::get().get(DispatchClass::Normal).base_extrinsic;
|
let base = RuntimeBlockWeights::get().get(DispatchClass::Normal).base_extrinsic;
|
||||||
let transfer = base + weights::pallet_balances::WeightInfo::<Runtime>::transfer();
|
let transfer =
|
||||||
|
base + weights::pallet_balances::WeightInfo::<Runtime>::transfer_allow_death();
|
||||||
|
|
||||||
let fee: Balance = fee::WeightToFee::weight_to_fee(&transfer);
|
let fee: Balance = fee::WeightToFee::weight_to_fee(&transfer);
|
||||||
assert!(fee <= CENTS, "{} MILLICENTS should be at most 1000", fee / MILLICENTS);
|
assert!(fee <= CENTS, "{} MILLICENTS should be at most 1000", fee / MILLICENTS);
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ pub struct WeightInfo<T>(PhantomData<T>);
|
|||||||
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn transfer() -> Weight {
|
fn transfer_allow_death() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1178`
|
// Measured: `1178`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -73,7 +73,7 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn set_balance_creating() -> Weight {
|
fn force_set_balance_creating() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1174`
|
// Measured: `1174`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -85,7 +85,7 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn set_balance_killing() -> Weight {
|
fn force_set_balance_killing() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1174`
|
// Measured: `1174`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -121,6 +121,9 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
|
fn upgrade_accounts(_: u32) -> Weight {
|
||||||
|
Weight::from_parts(0, 0)
|
||||||
|
}
|
||||||
fn force_unreserve() -> Weight {
|
fn force_unreserve() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1058`
|
// Measured: `1058`
|
||||||
|
|||||||
@@ -214,6 +214,10 @@ impl pallet_balances::Config for Runtime {
|
|||||||
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
|
||||||
type MaxReserves = ConstU32<50>;
|
type MaxReserves = ConstU32<50>;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<0>;
|
||||||
|
type MaxFreezes = ConstU32<0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
@@ -1091,7 +1095,8 @@ mod tests {
|
|||||||
use pallet_balances::WeightInfo;
|
use pallet_balances::WeightInfo;
|
||||||
let block = RuntimeBlockWeights::get().max_block;
|
let block = RuntimeBlockWeights::get().max_block;
|
||||||
let base = RuntimeBlockWeights::get().get(DispatchClass::Normal).base_extrinsic;
|
let base = RuntimeBlockWeights::get().get(DispatchClass::Normal).base_extrinsic;
|
||||||
let transfer = base + weights::pallet_balances::WeightInfo::<Runtime>::transfer();
|
let transfer =
|
||||||
|
base + weights::pallet_balances::WeightInfo::<Runtime>::transfer_allow_death();
|
||||||
|
|
||||||
let fit = block.checked_div_per_component(&transfer).unwrap_or_default();
|
let fit = block.checked_div_per_component(&transfer).unwrap_or_default();
|
||||||
assert!(fit >= 1000, "{} should be at least 1000", fit);
|
assert!(fit >= 1000, "{} should be at least 1000", fit);
|
||||||
@@ -1102,7 +1107,8 @@ mod tests {
|
|||||||
fn sane_transfer_fee() {
|
fn sane_transfer_fee() {
|
||||||
use pallet_balances::WeightInfo;
|
use pallet_balances::WeightInfo;
|
||||||
let base = RuntimeBlockWeights::get().get(DispatchClass::Normal).base_extrinsic;
|
let base = RuntimeBlockWeights::get().get(DispatchClass::Normal).base_extrinsic;
|
||||||
let transfer = base + weights::pallet_balances::WeightInfo::<Runtime>::transfer();
|
let transfer =
|
||||||
|
base + weights::pallet_balances::WeightInfo::<Runtime>::transfer_allow_death();
|
||||||
|
|
||||||
let fee: Balance = fee::WeightToFee::weight_to_fee(&transfer);
|
let fee: Balance = fee::WeightToFee::weight_to_fee(&transfer);
|
||||||
assert!(fee <= CENTS, "{} MILLICENTS should be at most 1000", fee / MILLICENTS);
|
assert!(fee <= CENTS, "{} MILLICENTS should be at most 1000", fee / MILLICENTS);
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ pub struct WeightInfo<T>(PhantomData<T>);
|
|||||||
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn transfer() -> Weight {
|
fn transfer_allow_death() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1178`
|
// Measured: `1178`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -73,7 +73,7 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn set_balance_creating() -> Weight {
|
fn force_set_balance_creating() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1174`
|
// Measured: `1174`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -85,7 +85,7 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn set_balance_killing() -> Weight {
|
fn force_set_balance_killing() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1174`
|
// Measured: `1174`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -121,6 +121,9 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
|
fn upgrade_accounts(_: u32) -> Weight {
|
||||||
|
Weight::from_parts(0, 0)
|
||||||
|
}
|
||||||
fn force_unreserve() -> Weight {
|
fn force_unreserve() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1058`
|
// Measured: `1058`
|
||||||
|
|||||||
@@ -188,6 +188,10 @@ impl pallet_balances::Config for Runtime {
|
|||||||
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
|
||||||
type MaxReserves = ConstU32<50>;
|
type MaxReserves = ConstU32<50>;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<0>;
|
||||||
|
type MaxFreezes = ConstU32<0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ pub struct WeightInfo<T>(PhantomData<T>);
|
|||||||
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn transfer() -> Weight {
|
fn transfer_allow_death() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1177`
|
// Measured: `1177`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -73,7 +73,7 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn set_balance_creating() -> Weight {
|
fn force_set_balance_creating() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1173`
|
// Measured: `1173`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -85,7 +85,7 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn set_balance_killing() -> Weight {
|
fn force_set_balance_killing() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1173`
|
// Measured: `1173`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -121,6 +121,9 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
|
fn upgrade_accounts(_: u32) -> Weight {
|
||||||
|
Weight::from_parts(0, 0)
|
||||||
|
}
|
||||||
fn force_unreserve() -> Weight {
|
fn force_unreserve() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1057`
|
// Measured: `1057`
|
||||||
|
|||||||
@@ -250,6 +250,10 @@ impl pallet_balances::Config for Runtime {
|
|||||||
type MaxLocks = ConstU32<50>;
|
type MaxLocks = ConstU32<50>;
|
||||||
type MaxReserves = ConstU32<50>;
|
type MaxReserves = ConstU32<50>;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<0>;
|
||||||
|
type MaxFreezes = ConstU32<0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
+6
-3
@@ -49,7 +49,7 @@ pub struct WeightInfo<T>(PhantomData<T>);
|
|||||||
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn transfer() -> Weight {
|
fn transfer_allow_death() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1314`
|
// Measured: `1314`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -73,7 +73,7 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn set_balance_creating() -> Weight {
|
fn force_set_balance_creating() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1348`
|
// Measured: `1348`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -85,7 +85,7 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn set_balance_killing() -> Weight {
|
fn force_set_balance_killing() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1348`
|
// Measured: `1348`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -121,6 +121,9 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
|
fn upgrade_accounts(_: u32) -> Weight {
|
||||||
|
Weight::from_parts(0, 0)
|
||||||
|
}
|
||||||
fn force_unreserve() -> Weight {
|
fn force_unreserve() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1232`
|
// Measured: `1232`
|
||||||
|
|||||||
@@ -250,6 +250,10 @@ impl pallet_balances::Config for Runtime {
|
|||||||
type MaxLocks = ConstU32<50>;
|
type MaxLocks = ConstU32<50>;
|
||||||
type MaxReserves = ConstU32<50>;
|
type MaxReserves = ConstU32<50>;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<0>;
|
||||||
|
type MaxFreezes = ConstU32<0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
+6
-3
@@ -49,7 +49,7 @@ pub struct WeightInfo<T>(PhantomData<T>);
|
|||||||
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn transfer() -> Weight {
|
fn transfer_allow_death() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1316`
|
// Measured: `1316`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -73,7 +73,7 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn set_balance_creating() -> Weight {
|
fn force_set_balance_creating() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1350`
|
// Measured: `1350`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -85,7 +85,7 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn set_balance_killing() -> Weight {
|
fn force_set_balance_killing() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1350`
|
// Measured: `1350`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -121,6 +121,9 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
|
fn upgrade_accounts(_: u32) -> Weight {
|
||||||
|
Weight::from_parts(0, 0)
|
||||||
|
}
|
||||||
fn force_unreserve() -> Weight {
|
fn force_unreserve() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1234`
|
// Measured: `1234`
|
||||||
|
|||||||
@@ -319,6 +319,10 @@ impl pallet_balances::Config for Runtime {
|
|||||||
type MaxLocks = ConstU32<50>;
|
type MaxLocks = ConstU32<50>;
|
||||||
type MaxReserves = ConstU32<50>;
|
type MaxReserves = ConstU32<50>;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<0>;
|
||||||
|
type MaxFreezes = ConstU32<0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
+6
-3
@@ -49,7 +49,7 @@ pub struct WeightInfo<T>(PhantomData<T>);
|
|||||||
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn transfer() -> Weight {
|
fn transfer_allow_death() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1314`
|
// Measured: `1314`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -73,7 +73,7 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn set_balance_creating() -> Weight {
|
fn force_set_balance_creating() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1348`
|
// Measured: `1348`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -85,7 +85,7 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn set_balance_killing() -> Weight {
|
fn force_set_balance_killing() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1348`
|
// Measured: `1348`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -121,6 +121,9 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
|
fn upgrade_accounts(_: u32) -> Weight {
|
||||||
|
Weight::from_parts(0, 0)
|
||||||
|
}
|
||||||
fn force_unreserve() -> Weight {
|
fn force_unreserve() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1232`
|
// Measured: `1232`
|
||||||
|
|||||||
@@ -205,6 +205,10 @@ impl pallet_balances::Config for Runtime {
|
|||||||
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
|
||||||
type MaxReserves = ConstU32<50>;
|
type MaxReserves = ConstU32<50>;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<0>;
|
||||||
|
type MaxFreezes = ConstU32<0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
+6
-3
@@ -49,7 +49,7 @@ pub struct WeightInfo<T>(PhantomData<T>);
|
|||||||
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn transfer() -> Weight {
|
fn transfer_allow_death() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1176`
|
// Measured: `1176`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -73,7 +73,7 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn set_balance_creating() -> Weight {
|
fn force_set_balance_creating() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1172`
|
// Measured: `1172`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -85,7 +85,7 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
fn set_balance_killing() -> Weight {
|
fn force_set_balance_killing() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1172`
|
// Measured: `1172`
|
||||||
// Estimated: `2603`
|
// Estimated: `2603`
|
||||||
@@ -121,6 +121,9 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
|||||||
}
|
}
|
||||||
/// Storage: System Account (r:1 w:1)
|
/// Storage: System Account (r:1 w:1)
|
||||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||||
|
fn upgrade_accounts(_: u32) -> Weight {
|
||||||
|
Weight::from_parts(0, 0)
|
||||||
|
}
|
||||||
fn force_unreserve() -> Weight {
|
fn force_unreserve() -> Weight {
|
||||||
// Proof Size summary in bytes:
|
// Proof Size summary in bytes:
|
||||||
// Measured: `1056`
|
// Measured: `1056`
|
||||||
|
|||||||
@@ -210,6 +210,10 @@ impl pallet_balances::Config for Runtime {
|
|||||||
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
|
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
|
||||||
type MaxReserves = ConstU32<50>;
|
type MaxReserves = ConstU32<50>;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<0>;
|
||||||
|
type MaxFreezes = ConstU32<0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment::Config for Runtime {
|
impl pallet_transaction_payment::Config for Runtime {
|
||||||
|
|||||||
@@ -387,6 +387,10 @@ impl pallet_balances::Config for Runtime {
|
|||||||
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
|
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
|
||||||
type MaxReserves = ConstU32<50>;
|
type MaxReserves = ConstU32<50>;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<0>;
|
||||||
|
type MaxFreezes = ConstU32<0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ use core::marker::PhantomData;
|
|||||||
use frame_support::{
|
use frame_support::{
|
||||||
match_types, parameter_types,
|
match_types, parameter_types,
|
||||||
traits::{
|
traits::{
|
||||||
fungibles::{self, Balanced, CreditOf},
|
fungibles::{self, Balanced, Credit},
|
||||||
ConstU32, Contains, ContainsPair, Everything, Get, Nothing,
|
ConstU32, Contains, ContainsPair, Everything, Get, Nothing,
|
||||||
},
|
},
|
||||||
weights::Weight,
|
weights::Weight,
|
||||||
@@ -208,7 +208,7 @@ where
|
|||||||
R: pallet_authorship::Config + pallet_assets::Config,
|
R: pallet_authorship::Config + pallet_assets::Config,
|
||||||
AccountIdOf<R>: From<polkadot_primitives::AccountId> + Into<polkadot_primitives::AccountId>,
|
AccountIdOf<R>: From<polkadot_primitives::AccountId> + Into<polkadot_primitives::AccountId>,
|
||||||
{
|
{
|
||||||
fn handle_credit(credit: CreditOf<AccountIdOf<R>, pallet_assets::Pallet<R>>) {
|
fn handle_credit(credit: Credit<AccountIdOf<R>, pallet_assets::Pallet<R>>) {
|
||||||
if let Some(author) = pallet_authorship::Pallet::<R>::author() {
|
if let Some(author) = pallet_authorship::Pallet::<R>::author() {
|
||||||
// In case of error: Will drop the result triggering the `OnDrop` of the imbalance.
|
// In case of error: Will drop the result triggering the `OnDrop` of the imbalance.
|
||||||
let _ = pallet_assets::Pallet::<R>::resolve(&author, credit);
|
let _ = pallet_assets::Pallet::<R>::resolve(&author, credit);
|
||||||
|
|||||||
@@ -237,6 +237,10 @@ impl pallet_balances::Config for Runtime {
|
|||||||
type MaxLocks = ConstU32<50>;
|
type MaxLocks = ConstU32<50>;
|
||||||
type MaxReserves = ConstU32<50>;
|
type MaxReserves = ConstU32<50>;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<0>;
|
||||||
|
type MaxFreezes = ConstU32<0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment::Config for Runtime {
|
impl pallet_transaction_payment::Config for Runtime {
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ pub struct TakeFirstAssetTrader<
|
|||||||
AccountId,
|
AccountId,
|
||||||
FeeCharger: ChargeWeightInFungibles<AccountId, ConcreteAssets>,
|
FeeCharger: ChargeWeightInFungibles<AccountId, ConcreteAssets>,
|
||||||
Matcher: MatchesFungibles<ConcreteAssets::AssetId, ConcreteAssets::Balance>,
|
Matcher: MatchesFungibles<ConcreteAssets::AssetId, ConcreteAssets::Balance>,
|
||||||
ConcreteAssets: fungibles::Mutate<AccountId> + fungibles::Transfer<AccountId> + fungibles::Balanced<AccountId>,
|
ConcreteAssets: fungibles::Mutate<AccountId> + fungibles::Balanced<AccountId>,
|
||||||
HandleRefund: TakeRevenue,
|
HandleRefund: TakeRevenue,
|
||||||
>(
|
>(
|
||||||
Option<AssetTraderRefunder>,
|
Option<AssetTraderRefunder>,
|
||||||
@@ -131,9 +131,7 @@ impl<
|
|||||||
AccountId,
|
AccountId,
|
||||||
FeeCharger: ChargeWeightInFungibles<AccountId, ConcreteAssets>,
|
FeeCharger: ChargeWeightInFungibles<AccountId, ConcreteAssets>,
|
||||||
Matcher: MatchesFungibles<ConcreteAssets::AssetId, ConcreteAssets::Balance>,
|
Matcher: MatchesFungibles<ConcreteAssets::AssetId, ConcreteAssets::Balance>,
|
||||||
ConcreteAssets: fungibles::Mutate<AccountId>
|
ConcreteAssets: fungibles::Mutate<AccountId> + fungibles::Balanced<AccountId>,
|
||||||
+ fungibles::Transfer<AccountId>
|
|
||||||
+ fungibles::Balanced<AccountId>,
|
|
||||||
HandleRefund: TakeRevenue,
|
HandleRefund: TakeRevenue,
|
||||||
> WeightTrader
|
> WeightTrader
|
||||||
for TakeFirstAssetTrader<AccountId, FeeCharger, Matcher, ConcreteAssets, HandleRefund>
|
for TakeFirstAssetTrader<AccountId, FeeCharger, Matcher, ConcreteAssets, HandleRefund>
|
||||||
@@ -260,9 +258,7 @@ impl<
|
|||||||
AccountId,
|
AccountId,
|
||||||
FeeCharger: ChargeWeightInFungibles<AccountId, ConcreteAssets>,
|
FeeCharger: ChargeWeightInFungibles<AccountId, ConcreteAssets>,
|
||||||
Matcher: MatchesFungibles<ConcreteAssets::AssetId, ConcreteAssets::Balance>,
|
Matcher: MatchesFungibles<ConcreteAssets::AssetId, ConcreteAssets::Balance>,
|
||||||
ConcreteAssets: fungibles::Mutate<AccountId>
|
ConcreteAssets: fungibles::Mutate<AccountId> + fungibles::Balanced<AccountId>,
|
||||||
+ fungibles::Transfer<AccountId>
|
|
||||||
+ fungibles::Balanced<AccountId>,
|
|
||||||
HandleRefund: TakeRevenue,
|
HandleRefund: TakeRevenue,
|
||||||
> Drop for TakeFirstAssetTrader<AccountId, FeeCharger, Matcher, ConcreteAssets, HandleRefund>
|
> Drop for TakeFirstAssetTrader<AccountId, FeeCharger, Matcher, ConcreteAssets, HandleRefund>
|
||||||
{
|
{
|
||||||
@@ -317,10 +313,11 @@ mod tests {
|
|||||||
use cumulus_primitives_core::UpwardMessage;
|
use cumulus_primitives_core::UpwardMessage;
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
assert_ok,
|
assert_ok,
|
||||||
dispatch::DispatchResult,
|
dispatch::DispatchError,
|
||||||
traits::tokens::{DepositConsequence, WithdrawConsequence},
|
traits::tokens::{
|
||||||
|
DepositConsequence, Fortitude, Preservation, Provenance, WithdrawConsequence,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
use sp_runtime::DispatchError;
|
|
||||||
use xcm_executor::{traits::Error, Assets};
|
use xcm_executor::{traits::Error, Assets};
|
||||||
|
|
||||||
/// Validates [`validate`] for required Some(destination) and Some(message)
|
/// Validates [`validate`] for required Some(destination) and Some(message)
|
||||||
@@ -451,7 +448,16 @@ mod tests {
|
|||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn reducible_balance(_: Self::AssetId, _: &TestAccountId, _: bool) -> Self::Balance {
|
fn total_balance(_: Self::AssetId, _: &TestAccountId) -> Self::Balance {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn reducible_balance(
|
||||||
|
_: Self::AssetId,
|
||||||
|
_: &TestAccountId,
|
||||||
|
_: Preservation,
|
||||||
|
_: Fortitude,
|
||||||
|
) -> Self::Balance {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -459,7 +465,7 @@ mod tests {
|
|||||||
_: Self::AssetId,
|
_: Self::AssetId,
|
||||||
_: &TestAccountId,
|
_: &TestAccountId,
|
||||||
_: Self::Balance,
|
_: Self::Balance,
|
||||||
_: bool,
|
_: Provenance,
|
||||||
) -> DepositConsequence {
|
) -> DepositConsequence {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
@@ -476,36 +482,20 @@ mod tests {
|
|||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl fungibles::Mutate<TestAccountId> for TestAssets {
|
impl fungibles::Mutate<TestAccountId> for TestAssets {}
|
||||||
fn mint_into(_: Self::AssetId, _: &TestAccountId, _: Self::Balance) -> DispatchResult {
|
impl fungibles::Balanced<TestAccountId> for TestAssets {
|
||||||
todo!()
|
type OnDropCredit = fungibles::DecreaseIssuance<TestAccountId, Self>;
|
||||||
}
|
type OnDropDebt = fungibles::IncreaseIssuance<TestAccountId, Self>;
|
||||||
|
|
||||||
fn burn_from(
|
|
||||||
_: Self::AssetId,
|
|
||||||
_: &TestAccountId,
|
|
||||||
_: Self::Balance,
|
|
||||||
) -> Result<Self::Balance, DispatchError> {
|
|
||||||
todo!()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl fungibles::Transfer<TestAccountId> for TestAssets {
|
|
||||||
fn transfer(
|
|
||||||
_: Self::AssetId,
|
|
||||||
_: &TestAccountId,
|
|
||||||
_: &TestAccountId,
|
|
||||||
_: Self::Balance,
|
|
||||||
_: bool,
|
|
||||||
) -> Result<Self::Balance, DispatchError> {
|
|
||||||
todo!()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
impl fungibles::Unbalanced<TestAccountId> for TestAssets {
|
impl fungibles::Unbalanced<TestAccountId> for TestAssets {
|
||||||
fn set_balance(
|
fn handle_dust(_: fungibles::Dust<TestAccountId, Self>) {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
fn write_balance(
|
||||||
_: Self::AssetId,
|
_: Self::AssetId,
|
||||||
_: &TestAccountId,
|
_: &TestAccountId,
|
||||||
_: Self::Balance,
|
_: Self::Balance,
|
||||||
) -> DispatchResult {
|
) -> Result<Option<Self::Balance>, DispatchError> {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ pub fn transfer(
|
|||||||
dest: sp_keyring::AccountKeyring,
|
dest: sp_keyring::AccountKeyring,
|
||||||
value: Balance,
|
value: Balance,
|
||||||
) -> UncheckedExtrinsic {
|
) -> UncheckedExtrinsic {
|
||||||
let function = RuntimeCall::Balances(pallet_balances::Call::transfer {
|
let function = RuntimeCall::Balances(pallet_balances::Call::transfer_allow_death {
|
||||||
dest: dest.public().into(),
|
dest: dest.public().into(),
|
||||||
value,
|
value,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ mod test_pallet;
|
|||||||
|
|
||||||
use frame_support::traits::OnRuntimeUpgrade;
|
use frame_support::traits::OnRuntimeUpgrade;
|
||||||
use sp_api::{decl_runtime_apis, impl_runtime_apis};
|
use sp_api::{decl_runtime_apis, impl_runtime_apis};
|
||||||
use sp_core::OpaqueMetadata;
|
use sp_core::{ConstU32, OpaqueMetadata};
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
create_runtime_str, generic, impl_opaque_keys,
|
create_runtime_str, generic, impl_opaque_keys,
|
||||||
traits::{BlakeTwo256, Block as BlockT, IdentifyAccount, IdentityLookup, Verify},
|
traits::{BlakeTwo256, Block as BlockT, IdentifyAccount, IdentityLookup, Verify},
|
||||||
@@ -244,6 +244,10 @@ impl pallet_balances::Config for Runtime {
|
|||||||
type MaxLocks = ();
|
type MaxLocks = ();
|
||||||
type MaxReserves = MaxReserves;
|
type MaxReserves = MaxReserves;
|
||||||
type ReserveIdentifier = [u8; 8];
|
type ReserveIdentifier = [u8; 8];
|
||||||
|
type HoldIdentifier = ();
|
||||||
|
type FreezeIdentifier = ();
|
||||||
|
type MaxHolds = ConstU32<0>;
|
||||||
|
type MaxFreezes = ConstU32<0>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_transaction_payment::Config for Runtime {
|
impl pallet_transaction_payment::Config for Runtime {
|
||||||
|
|||||||
@@ -53,10 +53,9 @@ fn create_account_extrinsics(client: &Client, accounts: &[sr25519::Pair]) -> Vec
|
|||||||
client,
|
client,
|
||||||
SudoCall::sudo {
|
SudoCall::sudo {
|
||||||
call: Box::new(
|
call: Box::new(
|
||||||
BalancesCall::set_balance {
|
BalancesCall::force_set_balance {
|
||||||
who: AccountId::from(a.public()).into(),
|
who: AccountId::from(a.public()).into(),
|
||||||
new_free: 0,
|
new_free: 0,
|
||||||
new_reserved: 0,
|
|
||||||
}
|
}
|
||||||
.into(),
|
.into(),
|
||||||
),
|
),
|
||||||
@@ -69,10 +68,9 @@ fn create_account_extrinsics(client: &Client, accounts: &[sr25519::Pair]) -> Vec
|
|||||||
client,
|
client,
|
||||||
SudoCall::sudo {
|
SudoCall::sudo {
|
||||||
call: Box::new(
|
call: Box::new(
|
||||||
BalancesCall::set_balance {
|
BalancesCall::force_set_balance {
|
||||||
who: AccountId::from(a.public()).into(),
|
who: AccountId::from(a.public()).into(),
|
||||||
new_free: 1_000_000_000_000 * ExistentialDeposit::get(),
|
new_free: 1_000_000_000_000 * ExistentialDeposit::get(),
|
||||||
new_reserved: 0,
|
|
||||||
}
|
}
|
||||||
.into(),
|
.into(),
|
||||||
),
|
),
|
||||||
@@ -98,7 +96,7 @@ fn create_benchmark_extrinsics(
|
|||||||
(0..extrinsics_per_account).map(move |nonce| {
|
(0..extrinsics_per_account).map(move |nonce| {
|
||||||
construct_extrinsic(
|
construct_extrinsic(
|
||||||
client,
|
client,
|
||||||
BalancesCall::transfer {
|
BalancesCall::transfer_allow_death {
|
||||||
dest: Bob.to_account_id().into(),
|
dest: Bob.to_account_id().into(),
|
||||||
value: 1 * ExistentialDeposit::get(),
|
value: 1 * ExistentialDeposit::get(),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user