Skip to content

Commit ab415a3

Browse files
Deprecate protocol_version method in Ledger (#1625)
### What Deprecate the protocol_version method. ### Why Protocol version will probably not be available in future releases of the runtime. It is not used by any contract deployed to mainnet today.
1 parent 77cf173 commit ab415a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

soroban-sdk/src/ledger.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use crate::{env::internal, unwrap::UnwrapInfallible, BytesN, Env, TryIntoVal};
2121
/// # pub fn f(env: Env) {
2222
/// let ledger = env.ledger();
2323
///
24-
/// let protocol_version = ledger.protocol_version();
2524
/// let sequence = ledger.sequence();
2625
/// let timestamp = ledger.timestamp();
2726
/// let network_id = ledger.network_id();
@@ -52,6 +51,7 @@ impl Ledger {
5251
}
5352

5453
/// Returns the version of the protocol that the ledger created with.
54+
#[deprecated(note = "Protocol version won't be available in the future")]
5555
pub fn protocol_version(&self) -> u32 {
5656
internal::Env::get_ledger_version(self.env())
5757
.unwrap_infallible()

0 commit comments

Comments
 (0)