Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated to use injective-core v1.12.1 and the matching cosmos-sdk #218

Merged
merged 6 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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 Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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;
2 changes: 1 addition & 1 deletion packages/injective-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ license = "MIT OR Apache-2.0"
name = "injective-std"
readme = "README.md"
repository = "https://github.com/InjectiveLabs/cw-injective/tree/dev/packages/injective-std"
version = "0.1.6"
version = "0.1.7"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
6 changes: 3 additions & 3 deletions packages/injective-std/src/types/cosmos/auth/v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,9 @@
pub fn account(&self, address: ::prost::alloc::string::String) -> Result<QueryAccountResponse, cosmwasm_std::StdError> {
QueryAccountRequest { address }.query(self.querier)
}
// pub fn account_address_by_id(&self, id: i64, account_id: u64) -> Result<QueryAccountAddressByIdResponse, cosmwasm_std::StdError> {
// QueryAccountAddressByIdRequest { id, account_id }.query(self.querier)
// }
pub fn account_address_by_id(&self, id: i64, account_id: u64) -> Result<QueryAccountAddressByIdResponse, cosmwasm_std::StdError> {
QueryAccountAddressByIdRequest { id, account_id }.query(self.querier)

Check failure on line 392 in packages/injective-std/src/types/cosmos/auth/v1beta1.rs

View workflow job for this annotation

GitHub Actions / Lints

use of deprecated field `types::cosmos::auth::v1beta1::QueryAccountAddressByIdRequest::id`

Check failure on line 392 in packages/injective-std/src/types/cosmos/auth/v1beta1.rs

View workflow job for this annotation

GitHub Actions / Lints

use of deprecated field `types::cosmos::auth::v1beta1::QueryAccountAddressByIdRequest::id`

Check warning on line 392 in packages/injective-std/src/types/cosmos/auth/v1beta1.rs

View workflow job for this annotation

GitHub Actions / Test Suite

use of deprecated field `types::cosmos::auth::v1beta1::QueryAccountAddressByIdRequest::id`

Check warning on line 392 in packages/injective-std/src/types/cosmos/auth/v1beta1.rs

View workflow job for this annotation

GitHub Actions / Test Suite

use of deprecated field `types::cosmos::auth::v1beta1::QueryAccountAddressByIdRequest::id`
maxrobot marked this conversation as resolved.
Show resolved Hide resolved
}
pub fn params(&self) -> Result<QueryParamsResponse, cosmwasm_std::StdError> {
QueryParamsRequest {}.query(self.querier)
}
Expand Down
16 changes: 8 additions & 8 deletions packages/injective-std/src/types/cosmos/bank/v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@
/// Supply represents a struct that passively keeps track of the total supply
/// amounts in the network.
/// This message is deprecated now that supply is indexed by denom.
// #[allow(clippy::derive_partial_eq_without_eq)]
// #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
// #[proto_message(type_url = "/cosmos.bank.v1beta1.SupplySupply")]
// #[deprecated]
// pub struct Supply {
// #[prost(message, repeated, tag = "1")]
// pub total: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
// }
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.bank.v1beta1.SupplySupply")]
#[deprecated]
pub struct Supply {

Check failure on line 73 in packages/injective-std/src/types/cosmos/bank/v1beta1.rs

View workflow job for this annotation

GitHub Actions / Lints

use of deprecated struct `types::cosmos::bank::v1beta1::Supply`

Check failure on line 73 in packages/injective-std/src/types/cosmos/bank/v1beta1.rs

View workflow job for this annotation

GitHub Actions / Lints

use of deprecated struct `types::cosmos::bank::v1beta1::Supply`

Check warning on line 73 in packages/injective-std/src/types/cosmos/bank/v1beta1.rs

View workflow job for this annotation

GitHub Actions / Test Suite

use of deprecated struct `types::cosmos::bank::v1beta1::Supply`

Check warning on line 73 in packages/injective-std/src/types/cosmos/bank/v1beta1.rs

View workflow job for this annotation

GitHub Actions / Test Suite

use of deprecated struct `types::cosmos::bank::v1beta1::Supply`
maxrobot marked this conversation as resolved.
Show resolved Hide resolved
#[prost(message, repeated, tag = "1")]
pub total: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
}
/// DenomUnit represents a struct that describes a given
/// denomination unit of the basic token.
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
28 changes: 14 additions & 14 deletions packages/injective-std/src/types/cosmos/distribution/v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,20 @@
/// longer a need for an explicit CommunityPoolSpendProposal. To spend community
/// pool funds, a simple MsgCommunityPoolSpend can be invoked from the x/gov
/// module via a v1 governance proposal.
// #[allow(clippy::derive_partial_eq_without_eq)]
// #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
// #[proto_message(type_url = "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalCommunityPoolSpendProposal")]
// #[deprecated]
// pub struct CommunityPoolSpendProposal {
// #[prost(string, tag = "1")]
// pub title: ::prost::alloc::string::String,
// #[prost(string, tag = "2")]
// pub description: ::prost::alloc::string::String,
// #[prost(string, tag = "3")]
// pub recipient: ::prost::alloc::string::String,
// #[prost(message, repeated, tag = "4")]
// pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
// }
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalCommunityPoolSpendProposal")]
#[deprecated]
pub struct CommunityPoolSpendProposal {

Check failure on line 126 in packages/injective-std/src/types/cosmos/distribution/v1beta1.rs

View workflow job for this annotation

GitHub Actions / Lints

use of deprecated struct `types::cosmos::distribution::v1beta1::CommunityPoolSpendProposal`

Check failure on line 126 in packages/injective-std/src/types/cosmos/distribution/v1beta1.rs

View workflow job for this annotation

GitHub Actions / Lints

use of deprecated struct `types::cosmos::distribution::v1beta1::CommunityPoolSpendProposal`

Check warning on line 126 in packages/injective-std/src/types/cosmos/distribution/v1beta1.rs

View workflow job for this annotation

GitHub Actions / Test Suite

use of deprecated struct `types::cosmos::distribution::v1beta1::CommunityPoolSpendProposal`

Check warning on line 126 in packages/injective-std/src/types/cosmos/distribution/v1beta1.rs

View workflow job for this annotation

GitHub Actions / Test Suite

use of deprecated struct `types::cosmos::distribution::v1beta1::CommunityPoolSpendProposal`
maxrobot marked this conversation as resolved.
Show resolved Hide resolved
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub recipient: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
}
/// DelegatorStartingInfo represents the starting info for a delegator reward
/// period. It tracks the previous validator period, the delegation's amount of
/// staking token, and the creation height (to check later on if any slashes have
Expand Down
1 change: 1 addition & 0 deletions packages/injective-std/src/types/injective/auction/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod v1beta1;
244 changes: 244 additions & 0 deletions packages/injective-std/src/types/injective/auction/v1beta1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
use osmosis_std_derive::CosmwasmExt;
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.auction.v1beta1.Params")]
pub struct Params {
/// auction_period_duration defines the auction period duration
#[prost(int64, tag = "1")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub auction_period: i64,
/// min_next_bid_increment_rate defines the minimum increment rate for new bids
#[prost(string, tag = "2")]
pub min_next_bid_increment_rate: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.auction.v1beta1.Bid")]
pub struct Bid {
#[prost(string, tag = "1")]
pub bidder: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub amount: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.auction.v1beta1.EventBid")]
pub struct EventBid {
/// bidder describes the address of bidder
#[prost(string, tag = "1")]
pub bidder: ::prost::alloc::string::String,
/// amount describes the amount the bidder put on the auction
#[prost(string, tag = "2")]
pub amount: ::prost::alloc::string::String,
/// round defines the round number of auction
#[prost(uint64, tag = "3")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub round: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.auction.v1beta1.EventAuctionResult")]
pub struct EventAuctionResult {
/// winner describes the address of the winner
#[prost(string, tag = "1")]
pub winner: ::prost::alloc::string::String,
/// amount describes the amount the winner get from the auction
#[prost(string, tag = "2")]
pub amount: ::prost::alloc::string::String,
/// round defines the round number of auction
#[prost(uint64, tag = "3")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub round: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.auction.v1beta1.EventAuctionStart")]
pub struct EventAuctionStart {
/// round defines the round number of auction
#[prost(uint64, tag = "1")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub round: u64,
/// ending_timestamp describes auction end time
#[prost(int64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub ending_timestamp: i64,
/// new_basket describes auction module balance at the time of new auction
/// start
#[prost(message, repeated, tag = "3")]
pub new_basket: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
}
/// GenesisState defines the auction 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 = "/injective.auction.v1beta1.GenesisState")]
pub struct GenesisState {
/// params defines all the parameters of related to auction.
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
/// current auction round
#[prost(uint64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub auction_round: u64,
/// current highest bid
#[prost(message, optional, tag = "3")]
pub highest_bid: ::core::option::Option<Bid>,
/// auction ending timestamp
#[prost(int64, tag = "4")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub auction_ending_timestamp: i64,
}
/// QueryAuctionParamsRequest is the request type for the Query/AuctionParams RPC
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.auction.v1beta1.QueryAuctionParamsRequest")]
#[proto_query(
path = "/injective.auction.v1beta1.Query/AuctionParams",
response_type = QueryAuctionParamsResponse
)]
pub struct QueryAuctionParamsRequest {}
/// QueryAuctionParamsRequest is the response type for the Query/AuctionParams
/// RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.auction.v1beta1.QueryAuctionParamsResponse")]
pub struct QueryAuctionParamsResponse {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
}
/// QueryCurrentAuctionBasketRequest is the request type for the
/// Query/CurrentAuctionBasket RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.auction.v1beta1.QueryCurrentAuctionBasketRequest")]
#[proto_query(
path = "/injective.auction.v1beta1.Query/CurrentAuctionBasket",
response_type = QueryCurrentAuctionBasketResponse
)]
pub struct QueryCurrentAuctionBasketRequest {}
/// QueryCurrentAuctionBasketResponse is the response type for the
/// Query/CurrentAuctionBasket RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.auction.v1beta1.QueryCurrentAuctionBasketResponse")]
pub struct QueryCurrentAuctionBasketResponse {
/// amount describes the amount put on auction
#[prost(message, repeated, tag = "1")]
pub amount: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
/// auctionRound describes current auction round
#[prost(uint64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub auction_round: u64,
/// auctionClosingTime describes auction close time for the round
#[prost(int64, tag = "3")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub auction_closing_time: i64,
/// highestBidder describes highest bidder on current round
#[prost(string, tag = "4")]
pub highest_bidder: ::prost::alloc::string::String,
/// highestBidAmount describes highest bid amount on current round
#[prost(string, tag = "5")]
pub highest_bid_amount: ::prost::alloc::string::String,
}
/// QueryModuleStateRequest is the request type for the Query/AuctionModuleState
/// RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.auction.v1beta1.QueryModuleStateRequest")]
#[proto_query(
path = "/injective.auction.v1beta1.Query/AuctionModuleState",
response_type = QueryModuleStateResponse
)]
pub struct QueryModuleStateRequest {}
/// QueryModuleStateResponse is the response type for the
/// Query/AuctionModuleState RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.auction.v1beta1.QueryModuleStateResponse")]
pub struct QueryModuleStateResponse {
#[prost(message, optional, tag = "1")]
pub state: ::core::option::Option<GenesisState>,
}
/// Bid defines a SDK message for placing a bid for an auction
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.auction.v1beta1.MsgBid")]
pub struct MsgBid {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
/// amount of the bid in INJ tokens
#[prost(message, optional, tag = "2")]
pub bid_amount: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
/// the current auction round being bid on
#[prost(uint64, tag = "3")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub round: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.auction.v1beta1.MsgBidResponse")]
pub struct MsgBidResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/injective.auction.v1beta1.MsgUpdateParams")]
pub struct MsgUpdateParams {
/// authority is the address of the governance account.
#[prost(string, tag = "1")]
pub authority: ::prost::alloc::string::String,
/// params defines the ocr parameters to update.
///
/// NOTE: All parameters must be supplied.
#[prost(message, optional, tag = "2")]
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 = "/injective.auction.v1beta1.MsgUpdateParamsResponse")]
pub struct MsgUpdateParamsResponse {}
pub struct AuctionQuerier<'a, Q: cosmwasm_std::CustomQuery> {
querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
}
impl<'a, Q: cosmwasm_std::CustomQuery> AuctionQuerier<'a, Q> {
pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
Self { querier }
}
pub fn auction_params(&self) -> Result<QueryAuctionParamsResponse, cosmwasm_std::StdError> {
QueryAuctionParamsRequest {}.query(self.querier)
}
pub fn current_auction_basket(&self) -> Result<QueryCurrentAuctionBasketResponse, cosmwasm_std::StdError> {
QueryCurrentAuctionBasketRequest {}.query(self.querier)
}
pub fn auction_module_state(&self) -> Result<QueryModuleStateResponse, cosmwasm_std::StdError> {
QueryModuleStateRequest {}.query(self.querier)
}
}
Loading
Loading