Skip to content

Commit 3c33ffe

Browse files
committed
update proto
1 parent d4beffe commit 3c33ffe

10 files changed

+4434
-4012
lines changed

side-proto/src/prost/side/side.auction.rs

Lines changed: 0 additions & 497 deletions
This file was deleted.

side-proto/src/prost/side/side.dlc.rs

Lines changed: 102 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl ::prost::Name for DlcOracle {
2828
}
2929
#[allow(clippy::derive_partial_eq_without_eq)]
3030
#[derive(Clone, PartialEq, ::prost::Message)]
31-
pub struct Agency {
31+
pub struct Dcm {
3232
#[prost(uint64, tag = "1")]
3333
pub id: u64,
3434
#[prost(string, tag = "2")]
@@ -41,11 +41,11 @@ pub struct Agency {
4141
pub pubkey: ::prost::alloc::string::String,
4242
#[prost(message, optional, tag = "6")]
4343
pub time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>,
44-
#[prost(enumeration = "AgencyStatus", tag = "7")]
44+
#[prost(enumeration = "DcmStatus", tag = "7")]
4545
pub status: i32,
4646
}
47-
impl ::prost::Name for Agency {
48-
const NAME: &'static str = "Agency";
47+
impl ::prost::Name for Dcm {
48+
const NAME: &'static str = "DCM";
4949
const PACKAGE: &'static str = "side.dlc";
5050
fn full_name() -> ::prost::alloc::string::String {
5151
::prost::alloc::format!("side.dlc.{}", Self::NAME)
@@ -72,26 +72,28 @@ impl ::prost::Name for DlcNonce {
7272
}
7373
#[allow(clippy::derive_partial_eq_without_eq)]
7474
#[derive(Clone, PartialEq, ::prost::Message)]
75-
pub struct DlcPriceEvent {
75+
pub struct DlcEvent {
7676
#[prost(uint64, tag = "1")]
7777
pub id: u64,
78-
#[prost(string, tag = "2")]
79-
pub trigger_price: ::prost::alloc::string::String,
78+
#[prost(enumeration = "DlcEventType", tag = "2")]
79+
pub r#type: i32,
8080
#[prost(string, tag = "3")]
81-
pub price_decimal: ::prost::alloc::string::String,
82-
#[prost(string, tag = "4")]
8381
pub nonce: ::prost::alloc::string::String,
84-
#[prost(string, tag = "5")]
82+
#[prost(string, tag = "4")]
8583
pub pubkey: ::prost::alloc::string::String,
86-
#[prost(string, tag = "6")]
84+
#[prost(string, tag = "5")]
8785
pub description: ::prost::alloc::string::String,
86+
#[prost(string, repeated, tag = "6")]
87+
pub outcomes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
8888
#[prost(bool, tag = "7")]
8989
pub has_triggered: bool,
90-
#[prost(message, optional, tag = "8")]
90+
#[prost(uint32, tag = "8")]
91+
pub outcome_index: u32,
92+
#[prost(message, optional, tag = "9")]
9193
pub publish_at: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>,
9294
}
93-
impl ::prost::Name for DlcPriceEvent {
94-
const NAME: &'static str = "DLCPriceEvent";
95+
impl ::prost::Name for DlcEvent {
96+
const NAME: &'static str = "DLCEvent";
9597
const PACKAGE: &'static str = "side.dlc";
9698
fn full_name() -> ::prost::alloc::string::String {
9799
::prost::alloc::format!("side.dlc.{}", Self::NAME)
@@ -104,14 +106,14 @@ pub struct DlcAttestation {
104106
pub id: u64,
105107
#[prost(uint64, tag = "2")]
106108
pub event_id: u64,
107-
#[prost(message, optional, tag = "3")]
108-
pub time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>,
109+
#[prost(string, tag = "3")]
110+
pub outcome: ::prost::alloc::string::String,
109111
#[prost(string, tag = "4")]
110112
pub pubkey: ::prost::alloc::string::String,
111113
#[prost(string, tag = "5")]
112-
pub outcome: ::prost::alloc::string::String,
113-
#[prost(string, tag = "6")]
114114
pub signature: ::prost::alloc::string::String,
115+
#[prost(message, optional, tag = "6")]
116+
pub time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>,
115117
}
116118
impl ::prost::Name for DlcAttestation {
117119
const NAME: &'static str = "DLCAttestation";
@@ -157,35 +159,67 @@ impl DlcOracleStatus {
157159
}
158160
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
159161
#[repr(i32)]
160-
pub enum AgencyStatus {
162+
pub enum DcmStatus {
161163
Pending = 0,
162164
Failed = 1,
163165
Timedout = 2,
164166
Enable = 3,
165167
Disable = 4,
166168
}
167-
impl AgencyStatus {
169+
impl DcmStatus {
170+
/// String value of the enum field names used in the ProtoBuf definition.
171+
///
172+
/// The values are not transformed in any way and thus are considered stable
173+
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
174+
pub fn as_str_name(&self) -> &'static str {
175+
match self {
176+
DcmStatus::Pending => "DCM_Status_Pending",
177+
DcmStatus::Failed => "DCM_Status_Failed",
178+
DcmStatus::Timedout => "DCM_Status_Timedout",
179+
DcmStatus::Enable => "DCM_status_Enable",
180+
DcmStatus::Disable => "DCM_status_Disable",
181+
}
182+
}
183+
/// Creates an enum from field names used in the ProtoBuf definition.
184+
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
185+
match value {
186+
"DCM_Status_Pending" => Some(Self::Pending),
187+
"DCM_Status_Failed" => Some(Self::Failed),
188+
"DCM_Status_Timedout" => Some(Self::Timedout),
189+
"DCM_status_Enable" => Some(Self::Enable),
190+
"DCM_status_Disable" => Some(Self::Disable),
191+
_ => None,
192+
}
193+
}
194+
}
195+
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
196+
#[repr(i32)]
197+
pub enum DlcEventType {
198+
Unspecified = 0,
199+
Price = 1,
200+
Date = 2,
201+
Lending = 3,
202+
}
203+
impl DlcEventType {
168204
/// String value of the enum field names used in the ProtoBuf definition.
169205
///
170206
/// The values are not transformed in any way and thus are considered stable
171207
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
172208
pub fn as_str_name(&self) -> &'static str {
173209
match self {
174-
AgencyStatus::Pending => "Agency_Status_Pending",
175-
AgencyStatus::Failed => "Agency_Status_Failed",
176-
AgencyStatus::Timedout => "Agency_Status_Timedout",
177-
AgencyStatus::Enable => "Agency_status_Enable",
178-
AgencyStatus::Disable => "Agency_status_Disable",
210+
DlcEventType::Unspecified => "UNSPECIFIED",
211+
DlcEventType::Price => "PRICE",
212+
DlcEventType::Date => "DATE",
213+
DlcEventType::Lending => "LENDING",
179214
}
180215
}
181216
/// Creates an enum from field names used in the ProtoBuf definition.
182217
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
183218
match value {
184-
"Agency_Status_Pending" => Some(Self::Pending),
185-
"Agency_Status_Failed" => Some(Self::Failed),
186-
"Agency_Status_Timedout" => Some(Self::Timedout),
187-
"Agency_status_Enable" => Some(Self::Enable),
188-
"Agency_status_Disable" => Some(Self::Disable),
219+
"UNSPECIFIED" => Some(Self::Unspecified),
220+
"PRICE" => Some(Self::Price),
221+
"DATE" => Some(Self::Date),
222+
"LENDING" => Some(Self::Lending),
189223
_ => None,
190224
}
191225
}
@@ -210,10 +244,16 @@ impl ::prost::Name for PriceInterval {
210244
#[derive(Clone, PartialEq, ::prost::Message)]
211245
pub struct Params {
212246
#[prost(uint32, tag = "1")]
213-
pub nonce_queue_size: u32,
247+
pub price_event_nonce_queue_size: u32,
214248
#[prost(message, repeated, tag = "2")]
215249
pub price_intervals: ::prost::alloc::vec::Vec<PriceInterval>,
216-
#[prost(message, optional, tag = "3")]
250+
#[prost(uint32, tag = "3")]
251+
pub date_event_nonce_queue_size: u32,
252+
#[prost(message, optional, tag = "4")]
253+
pub date_interval: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>,
254+
#[prost(uint32, tag = "5")]
255+
pub lending_event_nonce_queue_size: u32,
256+
#[prost(message, optional, tag = "6")]
217257
pub dkg_timeout_period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>,
218258
}
219259
impl ::prost::Name for Params {
@@ -230,7 +270,7 @@ pub struct GenesisState {
230270
#[prost(message, optional, tag = "1")]
231271
pub params: ::core::option::Option<Params>,
232272
#[prost(message, repeated, tag = "2")]
233-
pub events: ::prost::alloc::vec::Vec<DlcPriceEvent>,
273+
pub events: ::prost::alloc::vec::Vec<DlcEvent>,
234274
#[prost(message, repeated, tag = "3")]
235275
pub attestations: ::prost::alloc::vec::Vec<DlcAttestation>,
236276
}
@@ -298,30 +338,30 @@ impl ::prost::Name for QueryAttestationsResponse {
298338
}
299339
#[allow(clippy::derive_partial_eq_without_eq)]
300340
#[derive(Clone, PartialEq, ::prost::Message)]
301-
pub struct QueryAgenciesRequest {
302-
#[prost(enumeration = "AgencyStatus", tag = "1")]
341+
pub struct QueryDcMsRequest {
342+
#[prost(enumeration = "DcmStatus", tag = "1")]
303343
pub status: i32,
304344
#[prost(message, optional, tag = "2")]
305345
pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
306346
}
307-
impl ::prost::Name for QueryAgenciesRequest {
308-
const NAME: &'static str = "QueryAgenciesRequest";
347+
impl ::prost::Name for QueryDcMsRequest {
348+
const NAME: &'static str = "QueryDCMsRequest";
309349
const PACKAGE: &'static str = "side.dlc";
310350
fn full_name() -> ::prost::alloc::string::String {
311351
::prost::alloc::format!("side.dlc.{}", Self::NAME)
312352
}
313353
}
314354
#[allow(clippy::derive_partial_eq_without_eq)]
315355
#[derive(Clone, PartialEq, ::prost::Message)]
316-
pub struct QueryAgenciesResponse {
356+
pub struct QueryDcMsResponse {
317357
#[prost(message, repeated, tag = "1")]
318-
pub agencies: ::prost::alloc::vec::Vec<Agency>,
358+
pub dcms: ::prost::alloc::vec::Vec<Dcm>,
319359
#[prost(message, optional, tag = "2")]
320360
pub pagination:
321361
::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
322362
}
323-
impl ::prost::Name for QueryAgenciesResponse {
324-
const NAME: &'static str = "QueryAgenciesResponse";
363+
impl ::prost::Name for QueryDcMsResponse {
364+
const NAME: &'static str = "QueryDCMsResponse";
325365
const PACKAGE: &'static str = "side.dlc";
326366
fn full_name() -> ::prost::alloc::string::String {
327367
::prost::alloc::format!("side.dlc.{}", Self::NAME)
@@ -462,7 +502,7 @@ impl ::prost::Name for QueryEventRequest {
462502
#[derive(Clone, PartialEq, ::prost::Message)]
463503
pub struct QueryEventResponse {
464504
#[prost(message, optional, tag = "1")]
465-
pub event: ::core::option::Option<DlcPriceEvent>,
505+
pub event: ::core::option::Option<DlcEvent>,
466506
}
467507
impl ::prost::Name for QueryEventResponse {
468508
const NAME: &'static str = "QueryEventResponse";
@@ -492,7 +532,7 @@ impl ::prost::Name for QueryEventsRequest {
492532
#[derive(Clone, PartialEq, ::prost::Message)]
493533
pub struct QueryEventsResponse {
494534
#[prost(message, repeated, tag = "1")]
495-
pub events: ::prost::alloc::vec::Vec<DlcPriceEvent>,
535+
pub events: ::prost::alloc::vec::Vec<DlcEvent>,
496536
#[prost(message, optional, tag = "2")]
497537
pub pagination:
498538
::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
@@ -559,30 +599,30 @@ impl ::prost::Name for QueryParamsResponse {
559599
}
560600
#[allow(clippy::derive_partial_eq_without_eq)]
561601
#[derive(Clone, PartialEq, ::prost::Message)]
562-
pub struct MsgSubmitAgencyPubKey {
602+
pub struct MsgSubmitDcmPubKey {
563603
#[prost(string, tag = "1")]
564604
pub sender: ::prost::alloc::string::String,
565605
#[prost(string, tag = "2")]
566606
pub pub_key: ::prost::alloc::string::String,
567607
#[prost(uint64, tag = "3")]
568-
pub agency_id: u64,
608+
pub dcm_id: u64,
569609
#[prost(string, tag = "4")]
570-
pub agency_pubkey: ::prost::alloc::string::String,
610+
pub dcm_pubkey: ::prost::alloc::string::String,
571611
#[prost(string, tag = "5")]
572612
pub signature: ::prost::alloc::string::String,
573613
}
574-
impl ::prost::Name for MsgSubmitAgencyPubKey {
575-
const NAME: &'static str = "MsgSubmitAgencyPubKey";
614+
impl ::prost::Name for MsgSubmitDcmPubKey {
615+
const NAME: &'static str = "MsgSubmitDCMPubKey";
576616
const PACKAGE: &'static str = "side.dlc";
577617
fn full_name() -> ::prost::alloc::string::String {
578618
::prost::alloc::format!("side.dlc.{}", Self::NAME)
579619
}
580620
}
581621
#[allow(clippy::derive_partial_eq_without_eq)]
582622
#[derive(Clone, PartialEq, ::prost::Message)]
583-
pub struct MsgSubmitAgencyPubKeyResponse {}
584-
impl ::prost::Name for MsgSubmitAgencyPubKeyResponse {
585-
const NAME: &'static str = "MsgSubmitAgencyPubKeyResponse";
623+
pub struct MsgSubmitDcmPubKeyResponse {}
624+
impl ::prost::Name for MsgSubmitDcmPubKeyResponse {
625+
const NAME: &'static str = "MsgSubmitDCMPubKeyResponse";
586626
const PACKAGE: &'static str = "side.dlc";
587627
fn full_name() -> ::prost::alloc::string::String {
588628
::prost::alloc::format!("side.dlc.{}", Self::NAME)
@@ -624,11 +664,13 @@ impl ::prost::Name for MsgSubmitOraclePubKeyResponse {
624664
pub struct MsgSubmitNonce {
625665
#[prost(string, tag = "1")]
626666
pub sender: ::prost::alloc::string::String,
627-
#[prost(string, tag = "2")]
628-
pub nonce: ::prost::alloc::string::String,
667+
#[prost(enumeration = "DlcEventType", tag = "2")]
668+
pub event_type: i32,
629669
#[prost(string, tag = "3")]
630-
pub oracle_pubkey: ::prost::alloc::string::String,
670+
pub nonce: ::prost::alloc::string::String,
631671
#[prost(string, tag = "4")]
672+
pub oracle_pubkey: ::prost::alloc::string::String,
673+
#[prost(string, tag = "5")]
632674
pub signature: ::prost::alloc::string::String,
633675
}
634676
impl ::prost::Name for MsgSubmitNonce {
@@ -705,7 +747,7 @@ impl ::prost::Name for MsgCreateOracleResponse {
705747
}
706748
#[allow(clippy::derive_partial_eq_without_eq)]
707749
#[derive(Clone, PartialEq, ::prost::Message)]
708-
pub struct MsgCreateAgency {
750+
pub struct MsgCreateDcm {
709751
/// authority is the address that controls the module (defaults to x/gov unless overwritten).
710752
#[prost(string, tag = "1")]
711753
pub authority: ::prost::alloc::string::String,
@@ -714,18 +756,18 @@ pub struct MsgCreateAgency {
714756
#[prost(uint32, tag = "3")]
715757
pub threshold: u32,
716758
}
717-
impl ::prost::Name for MsgCreateAgency {
718-
const NAME: &'static str = "MsgCreateAgency";
759+
impl ::prost::Name for MsgCreateDcm {
760+
const NAME: &'static str = "MsgCreateDCM";
719761
const PACKAGE: &'static str = "side.dlc";
720762
fn full_name() -> ::prost::alloc::string::String {
721763
::prost::alloc::format!("side.dlc.{}", Self::NAME)
722764
}
723765
}
724766
#[allow(clippy::derive_partial_eq_without_eq)]
725767
#[derive(Clone, PartialEq, ::prost::Message)]
726-
pub struct MsgCreateAgencyResponse {}
727-
impl ::prost::Name for MsgCreateAgencyResponse {
728-
const NAME: &'static str = "MsgCreateAgencyResponse";
768+
pub struct MsgCreateDcmResponse {}
769+
impl ::prost::Name for MsgCreateDcmResponse {
770+
const NAME: &'static str = "MsgCreateDCMResponse";
729771
const PACKAGE: &'static str = "side.dlc";
730772
fn full_name() -> ::prost::alloc::string::String {
731773
::prost::alloc::format!("side.dlc.{}", Self::NAME)

0 commit comments

Comments
 (0)