1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use anyhow::Result;
use move_core_types::{ident_str, identifier::IdentStr, move_resource::MoveStructType};
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize)]
pub struct BaseUrlRotationEvent {
new_base_url: Vec<u8>,
time_rotated_seconds: u64,
}
impl BaseUrlRotationEvent {
pub fn new_base_url(&self) -> &[u8] {
&self.new_base_url
}
pub fn time_rotated_seconds(&self) -> u64 {
self.time_rotated_seconds
}
pub fn try_from_bytes(bytes: &[u8]) -> Result<Self> {
bcs::from_bytes(bytes).map_err(Into::into)
}
}
impl MoveStructType for BaseUrlRotationEvent {
const MODULE_NAME: &'static IdentStr = ident_str!("DualAttestation");
const STRUCT_NAME: &'static IdentStr = ident_str!("BaseUrlRotationEvent");
}