diff --git a/cosmrs/src/staking.rs b/cosmrs/src/staking.rs
index 00f91a3b..80ae5dd0 100644
--- a/cosmrs/src/staking.rs
+++ b/cosmrs/src/staking.rs
@@ -2,11 +2,29 @@
//!
//!
+mod commision_rates;
+mod commission;
+mod description;
+mod historical_info;
mod msg_begin_redelegate;
mod msg_delegate;
mod msg_undelegate;
+mod query_historical_info_request;
+mod query_historical_info_response;
+mod query_validator_request;
+mod query_validator_response;
+mod query_validators_request;
+mod query_validators_response;
+mod validator;
pub use self::{
- msg_begin_redelegate::MsgBeginRedelegate, msg_delegate::MsgDelegate,
- msg_undelegate::MsgUndelegate,
+ commision_rates::CommissionRates, commission::Commission, description::Description,
+ historical_info::HistoricalInfo, msg_begin_redelegate::MsgBeginRedelegate,
+ msg_delegate::MsgDelegate, msg_undelegate::MsgUndelegate,
+ query_historical_info_request::QueryHistoricalInfoRequest,
+ query_historical_info_response::QueryHistoricalInfoResponse,
+ query_validator_request::QueryValidatorRequest,
+ query_validator_response::QueryValidatorResponse,
+ query_validators_request::QueryValidatorsRequest,
+ query_validators_response::QueryValidatorsResponse, validator::Validator,
};
diff --git a/cosmrs/src/staking/commision_rates.rs b/cosmrs/src/staking/commision_rates.rs
new file mode 100644
index 00000000..ec8a3ce6
--- /dev/null
+++ b/cosmrs/src/staking/commision_rates.rs
@@ -0,0 +1,35 @@
+use crate::proto;
+
+/// CommissionRates defines the initial commission rates to be used for creating
+/// a validator.
+#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
+pub struct CommissionRates {
+ /// rate is the commission rate charged to delegators, as a fraction.
+ pub rate: String,
+
+ /// max_rate defines the maximum commission rate which validator can ever charge, as a fraction.
+ pub max_rate: String,
+
+ /// max_change_rate defines the maximum daily increase of the validator commission, as a fraction.
+ pub max_change_rate: String,
+}
+
+impl From for CommissionRates {
+ fn from(proto: cosmos_sdk_proto::cosmos::staking::v1beta1::CommissionRates) -> Self {
+ CommissionRates {
+ rate: proto.rate,
+ max_rate: proto.max_rate,
+ max_change_rate: proto.max_change_rate,
+ }
+ }
+}
+
+impl From for proto::cosmos::staking::v1beta1::CommissionRates {
+ fn from(commission_rates: CommissionRates) -> Self {
+ proto::cosmos::staking::v1beta1::CommissionRates {
+ rate: commission_rates.rate,
+ max_rate: commission_rates.max_rate,
+ max_change_rate: commission_rates.max_change_rate,
+ }
+ }
+}
diff --git a/cosmrs/src/staking/commission.rs b/cosmrs/src/staking/commission.rs
new file mode 100644
index 00000000..67471f2c
--- /dev/null
+++ b/cosmrs/src/staking/commission.rs
@@ -0,0 +1,49 @@
+use crate::staking::CommissionRates;
+use crate::{proto, ErrorReport, Result};
+use cosmos_sdk_proto::Timestamp;
+use tendermint::Time;
+
+/// Commission defines commission parameters for a given validator.
+#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
+pub struct Commission {
+ /// commission_rates defines the initial commission rates to be used for creating a validator.
+ pub commission_rates: Option,
+
+ /// update_time is the last time the commission rate was changed.
+ pub update_time: Option