ticketly is an Anchor-based Solana program for event ticketing with:
- event creation and management
- primary ticket minting
- gate check-in and operator controls
- whitelist allocations
- secondary marketplace listing/buy/cancel
- optional POAP minting for checked-in attendees
| Network | Program ID |
|---|---|
| devnet | GawjtcQFx5cnK24VrDiUhGdg4DZbVGLzsSsd4vbxznfs |
| mainnet | TBD |
ticketly/
├─ README.md
├─ ARCHITECTURE.md
└─ ticketly/
├─ Anchor.toml
├─ Cargo.toml
├─ package.json
├─ migrations/
├─ programs/
│ └─ ticketly/
│ └─ src/
│ ├─ lib.rs
│ ├─ constants.rs
│ ├─ errors.rs
│ ├─ events.rs
│ ├─ security.rs
│ ├─ contexts/
│ ├─ instructions/
│ ├─ state/
│ └─ utils/
└─ tests/
└─ ticketly.ts
- Rust + Anchor (
0.32.1) - Solana programs (
cdylib) - TypeScript integration tests (
ts-mocha+chai) - SPL Token + Associated Token Account + Metaplex metadata CPI support
- Initialize/update protocol platform config (admin, fee bps, receiver, pause flag)
- Initialize/update organizer profile
- Create event with tier configuration and validation
- Update event metadata and policy fields
- Cancel event (blocked once check-ins exist)
- Withdraw primary-sale SOL from event PDA
- Mint NFT-like ticket (1 token) per purchase
- Track tier index/type, owner, payment, and lifecycle state
- Transfer ticket peer-to-peer
- Add/remove gate operators per event
- Add/remove whitelist entries with allocation limits
- Enforce check-in window and operator authority
- List ticket into escrow ATA
- Buy listed ticket with royalty split
- Cancel listing and reclaim token
- Mint POAP for checked-in ticket holder when enabled
See ARCHITECTURE.md for full details.
Key account model (PDAs):
platform:["platform"]organizer:["organizer", authority]event:["event", authority, event_id_le]ticket:["ticket", event, ticket_number_le]ticket_mint:["ticket_mint", ticket]listing:["listing", ticket]poap:["poap", ticket]poap_mint:["poap_mint", ticket]whitelist:["whitelist", event, wallet]
Install:
- Rust toolchain (stable)
- Solana CLI
- Anchor CLI
0.32.1 - Node.js (LTS recommended)
- Yarn
1.x
Suggested verification:
rustc --version
cargo --version
solana --version
anchor --version
node --version
yarn --versionFrom repository root:
cd ticketly
yarn install
anchor buildGenerate/update IDL + TS types:
anchor buildArtifacts are produced under:
target/idl/target/types/
Current Anchor.toml points provider to devnet:
[provider] cluster = "devnet"
For local development/tests you can either:
- keep default
anchor testflow (starts local validator), or - reuse a running validator with:
anchor test --skip-local-validatorIf local validator port conflicts occur (8899 already in use), use --skip-local-validator or stop stale validator processes.
cd ticketly
anchor buildanchor deployanchor testor (when validator is already running):
anchor test --skip-local-validatorCurrent suite file:
ticketly/tests/ticketly.ts
cd ticketly
yarn lint
yarn lint:fixEntrypoints exposed in lib.rs:
init_platform,update_platforminit_organizer,update_organizercreate_event,update_event,cancel_eventwithdraw_revenueadd_operator,remove_operatoradd_whitelist_entry,remove_whitelist_entrymint_ticket,transfer_ticket,check_in_ticketmint_poaplist_ticket,buy_ticket,cancel_listing
- authority checks for event-admin and gate operations
- event lifecycle checks (active/cancelled)
- timing checks (future start on create, check-in grace window)
- tier bounds and sale-window checks
- whitelist gating and allocation enforcement
- resale cap and royalty constraints
- safe arithmetic guards for lamport math
Representative events:
EventCreated,EventUpdated,EventCancelledTicketMinted,TicketTransferred,TicketCheckedInTicketListed,TicketSold,ListingCancelledOperatorAdded,OperatorRemovedWhitelistEntryAdded,WhitelistEntryRemovedRevenueWithdrawn,PoapMinted
During TS tests you may see Node warnings such as:
MODULE_TYPELESS_PACKAGE_JSONDEP0040 punycode
These are runtime/tooling warnings and do not indicate Solana program logic failure.
- Run with
anchor test --skip-local-validator, or - terminate stale validator and rerun tests.
- prefer fresh local validator, or
- run deterministic test setup and avoid stale PDA assumptions.
- if metadata program is unavailable/non-executable locally, core ticket flows can still be validated depending on current program handling.
anchor buildanchor test --skip-local-validator(when validator is already running)- review emitted logs/events
- update IDL/types via rebuild
- rerun full suite before commit
Build with ❤️ for solana