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

difftreelog

Field name changed

str-mv2020-07-03parent: #af2b662.patch.diff
in: master

4 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2804,6 +2804,7 @@
  "pallet-grandpa",
  "pallet-nft",
  "pallet-randomness-collective-flip",
+ "pallet-staking",
  "pallet-sudo",
  "pallet-timestamp",
  "pallet-transaction-payment",
@@ -3005,6 +3006,21 @@
 ]
 
 [[package]]
+name = "pallet-authorship"
+version = "2.0.0-rc4"
+source = "git+https://github.com/paritytech/substrate.git?tag=v2.0.0-rc4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4"
+dependencies = [
+ "frame-support",
+ "frame-system",
+ "impl-trait-for-tuples",
+ "parity-scale-codec",
+ "sp-authorship",
+ "sp-inherents",
+ "sp-runtime",
+ "sp-std",
+]
+
+[[package]]
 name = "pallet-balances"
 version = "2.0.0-rc4"
 source = "git+https://github.com/paritytech/substrate.git?tag=v2.0.0-rc4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4"
@@ -3161,6 +3177,26 @@
 ]
 
 [[package]]
+name = "pallet-staking"
+version = "2.0.0-rc4"
+source = "git+https://github.com/paritytech/substrate.git?tag=v2.0.0-rc4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4"
+dependencies = [
+ "frame-support",
+ "frame-system",
+ "pallet-authorship",
+ "pallet-session",
+ "parity-scale-codec",
+ "serde",
+ "sp-application-crypto",
+ "sp-io",
+ "sp-npos-elections",
+ "sp-runtime",
+ "sp-staking",
+ "sp-std",
+ "static_assertions",
+]
+
+[[package]]
 name = "pallet-sudo"
 version = "2.0.0-rc4"
 source = "git+https://github.com/paritytech/substrate.git?tag=v2.0.0-rc4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4"
@@ -5360,6 +5396,17 @@
 ]
 
 [[package]]
+name = "sp-authorship"
+version = "2.0.0-rc4"
+source = "git+https://github.com/paritytech/substrate.git?tag=v2.0.0-rc4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4"
+dependencies = [
+ "parity-scale-codec",
+ "sp-inherents",
+ "sp-runtime",
+ "sp-std",
+]
+
+[[package]]
 name = "sp-block-builder"
 version = "2.0.0-rc4"
 source = "git+https://github.com/paritytech/substrate.git?tag=v2.0.0-rc4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4"
@@ -5577,6 +5624,29 @@
 ]
 
 [[package]]
+name = "sp-npos-elections"
+version = "2.0.0-rc4"
+source = "git+https://github.com/paritytech/substrate.git?tag=v2.0.0-rc4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4"
+dependencies = [
+ "parity-scale-codec",
+ "serde",
+ "sp-arithmetic",
+ "sp-npos-elections-compact",
+ "sp-std",
+]
+
+[[package]]
+name = "sp-npos-elections-compact"
+version = "2.0.0-rc4"
+source = "git+https://github.com/paritytech/substrate.git?tag=v2.0.0-rc4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4"
+dependencies = [
+ "proc-macro-crate",
+ "proc-macro2",
+ "quote 1.0.7",
+ "syn 1.0.31",
+]
+
+[[package]]
 name = "sp-offchain"
 version = "2.0.0-rc4"
 source = "git+https://github.com/paritytech/substrate.git?tag=v2.0.0-rc4#00768a1f21a579c478fe5d4f51e1fa71f7db9fd4"
modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
--- a/pallets/nft/src/lib.rs
+++ b/pallets/nft/src/lib.rs
@@ -26,7 +26,7 @@
     pub next_item_id: u64,
     pub name: Vec<u16>, // 64 include null escape char
     pub description: Vec<u16>, // 256 include null escape char
-    pub token_trefix: Vec<u8>, // 16 include null escape char
+    pub token_prefix: Vec<u8>, // 16 include null escape char
     pub custom_data_size: u32,
 }
 
@@ -125,9 +125,9 @@
             description.push(0);
             ensure!(name.len() <= 256, "Collection description can not be longer than 255 char");
 
-            let mut token_trefix = token_prefix.to_vec();
-            token_trefix.push(0);
-            ensure!(token_trefix.len() <= 16, "Token prefix can not be longer than 15 char");
+            let mut prefix = token_prefix.to_vec();
+            prefix.push(0);
+            ensure!(prefix.len() <= 16, "Token prefix can not be longer than 15 char");
 
             // Generate next collection ID
             let next_id = NextCollectionID::get();
@@ -139,7 +139,7 @@
                 owner: who.clone(),
                 name: name,
                 description: description,
-                token_trefix: token_trefix,
+                token_prefix: prefix,
                 next_item_id: next_id,
                 custom_data_size: custom_data_sz,
             };
modifiedruntime/Cargo.tomldiffbeforeafterboth
before · runtime/Cargo.toml
1[features]2default = ['std']3std = [4    'aura/std',5    'balances/std',6    'codec/std',7    'contracts/std',8    'contracts-primitives/std',9    'contracts-rpc-runtime-api/std',10    'frame-executive/std',11    'frame-support/std',12    'grandpa/std',13    'randomness-collective-flip/std',14    'serde',15    'sp-api/std',16    'sp-block-builder/std',17    'sp-consensus-aura/std',18    'sp-core/std',19    'sp-inherents/std',20    'sp-io/std',21    'sp-offchain/std',22    'sp-runtime/std',23    'sp-session/std',24    'sp-std/std',25    'sp-transaction-pool/std',26    'sp-version/std',27    'sudo/std',28    'system/std',29    'timestamp/std',30    'transaction-payment/std',31    'nft/std',32]33[dependencies.aura]34default-features = false35git = 'https://github.com/paritytech/substrate.git'36package = 'pallet-aura'37tag = 'v2.0.0-rc4'38version = '2.0.0-rc4'3940[dependencies.balances]41default-features = false42git = 'https://github.com/paritytech/substrate.git'43package = 'pallet-balances'44tag = 'v2.0.0-rc4'45version = '2.0.0-rc4'4647[dependencies.codec]48default-features = false49features = ['derive']50package = 'parity-scale-codec'51version = '1.3.1'5253[dependencies.contracts]54git = 'https://github.com/paritytech/substrate.git'55default-features = false56package = 'pallet-contracts'57tag = 'v2.0.0-rc4'58version = '2.0.0-rc4'5960[dependencies.contracts-primitives]61git = 'https://github.com/paritytech/substrate.git'62default-features = false63package = 'pallet-contracts-primitives'64tag = 'v2.0.0-rc4'65version = '2.0.0-rc4'6667[dependencies.contracts-rpc-runtime-api]68git = 'https://github.com/paritytech/substrate.git'69default-features = false70package = 'pallet-contracts-rpc-runtime-api'71version = '0.8.0-rc4'72tag = 'v2.0.0-rc4'7374[dependencies.frame-executive]75default-features = false76git = 'https://github.com/paritytech/substrate.git'77tag = 'v2.0.0-rc4'78version = '2.0.0-rc4'7980[dependencies.frame-support]81default-features = false82git = 'https://github.com/paritytech/substrate.git'83tag = 'v2.0.0-rc4'84version = '2.0.0-rc4'8586[dependencies.grandpa]87default-features = false88git = 'https://github.com/paritytech/substrate.git'89package = 'pallet-grandpa'90tag = 'v2.0.0-rc4'91version = '2.0.0-rc4'9293[dependencies.randomness-collective-flip]94default-features = false95git = 'https://github.com/paritytech/substrate.git'96package = 'pallet-randomness-collective-flip'97tag = 'v2.0.0-rc4'98version = '2.0.0-rc4'99100[dependencies.serde]101features = ['derive']102optional = true103version = '1.0.101'104105[dependencies.sp-api]106default-features = false107git = 'https://github.com/paritytech/substrate.git'108tag = 'v2.0.0-rc4'109version = '2.0.0-rc4'110111[dependencies.sp-block-builder]112default-features = false113git = 'https://github.com/paritytech/substrate.git'114tag = 'v2.0.0-rc4'115version = '2.0.0-rc4'116117[dependencies.sp-consensus-aura]118default-features = false119git = 'https://github.com/paritytech/substrate.git'120tag = 'v2.0.0-rc4'121version = '0.8.0-rc4'122123[dependencies.sp-core]124default-features = false125git = 'https://github.com/paritytech/substrate.git'126tag = 'v2.0.0-rc4'127version = '2.0.0-rc4'128129[dependencies.sp-inherents]130default-features = false131git = 'https://github.com/paritytech/substrate.git'132tag = 'v2.0.0-rc4'133version = '2.0.0-rc4'134135[dependencies.sp-io]136default-features = false137git = 'https://github.com/paritytech/substrate.git'138tag = 'v2.0.0-rc4'139version = '2.0.0-rc4'140141[dependencies.sp-offchain]142default-features = false143git = 'https://github.com/paritytech/substrate.git'144tag = 'v2.0.0-rc4'145version = '2.0.0-rc4'146147[dependencies.sp-runtime]148default-features = false149git = 'https://github.com/paritytech/substrate.git'150tag = 'v2.0.0-rc4'151version = '2.0.0-rc4'152153[dependencies.sp-session]154default-features = false155git = 'https://github.com/paritytech/substrate.git'156tag = 'v2.0.0-rc4'157version = '2.0.0-rc4'158159[dependencies.sp-std]160default-features = false161git = 'https://github.com/paritytech/substrate.git'162tag = 'v2.0.0-rc4'163version = '2.0.0-rc4'164165[dependencies.sp-transaction-pool]166default-features = false167git = 'https://github.com/paritytech/substrate.git'168tag = 'v2.0.0-rc4'169version = '2.0.0-rc4'170171[dependencies.sp-version]172default-features = false173git = 'https://github.com/paritytech/substrate.git'174tag = 'v2.0.0-rc4'175version = '2.0.0-rc4'176177[dependencies.sudo]178default-features = false179git = 'https://github.com/paritytech/substrate.git'180package = 'pallet-sudo'181tag = 'v2.0.0-rc4'182version = '2.0.0-rc4'183184[dependencies.system]185default-features = false186git = 'https://github.com/paritytech/substrate.git'187package = 'frame-system'188tag = 'v2.0.0-rc4'189version = '2.0.0-rc4'190191[dependencies.nft]192default-features = false193package = 'pallet-nft'194path = '../pallets/nft'195version = '2.0.0-rc4'196197[dependencies.timestamp]198default-features = false199git = 'https://github.com/paritytech/substrate.git'200package = 'pallet-timestamp'201tag = 'v2.0.0-rc4'202version = '2.0.0-rc4'203204[dependencies.transaction-payment]205default-features = false206git = 'https://github.com/paritytech/substrate.git'207package = 'pallet-transaction-payment'208tag = 'v2.0.0-rc4'209version = '2.0.0-rc4'210211[package]212authors = ['UseTech']213edition = '2018'214homepage = 'https://usetech.com/blockchain'215license = 'Unlicense'216name = 'nft-runtime'217repository = 'https://github.com/usetech-llc/nft_parachain/'218version = '2.0.0-rc4'219220[package.metadata.docs.rs]221targets = ['x86_64-unknown-linux-gnu']222223[build-dependencies.wasm-builder-runner]224git = 'https://github.com/paritytech/substrate.git'225package = 'substrate-wasm-builder-runner'226tag = 'v2.0.0-rc4'227version = '1.0.5'
modifiedruntime/src/lib.rsdiffbeforeafterboth
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -30,6 +30,7 @@
 #[cfg(any(feature = "std", test))]
 pub use sp_runtime::BuildStorage;
 pub use timestamp::Call as TimestampCall;
+pub use staking::Call as StakingCall;
 pub use balances::Call as BalancesCall;
 pub use sp_runtime::{Permill, Perbill};
 pub use contracts::Schedule as ContractsSchedule;
@@ -229,6 +230,33 @@
 	type MinimumPeriod = MinimumPeriod;
 }
 
+
+parameter_types! {
+    pub const TombstoneDeposit: Balance = 16 * MILLICENTS;
+    pub const RentByteFee: Balance = 4 * MILLICENTS;
+    pub const RentDepositOffset: Balance = 1000 * MILLICENTS;
+    pub const SurchargeReward: Balance = 150 * MILLICENTS;
+}
+
+impl contracts::Trait for Runtime {
+    type Time = Timestamp;
+    type Randomness = RandomnessCollectiveFlip;
+    type Currency = Balances;
+    type Event = Event;
+    type DetermineContractAddress = contracts::SimpleAddressDeterminer<Runtime>;
+    type TrieIdGenerator = contracts::TrieIdFromParentCounter<Runtime>;
+    type RentPayment = ();
+    type SignedClaimHandicap = contracts::DefaultSignedClaimHandicap;
+    type TombstoneDeposit = TombstoneDeposit;
+    type StorageSizeOffset = contracts::DefaultStorageSizeOffset;
+    type RentByteFee = RentByteFee;
+    type RentDepositOffset = RentDepositOffset;
+    type SurchargeReward = SurchargeReward;
+    type MaxDepth = contracts::DefaultMaxDepth;
+    type MaxValueSize = contracts::DefaultMaxValueSize;
+    type WeightPrice = transaction_payment::Module<Self>;
+}
+
 parameter_types! {
 	pub const ExistentialDeposit: u128 = 500;
 }
@@ -260,32 +288,6 @@
 	type Call = Call;
 }
 
-parameter_types! {
-    pub const TombstoneDeposit: Balance = 16 * MILLICENTS;
-    pub const RentByteFee: Balance = 4 * MILLICENTS;
-    pub const RentDepositOffset: Balance = 1000 * MILLICENTS;
-    pub const SurchargeReward: Balance = 150 * MILLICENTS;
-}
-
-impl contracts::Trait for Runtime {
-    type Time = Timestamp;
-    type Randomness = RandomnessCollectiveFlip;
-    type Currency = Balances;
-    type Event = Event;
-    type DetermineContractAddress = contracts::SimpleAddressDeterminer<Runtime>;
-    type TrieIdGenerator = contracts::TrieIdFromParentCounter<Runtime>;
-    type RentPayment = ();
-    type SignedClaimHandicap = contracts::DefaultSignedClaimHandicap;
-    type TombstoneDeposit = TombstoneDeposit;
-    type StorageSizeOffset = contracts::DefaultStorageSizeOffset;
-    type RentByteFee = RentByteFee;
-    type RentDepositOffset = RentDepositOffset;
-    type SurchargeReward = SurchargeReward;
-    type MaxDepth = contracts::DefaultMaxDepth;
-    type MaxValueSize = contracts::DefaultMaxValueSize;
-    type WeightPrice = transaction_payment::Module<Self>;
-}
-
 /// Used for the module template in `./template.rs`
 impl nft::Trait for Runtime {
     type Event = Event;
@@ -306,6 +308,7 @@
 		Balances: balances::{Module, Call, Storage, Config<T>, Event<T>},
 		TransactionPayment: transaction_payment::{Module, Storage},
 		Sudo: sudo::{Module, Call, Config<T>, Storage, Event<T>},
+		// Staking: staking::{Module, Call, Config<T>, Storage, Event<T>},
 		// Used for the module template in `./template.rs`
         Nft: nft::{Module, Call, Storage, Event<T>},
 	}