2025-11-19 14:28:18 +02:00
|
|
|
use borsh::{BorshDeserialize, BorshSerialize};
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, BorshSerialize, BorshDeserialize)]
|
2025-10-14 17:15:04 -03:00
|
|
|
pub struct Message {
|
|
|
|
|
pub(crate) bytecode: Vec<u8>,
|
|
|
|
|
}
|
2025-10-15 20:14:19 -03:00
|
|
|
|
|
|
|
|
impl Message {
|
2026-03-03 23:21:08 +03:00
|
|
|
#[must_use]
|
2026-03-09 18:27:56 +03:00
|
|
|
pub const fn new(bytecode: Vec<u8>) -> Self {
|
2025-10-15 20:14:19 -03:00
|
|
|
Self { bytecode }
|
|
|
|
|
}
|
2026-01-24 04:05:59 +03:00
|
|
|
|
2026-03-03 23:21:08 +03:00
|
|
|
#[must_use]
|
2026-01-24 04:05:59 +03:00
|
|
|
pub fn into_bytecode(self) -> Vec<u8> {
|
|
|
|
|
self.bytecode
|
|
|
|
|
}
|
2025-10-15 20:14:19 -03:00
|
|
|
}
|