mirror of
https://github.com/logos-co/logos-scaffold.git
synced 2026-08-27 10:51:16 +00:00
LEZ Framework Template
This project was generated with:
logos-scaffold new <name> --template lez-framework
It uses the LEZ Framework for an ergonomic developer experience similar to Anchor on Solana:
#[lez_program]macro eliminates boilerplate#[instruction]attribute marks instruction handlers#[account(...)]annotations for account constraints and PDA derivation- Compile-time IDL generation via
PROGRAM_IDL_JSON
First-Time Setup
logos-scaffold setup
logos-scaffold localnet start
logos-scaffold doctor
Build
logos-scaffold build
IDL
logos-scaffold build idl
Diagnostics Bundle
logos-scaffold report [--out PATH] [--tail N]
Inspect the generated archive before attaching it to public issues.
Project Structure
- Program:
methods/guest/src/bin/lez_counter.rs - Generated IDL:
idl/lez_counter.json - Runner:
src/bin/run_lez_counter.rs
Writing Programs
#[lez_program]
mod my_program {
#[instruction]
pub fn my_handler(
#[account(init, pda = literal("state"))]
state: AccountWithMetadata,
#[account(signer)]
authority: AccountWithMetadata,
) -> LezResult {
// your logic here
}
}