pub fn transfer_referral_code(
ctx: Context<'_, '_, '_, '_, TransferReferralCode<'_>>,
) -> Result<()>Expand description
Transfer referral code.
§Accounts
See the documentation for the accounts.
§Errors
- The
ownermust be a signer. - The
storemust be properly initialized. - The
useraccount must be:- Properly initialized
- Correspond to the
owner - Different from the
receiver_user
- The
referral_codeaccount must be:- Properly initialized
- Owned by the
store - Correspond to the
owner
- The
receiver_useraccount must be:- Properly initialized
- Not have an associated referral code