Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Polkadot v0.9.37 #49

Merged
merged 3 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = 'substrate-validator-set'
version = '0.9.35'
version = '0.9.37'
authors = ['Gautam Dhameja <quasijatt@outlook.com>']
edition = '2021'
license = 'Apache-2.0'
Expand All @@ -13,27 +13,27 @@ version = '1.0.126'
[dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
branch = 'polkadot-v0.9.35'
branch = 'polkadot-v0.9.37'

[dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
branch = 'polkadot-v0.9.35'
branch = 'polkadot-v0.9.37'

[dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
branch = 'polkadot-v0.9.35'
branch = 'polkadot-v0.9.37'

[dependencies.sp-std]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
branch = 'polkadot-v0.9.35'
branch = 'polkadot-v0.9.37'

[dependencies.sp-staking]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
branch = 'polkadot-v0.9.35'
branch = 'polkadot-v0.9.37'

[dependencies.log]
default-features = false
Expand All @@ -49,23 +49,23 @@ version = '3.0.0'
default-features = false
git = 'https://github.com/paritytech/substrate.git'
optional = true
branch = 'polkadot-v0.9.35'
branch = 'polkadot-v0.9.37'

[dependencies.frame-support]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
branch = 'polkadot-v0.9.35'
branch = 'polkadot-v0.9.37'

[dependencies.frame-system]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
branch = 'polkadot-v0.9.35'
branch = 'polkadot-v0.9.37'

[dependencies.pallet-session]
default-features = false
features = ['historical']
git = 'https://github.com/paritytech/substrate.git'
branch = 'polkadot-v0.9.35'
branch = 'polkadot-v0.9.37'

[dependencies.scale-info]
default-features = false
Expand Down
4 changes: 2 additions & 2 deletions docs/im-online-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[dependencies.pallet-im-online]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
branch = 'polkadot-v0.9.35'
branch = 'polkadot-v0.9.37'
```

```toml
Expand Down Expand Up @@ -154,7 +154,7 @@ construct_runtime!(
[dependencies.pallet-im-online]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
branch = 'polkadot-v0.9.35'
branch = 'polkadot-v0.9.37'
```

* Import `ImOnlineId` in the `chain_spec.rs`.
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A [Substrate](https://github.com/paritytech/substrate/) pallet to add/remove authorities/validators using extrinsics in PoA networks.

**Note: Current master is compatible with Substrate [polkadot-v0.9.35](https://github.com/paritytech/substrate/tree/polkadot-v0.9.35) branch. For older versions, please see releases/tags.**
**Note: Current master is compatible with Substrate [polkadot-v0.9.37](https://github.com/paritytech/substrate/tree/polkadot-v0.9.37) branch. For older versions, please see releases/tags.**

## Demo

Expand All @@ -21,12 +21,12 @@ To see this pallet in action in a Substrate runtime, watch this video - https://
default-features = false
package = 'substrate-validator-set'
git = 'https://github.com/gautamdhameja/substrate-validator-set.git'
version = '0.9.33'
version = '0.9.37'

[dependencies.pallet-session]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
branch = 'polkadot-v0.9.35'
branch = 'polkadot-v0.9.37'
```

```toml
Expand Down
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ pub mod pallet {
///
/// The origin can be configured using the `AddRemoveOrigin` type in the
/// host runtime. Can also be set to sudo/root.
#[pallet::call_index(0)]
#[pallet::weight(0)]
pub fn add_validator(origin: OriginFor<T>, validator_id: T::AccountId) -> DispatchResult {
T::AddRemoveOrigin::ensure_origin(origin)?;
Expand All @@ -134,6 +135,7 @@ pub mod pallet {
///
/// The origin can be configured using the `AddRemoveOrigin` type in the
/// host runtime. Can also be set to sudo/root.
#[pallet::call_index(1)]
#[pallet::weight(0)]
pub fn remove_validator(
origin: OriginFor<T>,
Expand All @@ -150,6 +152,7 @@ pub mod pallet {
/// Add an approved validator again when it comes back online.
///
/// For this call, the dispatch origin must be the validator itself.
#[pallet::call_index(2)]
#[pallet::weight(0)]
pub fn add_validator_again(
origin: OriginFor<T>,
Expand Down Expand Up @@ -328,4 +331,4 @@ impl<T: Config, O: Offence<(T::AccountId, T::AccountId)>>
) -> bool {
false
}
}
}