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
--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -46,6 +46,7 @@
     'pallet-contracts/std',
     'pallet-contracts-primitives/std',
     'pallet-contracts-rpc-runtime-api/std',
+    'pallet-contract-helpers/std',
     'pallet-randomness-collective-flip/std',
     'pallet-sudo/std',
     'pallet-timestamp/std',
@@ -372,8 +373,9 @@
 [dependencies]
 pallet-nft = { path = '../pallets/nft', default-features = false, version = '3.0.0' }
 pallet-inflation = { path = '../pallets/inflation', default-features = false, version = '3.0.0' }
-nft-data-structs = { path = '../primitives', default-features = false,  version = '0.9.0' }
+nft-data-structs = { path = '../primitives/nft', default-features = false,  version = '0.9.0' }
 pallet-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }
+pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
 pallet-nft-transaction-payment = { path = '../pallets/nft-transaction-payment', default-features = false, version = '3.0.0' }
 pallet-nft-charge-transaction = { path = '../pallets/nft-charge-transaction', default-features = false, version = '3.0.0' }
 
modifiedruntime/src/lib.rsdiffbeforeafterboth
734 }734 }
735}735}
736
737type SponsorshipHandler = (
738 pallet_nft::NftSponsorshipHandler<Runtime>,
739 pallet_contract_helpers::ContractSponsorshipHandler<Runtime>,
740);
736741
737impl pallet_scheduler::Config for Runtime {742impl pallet_scheduler::Config for Runtime {
738 type Event = Event;743 type Event = Event;
742 type MaximumWeight = MaximumSchedulerWeight;747 type MaximumWeight = MaximumSchedulerWeight;
743 type ScheduleOrigin = EnsureSigned<AccountId>;748 type ScheduleOrigin = EnsureSigned<AccountId>;
744 type MaxScheduledPerBlock = MaxScheduledPerBlock;749 type MaxScheduledPerBlock = MaxScheduledPerBlock;
745 type Sponsoring = Sponsoring;750 type SponsorshipHandler = SponsorshipHandler;
746 type WeightInfo = ();751 type WeightInfo = ();
747}752}
748753
749impl pallet_nft_transaction_payment::Config for Runtime {754impl pallet_nft_transaction_payment::Config for Runtime {
755 type SponsorshipHandler = SponsorshipHandler;
750}756}
751757
752impl pallet_nft_charge_transaction::Config for Runtime {758impl pallet_nft_charge_transaction::Config for Runtime {}
753}759
760impl pallet_contract_helpers::Config for Runtime {}
754761
755construct_runtime!(762construct_runtime!(
756 pub enum Runtime where763 pub enum Runtime where
791 Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>},798 Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>},
792 NftPayment: pallet_nft_transaction_payment::{Pallet, Call, Storage},799 NftPayment: pallet_nft_transaction_payment::{Pallet, Call, Storage},
793 Charging: pallet_nft_charge_transaction::{Pallet, Call, Storage },800 Charging: pallet_nft_charge_transaction::{Pallet, Call, Storage },
801 ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage},
794 }802 }
795);803);
796804
829 system::CheckNonce<Runtime>,837 system::CheckNonce<Runtime>,
830 system::CheckWeight<Runtime>,838 system::CheckWeight<Runtime>,
831 pallet_nft_charge_transaction::ChargeTransactionPayment<Runtime>,839 pallet_nft_charge_transaction::ChargeTransactionPayment<Runtime>,
840 pallet_contract_helpers::ContractHelpersExtension<Runtime>,
832);841);
833/// Unchecked extrinsic type as expected by this runtime.842/// Unchecked extrinsic type as expected by this runtime.
834pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;843pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;