Skip to content

Commit 2262f7c

Browse files
committed
Lazer: Add deprecated symbol state
1 parent eb65f9b commit 2262f7c

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

lazer/Cargo.lock

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

lazer/publisher_sdk/proto/state.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ message Publisher {
4444
optional bool is_active = 4;
4545
}
4646

47+
enum FeedMetadataState {
48+
COMING_SOON = 0; // Default value
49+
STABLE = 1;
50+
DEPRECATED = 2;
51+
}
52+
4753
// Static data for a feed.
4854
message FeedMetadata {
4955
// [required] ID of the price feed.
@@ -86,6 +92,8 @@ message FeedMetadata {
8692
// [optional] Market schedule in Pythnet format.
8793
// If absent, the default schedule is used (market is always open).
8894
optional string market_schedule = 15;
95+
// [required] Feed state
96+
optional FeedMetadataState state = 16;
8997
}
9098

9199
// An item of the state describing a feed.

lazer/publisher_sdk/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyth-lazer-publisher-sdk"
3-
version = "0.1.5"
3+
version = "0.1.7"
44
edition = "2021"
55
description = "Pyth Lazer Publisher SDK types."
66
license = "Apache-2.0"

lazer/sdk/rust/protocol/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyth-lazer-protocol"
3-
version = "0.7.2"
3+
version = "0.7.3"
44
edition = "2021"
55
description = "Pyth Lazer SDK - protocol types."
66
license = "Apache-2.0"

lazer/sdk/rust/protocol/src/symbol_state.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ use {
88
pub enum SymbolState {
99
Stable,
1010
ComingSoon,
11+
Deprecated,
1112
}
1213

1314
impl Display for SymbolState {
1415
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1516
match self {
1617
SymbolState::Stable => write!(f, "stable"),
1718
SymbolState::ComingSoon => write!(f, "coming_soon"),
19+
SymbolState::Deprecated => write!(f, "deprecated"),
1820
}
1921
}
2022
}

0 commit comments

Comments
 (0)