Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/neutron-std/src/types/NEUTRON_COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v6.0.0
828f75e2de165b4ff7d786abf6405c784194e9f6
1 change: 1 addition & 0 deletions packages/neutron-std/src/types/neutron/crypto/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod v1beta1;
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
use neutron_std_derive::CosmwasmExt;
/// PubKey defines a type alias for an ecdsa.PublicKey that implements
/// Tendermint's PubKey interface. It represents the 33-byte compressed public
/// key format.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/neutron.crypto.v1beta1.ethsecp256k1.PubKey")]
pub struct PubKey {
#[prost(bytes = "vec", tag = "1")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub key: ::prost::alloc::vec::Vec<u8>,
}
/// PrivKey defines a type alias for an ecdsa.PrivateKey that implements
/// Tendermint's PrivateKey interface.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/neutron.crypto.v1beta1.ethsecp256k1.PrivKey")]
pub struct PrivKey {
#[prost(bytes = "vec", tag = "1")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub key: ::prost::alloc::vec::Vec<u8>,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod ethsecp256k1;
4 changes: 2 additions & 2 deletions packages/neutron-std/src/types/neutron/dex/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ pub struct MsgMultiHopSwap {
#[prost(string, tag = "5")]
pub exit_limit_price: ::prost::alloc::string::String,
/// If pickBestRoute == true then all routes are run and the route with the
/// best price is chosen otherwise, the first succesful route is used.
/// best price is chosen otherwise, the first successful route is used.
#[prost(bool, tag = "6")]
pub pick_best_route: bool,
}
Expand Down Expand Up @@ -1440,7 +1440,7 @@ pub struct QueryEstimateMultiHopSwapRequest {
#[prost(string, tag = "5")]
pub exit_limit_price: ::prost::alloc::string::String,
/// If pickBestRoute == true then all routes are run and the route with the
/// best price is chosen otherwise, the first succesful route is used.
/// best price is chosen otherwise, the first successful route is used.
#[prost(bool, tag = "6")]
pub pick_best_route: bool,
}
Expand Down
2 changes: 2 additions & 0 deletions packages/neutron-std/src/types/neutron/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pub mod contractmanager;
pub mod cron;
pub mod crypto;
pub mod dex;
pub mod dynamicfees;
pub mod feeburner;
Expand All @@ -9,4 +10,5 @@ pub mod ibcratelimit;
pub mod interchainqueries;
pub mod interchaintxs;
pub mod revenue;
pub mod state_verifier;
pub mod transfer;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod v1;
161 changes: 161 additions & 0 deletions packages/neutron-std/src/types/neutron/state_verifier/v1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
use neutron_std_derive::CosmwasmExt;
/// Describes a "light" consensus state of the chain at a particular height
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/neutron.state_verifier.v1.ConsensusState")]
pub struct ConsensusState {
/// Describes a block height for which the consensus height is saved
#[prost(int64, tag = "1")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub height: i64,
/// ConsensusState defines the consensus state from Tendermint
#[prost(message, optional, tag = "2")]
pub cs: ::core::option::Option<
super::super::super::ibc::lightclients::tendermint::v1::ConsensusState,
>,
}
/// Defines the state verifier 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 = "/neutron.state_verifier.v1.GenesisState")]
pub struct GenesisState {
#[prost(message, repeated, tag = "1")]
pub states: ::prost::alloc::vec::Vec<ConsensusState>,
}
/// Describes a structure to verify storage values from the chain state from a particular height in the past
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/neutron.state_verifier.v1.QueryVerifyStateValuesRequest")]
#[proto_query(
path = "/neutron.state_verifier.v1.Query/VerifyStateValues",
response_type = QueryVerifyStateValuesResponse
)]
pub struct QueryVerifyStateValuesRequest {
/// Refers to the block height to which the storage values belong.
#[prost(uint64, tag = "1")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub height: u64,
/// A slice of neutron.interchainqueries.StorageValue which relate to the specified height and must be verified against
#[prost(message, repeated, tag = "2")]
pub storage_values: ::prost::alloc::vec::Vec<super::super::interchainqueries::StorageValue>,
}
/// Describes a response structure for `VerifyStateValues` query
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/neutron.state_verifier.v1.QueryVerifyStateValuesResponse")]
pub struct QueryVerifyStateValuesResponse {
/// The field describes a validity of all the storage values passed to the request at a specific height
#[prost(bool, tag = "1")]
pub valid: bool,
}
/// Describes a structure to query ConsensusState by the specified height
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/neutron.state_verifier.v1.QueryConsensusStateRequest")]
#[proto_query(
path = "/neutron.state_verifier.v1.Query/QueryConsensusState",
response_type = QueryConsensusStateResponse
)]
pub struct QueryConsensusStateRequest {
/// Refers to the block height for which you want to query ConsensusState
#[prost(uint64, tag = "1")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub height: u64,
}
/// Describes a response structure for `QueryConsensusStateRequest` query
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/neutron.state_verifier.v1.QueryConsensusStateResponse")]
pub struct QueryConsensusStateResponse {
/// ConsensusState defines the consensus state from the state-verifier module
#[prost(message, optional, tag = "2")]
pub cs: ::core::option::Option<ConsensusState>,
}
pub struct StateVerifierQuerier<'a, Q: cosmwasm_std::CustomQuery> {
querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
}
impl<'a, Q: cosmwasm_std::CustomQuery> StateVerifierQuerier<'a, Q> {
pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
Self { querier }
}
pub fn verify_state_values(
&self,
height: u64,
storage_values: ::prost::alloc::vec::Vec<super::super::interchainqueries::StorageValue>,
) -> Result<QueryVerifyStateValuesResponse, cosmwasm_std::StdError> {
QueryVerifyStateValuesRequest {
height,
storage_values,
}
.query(self.querier)
}
pub fn query_consensus_state(
&self,
height: u64,
) -> Result<QueryConsensusStateResponse, cosmwasm_std::StdError> {
QueryConsensusStateRequest { height }.query(self.querier)
}
}
7 changes: 7 additions & 0 deletions packages/neutron-std/src/types/osmosis/tokenfactory/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,11 @@ pub struct Params {
/// whitelisted_hooks is the list of hooks which are allowed to be added and executed
#[prost(message, repeated, tag = "4")]
pub whitelisted_hooks: ::prost::alloc::vec::Vec<WhitelistedHook>,
/// Sets a limit on the gas that can be consumed by the before_send hook.
#[prost(uint64, tag = "5")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub track_before_send_gas_limit: u64,
}
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ pub struct QueryDenomsFromCreatorRequest {
#[prost(string, tag = "1")]
pub creator: ::prost::alloc::string::String,
}
/// QueryDenomsFromCreatorRequest defines the response structure for the
/// QueryDenomsFromCreatorResponse defines the response structure for the
/// DenomsFromCreator gRPC query.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Expand Down
3 changes: 2 additions & 1 deletion proto-build/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const ADMIN_MODULE_REPO: &str = "https://github.com/neutron-org/admin-module.git
const COSMOS_SDK_REV: &str = "v0.50.13-neutron";

/// The Neutron commit or tag to be cloned and used to build the proto files
const NEUTRON_REV: &str = "v6.0.0";
const NEUTRON_REV: &str = "828f75e2de165b4ff7d786abf6405c784194e9f6";


/// The wasmd commit or tag to be cloned and used to build the proto files
const WASMD_REV: &str = "8ab684b5eff649e2e335a6e1b439ae8b72afd392";
Expand Down