iota_types/timelock/
stardust_upgrade_label.rs1use move_core_types::{ident_str, identifier::IdentStr, language_storage::StructTag};
6
7use crate::STARDUST_ADDRESS;
8
9pub const STARDUST_UPGRADE_MODULE_NAME: &IdentStr = ident_str!("stardust_upgrade_label");
10pub const STARDUST_UPGRADE_STRUCT_NAME: &IdentStr = ident_str!("STARDUST_UPGRADE_LABEL");
11
12pub const STARDUST_UPGRADE_LABEL_VALUE: &str = "000000000000000000000000000000000000000000000000000000000000107a::stardust_upgrade_label::STARDUST_UPGRADE_LABEL";
13
14pub fn stardust_upgrade_label_type() -> StructTag {
16 StructTag {
17 address: STARDUST_ADDRESS,
18 module: STARDUST_UPGRADE_MODULE_NAME.to_owned(),
19 name: STARDUST_UPGRADE_STRUCT_NAME.to_owned(),
20 type_params: vec![],
21 }
22}
23
24pub fn is_stardust_upgrade(other: &StructTag) -> bool {
26 other.address == STARDUST_ADDRESS
27 && other.module.as_ident_str() == STARDUST_UPGRADE_MODULE_NAME
28 && other.name.as_ident_str() == STARDUST_UPGRADE_STRUCT_NAME
29}