From e7b23ab5f278bd7831162b9b0f257ed226c793da Mon Sep 17 00:00:00 2001 From: Alessandro Siniscalchi Date: Fri, 10 Nov 2023 17:07:08 +0100 Subject: [PATCH] using existential balance == 0 --- ownership-chain/runtime/Cargo.toml | 2 +- ownership-chain/runtime/src/lib.rs | 2 +- ownership-chain/runtime/src/tests.rs | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ownership-chain/runtime/Cargo.toml b/ownership-chain/runtime/Cargo.toml index e219d4710..55a003073 100644 --- a/ownership-chain/runtime/Cargo.toml +++ b/ownership-chain/runtime/Cargo.toml @@ -34,7 +34,7 @@ frame-system-rpc-runtime-api = { workspace = true } frame-try-runtime = { workspace = true, optional = true } pallet-aura = { workspace = true } pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } +pallet-balances = { workspace = true , features = ["insecure_zero_ed"] } pallet-session = { workspace = true } pallet-sudo = { workspace = true } pallet-timestamp = { workspace = true } diff --git a/ownership-chain/runtime/src/lib.rs b/ownership-chain/runtime/src/lib.rs index 532f0970f..3929021c7 100644 --- a/ownership-chain/runtime/src/lib.rs +++ b/ownership-chain/runtime/src/lib.rs @@ -339,7 +339,7 @@ parameter_types! { /// behaviour if you set this to zero. /// /// Bottom line: Do yourself a favour and make it at least one! - pub const ExistentialDeposit: Balance = 1; + pub const ExistentialDeposit: Balance = 0; } impl pallet_balances::Config for Runtime { diff --git a/ownership-chain/runtime/src/tests.rs b/ownership-chain/runtime/src/tests.rs index 2590c8d79..489a18138 100644 --- a/ownership-chain/runtime/src/tests.rs +++ b/ownership-chain/runtime/src/tests.rs @@ -64,5 +64,6 @@ fn asset_id_to_address_two_assets_same_owner() { #[test] fn minimum_balance_should_be_1() { - assert_eq!(Balances::minimum_balance(), 1); + assert_eq!(Balances::minimum_balance(), 0); } +