INNER CODE UNIT · TypeScript

BUFFER_HEADER

blueshift-gg/doppler · packages/core/index.ts:13

export const BUFFER_HEADER = 4 + 1 + 32;
/** Loader-v3 program: tag, programdata address. */
export const PROGRAM_LEN = 4 + 32;

/** `DEFAULT_COMPUTE_UNITS` of the system and compute-budget builtins. */
const BUILTIN_IX_CU = 150;
/**
 * A deploy's own units: three `create_account`s, the loader's `create_account` CPI, and four loader-v3
 * instructions at 2_370 each. Measured at 10_230 with the price instruction on surfpool 1.5.0 for 328,
 * 336 and 360-byte programs; pinned by the live tests.
 */
const DEPLOY_CU = 4 * BUILTIN_IX_CU + 4 * 2_370;
/**
 * Builtin and sysvar data a deploy loads: the system program, 21 bytes on mainnet and 14 on devnet,
 * where a limit only needs to cover the larger; the loader; the rent and clock sysvars.
 */
const DEPLOY_LOADED_DATA = 21 + 37 + 17 + 40;
/** SIMD-0186. */

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…