Skip to content

feat: add initialize, admin, and payment_token entry points#625

Merged
yusuftomilola merged 1 commit intoDistinctCodes:mainfrom
phertyameen:feat/admin_payment_token
Mar 7, 2026
Merged

feat: add initialize, admin, and payment_token entry points#625
yusuftomilola merged 1 commit intoDistinctCodes:mainfrom
phertyameen:feat/admin_payment_token

Conversation

@phertyameen
Copy link
Contributor

Closes #599

Summary

Implements the one-time initialize entry point and two public query
functions on top of the Issue #598 scaffold.

Changes

  • initialize(env, admin, payment_token) — guards against double-init,
    requires admin auth, writes both addresses to instance storage, and
    emits an init event
  • admin(env) — delegates to Self::get_admin(&env)
  • payment_token(env) — delegates to Self::get_payment_token(&env)

Acceptance Criteria

  • cargo check -p workspace_booking passes
  • cargo clippy -p workspace_booking -- -D warnings passes
  • Double initialize panics with Error(Contract, #3)
  • admin() returns the address passed to initialize
  • payment_token() returns the token address passed to initialize
  • init event is emitted on successful initialization

@vercel
Copy link

vercel bot commented Mar 6, 2026

@phertyameen is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@yusuftomilola yusuftomilola merged commit 1995d1b into DistinctCodes:main Mar 7, 2026
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue #2 — Contract Initialization & Admin Queries

2 participants