committed by
GitHub
parent
230df0ec0c
commit
a0514eb2ae
@@ -1,5 +1,6 @@
|
||||
//! Defines a composable Instruction type and a memory-efficient CompiledInstruction.
|
||||
|
||||
use crate::sanitize::Sanitize;
|
||||
use crate::{pubkey::Pubkey, short_vec, system_instruction::SystemError};
|
||||
use bincode::serialize;
|
||||
use serde::Serialize;
|
||||
@@ -252,6 +253,8 @@ pub struct CompiledInstruction {
|
||||
pub data: Vec<u8>,
|
||||
}
|
||||
|
||||
impl Sanitize for CompiledInstruction {}
|
||||
|
||||
impl CompiledInstruction {
|
||||
pub fn new<T: Serialize>(program_ids_index: u8, data: &T, accounts: Vec<u8>) -> Self {
|
||||
let data = serialize(data).unwrap();
|
||||
|
Reference in New Issue
Block a user