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
--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -27,6 +27,7 @@
     'sudo/std',
     'system/std',
     'timestamp/std',
+    'staking/std',
     'transaction-payment/std',
     'nft/std',
 ]
@@ -201,6 +202,14 @@
 tag = 'v2.0.0-rc4'
 version = '2.0.0-rc4'
 
+
+[dependencies.staking]
+default-features = false
+git = 'https://github.com/paritytech/substrate.git'
+package = 'pallet-staking'
+tag = 'v2.0.0-rc4'
+version = '2.0.0-rc4'
+
 [dependencies.transaction-payment]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
modifiedruntime/src/lib.rsdiffbeforeafterboth
30#[cfg(any(feature = "std", test))]30#[cfg(any(feature = "std", test))]
31pub use sp_runtime::BuildStorage;31pub use sp_runtime::BuildStorage;
32pub use timestamp::Call as TimestampCall;32pub use timestamp::Call as TimestampCall;
33pub use staking::Call as StakingCall;
33pub use balances::Call as BalancesCall;34pub use balances::Call as BalancesCall;
34pub use sp_runtime::{Permill, Perbill};35pub use sp_runtime::{Permill, Perbill};
35pub use contracts::Schedule as ContractsSchedule;36pub use contracts::Schedule as ContractsSchedule;
230}231}
232
233
234parameter_types! {
235 pub const TombstoneDeposit: Balance = 16 * MILLICENTS;
236 pub const RentByteFee: Balance = 4 * MILLICENTS;
237 pub const RentDepositOffset: Balance = 1000 * MILLICENTS;
238 pub const SurchargeReward: Balance = 150 * MILLICENTS;
239}
240
241impl contracts::Trait for Runtime {
242 type Time = Timestamp;
243 type Randomness = RandomnessCollectiveFlip;
244 type Currency = Balances;
245 type Event = Event;
246 type DetermineContractAddress = contracts::SimpleAddressDeterminer<Runtime>;
247 type TrieIdGenerator = contracts::TrieIdFromParentCounter<Runtime>;
248 type RentPayment = ();
249 type SignedClaimHandicap = contracts::DefaultSignedClaimHandicap;
250 type TombstoneDeposit = TombstoneDeposit;
251 type StorageSizeOffset = contracts::DefaultStorageSizeOffset;
252 type RentByteFee = RentByteFee;
253 type RentDepositOffset = RentDepositOffset;
254 type SurchargeReward = SurchargeReward;
255 type MaxDepth = contracts::DefaultMaxDepth;
256 type MaxValueSize = contracts::DefaultMaxValueSize;
257 type WeightPrice = transaction_payment::Module<Self>;
258}
231259
232parameter_types! {260parameter_types! {
233 pub const ExistentialDeposit: u128 = 500;261 pub const ExistentialDeposit: u128 = 500;
260 type Call = Call;288 type Call = Call;
261}289}
262
263parameter_types! {
264 pub const TombstoneDeposit: Balance = 16 * MILLICENTS;
265 pub const RentByteFee: Balance = 4 * MILLICENTS;
266 pub const RentDepositOffset: Balance = 1000 * MILLICENTS;
267 pub const SurchargeReward: Balance = 150 * MILLICENTS;
268}
269
270impl contracts::Trait for Runtime {
271 type Time = Timestamp;
272 type Randomness = RandomnessCollectiveFlip;
273 type Currency = Balances;
274 type Event = Event;
275 type DetermineContractAddress = contracts::SimpleAddressDeterminer<Runtime>;
276 type TrieIdGenerator = contracts::TrieIdFromParentCounter<Runtime>;
277 type RentPayment = ();
278 type SignedClaimHandicap = contracts::DefaultSignedClaimHandicap;
279 type TombstoneDeposit = TombstoneDeposit;
280 type StorageSizeOffset = contracts::DefaultStorageSizeOffset;
281 type RentByteFee = RentByteFee;
282 type RentDepositOffset = RentDepositOffset;
283 type SurchargeReward = SurchargeReward;
284 type MaxDepth = contracts::DefaultMaxDepth;
285 type MaxValueSize = contracts::DefaultMaxValueSize;
286 type WeightPrice = transaction_payment::Module<Self>;
287}
288290
289/// Used for the module template in `./template.rs`291/// Used for the module template in `./template.rs`
290impl nft::Trait for Runtime {292impl nft::Trait for Runtime {
306 Balances: balances::{Module, Call, Storage, Config<T>, Event<T>},308 Balances: balances::{Module, Call, Storage, Config<T>, Event<T>},
307 TransactionPayment: transaction_payment::{Module, Storage},309 TransactionPayment: transaction_payment::{Module, Storage},
308 Sudo: sudo::{Module, Call, Config<T>, Storage, Event<T>},310 Sudo: sudo::{Module, Call, Config<T>, Storage, Event<T>},
311 // Staking: staking::{Module, Call, Config<T>, Storage, Event<T>},
309 // Used for the module template in `./template.rs`312 // Used for the module template in `./template.rs`
310 Nft: nft::{Module, Call, Storage, Event<T>},313 Nft: nft::{Module, Call, Storage, Event<T>},
311 }314 }