getInnerInstructionsFromMeta

function getInnerInstructionsFromMeta(
    meta,
    accountMetas,
): TracedInstruction[];

Returns the inner instructions in a getTransaction response as TracedInstructions.

The RPC returns inner instructions in a different shape from the wire format: indices reference the same flat account list as the outer instructions, but data is a base58-encoded string. This helper decodes the data, resolves the indices against the supplied AccountMeta list, and tags each instruction with an inner trace.

Throws if any programIdIndex or account index falls outside the supplied accountMetas list.

Parameters

ParameterType
metaMetaWithInnerInstructions
accountMetasreadonly AccountMeta<string>[]

Returns

TracedInstruction[]

Example

const accountMetas = getAccountMetasFromCompiledTransactionMessage(compiledMessage, loadedAddresses);
const inner = getInnerInstructionsFromMeta(rpcResponse.meta, accountMetas);

On this page