inspect any batch(0xFF) tx
the canonical reference for the p-token batch instruction wire format. live size + CU calculator. decoder. worked example from $76 genesis tx. measured numbers only.
live numbers from the day 5 devnet benchmark. drag to see how the tx scales. the binding constraint is tx size, not CU.
12 bytes that minted $76. fetched, decoded, annotated. the batch encoder in lib/batch.ts ships this exact format.
{
"innerInstructions": [
{
"numAccounts": 3,
"discriminator": "0x07",
"dataHex": "07 00 AB 87 04 00 00 00 00"
}
]
}paste any batch(0xFF) instruction data (hex). returns the decoded inner instructions via @p76/batch-sdk.
the layout that p-token process_batch parses. identical to docs/BATCH_FORMAT.md in this repo.
[0xFF] // batch discriminator [n_accounts: u8] [data_len: u8] // inner 1 header [data ...data_len bytes] // inner 1 data (byte 0 = p-token disc) [n_accounts: u8] [data_len: u8] // inner 2 header [data ...] // inner 2 data ... // loop until bytes exhausted
inner discriminators are dispatched inside p-token (Transfer, MintTo, Burn, Initialize, etc.). cross-program CPI is not possible — CreateAssociatedTokenAccount lives in the ATA program, not p-token.
ownership pre-checks fire for selected discriminators (3/7/8/12/14/15 and 4-13/22/38/45) because the runtime owner check only runs after the outer tx.
u8 limits: max 255 accounts per inner, max 255 bytes per inner data. ample for normal token ops.
this whole page is powered by @p76/batch-sdk: encoder, decoder, types. use it in your own project:
npm install @p76/batch-sdk
import { encodeBatchData, decodeBatchData } from '@p76/batch-sdk';
const encoded = encodeBatchData([
{ numAccounts: 3, data: new Uint8Array([0x07, ...amountLE]) },
]);