inspect any batch(0xFF) tx. live size + CU calculator. measured numbers only.
Decoder + size and compute-unit calculator for the p-token batch(0xFF) instruction. Paste any hex to see the inner instructions broken out. Reference for devs building on the same primitive.
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 page is powered by @p76/batch-sdk. zero runtime deps, encoder + decoder + typed inner builders.
npm install @p76/batch-sdk
import { encodeBatchData, transferInner, closeAccountInner } from '@p76/batch-sdk';
const data = encodeBatchData([
transferInner(1_000_000n),
closeAccountInner(),
]);