forked from osmosis-labs/osmosis-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6841a23
commit 765f391
Showing
8 changed files
with
334 additions
and
92 deletions.
There are no files selected for viewing
257 changes: 166 additions & 91 deletions
257
packages/osmosis-std/src/types/osmosis/concentratedliquidity/v1beta1.rs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod v1beta1; |
154 changes: 154 additions & 0 deletions
154
packages/osmosis-std/src/types/osmosis/cosmwasmpool/v1beta1.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
use osmosis_std_derive::CosmwasmExt; | ||
/// Params holds parameters for the cosmwasmpool module | ||
#[allow(clippy::derive_partial_eq_without_eq)] | ||
#[derive( | ||
Clone, | ||
PartialEq, | ||
Eq, | ||
::prost::Message, | ||
::serde::Serialize, | ||
::serde::Deserialize, | ||
::schemars::JsonSchema, | ||
CosmwasmExt, | ||
)] | ||
#[proto_message(type_url = "/osmosis.cosmwasmpool.v1beta1.Params")] | ||
pub struct Params {} | ||
/// GenesisState defines the cosmwasmpool module's genesis state. | ||
#[allow(clippy::derive_partial_eq_without_eq)] | ||
#[derive( | ||
Clone, | ||
PartialEq, | ||
Eq, | ||
::prost::Message, | ||
::serde::Serialize, | ||
::serde::Deserialize, | ||
::schemars::JsonSchema, | ||
CosmwasmExt, | ||
)] | ||
#[proto_message(type_url = "/osmosis.cosmwasmpool.v1beta1.GenesisState")] | ||
pub struct GenesisState { | ||
/// params is the container of cosmwasmpool parameters. | ||
#[prost(message, optional, tag = "1")] | ||
pub params: ::core::option::Option<Params>, | ||
} | ||
#[allow(clippy::derive_partial_eq_without_eq)] | ||
#[derive( | ||
Clone, | ||
PartialEq, | ||
Eq, | ||
::prost::Message, | ||
::serde::Serialize, | ||
::serde::Deserialize, | ||
::schemars::JsonSchema, | ||
CosmwasmExt, | ||
)] | ||
#[proto_message(type_url = "/osmosis.cosmwasmpool.v1beta1.CosmWasmPool")] | ||
pub struct CosmWasmPool { | ||
#[prost(string, tag = "1")] | ||
pub pool_address: ::prost::alloc::string::String, | ||
#[prost(string, tag = "2")] | ||
pub contract_address: ::prost::alloc::string::String, | ||
#[prost(uint64, tag = "3")] | ||
#[serde( | ||
serialize_with = "crate::serde::as_str::serialize", | ||
deserialize_with = "crate::serde::as_str::deserialize" | ||
)] | ||
pub pool_id: u64, | ||
#[prost(uint64, tag = "4")] | ||
#[serde( | ||
serialize_with = "crate::serde::as_str::serialize", | ||
deserialize_with = "crate::serde::as_str::deserialize" | ||
)] | ||
pub code_id: u64, | ||
} | ||
/// ===================== MsgCreateCosmwasmPool | ||
#[allow(clippy::derive_partial_eq_without_eq)] | ||
#[derive( | ||
Clone, | ||
PartialEq, | ||
Eq, | ||
::prost::Message, | ||
::serde::Serialize, | ||
::serde::Deserialize, | ||
::schemars::JsonSchema, | ||
CosmwasmExt, | ||
)] | ||
#[proto_message(type_url = "/osmosis.cosmwasmpool.v1beta1.MsgCreateCosmWasmPool")] | ||
pub struct MsgCreateCosmWasmPool { | ||
#[prost(uint64, tag = "1")] | ||
#[serde( | ||
serialize_with = "crate::serde::as_str::serialize", | ||
deserialize_with = "crate::serde::as_str::deserialize" | ||
)] | ||
pub code_id: u64, | ||
#[prost(bytes = "vec", tag = "2")] | ||
pub instantiate_msg: ::prost::alloc::vec::Vec<u8>, | ||
#[prost(string, tag = "3")] | ||
pub sender: ::prost::alloc::string::String, | ||
} | ||
/// Returns a unique poolID to identify the pool with. | ||
#[allow(clippy::derive_partial_eq_without_eq)] | ||
#[derive( | ||
Clone, | ||
PartialEq, | ||
Eq, | ||
::prost::Message, | ||
::serde::Serialize, | ||
::serde::Deserialize, | ||
::schemars::JsonSchema, | ||
CosmwasmExt, | ||
)] | ||
#[proto_message(type_url = "/osmosis.cosmwasmpool.v1beta1.MsgCreateCosmWasmPoolResponse")] | ||
pub struct MsgCreateCosmWasmPoolResponse { | ||
#[prost(uint64, tag = "1")] | ||
#[serde( | ||
serialize_with = "crate::serde::as_str::serialize", | ||
deserialize_with = "crate::serde::as_str::deserialize" | ||
)] | ||
pub pool_id: u64, | ||
} | ||
/// =============================== Params | ||
#[allow(clippy::derive_partial_eq_without_eq)] | ||
#[derive( | ||
Clone, | ||
PartialEq, | ||
Eq, | ||
::prost::Message, | ||
::serde::Serialize, | ||
::serde::Deserialize, | ||
::schemars::JsonSchema, | ||
CosmwasmExt, | ||
)] | ||
#[proto_message(type_url = "/osmosis.cosmwasmpool.v1beta1.ParamsRequest")] | ||
#[proto_query( | ||
path = "/osmosis.cosmwasmpool.v1beta1.Query/Params", | ||
response_type = ParamsResponse | ||
)] | ||
pub struct ParamsRequest {} | ||
#[allow(clippy::derive_partial_eq_without_eq)] | ||
#[derive( | ||
Clone, | ||
PartialEq, | ||
Eq, | ||
::prost::Message, | ||
::serde::Serialize, | ||
::serde::Deserialize, | ||
::schemars::JsonSchema, | ||
CosmwasmExt, | ||
)] | ||
#[proto_message(type_url = "/osmosis.cosmwasmpool.v1beta1.ParamsResponse")] | ||
pub struct ParamsResponse { | ||
#[prost(message, optional, tag = "1")] | ||
pub params: ::core::option::Option<Params>, | ||
} | ||
pub struct CosmwasmpoolQuerier<'a, Q: cosmwasm_std::CustomQuery> { | ||
querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, | ||
} | ||
impl<'a, Q: cosmwasm_std::CustomQuery> CosmwasmpoolQuerier<'a, Q> { | ||
pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { | ||
Self { querier } | ||
} | ||
pub fn params(&self) -> Result<ParamsResponse, cosmwasm_std::StdError> { | ||
ParamsRequest {}.query(self.querier) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters