UNPKG

@wuwei-labs/srsly

Version:
34 lines 1.5 kB
"use strict"; /** * @purpose Cost-related constants shared across SDK modules. * * Single source of truth for thread funding, execution budgets, and per-tx fees. * Mirrors on-chain constants in `rust/programs/srsly/src/instructions/contract_thread.rs`. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.SPL_ATA_SIZE = exports.SECONDS_PER_DAY = exports.PER_TICK_LAMPORTS = exports.TX_BASE_FEE_LAMPORTS = exports.DEFAULT_EXECUTION_BUDGET = exports.MINIMUM_THREAD_FUNDING = void 0; /** * Infrastructure base auto-added by the SDK when creating a contract thread. * Covers thread rent + 3 fiber rents (~0.034 SOL) plus a ~0.006 SOL buffer. * * On-chain minimum: `rust/programs/srsly/src/instructions/contract_thread.rs:119`. */ exports.MINIMUM_THREAD_FUNDING = 40000000n; /** * Default execution budget for contract thread ticks when caller does not * specify one. 0.00219 SOL funds ~365 ticks at 0.000006 SOL each * (≈1 year of daily cron executions). */ exports.DEFAULT_EXECUTION_BUDGET = 2190000n; /** Solana base transaction fee in lamports (5_000 per signature). */ exports.TX_BASE_FEE_LAMPORTS = 5000n; /** * Cost per thread tick in lamports. * 5_000 (Solana base) + 1_000 (Antegen commission) = 6_000. */ exports.PER_TICK_LAMPORTS = 6000n; /** Seconds in a day — used for pro-rata rental amount math. */ exports.SECONDS_PER_DAY = 86400n; /** Fixed size of an SPL associated token account. */ exports.SPL_ATA_SIZE = 165; //# sourceMappingURL=constants.js.map