radix_transactions/model/v2/
instructions_v2.rs

1use super::*;
2use crate::internal_prelude::*;
3
4#[derive(Debug, Clone, Eq, PartialEq, ManifestSbor, ScryptoDescribe)]
5#[sbor(transparent)]
6pub struct InstructionsV2(pub Vec<InstructionV2>);
7
8impl InstructionsV2 {
9    pub fn to_vec(&self) -> Vec<InstructionV2> {
10        self.0.clone()
11    }
12}
13
14impl From<Vec<InstructionV2>> for InstructionsV2 {
15    fn from(value: Vec<InstructionV2>) -> Self {
16        InstructionsV2(value)
17    }
18}
19
20impl From<InstructionsV2> for Vec<InstructionV2> {
21    fn from(value: InstructionsV2) -> Self {
22        value.0
23    }
24}
25
26impl TransactionPartialPrepare for InstructionsV2 {
27    type Prepared = PreparedInstructionsV2;
28}
29
30// We summarize all the transactions as a single unit (not transaction-by-transaction)
31pub type PreparedInstructionsV2 = SummarizedRawValueBodyWithReferences<InstructionsV2>;