Skip to content

[CT-38] Add referral query functions #802

@yusuftomilola

Description

@yusuftomilola

Overview

Add read-only query functions for referral history and reward status. Work inside contracts/sandbox/referral/.

Acceptance Criteria

  • get_code(env, code) -> Result<ReferralCode, Error> returns code details
  • get_referrer_code(env, referrer) -> Option<String> returns a referrer's own code
  • get_referral(env, referee) -> Option<Referral> returns who referred a given address
  • get_reward_amount(env) -> u128 returns the current configured reward
  • Code compiles with cargo build

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions