## Overview Write a comprehensive test suite for the `referral` contract in `src/test.rs`. Work inside `contracts/sandbox/referral/`. ## Acceptance Criteria - [ ] Test: `register_code` creates code and rejects duplicates - [ ] Test: `use_referral_code` links referee and increments usage count - [ ] Test: `use_referral_code` rejects self-referral - [ ] Test: `use_referral_code` rejects already-referred address - [ ] Test: `pay_referral_reward` sends token to referrer and marks as paid - [ ] Test: reward cannot be paid twice for the same referral - [ ] All tests pass with `cargo test`
Overview
Write a comprehensive test suite for the
referralcontract insrc/test.rs. Work insidecontracts/sandbox/referral/.Acceptance Criteria
register_codecreates code and rejects duplicatesuse_referral_codelinks referee and increments usage countuse_referral_coderejects self-referraluse_referral_coderejects already-referred addresspay_referral_rewardsends token to referrer and marks as paidcargo test