Add program deployment docs (#15075) (#15082)

(cherry picked from commit d0118a5c42)

Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
mergify[bot]
2021-02-04 10:42:37 +00:00
committed by GitHub
parent dadebb2bba
commit cfeed09f1f
7 changed files with 237 additions and 17 deletions

View File

@@ -1527,8 +1527,8 @@ pub struct CliUpgradeableProgram {
pub program_id: String,
pub programdata_address: String,
pub authority: String,
pub last_upgrade_slot: u64,
pub program_len: usize,
pub last_deploy_slot: u64,
pub data_len: usize,
}
impl QuietDisplay for CliUpgradeableProgram {}
impl VerboseDisplay for CliUpgradeableProgram {}
@@ -1540,13 +1540,13 @@ impl fmt::Display for CliUpgradeableProgram {
writeln_name_value(f, "Authority:", &self.authority)?;
writeln_name_value(
f,
"Last Upgraded In Slot:",
&self.last_upgrade_slot.to_string(),
"Last Deployed In Slot:",
&self.last_deploy_slot.to_string(),
)?;
writeln_name_value(
f,
"Program Length:",
&format!("{:?} ({:#x?}) bytes", self.program_len, self.program_len),
"Data Length:",
&format!("{:?} ({:#x?}) bytes", self.data_len, self.data_len),
)?;
Ok(())
}