( instructionsData: Instruction[] )
| 49 | } |
| 50 | |
| 51 | function buildInstructions( |
| 52 | instructionsData: Instruction[] |
| 53 | ): TransactionInstruction[] { |
| 54 | return instructionsData.map((ix) => { |
| 55 | const keys = ix.accounts.map((acc: InstructionAccount) => ({ |
| 56 | pubkey: decodePubkey(acc.pubkey), |
| 57 | isSigner: acc.is_signer, |
| 58 | isWritable: acc.is_writable, |
| 59 | })); |
| 60 | |
| 61 | const programId = decodePubkey(ix.program_id); |
| 62 | const data = Buffer.from(ix.data); |
| 63 | |
| 64 | return new TransactionInstruction({ keys, programId, data }); |
| 65 | }); |
| 66 | } |
| 67 | |
| 68 | // === Step 3: Resolve Address Lookup Tables === |
| 69 | async function resolveAddressLookupTables( |
no test coverage detected