difftreelog
Field name changed
in: master
4 files changed
Cargo.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"
pallets/nft/src/lib.rsdiffbeforeafterboth26 pub next_item_id: u64,26 pub next_item_id: u64,27 pub name: Vec<u16>, // 64 include null escape char27 pub name: Vec<u16>, // 64 include null escape char28 pub description: Vec<u16>, // 256 include null escape char28 pub description: Vec<u16>, // 256 include null escape char29 pub token_trefix: Vec<u8>, // 16 include null escape char29 pub token_prefix: Vec<u8>, // 16 include null escape char30 pub custom_data_size: u32,30 pub custom_data_size: u32,31}31}3232125 description.push(0);125 description.push(0);126 ensure!(name.len() <= 256, "Collection description can not be longer than 255 char");126 ensure!(name.len() <= 256, "Collection description can not be longer than 255 char");127127128 let mut token_trefix = token_prefix.to_vec();128 let mut prefix = token_prefix.to_vec();129 token_trefix.push(0);129 prefix.push(0);130 ensure!(token_trefix.len() <= 16, "Token prefix can not be longer than 15 char");130 ensure!(prefix.len() <= 16, "Token prefix can not be longer than 15 char");131131132 // Generate next collection ID132 // Generate next collection ID133 let next_id = NextCollectionID::get();133 let next_id = NextCollectionID::get();139 owner: who.clone(),139 owner: who.clone(),140 name: name,140 name: name,141 description: description,141 description: description,142 token_trefix: token_trefix,142 token_prefix: prefix,143 next_item_id: next_id,143 next_item_id: next_id,144 custom_data_size: custom_data_sz,144 custom_data_size: custom_data_sz,145 };145 };runtime/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'
runtime/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>},
}