git.delta.rocks / unique-network / refs/commits / d881b160c58c

difftreelog

feat enable sponsorship primitives

Yaroslav Bolyukin2021-06-24parent: #900dc04.patch.diff
in: master

2 files changed

modifiedruntime/Cargo.tomldiffbeforeafterboth
46 'pallet-contracts/std',46 'pallet-contracts/std',
47 'pallet-contracts-primitives/std',47 'pallet-contracts-primitives/std',
48 'pallet-contracts-rpc-runtime-api/std',48 'pallet-contracts-rpc-runtime-api/std',
49 'pallet-contract-helpers/std',
49 'pallet-randomness-collective-flip/std',50 'pallet-randomness-collective-flip/std',
50 'pallet-sudo/std',51 'pallet-sudo/std',
51 'pallet-timestamp/std',52 'pallet-timestamp/std',
372[dependencies]373[dependencies]
373pallet-nft = { path = '../pallets/nft', default-features = false, version = '3.0.0' }374pallet-nft = { path = '../pallets/nft', default-features = false, version = '3.0.0' }
374pallet-inflation = { path = '../pallets/inflation', default-features = false, version = '3.0.0' }375pallet-inflation = { path = '../pallets/inflation', default-features = false, version = '3.0.0' }
375nft-data-structs = { path = '../primitives', default-features = false, version = '0.9.0' }376nft-data-structs = { path = '../primitives/nft', default-features = false, version = '0.9.0' }
376pallet-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }377pallet-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }
378pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
377pallet-nft-transaction-payment = { path = '../pallets/nft-transaction-payment', default-features = false, version = '3.0.0' }379pallet-nft-transaction-payment = { path = '../pallets/nft-transaction-payment', default-features = false, version = '3.0.0' }
378pallet-nft-charge-transaction = { path = '../pallets/nft-charge-transaction', default-features = false, version = '3.0.0' }380pallet-nft-charge-transaction = { path = '../pallets/nft-charge-transaction', default-features = false, version = '3.0.0' }
379381
modifiedruntime/src/lib.rsdiffbeforeafterboth
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -734,6 +734,11 @@
 	}
 }
 
+type SponsorshipHandler = (
+	pallet_nft::NftSponsorshipHandler<Runtime>,
+    pallet_contract_helpers::ContractSponsorshipHandler<Runtime>,
+);
+
 impl pallet_scheduler::Config for Runtime {
 	type Event = Event;
 	type Origin = Origin;
@@ -742,16 +747,18 @@
 	type MaximumWeight = MaximumSchedulerWeight;
 	type ScheduleOrigin = EnsureSigned<AccountId>;
 	type MaxScheduledPerBlock = MaxScheduledPerBlock;
-	type Sponsoring = Sponsoring;
+	type SponsorshipHandler = SponsorshipHandler;
 	type WeightInfo = ();
 }
 
 impl pallet_nft_transaction_payment::Config for Runtime {
+	type SponsorshipHandler = SponsorshipHandler;
 }
 
-impl pallet_nft_charge_transaction::Config for Runtime {
-}
+impl pallet_nft_charge_transaction::Config for Runtime {}
 
+impl pallet_contract_helpers::Config for Runtime {}
+
 construct_runtime!(
     pub enum Runtime where
         Block = Block,
@@ -791,6 +798,7 @@
 		Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>},
 		NftPayment: pallet_nft_transaction_payment::{Pallet, Call, Storage},
 		Charging: pallet_nft_charge_transaction::{Pallet, Call, Storage },
+		ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage},
     }
 );
 
@@ -829,6 +837,7 @@
     system::CheckNonce<Runtime>,
     system::CheckWeight<Runtime>,
     pallet_nft_charge_transaction::ChargeTransactionPayment<Runtime>,
+	pallet_contract_helpers::ContractHelpersExtension<Runtime>,
 );
 /// Unchecked extrinsic type as expected by this runtime.
 pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;