Skip to content

Commit eaec59c

Browse files
committed
refactor: update UpgradeInfo documentation and modify get_upgrade_info method to return last canister upgrade details
1 parent 14bbfab commit eaec59c

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

src/did/src/upgrade_info.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ use serde::Deserialize;
66

77
use crate::build::BuildData;
88

9-
/// Historical information about the canister
109
#[derive(CandidType, Deserialize, Clone, Debug)]
10+
/// Information about a canister upgrade, tracking deployment details and blockchain state.
1111
pub struct UpgradeInfo {
12-
/// The build data of the canister
12+
/// Compilation and build information for the deployed canister version
1313
pub build_data: BuildData,
14-
/// The timestamp of the deployment
14+
/// Unix timestamp (in seconds) when the upgrade was deployed.
1515
pub deploy_ts: u64,
16-
/// The last block number
16+
/// The blockchain block number at the time the upgrade was performed.
1717
pub last_block_number: u64,
1818
}
1919

src/evm-canister-client/src/client.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -928,10 +928,8 @@ impl<C: CanisterClient> EvmCanisterClient<C> {
928928
self.client.query("get_blockchain_block_info", ()).await
929929
}
930930

931-
/// Returns the upgrade info for the canister of the last `count` entries
931+
/// Returns the details of the last `count` canister upgrades.
932932
pub async fn get_upgrade_info(&self, count: u64) -> CanisterClientResult<UpgradeInfo> {
933-
self.client
934-
.query("get_upgrade_info_paginated", (count,))
935-
.await
933+
self.client.query("get_upgrade_info", (count,)).await
936934
}
937935
}

0 commit comments

Comments
 (0)