This document outlines the standard procedures for building, deploying, and testing the LazorKit program and its associated SDK.
- Solana Tool Suite (v2.x+)
- Rust (via rustup)
- Node.js 18+ & npm
- shank-cli:
cargo install shank-cli
/program Rust smart contract (pinocchio, zero-copy)
/sdk/solita-client TypeScript SDK (Solita-generated + hand-written utils)
/tests-sdk Integration tests (vitest, @solana/web3.js v1)
/scripts Build/deploy automation
/audits Audit reports
/no-padding Custom NoPadding derive macro
/assertions Custom assertion helpers
cargo build-sbfcargo testcd program && shank idl -o . --out-filename idl.json -p FLb7fyAtkfA4TSa2uYcAT8QKHd2pkoMHgmqfnXFXo7aocd sdk/solita-client && node generate.mjsThe generate.mjs script reads the Shank IDL, enriches it with accounts/errors/types, and runs Solita to produce TypeScript code in src/generated/.
# Terminal 1: Start local validator with program loaded
cd tests-sdk && npm run validator:start
# Terminal 2: Run all 56 tests
cd tests-sdk && npm testcd tests-sdk && npm run benchmarkMeasures CU usage and transaction sizes for all instructions, including deferred execution (Authorize TX1 + ExecuteDeferred TX2).
./scripts/sync-program-id.sh <NEW_PROGRAM_ID>cargo build-sbf
solana program deploy target/deploy/lazorkit_program.so -u d- 429 Too Many Requests: Check RPC credits or use local validator.
- Already Initialized: Use fresh userSeed or reset validator with
--reset. - InvalidSeeds: Verify PDA derivation matches on-chain seeds.
- 0xbc0 (InvalidSessionDuration): expires_at must be a future slot, not Unix timestamp.