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

chore(deps): bump iota-types #1089

Merged
merged 9 commits into from
Feb 9, 2023
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
38 changes: 32 additions & 6 deletions 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ futures = { version = "0.3", default-features = false }
humantime = { version = "2.1.0", default-features = false }
humantime-serde = { version = "1.1", default-features = false }
iota-crypto = { version = "0.15", default-features = false, features = [ "blake2b" ] }
iota-types = { version = "1.0.0-rc.4", default-features = false, features = [ "api", "block", "std" ] }
iota-types = { version = "1.0.0-rc.5", default-features = false, features = [ "api", "block", "std" ] }
mongodb = { version = "2.3", default-features = false, features = [ "tokio-runtime" ] }
packable = { version = "0.7", default-features = false }
pin-project = { version = "1.0", default-features = false }
Expand Down Expand Up @@ -76,7 +76,7 @@ inx = { version = "1.0.0-beta.8", default-features = false, optional = true }
tonic = { version = "0.8", default-features = false, optional = true }

[dev-dependencies]
iota-types = { version = "1.0.0-rc.4", default-features = false, features = [ "api", "block", "std", "rand" ] }
iota-types = { version = "1.0.0-rc.5", default-features = false, features = [ "api", "block", "std", "rand" ] }
rand = { version = "0.8", default-features = false, features = [ "std" ] }

[features]
Expand Down
6 changes: 3 additions & 3 deletions src/bin/inx-chronicle/api/stardust/core/responses.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use iota_types::{api::response as iota, block::protocol::dto::ProtocolParametersDto};
use iota_types::{api::core::response as iota, block::protocol::dto::ProtocolParametersDto};
use serde::{Deserialize, Serialize};

use crate::api::responses::impl_success_response;
Expand All @@ -20,7 +20,7 @@ pub struct InfoResponse {
impl_success_response!(InfoResponse);

/// A wrapper struct that allows us to implement [`IntoResponse`](axum::response::IntoResponse) for the foreign
/// responses from [`iota_types`](iota_types::api::response).
/// responses from [`iota_types`](iota_types::api::core::response).
#[derive(Clone, Debug, Serialize, derive_more::From)]
pub struct IotaResponse<T: Serialize>(T);

Expand All @@ -31,7 +31,7 @@ impl<T: Serialize> axum::response::IntoResponse for IotaResponse<T> {
}

/// A wrapper struct that allows us to implement [`IntoResponse`](axum::response::IntoResponse) for the foreign
/// raw responses from [`iota_types`](iota_types::api::response).
/// raw responses from [`iota_types`](iota_types::api::core::response).
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(untagged)]
pub enum IotaRawResponse<T: Serialize> {
Expand Down
17 changes: 7 additions & 10 deletions src/bin/inx-chronicle/api/stardust/core/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ use chronicle::{
};
use futures::TryStreamExt;
use iota_types::{
api::{
api::core::{
dto::ReceiptDto,
response::{
self as iota, BaseTokenResponse, BlockMetadataResponse, ConfirmedMilestoneResponse,
LatestMilestoneResponse, OutputMetadataResponse, OutputWithMetadataResponse, ReceiptsResponse,
StatusResponse, TreasuryResponse, UtxoChangesResponse,
LatestMilestoneResponse, OutputWithMetadataResponse, ReceiptsResponse, StatusResponse, TreasuryResponse,
UtxoChangesResponse,
},
},
block::{
output::dto::RentStructureDto,
output::dto::{OutputMetadataDto, RentStructureDto},
payload::{dto::MilestonePayloadDto, milestone::option::dto::MilestoneOptionDto},
protocol::dto::ProtocolParametersDto,
BlockDto,
Expand Down Expand Up @@ -246,11 +246,8 @@ async fn block_metadata(
Ok(create_block_metadata_response(block_id, metadata).into())
}

fn create_output_metadata_response(
metadata: OutputMetadataResult,
ledger_index: MilestoneIndex,
) -> iota::OutputMetadataResponse {
iota::OutputMetadataResponse {
fn create_output_metadata_response(metadata: OutputMetadataResult, ledger_index: MilestoneIndex) -> OutputMetadataDto {
OutputMetadataDto {
block_id: metadata.block_id.to_hex(),
transaction_id: metadata.output_id.transaction_id.to_hex(),
output_index: metadata.output_id.index,
Expand Down Expand Up @@ -313,7 +310,7 @@ async fn output(
async fn output_metadata(
database: Extension<MongoDb>,
Path(output_id): Path<String>,
) -> ApiResult<IotaResponse<OutputMetadataResponse>> {
) -> ApiResult<IotaResponse<OutputMetadataDto>> {
let ledger_index = database
.collection::<MilestoneCollection>()
.get_ledger_index()
Expand Down
2 changes: 1 addition & 1 deletion src/types/ledger/inclusion_state.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use iota_types::api::dto as iota;
use iota_types::api::core::dto as iota;
use mongodb::bson::Bson;
use serde::{Deserialize, Serialize};

Expand Down