Skip to content

Commit 9079547

Browse files
authored
change europa rent parameters to zero (#97)
substrate have removed the rent in pallet-contracts in newest substrate after this pr paritytech/substrate#9669. but we do not wanna update current substrate to new version, for we are waiting substrate to release 4.0.0. thus, we just change the rent parameters to zero, it will cause the same result compared with removed rent pallet-contracts.
1 parent 031c246 commit 9079547

2 files changed

Lines changed: 11 additions & 18 deletions

File tree

bin/europa/runtime/src/constants.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@ pub mod currency {
1111
pub const DOTS: Balance = 1_000_000_000_000; // old dot, one Dot is 100 Dot(new) now
1212
pub const DOLLARS: Balance = DOTS / 100; // 10_000_000_000 // one Dollar is 1 Dot(new) now
1313
pub const CENTS: Balance = DOLLARS / 100; // 100_000_000 // one Cent is 0.01 Dot(new) now
14-
pub const MILLICENTS: Balance = CENTS / 1_000; // 100_000 // one Millicent is 0.00001 Dot(new) now
14+
// pub const MILLICENTS: Balance = CENTS / 1_000; // 100_000 // one Millicent is 0.00001 Dot(new) now
1515

16-
pub const fn deposit(items: u32, bytes: u32) -> Balance {
17-
items as Balance * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS
18-
}
19-
20-
pub const fn europa_deposit(items: u32, bytes: u32) -> Balance {
21-
items as Balance * 10 * CENTS + (bytes as Balance) * 10 * MILLICENTS
22-
}
16+
// pub const fn deposit(items: u32, bytes: u32) -> Balance {
17+
// items as Balance * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS
18+
// }
2319
}
2420

2521
/// Fee-related.

bin/europa/runtime/src/lib.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -257,16 +257,13 @@ impl pallet_transaction_payment::Config for Runtime {
257257
}
258258

259259
parameter_types! {
260-
pub TombstoneDeposit: Balance = europa_deposit(
261-
1,
262-
<pallet_contracts::Pallet<Runtime>>::contract_info_size(),
263-
);
264-
pub DepositPerContract: Balance = TombstoneDeposit::get();
265-
pub const DepositPerStorageByte: Balance = deposit(0, 1);
266-
pub const DepositPerStorageItem: Balance = deposit(1, 0);
267-
pub RentFraction: Perbill = Perbill::from_rational(1u32, 30 * DAYS);
268-
pub const SurchargeReward: Balance = 150 * MILLICENTS;
269-
pub const SignedClaimHandicap: u32 = 2;
260+
pub const TombstoneDeposit: Balance = 0;
261+
pub const DepositPerContract: Balance = 0;
262+
pub const DepositPerStorageByte: Balance = TombstoneDeposit::get();
263+
pub const DepositPerStorageItem: Balance = 0;
264+
pub RentFraction: Perbill = Perbill::zero();
265+
pub const SurchargeReward: Balance = 0;
266+
pub const SignedClaimHandicap: u32 = 0;
270267
pub const MaxValueSize: u32 = 16 * 1024;
271268
// The lazy deletion runs inside on_initialize.
272269
pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO *

0 commit comments

Comments
 (0)