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
before · Cargo.lock
618 packageslockfile v1
after · Cargo.lock
623 packageslockfile v1
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
--- 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>},
 	}