Skip to content

Commit ad39bdd

Browse files
committed
add to existing storage structs
1 parent 0618272 commit ad39bdd

File tree

19 files changed

+38
-1
lines changed

19 files changed

+38
-1
lines changed

Cargo.lock

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ serde_with = { version = "=2.0.0", default-features = false }
3434
smallvec = "1.13.2"
3535
litep2p = { git = "https://github.com/paritytech/litep2p", branch = "master" }
3636

37-
macros = { path = "support/macros" }
37+
subtensor-macros = { path = "support/macros" }
3838

3939
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.10.0", default-features = false }
4040
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.10.0" }

pallets/admin-utils/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ workspace = true
1616
targets = ["x86_64-unknown-linux-gnu"]
1717

1818
[dependencies]
19+
subtensor-macros.workspace = true
1920
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [
2021
"derive",
2122
] }

pallets/collective/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ workspace = true
1616
targets = ["x86_64-unknown-linux-gnu"]
1717

1818
[dependencies]
19+
subtensor-macros.workspace = true
1920
codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false, features = [
2021
"derive",
2122
] }

pallets/collective/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ mod benchmarking;
6565
pub mod weights;
6666

6767
pub use pallet::*;
68+
use subtensor_macros::freeze_struct;
6869
pub use weights::WeightInfo;
6970

7071
const LOG_TARGET: &str = "runtime::collective";
@@ -150,6 +151,7 @@ impl<AccountId, I> GetBacking for RawOrigin<AccountId, I> {
150151
}
151152

152153
/// Info for keeping track of a motion being voted on.
154+
#[freeze_struct("5959418cdb31993b")]
153155
#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)]
154156
pub struct Votes<AccountId, BlockNumber> {
155157
/// The proposal's unique index.

pallets/commitments/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ workspace = true
1616
targets = ["x86_64-unknown-linux-gnu"]
1717

1818
[dependencies]
19+
subtensor-macros.workspace = true
1920
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [
2021
"derive",
2122
"max-encoded-len",

pallets/commitments/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pub mod types;
1010
pub mod weights;
1111

1212
pub use pallet::*;
13+
use subtensor_macros::freeze_struct;
1314
pub use types::*;
1415
pub use weights::WeightInfo;
1516

@@ -209,6 +210,7 @@ use {
209210
},
210211
};
211212

213+
#[freeze_struct("6a00398e14a8a984")]
212214
#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)]
213215
pub struct CommitmentsSignedExtension<T: Config + Send + Sync + TypeInfo>(pub PhantomData<T>);
214216

pallets/commitments/src/types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ use sp_runtime::{
2929
RuntimeDebug,
3030
};
3131
use sp_std::{fmt::Debug, iter::once, prelude::*};
32+
use subtensor_macros::freeze_struct;
3233

3334
/// Either underlying data blob if it is at most 32 bytes, or a hash of it. If the data is greater
3435
/// than 32-bytes then it will be truncated when encoding.
@@ -283,6 +284,7 @@ impl Default for Data {
283284
}
284285
}
285286

287+
#[freeze_struct("1053e03f8a8f6a67")]
286288
#[derive(
287289
CloneNoBound, Encode, Decode, Eq, MaxEncodedLen, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo,
288290
)]

pallets/registry/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ workspace = true
1616
targets = ["x86_64-unknown-linux-gnu"]
1717

1818
[dependencies]
19+
subtensor-macros.workspace = true
1920
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [
2021
"derive",
2122
"max-encoded-len",

pallets/registry/src/types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ use sp_runtime::{
3030
RuntimeDebug,
3131
};
3232
use sp_std::{fmt::Debug, iter::once, ops::Add, prelude::*};
33+
use subtensor_macros::freeze_struct;
3334

3435
/// Either underlying data blob if it is at most 32 bytes, or a hash of it. If the data is greater
3536
/// than 32-bytes then it will be truncated when encoding.
@@ -278,6 +279,7 @@ impl TypeInfo for IdentityFields {
278279
///
279280
/// NOTE: This should be stored at the end of the storage item to facilitate the addition of extra
280281
/// fields in a backwards compatible way through a specialized `Decode` impl.
282+
#[freeze_struct("fa02e2abde778fc4")]
281283
#[derive(
282284
CloneNoBound, Encode, Decode, Eq, MaxEncodedLen, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo,
283285
)]

0 commit comments

Comments
 (0)