solana_svm_transaction/svm_message/
sanitized_transaction.rs1use {
2 crate::{
3 instruction::SVMInstruction, message_address_table_lookup::SVMMessageAddressTableLookup,
4 svm_message::SVMMessage,
5 },
6 solana_hash::Hash,
7 solana_message::AccountKeys,
8 solana_pubkey::Pubkey,
9 solana_transaction::sanitized::SanitizedTransaction,
10};
11
12impl SVMMessage for SanitizedTransaction {
13 fn num_transaction_signatures(&self) -> u64 {
14 SVMMessage::num_transaction_signatures(SanitizedTransaction::message(self))
15 }
16
17 fn num_write_locks(&self) -> u64 {
18 SVMMessage::num_write_locks(SanitizedTransaction::message(self))
19 }
20
21 fn recent_blockhash(&self) -> &Hash {
22 SVMMessage::recent_blockhash(SanitizedTransaction::message(self))
23 }
24
25 fn num_instructions(&self) -> usize {
26 SVMMessage::num_instructions(SanitizedTransaction::message(self))
27 }
28
29 fn instructions_iter(&self) -> impl Iterator<Item = SVMInstruction> {
30 SVMMessage::instructions_iter(SanitizedTransaction::message(self))
31 }
32
33 fn program_instructions_iter(&self) -> impl Iterator<Item = (&Pubkey, SVMInstruction)> + Clone {
34 SVMMessage::program_instructions_iter(SanitizedTransaction::message(self))
35 }
36
37 fn account_keys(&self) -> AccountKeys {
38 SVMMessage::account_keys(SanitizedTransaction::message(self))
39 }
40
41 fn fee_payer(&self) -> &Pubkey {
42 SVMMessage::fee_payer(SanitizedTransaction::message(self))
43 }
44
45 fn is_writable(&self, index: usize) -> bool {
46 SVMMessage::is_writable(SanitizedTransaction::message(self), index)
47 }
48
49 fn is_signer(&self, index: usize) -> bool {
50 SVMMessage::is_signer(SanitizedTransaction::message(self), index)
51 }
52
53 fn is_invoked(&self, key_index: usize) -> bool {
54 SVMMessage::is_invoked(SanitizedTransaction::message(self), key_index)
55 }
56
57 fn num_lookup_tables(&self) -> usize {
58 SVMMessage::num_lookup_tables(SanitizedTransaction::message(self))
59 }
60
61 fn message_address_table_lookups(&self) -> impl Iterator<Item = SVMMessageAddressTableLookup> {
62 SVMMessage::message_address_table_lookups(SanitizedTransaction::message(self))
63 }
64}