INNER CODE UNIT · TypeScript

DEPLOY_CU

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

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. */
const ACCOUNT_OVERHEAD = 64;
const COMPUTE_BUDGET_PROGRAM_LEN = 'compute_budget_program'.length;
/** `FeeStructure::default()`. */
const LAMPORTS_PER_SIGNATURE = 5_000n;
/** The header is a u64. */
const MAX_SEQUENCE = (1n << 64n) - 1n;

/** `Rent::default().minimum_balance`: `(ACCOUNT_STORAGE_OVERHEAD + bytes) * DEFAULT_LAMPORTS_PER_BYTE` (solana-rent). */
export function rentExempt(bytes: number): bigint {
  return BigInt(128 + bytes) * 6960n;
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…