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

penumbra: use core.auction.v1 #4368

Merged
merged 7 commits into from
May 9, 2024
Merged
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
6 changes: 3 additions & 3 deletions crates/bin/pcli/src/command/query/auction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ use penumbra_auction::auction::AuctionId;
use penumbra_dex::lp::position::{self, Position};
use penumbra_num::fixpoint::U128x128;
use penumbra_num::Amount;
use penumbra_proto::core::component::auction::v1alpha1 as pb_auction;
use penumbra_proto::core::component::auction::v1alpha1::query_service_client::QueryServiceClient as AuctionQueryServiceClient;
use penumbra_proto::core::component::auction::v1alpha1::AuctionStateByIdRequest;
use penumbra_proto::core::component::auction::v1 as pb_auction;
use penumbra_proto::core::component::auction::v1::query_service_client::QueryServiceClient as AuctionQueryServiceClient;
use penumbra_proto::core::component::auction::v1::AuctionStateByIdRequest;
use penumbra_proto::core::component::dex::v1::query_service_client::QueryServiceClient as DexQueryServiceClient;
use penumbra_proto::core::component::dex::v1::LiquidityPositionByIdRequest;
use penumbra_proto::DomainType;
Expand Down
2 changes: 1 addition & 1 deletion crates/bin/pcli/src/command/tx/auction/dutch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ impl DutchCmd {
bail!("auction state is missing from view server response")
};

use penumbra_proto::core::component::auction::v1alpha1 as pb_auction;
use penumbra_proto::core::component::auction::v1 as pb_auction;
// We're processing a Dutch auction:
assert_eq!(raw_da_state.type_url, pb_auction::DutchAuction::type_url());

Expand Down
2 changes: 1 addition & 1 deletion crates/bin/pcli/src/command/view/auction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use anyhow::Result;
use comfy_table::{presets, Cell, ContentArrangement, Table};
use penumbra_auction::auction::dutch::DutchAuction;
use penumbra_keys::FullViewingKey;
use penumbra_proto::{core::component::auction::v1alpha1 as pb_auction, DomainType, Name};
use penumbra_proto::{core::component::auction::v1 as pb_auction, DomainType, Name};
use penumbra_view::ViewClient;

use crate::command::query::auction::render_dutch_auction;
Expand Down
2 changes: 1 addition & 1 deletion crates/core/app/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use {
core::{
app::v1::query_service_server::QueryServiceServer as AppQueryServiceServer,
component::{
auction::v1alpha1::query_service_server::QueryServiceServer as AuctionQueryServiceServer,
auction::v1::query_service_server::QueryServiceServer as AuctionQueryServiceServer,
compact_block::v1::query_service_server::QueryServiceServer as CompactBlockQueryServiceServer,
dex::v1::{
query_service_server::QueryServiceServer as DexQueryServiceServer,
Expand Down
2 changes: 1 addition & 1 deletion crates/core/component/auction/src/auction/dutch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use anyhow::anyhow;
use penumbra_asset::{asset, Value};
use penumbra_dex::lp::position::{self};
use penumbra_num::Amount;
use penumbra_proto::{core::component::auction::v1alpha1 as pb, DomainType};
use penumbra_proto::{core::component::auction::v1 as pb, DomainType};
use serde::{Deserialize, Serialize};

use crate::auction::AuctionId;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::anyhow;
use penumbra_asset::{Balance, Value};
use penumbra_proto::{core::component::auction::v1alpha1 as pb, DomainType};
use penumbra_proto::{core::component::auction::v1 as pb, DomainType};
use penumbra_txhash::{EffectHash, EffectingData};
use serde::{Deserialize, Serialize};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use ark_ff::Zero;
use decaf377::Fr;
use penumbra_asset::{balance, Balance, Value};
use penumbra_proto::{penumbra::core::component::auction::v1alpha1 as pb, DomainType};
use penumbra_proto::{penumbra::core::component::auction::v1 as pb, DomainType};
use serde::{Deserialize, Serialize};

use crate::auction::{dutch::ActionDutchAuctionWithdraw, AuctionId, AuctionNft};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::auction::{dutch::DutchAuctionDescription, nft::AuctionNft};
use anyhow::anyhow;
use penumbra_asset::{Balance, Value};
use penumbra_proto::{core::component::auction::v1alpha1 as pb, DomainType};
use penumbra_proto::{core::component::auction::v1 as pb, DomainType};
use penumbra_txhash::{EffectHash, EffectingData};
use serde::{Deserialize, Serialize};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::auction::{
};
use anyhow::anyhow;
use penumbra_asset::ValueView;
use penumbra_proto::{core::component::auction::v1alpha1 as pb, DomainType};
use penumbra_proto::{core::component::auction::v1 as pb, DomainType};
use serde::{Deserialize, Serialize};

/* Domain type definitions */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use anyhow::anyhow;
use ark_ff::Zero;
use decaf377_rdsa::Fr;
use penumbra_asset::{balance, Balance, Value};
use penumbra_proto::{core::component::auction::v1alpha1 as pb, DomainType};
use penumbra_proto::{core::component::auction::v1 as pb, DomainType};
use penumbra_txhash::{EffectHash, EffectingData};
use serde::{Deserialize, Serialize};

Expand Down
2 changes: 1 addition & 1 deletion crates/core/component/auction/src/auction/id.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::{bail, Context};
use penumbra_proto::{
penumbra::core::component::auction::v1alpha1 as pb, serializers::bech32str, DomainType,
penumbra::core::component::auction::v1 as pb, serializers::bech32str, DomainType,
};
use serde::{Deserialize, Serialize};

Expand Down
2 changes: 1 addition & 1 deletion crates/core/component/auction/src/auction/nft.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::auction::id::AuctionId;
use anyhow::{anyhow, Result};
use penumbra_asset::asset::{self, Metadata};
use penumbra_proto::{core::component::auction::v1alpha1 as pb, DomainType};
use penumbra_proto::{core::component::auction::v1 as pb, DomainType};
use regex::Regex;

/// An non-fungible token (NFT) tracking the state and ownership of an auction.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use anyhow::Result;
use async_trait::async_trait;
use cnidarium::StateRead;
use pbjson_types::Any;
use penumbra_proto::core::component::auction::v1alpha1 as pb;
use penumbra_proto::core::component::auction::v1 as pb;
use penumbra_proto::DomainType;
use penumbra_proto::Name;
use penumbra_proto::StateReadProto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use penumbra_dex::lp::position::{self, Position};
use penumbra_dex::lp::Reserves;
use penumbra_dex::DirectedTradingPair;
use penumbra_num::Amount;
use penumbra_proto::core::component::auction::v1alpha1 as pb;
use penumbra_proto::core::component::auction::v1 as pb;
use penumbra_proto::StateWriteProto;
use penumbra_sct::component::clock::EpochRead;
use prost::{Message, Name};
Expand Down
4 changes: 2 additions & 2 deletions crates/core/component/auction/src/component/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

use penumbra_dex::{component::PositionRead, lp::position};
use penumbra_proto::{
core::component::auction::v1alpha1 as pb,
core::component::auction::v1alpha1::{
core::component::auction::v1 as pb,
core::component::auction::v1::{
query_service_server::QueryService, AuctionStateByIdRequest, AuctionStateByIdResponse,
AuctionStateByIdsRequest, AuctionStateByIdsResponse, DutchAuctionState,
},
Expand Down
2 changes: 1 addition & 1 deletion crates/core/component/auction/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::auction::dutch::{DutchAuctionDescription, DutchAuctionState};
use crate::auction::AuctionId;
use penumbra_asset::asset;
use penumbra_num::Amount;
use penumbra_proto::penumbra::core::component::auction::v1alpha1 as pb;
use penumbra_proto::penumbra::core::component::auction::v1 as pb;

/// Event for a Dutch auction that has been scheduled.
pub fn dutch_auction_schedule_event(
Expand Down
2 changes: 1 addition & 1 deletion crates/core/component/auction/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::params::AuctionParameters;
use anyhow::Context;
use serde::{Deserialize, Serialize};

use penumbra_proto::{penumbra::core::component::auction::v1alpha1 as pb, DomainType};
use penumbra_proto::{penumbra::core::component::auction::v1 as pb, DomainType};

#[derive(Deserialize, Serialize, Debug, Clone, Default)]
#[serde(try_from = "pb::GenesisContent", into = "pb::GenesisContent")]
Expand Down
2 changes: 1 addition & 1 deletion crates/core/component/auction/src/params.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use penumbra_proto::core::component::auction::v1alpha1 as pb;
use penumbra_proto::core::component::auction::v1 as pb;
use penumbra_proto::DomainType;
use serde::{Deserialize, Serialize};

Expand Down
4 changes: 2 additions & 2 deletions crates/proto/src/gen/penumbra.core.app.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub struct AppParameters {
/// Auction module parameters.
#[prost(message, optional, tag = "12")]
pub auction_params: ::core::option::Option<
super::super::component::auction::v1alpha1::AuctionParameters,
super::super::component::auction::v1::AuctionParameters,
>,
}
impl ::prost::Name for AppParameters {
Expand Down Expand Up @@ -209,7 +209,7 @@ pub struct GenesisContent {
/// Auction component genesis state.
#[prost(message, optional, tag = "12")]
pub auction_content: ::core::option::Option<
super::super::component::auction::v1alpha1::GenesisContent,
super::super::component::auction::v1::GenesisContent,
>,
}
impl ::prost::Name for GenesisContent {
Expand Down
Loading
Loading