difftreelog
feat connect split pallets via runtime
in: master
3 files changed
node/cli/src/chain_spec.rsdiffbeforeafterboth--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -5,7 +5,6 @@
use cumulus_primitives_core::ParaId;
use nft_runtime::*;
-use nft_data_structs::*;
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
use sc_service::ChainType;
use sp_core::{sr25519, Pair, Public};
@@ -175,34 +174,6 @@
.cloned()
.map(|k| (k, 1000, 100, 1 << 98))
.collect(),
- },
- nft: NftConfig {
- collection_id: vec![(
- 1,
- Collection {
- owner: get_account_id_from_seed::<sr25519::Public>("Alice"),
- mode: CollectionMode::NFT,
- access: AccessMode::Normal,
- decimal_points: 0,
- name: vec![],
- description: vec![],
- token_prefix: vec![],
- mint_mode: false,
- offchain_schema: vec![],
- schema_version: SchemaVersion::default(),
- sponsorship: SponsorshipState::Confirmed(get_account_id_from_seed::<
- sr25519::Public,
- >("Alice")),
- const_on_chain_schema: vec![],
- variable_on_chain_schema: vec![],
- limits: CollectionLimits::default(),
- meta_update_permission: MetaUpdatePermission::ItemOwner,
- transfers_enabled: true,
- },
- )],
- nft_item_id: vec![],
- fungible_item_id: vec![],
- refungible_item_id: vec![],
},
parachain_info: nft_runtime::ParachainInfoConfig { parachain_id: id },
aura: nft_runtime::AuraConfig {
runtime/Cargo.tomldiffbeforeafterboth1################################################################################2# Package 34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Substrate node nft'8edition = '2018'9homepage = 'https://unique.network'10license = 'All Rights Reserved'11name = 'nft-runtime'12repository = 'https://github.com/usetech-llc/nft_private/'13version = '3.0.0'1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std']20runtime-benchmarks = [21 'hex-literal',22 'frame-benchmarking',23 'frame-support/runtime-benchmarks',24 'frame-system-benchmarking',25 'frame-system/runtime-benchmarks',26 'pallet-evm-migration/runtime-benchmarks',27 'pallet-balances/runtime-benchmarks',28 'pallet-timestamp/runtime-benchmarks',29 'pallet-nft/runtime-benchmarks',30 'pallet-inflation/runtime-benchmarks',31 'pallet-xcm/runtime-benchmarks',32 'sp-runtime/runtime-benchmarks',33 'xcm-builder/runtime-benchmarks',34]35std = [36 'codec/std',37 'cumulus-pallet-aura-ext/std',38 'cumulus-pallet-parachain-system/std',39 'cumulus-pallet-xcm/std',40 'cumulus-pallet-xcmp-queue/std',41 'cumulus-primitives-core/std',42 'cumulus-primitives-utility/std',43 'frame-executive/std',44 'frame-support/std',45 'frame-system/std',46 'frame-system-rpc-runtime-api/std',47 'pallet-aura/std',48 'pallet-balances/std',49 # 'pallet-contracts/std',50 # 'pallet-contracts-primitives/std',51 # 'pallet-contracts-rpc-runtime-api/std',52 # 'pallet-contract-helpers/std',53 'pallet-randomness-collective-flip/std',54 'pallet-sudo/std',55 'pallet-timestamp/std',56 'pallet-transaction-payment/std',57 'pallet-transaction-payment-rpc-runtime-api/std',58 'pallet-treasury/std',59 'pallet-vesting/std',60 'pallet-evm/std',61 'pallet-evm-migration/std',62 'pallet-evm-contract-helpers/std',63 'pallet-evm-transaction-payment/std',64 'pallet-evm-coder-substrate/std',65 'pallet-ethereum/std',66 'fp-rpc/std',67 'parachain-info/std',68 'serde',69 'pallet-inflation/std',70 'pallet-nft/std',71 'pallet-scheduler/std',72 'pallet-nft-charge-transaction/std',73 'pallet-nft-transaction-payment/std',74 'nft-data-structs/std',75 'sp-api/std',76 'sp-block-builder/std',77 "sp-consensus-aura/std",78 'sp-core/std',79 'sp-inherents/std',80 'sp-io/std',81 'sp-offchain/std',82 'sp-runtime/std',83 'sp-session/std',84 'sp-std/std',85 'sp-transaction-pool/std',86 'sp-version/std',87 'xcm/std',88 'xcm-builder/std',89 'xcm-executor/std',90]91limit-testing = ['pallet-nft/limit-testing', 'nft-data-structs/limit-testing']9293################################################################################94# Substrate Dependencies9596[dependencies.codec]97default-features = false98features = ['derive']99package = 'parity-scale-codec'100version = '2.3.0'101102[dependencies.frame-benchmarking]103default-features = false104git = 'https://github.com/paritytech/substrate.git'105optional = true106branch = 'polkadot-v0.9.10'107version = '4.0.0-dev'108109[dependencies.frame-executive]110default-features = false111git = 'https://github.com/paritytech/substrate.git'112branch = 'polkadot-v0.9.10'113version = '4.0.0-dev'114115[dependencies.frame-support]116default-features = false117git = 'https://github.com/paritytech/substrate.git'118branch = 'polkadot-v0.9.10'119version = '4.0.0-dev'120121[dependencies.frame-system]122default-features = false123git = 'https://github.com/paritytech/substrate.git'124branch = 'polkadot-v0.9.10'125version = '4.0.0-dev'126127[dependencies.frame-system-benchmarking]128default-features = false129git = 'https://github.com/paritytech/substrate.git'130optional = true131branch = 'polkadot-v0.9.10'132version = '4.0.0-dev'133134[dependencies.frame-system-rpc-runtime-api]135default-features = false136git = 'https://github.com/paritytech/substrate.git'137branch = 'polkadot-v0.9.10'138version = '4.0.0-dev'139140[dependencies.hex-literal]141optional = true142version = '0.3.3'143144[dependencies.serde]145default-features = false146features = ['derive']147optional = true148version = '1.0.130'149150[dependencies.pallet-aura]151default-features = false152git = 'https://github.com/paritytech/substrate.git'153branch = 'polkadot-v0.9.10'154version = '4.0.0-dev'155156[dependencies.pallet-balances]157default-features = false158git = 'https://github.com/paritytech/substrate.git'159branch = 'polkadot-v0.9.10'160version = '4.0.0-dev'161162# Contracts specific packages163# [dependencies.pallet-contracts]164# git = 'https://github.com/paritytech/substrate.git'165# default-features = false166# branch = 'polkadot-v0.9.9'167# version = '4.0.0-dev'168169# [dependencies.pallet-contracts-primitives]170# git = 'https://github.com/paritytech/substrate.git'171# default-features = false172# branch = 'polkadot-v0.9.9'173# version = '4.0.0-dev'174175# [dependencies.pallet-contracts-rpc-runtime-api]176# git = 'https://github.com/paritytech/substrate.git'177# default-features = false178# branch = 'polkadot-v0.9.9'179# version = '4.0.0-dev'180181[dependencies.pallet-randomness-collective-flip]182default-features = false183git = 'https://github.com/paritytech/substrate.git'184branch = 'polkadot-v0.9.10'185version = '4.0.0-dev'186187[dependencies.pallet-sudo]188default-features = false189git = 'https://github.com/paritytech/substrate.git'190branch = 'polkadot-v0.9.10'191version = '4.0.0-dev'192193[dependencies.pallet-timestamp]194default-features = false195git = 'https://github.com/paritytech/substrate.git'196branch = 'polkadot-v0.9.10'197version = '4.0.0-dev'198199[dependencies.pallet-transaction-payment]200default-features = false201git = 'https://github.com/paritytech/substrate.git'202branch = 'polkadot-v0.9.10'203version = '4.0.0-dev'204205[dependencies.pallet-transaction-payment-rpc-runtime-api]206default-features = false207git = 'https://github.com/paritytech/substrate.git'208branch = 'polkadot-v0.9.10'209version = '4.0.0-dev'210211[dependencies.pallet-treasury]212default-features = false213git = 'https://github.com/paritytech/substrate.git'214branch = 'polkadot-v0.9.10'215version = '4.0.0-dev'216217[dependencies.pallet-vesting]218default-features = false219git = 'https://github.com/paritytech/substrate.git'220branch = 'polkadot-v0.9.10'221version = '4.0.0-dev'222223[dependencies.sp-arithmetic]224default-features = false225git = 'https://github.com/paritytech/substrate.git'226branch = 'polkadot-v0.9.10'227version = '4.0.0-dev'228229[dependencies.sp-api]230default-features = false231git = 'https://github.com/paritytech/substrate.git'232branch = 'polkadot-v0.9.10'233version = '4.0.0-dev'234235[dependencies.sp-block-builder]236default-features = false237git = 'https://github.com/paritytech/substrate.git'238branch = 'polkadot-v0.9.10'239version = '4.0.0-dev'240241[dependencies.sp-core]242default-features = false243git = 'https://github.com/paritytech/substrate.git'244branch = 'polkadot-v0.9.10'245version = '4.0.0-dev'246247[dependencies.sp-consensus-aura]248default-features = false249git = 'https://github.com/paritytech/substrate.git'250branch = 'polkadot-v0.9.10'251version = '0.10.0-dev'252253[dependencies.sp-inherents]254default-features = false255git = 'https://github.com/paritytech/substrate.git'256branch = 'polkadot-v0.9.10'257version = '4.0.0-dev'258259[dependencies.sp-io]260default-features = false261git = 'https://github.com/paritytech/substrate.git'262branch = 'polkadot-v0.9.10'263version = '4.0.0-dev'264265[dependencies.sp-offchain]266default-features = false267git = 'https://github.com/paritytech/substrate.git'268branch = 'polkadot-v0.9.10'269version = '4.0.0-dev'270271[dependencies.sp-runtime]272default-features = false273git = 'https://github.com/paritytech/substrate.git'274branch = 'polkadot-v0.9.10'275version = '4.0.0-dev'276277[dependencies.sp-session]278default-features = false279git = 'https://github.com/paritytech/substrate.git'280branch = 'polkadot-v0.9.10'281version = '4.0.0-dev'282283[dependencies.sp-std]284default-features = false285git = 'https://github.com/paritytech/substrate.git'286branch = 'polkadot-v0.9.10'287version = '4.0.0-dev'288289[dependencies.sp-transaction-pool]290default-features = false291git = 'https://github.com/paritytech/substrate.git'292branch = 'polkadot-v0.9.10'293version = '4.0.0-dev'294295[dependencies.sp-version]296default-features = false297git = 'https://github.com/paritytech/substrate.git'298branch = 'polkadot-v0.9.10'299version = '4.0.0-dev'300301[dependencies.smallvec]302version = '1.6.1'303304################################################################################305# Cumulus dependencies306307[dependencies.parachain-info]308default-features = false309git = 'https://github.com/paritytech/cumulus.git'310branch = 'polkadot-v0.9.10'311version = '0.1.0'312313[dependencies.cumulus-pallet-aura-ext]314git = 'https://github.com/paritytech/cumulus.git'315branch = 'polkadot-v0.9.10'316default-features = false317318[dependencies.cumulus-pallet-parachain-system]319git = 'https://github.com/paritytech/cumulus.git'320branch = 'polkadot-v0.9.10'321default-features = false322323[dependencies.cumulus-primitives-core]324git = 'https://github.com/paritytech/cumulus.git'325branch = 'polkadot-v0.9.10'326default-features = false327328[dependencies.cumulus-pallet-xcm]329git = 'https://github.com/paritytech/cumulus.git'330branch = 'polkadot-v0.9.10'331default-features = false332333[dependencies.cumulus-pallet-dmp-queue]334git = 'https://github.com/paritytech/cumulus.git'335branch = 'polkadot-v0.9.10'336default-features = false337338[dependencies.cumulus-pallet-xcmp-queue]339git = 'https://github.com/paritytech/cumulus.git'340branch = 'polkadot-v0.9.10'341default-features = false342343[dependencies.cumulus-primitives-utility]344git = 'https://github.com/paritytech/cumulus.git'345branch = 'polkadot-v0.9.10'346default-features = false347348[dependencies.cumulus-primitives-timestamp]349git = 'https://github.com/paritytech/cumulus.git'350branch = 'polkadot-v0.9.10'351default-features = false352353################################################################################354# Polkadot dependencies355356[dependencies.polkadot-parachain]357git = 'https://github.com/paritytech/polkadot'358branch = 'release-v0.9.10'359default-features = false360361[dependencies.xcm]362git = 'https://github.com/paritytech/polkadot'363branch = 'release-v0.9.10'364default-features = false365366[dependencies.xcm-builder]367git = 'https://github.com/paritytech/polkadot'368branch = 'release-v0.9.10'369default-features = false370371[dependencies.xcm-executor]372git = 'https://github.com/paritytech/polkadot'373branch = 'release-v0.9.10'374default-features = false375376[dependencies.pallet-xcm]377git = 'https://github.com/paritytech/polkadot'378branch = 'release-v0.9.10'379default-features = false380381382################################################################################383# local dependencies384385[dependencies]386derivative = "2.2.0"387pallet-nft = { path = '../pallets/nft', default-features = false, version = '3.0.0' }388pallet-inflation = { path = '../pallets/inflation', default-features = false, version = '3.0.0' }389nft-data-structs = { path = '../primitives/nft', default-features = false, version = '0.9.0' }390pallet-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }391# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }392pallet-nft-transaction-payment = { path = '../pallets/nft-transaction-payment', default-features = false, version = '3.0.0' }393pallet-nft-charge-transaction = { path = '../pallets/nft-charge-transaction', default-features = false, version = '3.0.0' }394pallet-evm-migration = { path = '../pallets/evm-migration', default-features = false }395pallet-evm-contract-helpers = { path = '../pallets/evm-contract-helpers', default-features = false }396pallet-evm-transaction-payment = { path = '../pallets/evm-transaction-payment', default-features = false }397pallet-evm-coder-substrate = { default-features = false, path = "../pallets/evm-coder-substrate" }398399pallet-evm = { default-features = false, version = "6.0.0-dev", git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.10" }400pallet-ethereum = { default-features = false, version = "4.0.0-dev", git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.10" }401fp-rpc = { default-features = false, version = "3.0.0-dev", git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.10" }402403################################################################################404# Build Dependencies405406[build-dependencies.substrate-wasm-builder]407git = 'https://github.com/paritytech/substrate.git'408branch = 'polkadot-v0.9.10'409version = '5.0.0-dev'1################################################################################2# Package 34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Substrate node nft'8edition = '2018'9homepage = 'https://unique.network'10license = 'All Rights Reserved'11name = 'nft-runtime'12repository = 'https://github.com/usetech-llc/nft_private/'13version = '3.0.0'1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std']20runtime-benchmarks = [21 'hex-literal',22 'frame-benchmarking',23 'frame-support/runtime-benchmarks',24 'frame-system-benchmarking',25 'frame-system/runtime-benchmarks',26 'pallet-evm-migration/runtime-benchmarks',27 'pallet-balances/runtime-benchmarks',28 'pallet-timestamp/runtime-benchmarks',29 'pallet-common/runtime-benchmarks',30 'pallet-fungible/runtime-benchmarks',31 'pallet-refungible/runtime-benchmarks',32 'pallet-nonfungible/runtime-benchmarks',33 'pallet-nft/runtime-benchmarks',34 'pallet-inflation/runtime-benchmarks',35 'pallet-xcm/runtime-benchmarks',36 'sp-runtime/runtime-benchmarks',37 'xcm-builder/runtime-benchmarks',38]39std = [40 'codec/std',41 'cumulus-pallet-aura-ext/std',42 'cumulus-pallet-parachain-system/std',43 'cumulus-pallet-xcm/std',44 'cumulus-pallet-xcmp-queue/std',45 'cumulus-primitives-core/std',46 'cumulus-primitives-utility/std',47 'frame-executive/std',48 'frame-support/std',49 'frame-system/std',50 'frame-system-rpc-runtime-api/std',51 'pallet-aura/std',52 'pallet-balances/std',53 # 'pallet-contracts/std',54 # 'pallet-contracts-primitives/std',55 # 'pallet-contracts-rpc-runtime-api/std',56 # 'pallet-contract-helpers/std',57 'pallet-randomness-collective-flip/std',58 'pallet-sudo/std',59 'pallet-timestamp/std',60 'pallet-transaction-payment/std',61 'pallet-transaction-payment-rpc-runtime-api/std',62 'pallet-treasury/std',63 'pallet-vesting/std',64 'pallet-evm/std',65 'pallet-evm-migration/std',66 'pallet-evm-contract-helpers/std',67 'pallet-evm-transaction-payment/std',68 'pallet-evm-coder-substrate/std',69 'pallet-ethereum/std',70 'fp-rpc/std',71 'parachain-info/std',72 'serde',73 'pallet-inflation/std',74 'pallet-common/std',75 'pallet-fungible/std',76 'pallet-refungible/std',77 'pallet-nonfungible/std',78 'pallet-nft/std',79 'pallet-scheduler/std',80 'pallet-nft-charge-transaction/std',81 'pallet-nft-transaction-payment/std',82 'nft-data-structs/std',83 'sp-api/std',84 'sp-block-builder/std',85 "sp-consensus-aura/std",86 'sp-core/std',87 'sp-inherents/std',88 'sp-io/std',89 'sp-offchain/std',90 'sp-runtime/std',91 'sp-session/std',92 'sp-std/std',93 'sp-transaction-pool/std',94 'sp-version/std',95 'xcm/std',96 'xcm-builder/std',97 'xcm-executor/std',98]99limit-testing = ['pallet-nft/limit-testing', 'nft-data-structs/limit-testing']100101################################################################################102# Substrate Dependencies103104[dependencies.codec]105default-features = false106features = ['derive']107package = 'parity-scale-codec'108version = '2.3.0'109110[dependencies.frame-benchmarking]111default-features = false112git = 'https://github.com/paritytech/substrate.git'113optional = true114branch = 'polkadot-v0.9.10'115version = '4.0.0-dev'116117[dependencies.frame-executive]118default-features = false119git = 'https://github.com/paritytech/substrate.git'120branch = 'polkadot-v0.9.10'121version = '4.0.0-dev'122123[dependencies.frame-support]124default-features = false125git = 'https://github.com/paritytech/substrate.git'126branch = 'polkadot-v0.9.10'127version = '4.0.0-dev'128129[dependencies.frame-system]130default-features = false131git = 'https://github.com/paritytech/substrate.git'132branch = 'polkadot-v0.9.10'133version = '4.0.0-dev'134135[dependencies.frame-system-benchmarking]136default-features = false137git = 'https://github.com/paritytech/substrate.git'138optional = true139branch = 'polkadot-v0.9.10'140version = '4.0.0-dev'141142[dependencies.frame-system-rpc-runtime-api]143default-features = false144git = 'https://github.com/paritytech/substrate.git'145branch = 'polkadot-v0.9.10'146version = '4.0.0-dev'147148[dependencies.hex-literal]149optional = true150version = '0.3.3'151152[dependencies.serde]153default-features = false154features = ['derive']155optional = true156version = '1.0.130'157158[dependencies.pallet-aura]159default-features = false160git = 'https://github.com/paritytech/substrate.git'161branch = 'polkadot-v0.9.10'162version = '4.0.0-dev'163164[dependencies.pallet-balances]165default-features = false166git = 'https://github.com/paritytech/substrate.git'167branch = 'polkadot-v0.9.10'168version = '4.0.0-dev'169170# Contracts specific packages171# [dependencies.pallet-contracts]172# git = 'https://github.com/paritytech/substrate.git'173# default-features = false174# branch = 'polkadot-v0.9.10'175# version = '4.0.0-dev'176177# [dependencies.pallet-contracts-primitives]178# git = 'https://github.com/paritytech/substrate.git'179# default-features = false180# branch = 'polkadot-v0.9.10'181# version = '4.0.0-dev'182183# [dependencies.pallet-contracts-rpc-runtime-api]184# git = 'https://github.com/paritytech/substrate.git'185# default-features = false186# branch = 'polkadot-v0.9.10'187# version = '4.0.0-dev'188189[dependencies.pallet-randomness-collective-flip]190default-features = false191git = 'https://github.com/paritytech/substrate.git'192branch = 'polkadot-v0.9.10'193version = '4.0.0-dev'194195[dependencies.pallet-sudo]196default-features = false197git = 'https://github.com/paritytech/substrate.git'198branch = 'polkadot-v0.9.10'199version = '4.0.0-dev'200201[dependencies.pallet-timestamp]202default-features = false203git = 'https://github.com/paritytech/substrate.git'204branch = 'polkadot-v0.9.10'205version = '4.0.0-dev'206207[dependencies.pallet-transaction-payment]208default-features = false209git = 'https://github.com/paritytech/substrate.git'210branch = 'polkadot-v0.9.10'211version = '4.0.0-dev'212213[dependencies.pallet-transaction-payment-rpc-runtime-api]214default-features = false215git = 'https://github.com/paritytech/substrate.git'216branch = 'polkadot-v0.9.10'217version = '4.0.0-dev'218219[dependencies.pallet-treasury]220default-features = false221git = 'https://github.com/paritytech/substrate.git'222branch = 'polkadot-v0.9.10'223version = '4.0.0-dev'224225[dependencies.pallet-vesting]226default-features = false227git = 'https://github.com/paritytech/substrate.git'228branch = 'polkadot-v0.9.10'229version = '4.0.0-dev'230231[dependencies.sp-arithmetic]232default-features = false233git = 'https://github.com/paritytech/substrate.git'234branch = 'polkadot-v0.9.10'235version = '4.0.0-dev'236237[dependencies.sp-api]238default-features = false239git = 'https://github.com/paritytech/substrate.git'240branch = 'polkadot-v0.9.10'241version = '4.0.0-dev'242243[dependencies.sp-block-builder]244default-features = false245git = 'https://github.com/paritytech/substrate.git'246branch = 'polkadot-v0.9.10'247version = '4.0.0-dev'248249[dependencies.sp-core]250default-features = false251git = 'https://github.com/paritytech/substrate.git'252branch = 'polkadot-v0.9.10'253version = '4.0.0-dev'254255[dependencies.sp-consensus-aura]256default-features = false257git = 'https://github.com/paritytech/substrate.git'258branch = 'polkadot-v0.9.10'259version = '0.10.0-dev'260261[dependencies.sp-inherents]262default-features = false263git = 'https://github.com/paritytech/substrate.git'264branch = 'polkadot-v0.9.10'265version = '4.0.0-dev'266267[dependencies.sp-io]268default-features = false269git = 'https://github.com/paritytech/substrate.git'270branch = 'polkadot-v0.9.10'271version = '4.0.0-dev'272273[dependencies.sp-offchain]274default-features = false275git = 'https://github.com/paritytech/substrate.git'276branch = 'polkadot-v0.9.10'277version = '4.0.0-dev'278279[dependencies.sp-runtime]280default-features = false281git = 'https://github.com/paritytech/substrate.git'282branch = 'polkadot-v0.9.10'283version = '4.0.0-dev'284285[dependencies.sp-session]286default-features = false287git = 'https://github.com/paritytech/substrate.git'288branch = 'polkadot-v0.9.10'289version = '4.0.0-dev'290291[dependencies.sp-std]292default-features = false293git = 'https://github.com/paritytech/substrate.git'294branch = 'polkadot-v0.9.10'295version = '4.0.0-dev'296297[dependencies.sp-transaction-pool]298default-features = false299git = 'https://github.com/paritytech/substrate.git'300branch = 'polkadot-v0.9.10'301version = '4.0.0-dev'302303[dependencies.sp-version]304default-features = false305git = 'https://github.com/paritytech/substrate.git'306branch = 'polkadot-v0.9.10'307version = '4.0.0-dev'308309[dependencies.smallvec]310version = '1.6.1'311312################################################################################313# Cumulus dependencies314315[dependencies.parachain-info]316default-features = false317git = 'https://github.com/paritytech/cumulus.git'318branch = 'polkadot-v0.9.10'319version = '0.1.0'320321[dependencies.cumulus-pallet-aura-ext]322git = 'https://github.com/paritytech/cumulus.git'323branch = 'polkadot-v0.9.10'324default-features = false325326[dependencies.cumulus-pallet-parachain-system]327git = 'https://github.com/paritytech/cumulus.git'328branch = 'polkadot-v0.9.10'329default-features = false330331[dependencies.cumulus-primitives-core]332git = 'https://github.com/paritytech/cumulus.git'333branch = 'polkadot-v0.9.10'334default-features = false335336[dependencies.cumulus-pallet-xcm]337git = 'https://github.com/paritytech/cumulus.git'338branch = 'polkadot-v0.9.10'339default-features = false340341[dependencies.cumulus-pallet-dmp-queue]342git = 'https://github.com/paritytech/cumulus.git'343branch = 'polkadot-v0.9.10'344default-features = false345346[dependencies.cumulus-pallet-xcmp-queue]347git = 'https://github.com/paritytech/cumulus.git'348branch = 'polkadot-v0.9.10'349default-features = false350351[dependencies.cumulus-primitives-utility]352git = 'https://github.com/paritytech/cumulus.git'353branch = 'polkadot-v0.9.10'354default-features = false355356[dependencies.cumulus-primitives-timestamp]357git = 'https://github.com/paritytech/cumulus.git'358branch = 'polkadot-v0.9.10'359default-features = false360361################################################################################362# Polkadot dependencies363364[dependencies.polkadot-parachain]365git = 'https://github.com/paritytech/polkadot'366branch = 'release-v0.9.10'367default-features = false368369[dependencies.xcm]370git = 'https://github.com/paritytech/polkadot'371branch = 'release-v0.9.10'372default-features = false373374[dependencies.xcm-builder]375git = 'https://github.com/paritytech/polkadot'376branch = 'release-v0.9.10'377default-features = false378379[dependencies.xcm-executor]380git = 'https://github.com/paritytech/polkadot'381branch = 'release-v0.9.10'382default-features = false383384[dependencies.pallet-xcm]385git = 'https://github.com/paritytech/polkadot'386branch = 'release-v0.9.10'387default-features = false388389390################################################################################391# local dependencies392393[dependencies]394derivative = "2.2.0"395pallet-nft = { path = '../pallets/nft', default-features = false, version = '3.0.0' }396up-rpc = { path = "../primitives/rpc", default-features = false }397pallet-inflation = { path = '../pallets/inflation', default-features = false, version = '3.0.0' }398nft-data-structs = { path = '../primitives/nft', default-features = false, version = '0.9.0' }399pallet-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }400pallet-common = { default-features = false, path = "../pallets/common" }401pallet-fungible = { default-features = false, path = "../pallets/fungible" }402pallet-refungible = { default-features = false, path = "../pallets/refungible" }403pallet-nonfungible = { default-features = false, path = "../pallets/nonfungible" }404# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }405pallet-nft-transaction-payment = { path = '../pallets/nft-transaction-payment', default-features = false, version = '3.0.0' }406pallet-nft-charge-transaction = { path = '../pallets/nft-charge-transaction', default-features = false, version = '3.0.0' }407pallet-evm-migration = { path = '../pallets/evm-migration', default-features = false }408pallet-evm-contract-helpers = { path = '../pallets/evm-contract-helpers', default-features = false }409pallet-evm-transaction-payment = { path = '../pallets/evm-transaction-payment', default-features = false }410pallet-evm-coder-substrate = { default-features = false, path = "../pallets/evm-coder-substrate" }411412pallet-evm = { default-features = false, version = "6.0.0-dev", git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.10" }413pallet-ethereum = { default-features = false, version = "4.0.0-dev", git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.10" }414fp-rpc = { default-features = false, version = "3.0.0-dev", git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.10" }415416################################################################################417# Build Dependencies418419[build-dependencies.substrate-wasm-builder]420git = 'https://github.com/paritytech/substrate.git'421branch = 'polkadot-v0.9.10'422version = '5.0.0-dev'runtime/src/lib.rsdiffbeforeafterboth--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -102,6 +102,8 @@
/// to the public key of our transaction signing scheme.
pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId;
+pub type CrossAccountId = pallet_common::account::BasicCrossAccountId<Runtime>;
+
/// The type for looking up accounts. We don't expect more than 4 billion of them, but you
/// never know...
pub type AccountIndex = u32;
@@ -701,20 +703,32 @@
pub const CollectionCreationPrice: Balance = 100 * UNIQUE;
}
-/// Used for the pallet nft in `./nft.rs`
-impl pallet_nft::Config for Runtime {
+impl pallet_common::Config for Runtime {
type Event = Event;
- type WeightInfo = pallet_nft::weights::SubstrateWeight<Self>;
-
- type EvmBackwardsAddressMapping = pallet_nft::MapBackwardsAddressTruncated;
+ type EvmBackwardsAddressMapping = pallet_common::account::MapBackwardsAddressTruncated;
type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;
- type CrossAccountId = pallet_nft::BasicCrossAccountId<Self>;
+ type CrossAccountId = pallet_common::account::BasicCrossAccountId<Self>;
type Currency = Balances;
type CollectionCreationPrice = CollectionCreationPrice;
type TreasuryAccountId = TreasuryAccountId;
}
+impl pallet_fungible::Config for Runtime {
+ type WeightInfo = pallet_fungible::weights::SubstrateWeight<Self>;
+}
+impl pallet_refungible::Config for Runtime {
+ type WeightInfo = pallet_refungible::weights::SubstrateWeight<Self>;
+}
+impl pallet_nonfungible::Config for Runtime {
+ type WeightInfo = pallet_nonfungible::weights::SubstrateWeight<Self>;
+}
+
+/// Used for the pallet nft in `./nft.rs`
+impl pallet_nft::Config for Runtime {
+ type WeightInfo = pallet_nft::weights::SubstrateWeight<Self>;
+}
+
parameter_types! {
pub const InflationBlockInterval: BlockNumber = 100; // every time per how many blocks inflation is applied
}
@@ -820,11 +834,15 @@
// Unique Pallets
Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,
- Nft: pallet_nft::{Pallet, Call, Config<T>, Storage, Event<T>} = 61,
+ Nft: pallet_nft::{Pallet, Call, Storage} = 61,
Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
NftPayment: pallet_nft_transaction_payment::{Pallet, Call, Storage} = 63,
Charging: pallet_nft_charge_transaction::{Pallet, Call, Storage } = 64,
// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,
+ Common: pallet_common::{Pallet, Storage, Event<T>} = 66,
+ Fungible: pallet_fungible::{Pallet, Storage} = 67,
+ Refungible: pallet_refungible::{Pallet, Storage} = 68,
+ Nonfungible: pallet_nonfungible::{Pallet, Storage} = 69,
// Frontier
EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,
@@ -901,10 +919,56 @@
}
}
+macro_rules! dispatch_nft_runtime {
+ ($collection:ident.$method:ident($($name:ident),*)) => {{
+ use pallet_nft::dispatch::Dispatched;
+
+ let collection = Dispatched::dispatch(<pallet_common::CollectionHandle<Runtime>>::new($collection).unwrap());
+ let dispatch = collection.as_dyn();
+
+ dispatch.$method($($name),*)
+ }};
+}
+
impl_runtime_apis! {
- impl pallet_nft::NftApi<Block>
+ impl up_rpc::NftApi<Block, CrossAccountId, AccountId>
for Runtime
{
+ fn account_tokens(collection: CollectionId, account: CrossAccountId) -> Vec<TokenId> {
+ dispatch_nft_runtime!(collection.account_tokens(account))
+ }
+ fn token_exists(collection: CollectionId, token: TokenId) -> bool {
+ dispatch_nft_runtime!(collection.token_exists(token))
+ }
+
+ fn token_owner(collection: CollectionId, token: TokenId) -> CrossAccountId {
+ dispatch_nft_runtime!(collection.token_owner(token))
+ }
+ fn const_metadata(collection: CollectionId, token: TokenId) -> Vec<u8> {
+ dispatch_nft_runtime!(collection.const_metadata(token))
+ }
+ fn variable_metadata(collection: CollectionId, token: TokenId) -> Vec<u8> {
+ dispatch_nft_runtime!(collection.variable_metadata(token))
+ }
+
+ fn collection_tokens(collection: CollectionId) -> u32 {
+ dispatch_nft_runtime!(collection.collection_tokens())
+ }
+ fn account_balance(collection: CollectionId, account: CrossAccountId) -> u32 {
+ dispatch_nft_runtime!(collection.account_balance(account))
+ }
+ fn balance(collection: CollectionId, account: CrossAccountId, token: TokenId) -> u128 {
+ dispatch_nft_runtime!(collection.balance(account, token))
+ }
+ fn allowance(
+ collection: CollectionId,
+ sender: CrossAccountId,
+ spender: CrossAccountId,
+ token: TokenId,
+ ) -> u128 {
+ dispatch_nft_runtime!(collection.allowance(sender, spender, token))
+ }
+
fn eth_contract_code(account: H160) -> Option<Vec<u8>> {
<pallet_nft::NftErcSupport<Runtime>>::get_code(&account)
}