Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrobot committed May 2, 2024
1 parent 342fa54 commit 172c613
Show file tree
Hide file tree
Showing 27 changed files with 1,397 additions and 3,438 deletions.
4 changes: 2 additions & 2 deletions packages/injective-protobuf/src/proto/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// @generated

pub mod account;
pub mod auth;
pub mod coin;
pub mod distribution;
pub mod exchange;
pub mod tx;
pub mod oracle;
pub mod account;
pub mod tx;
6 changes: 2 additions & 4 deletions packages/injective-std/src/types/cosmos/auth/module/v1.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use osmosis_std_derive::CosmwasmExt;
/// Module is the config object for the auth module.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.auth.module.v1.Module")]
pub struct Module {
/// bech32_prefix is the bech32 account prefix for the app.
Expand All @@ -17,8 +16,7 @@ pub struct Module {
}
/// ModuleAccountPermission represents permissions for a module account.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.auth.module.v1.ModuleAccountPermission")]
pub struct ModuleAccountPermission {
/// account is the name of the module.
Expand Down
139 changes: 39 additions & 100 deletions packages/injective-std/src/types/cosmos/auth/v1beta1.rs

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions packages/injective-std/src/types/cosmos/authz/module/v1.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use osmosis_std_derive::CosmwasmExt;
/// Module is the config object of the authz module.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.module.v1.Module")]
pub struct Module {}
107 changes: 31 additions & 76 deletions packages/injective-std/src/types/cosmos/authz/v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ use osmosis_std_derive::CosmwasmExt;
/// GenericAuthorization gives the grantee unrestricted permissions to execute
/// the provided method on behalf of the granter's account.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.GenericAuthorization")]
pub struct GenericAuthorization {
/// Msg, identified by it's type URL, to grant unrestricted permissions to execute
Expand All @@ -13,8 +12,7 @@ pub struct GenericAuthorization {
/// Grant gives permissions to execute
/// the provide method with expiration time.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.Grant")]
pub struct Grant {
#[prost(message, optional, tag = "1")]
Expand All @@ -28,8 +26,7 @@ pub struct Grant {
/// GrantAuthorization extends a grant with both the addresses of the grantee and granter.
/// It is used in genesis.proto and query.proto
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.GrantAuthorization")]
pub struct GrantAuthorization {
#[prost(string, tag = "1")]
Expand All @@ -43,8 +40,7 @@ pub struct GrantAuthorization {
}
/// GrantQueueItem contains the list of TypeURL of a sdk.Msg.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.GrantQueueItem")]
pub struct GrantQueueItem {
/// msg_type_urls contains the list of TypeURL of a sdk.Msg.
Expand All @@ -53,8 +49,7 @@ pub struct GrantQueueItem {
}
/// EventGrant is emitted on Msg/Grant
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.EventGrant")]
pub struct EventGrant {
/// Msg type URL for which an autorization is granted
Expand All @@ -69,8 +64,7 @@ pub struct EventGrant {
}
/// EventRevoke is emitted on Msg/Revoke
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.EventRevoke")]
pub struct EventRevoke {
/// Msg type URL for which an autorization is revoked
Expand All @@ -85,17 +79,15 @@ pub struct EventRevoke {
}
/// GenesisState defines the authz module's genesis state.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.GenesisState")]
pub struct GenesisState {
#[prost(message, repeated, tag = "1")]
pub authorization: ::prost::alloc::vec::Vec<GrantAuthorization>,
}
/// QueryGrantsRequest is the request type for the Query/Grants RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.QueryGrantsRequest")]
#[proto_query(
path = "/cosmos.authz.v1beta1.Query/Grants",
Expand All @@ -111,29 +103,23 @@ pub struct QueryGrantsRequest {
pub msg_type_url: ::prost::alloc::string::String,
/// pagination defines an pagination for the request.
#[prost(message, optional, tag = "4")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageRequest,
>,
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
/// QueryGrantsResponse is the response type for the Query/Authorizations RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.QueryGrantsResponse")]
pub struct QueryGrantsResponse {
/// authorizations is a list of grants granted for grantee by granter.
#[prost(message, repeated, tag = "1")]
pub grants: ::prost::alloc::vec::Vec<Grant>,
/// pagination defines an pagination for the response.
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageResponse,
>,
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
/// QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.QueryGranterGrantsRequest")]
#[proto_query(
path = "/cosmos.authz.v1beta1.Query/GranterGrants",
Expand All @@ -144,29 +130,23 @@ pub struct QueryGranterGrantsRequest {
pub granter: ::prost::alloc::string::String,
/// pagination defines an pagination for the request.
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageRequest,
>,
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
/// QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.QueryGranterGrantsResponse")]
pub struct QueryGranterGrantsResponse {
/// grants is a list of grants granted by the granter.
#[prost(message, repeated, tag = "1")]
pub grants: ::prost::alloc::vec::Vec<GrantAuthorization>,
/// pagination defines an pagination for the response.
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageResponse,
>,
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
/// QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.QueryGranteeGrantsRequest")]
#[proto_query(
path = "/cosmos.authz.v1beta1.Query/GranteeGrants",
Expand All @@ -177,30 +157,24 @@ pub struct QueryGranteeGrantsRequest {
pub grantee: ::prost::alloc::string::String,
/// pagination defines an pagination for the request.
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageRequest,
>,
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
/// QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.QueryGranteeGrantsResponse")]
pub struct QueryGranteeGrantsResponse {
/// grants is a list of grants granted to the grantee.
#[prost(message, repeated, tag = "1")]
pub grants: ::prost::alloc::vec::Vec<GrantAuthorization>,
/// pagination defines an pagination for the response.
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageResponse,
>,
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
/// MsgGrant is a request type for Grant method. It declares authorization to the grantee
/// on behalf of the granter with the provided expiration time.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.MsgGrant")]
pub struct MsgGrant {
#[prost(string, tag = "1")]
Expand All @@ -212,8 +186,7 @@ pub struct MsgGrant {
}
/// MsgExecResponse defines the Msg/MsgExecResponse response type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.MsgExecResponse")]
pub struct MsgExecResponse {
#[prost(bytes = "vec", repeated, tag = "1")]
Expand All @@ -223,8 +196,7 @@ pub struct MsgExecResponse {
/// authorizations granted to the grantee. Each message should have only
/// one signer corresponding to the granter of the authorization.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.MsgExec")]
pub struct MsgExec {
#[prost(string, tag = "1")]
Expand All @@ -237,15 +209,13 @@ pub struct MsgExec {
}
/// MsgGrantResponse defines the Msg/MsgGrant response type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.MsgGrantResponse")]
pub struct MsgGrantResponse {}
/// MsgRevoke revokes any authorization with the provided sdk.Msg type on the
/// granter's account with that has been granted to the grantee.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.MsgRevoke")]
pub struct MsgRevoke {
#[prost(string, tag = "1")]
Expand All @@ -257,8 +227,7 @@ pub struct MsgRevoke {
}
/// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.authz.v1beta1.MsgRevokeResponse")]
pub struct MsgRevokeResponse {}
pub struct AuthzQuerier<'a, Q: cosmwasm_std::CustomQuery> {
Expand All @@ -273,42 +242,28 @@ impl<'a, Q: cosmwasm_std::CustomQuery> AuthzQuerier<'a, Q> {
granter: ::prost::alloc::string::String,
grantee: ::prost::alloc::string::String,
msg_type_url: ::prost::alloc::string::String,
pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageRequest,
>,
pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
) -> Result<QueryGrantsResponse, cosmwasm_std::StdError> {
QueryGrantsRequest {
granter,
grantee,
msg_type_url,
pagination,
}
.query(self.querier)
.query(self.querier)
}
pub fn granter_grants(
&self,
granter: ::prost::alloc::string::String,
pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageRequest,
>,
pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
) -> Result<QueryGranterGrantsResponse, cosmwasm_std::StdError> {
QueryGranterGrantsRequest {
granter,
pagination,
}
.query(self.querier)
QueryGranterGrantsRequest { granter, pagination }.query(self.querier)
}
pub fn grantee_grants(
&self,
grantee: ::prost::alloc::string::String,
pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageRequest,
>,
pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
) -> Result<QueryGranteeGrantsResponse, cosmwasm_std::StdError> {
QueryGranteeGrantsRequest {
grantee,
pagination,
}
.query(self.querier)
QueryGranteeGrantsRequest { grantee, pagination }.query(self.querier)
}
}
7 changes: 2 additions & 5 deletions packages/injective-std/src/types/cosmos/bank/module/v1.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
use osmosis_std_derive::CosmwasmExt;
/// Module is the config object of the bank module.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.bank.module.v1.Module")]
pub struct Module {
/// blocked_module_accounts configures exceptional module accounts which should be blocked from receiving funds.
/// If left empty it defaults to the list of account names supplied in the auth module configuration as
/// module_account_permissions
#[prost(string, repeated, tag = "1")]
pub blocked_module_accounts_override: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
pub blocked_module_accounts_override: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// authority defines the custom module authority. If not set, defaults to the governance module.
#[prost(string, tag = "2")]
pub authority: ::prost::alloc::string::String,
Expand Down
Loading

0 comments on commit 172c613

Please sign in to comment.