Skip to content

Commit

Permalink
Merge branch 'secret'
Browse files Browse the repository at this point in the history
  • Loading branch information
kent-3 committed Dec 22, 2023
2 parents 3287a11 + d514734 commit 2e969f1
Show file tree
Hide file tree
Showing 17 changed files with 1,541 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "ibc-go"]
path = ibc-go
url = https://github.com/cosmos/ibc-go
[submodule "secret-network"]
path = secret-network
url = https://github.com/scrtlabs/SecretNetwork.git
7 changes: 4 additions & 3 deletions cosmos-sdk-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "cosmos-sdk-proto"
version = "0.20.0"
authors = [
"Justin Kilpatrick <justin@althea.net>",
"Greg Szabo <greg@informal.systems>",
"Tony Arcieri <tony@iqlusion.io>"
"Justin Kilpatrick <justin@althea.net>",
"Greg Szabo <greg@informal.systems>",
"Tony Arcieri <tony@iqlusion.io>",
]
license = "Apache-2.0"
repository = "https://github.com/cosmos/cosmos-rust/tree/main/cosmos-sdk-proto"
Expand All @@ -28,6 +28,7 @@ default = ["grpc-transport"]
grpc = ["tonic"]
grpc-transport = ["grpc", "tonic/transport"]
cosmwasm = []
secret-cosmwasm = ["cosmwasm"]

[package.metadata.docs.rs]
all-features = true
Expand Down
18 changes: 18 additions & 0 deletions cosmos-sdk-proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,24 @@ pub mod cosmwasm {
include!("prost/wasmd/cosmwasm.wasm.v1.rs");
}
}

#[cfg(feature = "secret-cosmwasm")]
#[cfg_attr(docsrs, doc(cfg(feature = "secret-cosmwasm")))]
pub mod secret {
pub mod compute {
pub mod v1beta1 {
include!("prost/secret/secret.compute.v1beta1.rs");
}
}

#[cfg(feature = "secret-cosmwasm")]
#[cfg_attr(docsrs, doc(cfg(feature = "secret-cosmwasm")))]
pub mod registration {
pub mod v1beta1 {
include!("prost/secret/secret.registration.v1beta1.rs");
}
}
}
}

/// IBC protobuf definitions.
Expand Down
1 change: 1 addition & 0 deletions cosmos-sdk-proto/src/prost/secret/SECRET_COMMIT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.3.1
154 changes: 154 additions & 0 deletions cosmos-sdk-proto/src/prost/secret/cosmos.base.abci.v1beta1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
/// TxResponse defines a structure containing relevant tx data and metadata. The
/// tags are stringified and the log is JSON decoded.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxResponse {
/// The block height
#[prost(int64, tag = "1")]
pub height: i64,
/// The transaction hash.
#[prost(string, tag = "2")]
pub txhash: ::prost::alloc::string::String,
/// Namespace for the Code
#[prost(string, tag = "3")]
pub codespace: ::prost::alloc::string::String,
/// Response code.
#[prost(uint32, tag = "4")]
pub code: u32,
/// Result bytes, if any.
#[prost(string, tag = "5")]
pub data: ::prost::alloc::string::String,
/// The output of the application's logger (raw string). May be
/// non-deterministic.
#[prost(string, tag = "6")]
pub raw_log: ::prost::alloc::string::String,
/// The output of the application's logger (typed). May be non-deterministic.
#[prost(message, repeated, tag = "7")]
pub logs: ::prost::alloc::vec::Vec<AbciMessageLog>,
/// Additional information. May be non-deterministic.
#[prost(string, tag = "8")]
pub info: ::prost::alloc::string::String,
/// Amount of gas requested for transaction.
#[prost(int64, tag = "9")]
pub gas_wanted: i64,
/// Amount of gas consumed by transaction.
#[prost(int64, tag = "10")]
pub gas_used: i64,
/// The request transaction bytes.
#[prost(message, optional, tag = "11")]
pub tx: ::core::option::Option<::prost_types::Any>,
/// Time of the previous block. For heights > 1, it's the weighted median of
/// the timestamps of the valid votes in the block.LastCommit. For height == 1,
/// it's genesis time.
#[prost(string, tag = "12")]
pub timestamp: ::prost::alloc::string::String,
/// Events defines all the events emitted by processing a transaction. Note,
/// these events include those emitted by processing all the messages and those
/// emitted from the ante handler. Whereas Logs contains the events, with
/// additional metadata, emitted only by processing the messages.
///
/// Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
#[prost(message, repeated, tag = "13")]
pub events: ::prost::alloc::vec::Vec<tendermint_proto::abci::Event>,
}
/// ABCIMessageLog defines a structure containing an indexed tx ABCI message log.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AbciMessageLog {
#[prost(uint32, tag = "1")]
pub msg_index: u32,
#[prost(string, tag = "2")]
pub log: ::prost::alloc::string::String,
/// Events contains a slice of Event objects that were emitted during some
/// execution.
#[prost(message, repeated, tag = "3")]
pub events: ::prost::alloc::vec::Vec<StringEvent>,
}
/// StringEvent defines en Event object wrapper where all the attributes
/// contain key/value pairs that are strings instead of raw bytes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StringEvent {
#[prost(string, tag = "1")]
pub r#type: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub attributes: ::prost::alloc::vec::Vec<Attribute>,
}
/// Attribute defines an attribute wrapper where the key and value are
/// strings instead of raw bytes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Attribute {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
/// GasInfo defines tx execution gas context.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GasInfo {
/// GasWanted is the maximum units of work we allow this tx to perform.
#[prost(uint64, tag = "1")]
pub gas_wanted: u64,
/// GasUsed is the amount of gas actually consumed.
#[prost(uint64, tag = "2")]
pub gas_used: u64,
}
/// Result is the union of ResponseFormat and ResponseCheckTx.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
/// Data is any data returned from message or handler execution. It MUST be
/// length prefixed in order to separate data from multiple message executions.
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
/// Log contains the log information from message or handler execution.
#[prost(string, tag = "2")]
pub log: ::prost::alloc::string::String,
/// Events contains a slice of Event objects that were emitted during message
/// or handler execution.
#[prost(message, repeated, tag = "3")]
pub events: ::prost::alloc::vec::Vec<tendermint_proto::abci::Event>,
}
/// SimulationResponse defines the response generated when a transaction is
/// successfully simulated.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SimulationResponse {
#[prost(message, optional, tag = "1")]
pub gas_info: ::core::option::Option<GasInfo>,
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<Result>,
}
/// MsgData defines the data returned in a Result object during message
/// execution.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgData {
#[prost(string, tag = "1")]
pub msg_type: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
/// TxMsgData defines a list of MsgData. A transaction will have a MsgData object
/// for each message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxMsgData {
#[prost(message, repeated, tag = "1")]
pub data: ::prost::alloc::vec::Vec<MsgData>,
}
/// SearchTxsResult defines a structure for querying txs pageable
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchTxsResult {
/// Count of all txs
#[prost(uint64, tag = "1")]
pub total_count: u64,
/// Count of txs in current page
#[prost(uint64, tag = "2")]
pub count: u64,
/// Index of current page, start from 1
#[prost(uint64, tag = "3")]
pub page_number: u64,
/// Count of total pages
#[prost(uint64, tag = "4")]
pub page_total: u64,
/// Max count txs per page
#[prost(uint64, tag = "5")]
pub limit: u64,
/// List of txs in current page
#[prost(message, repeated, tag = "6")]
pub txs: ::prost::alloc::vec::Vec<TxResponse>,
}
34 changes: 34 additions & 0 deletions cosmos-sdk-proto/src/prost/secret/cosmos.base.v1beta1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/// Coin defines a token with a denomination and an amount.
///
/// NOTE: The amount field is an Int which implements the custom method
/// signatures required by gogoproto.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Coin {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub amount: ::prost::alloc::string::String,
}
/// DecCoin defines a token with a denomination and a decimal amount.
///
/// NOTE: The amount field is an Dec which implements the custom method
/// signatures required by gogoproto.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DecCoin {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub amount: ::prost::alloc::string::String,
}
/// IntProto defines a Protobuf wrapper around an Int object.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IntProto {
#[prost(string, tag = "1")]
pub int: ::prost::alloc::string::String,
}
/// DecProto defines a Protobuf wrapper around a Dec object.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DecProto {
#[prost(string, tag = "1")]
pub dec: ::prost::alloc::string::String,
}
Loading

0 comments on commit 2e969f1

Please sign in to comment.