Skip to content

Commit 0bf13a6

Browse files
committed
Add view specifier for stake getters in saking precompile
1 parent f293e46 commit 0bf13a6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

precompiles/src/staking.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ where
120120
}
121121

122122
#[precompile::public("getTotalColdkeyStake(bytes32)")]
123+
#[precompile::view]
123124
fn get_total_coldkey_stake(
124125
_handle: &mut impl PrecompileHandle,
125126
coldkey: H256,
@@ -131,6 +132,7 @@ where
131132
}
132133

133134
#[precompile::public("getTotalHotkeyStake(bytes32)")]
135+
#[precompile::view]
134136
fn get_total_hotkey_stake(
135137
_handle: &mut impl PrecompileHandle,
136138
hotkey: H256,
@@ -275,6 +277,7 @@ where
275277
}
276278

277279
#[precompile::public("getTotalColdkeyStake(bytes32)")]
280+
#[precompile::view]
278281
fn get_total_coldkey_stake(
279282
_handle: &mut impl PrecompileHandle,
280283
coldkey: H256,
@@ -292,6 +295,7 @@ where
292295
}
293296

294297
#[precompile::public("getTotalHotkeyStake(bytes32)")]
298+
#[precompile::view]
295299
fn get_total_hotkey_stake(
296300
_handle: &mut impl PrecompileHandle,
297301
hotkey: H256,

runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
205205
// `spec_version`, and `authoring_version` are the same between Wasm and native.
206206
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
207207
// the compatible custom types.
208-
spec_version: 246,
208+
spec_version: 247,
209209
impl_version: 1,
210210
apis: RUNTIME_API_VERSIONS,
211211
transaction_version: 1,

0 commit comments

Comments
 (0)