Deprecate Currency: Companion for #12951 (#6780)

* Some renames

* Fix

* Fix build for new APIs

* Remove diener

* Fixes

* Fixes

* Fix integration tests

* Fixes

* fix nis issuance

* Update Cargo.toml

* Polkadot doesn't have freezes/holds yet

* No networks use freezes/holds

* update lockfile for {"substrate"}

* Fix tests

There are more failing tests; just starting with the easy ones.
Reserved balance does not count towards ED anymore, therefore reducing
all the reserves by ED (1).

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fixes for Polkadot pallets

* Fix parachains benchmarks

* Update Substrate

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

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:
Gavin Wood
2023-03-20 13:20:22 +00:00
committed by GitHub
parent 67035d6436
commit 2e656dcd6e
33 changed files with 481 additions and 305 deletions
+9 -4
View File
@@ -717,13 +717,14 @@ mod tests {
assert_err, assert_noop, assert_ok,
dispatch::{DispatchError::BadOrigin, GetDispatchInfo, Pays},
ord_parameter_types, parameter_types,
traits::{ExistenceRequirement, GenesisBuild, WithdrawReasons},
traits::{ConstU32, ExistenceRequirement, GenesisBuild, WithdrawReasons},
};
use pallet_balances;
use sp_runtime::{
testing::Header,
traits::{BlakeTwo256, Identity, IdentityLookup},
transaction_validity::TransactionLongevity,
TokenError,
};
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
@@ -786,6 +787,10 @@ mod tests {
type MaxReserves = ();
type ReserveIdentifier = [u8; 8];
type WeightInfo = ();
type HoldIdentifier = ();
type FreezeIdentifier = ();
type MaxHolds = ConstU32<1>;
type MaxFreezes = ConstU32<1>;
}
parameter_types! {
@@ -1206,7 +1211,7 @@ mod tests {
180,
ExistenceRequirement::AllowDeath
),
pallet_balances::Error::<Test, _>::LiquidityRestrictions,
TokenError::Frozen,
);
});
}
@@ -1294,6 +1299,8 @@ mod tests {
#[test]
fn claiming_while_vested_doesnt_work() {
new_test_ext().execute_with(|| {
CurrencyOf::<Test>::make_free_balance_be(&69, total_claims());
assert_eq!(Balances::free_balance(69), total_claims());
// A user is already vested
assert_ok!(<Test as Config>::VestingSchedule::add_vesting_schedule(
&69,
@@ -1301,8 +1308,6 @@ mod tests {
100,
10
));
CurrencyOf::<Test>::make_free_balance_be(&69, total_claims());
assert_eq!(Balances::free_balance(69), total_claims());
assert_ok!(Claims::mint_claim(
RuntimeOrigin::root(),
eth(&bob()),