Here the transfer is made by the signer directly, if your "from account" is owned by a PDA, then transfer seeds would need to be provided.
```rust let cpicontext = CpiContext::new( buddylinkprogram.toaccountinfo(), buddylink::cpi::TransferCheckedGlobalOnlyReward { buddylinkprogram: buddylinkprogram.toaccountinfo(), authority: authority.toaccountinfo(), systemprogram: None, mint: Some(mint.toaccountinfo()), tokenprogram: Some(tokenprogram.toaccountinfo()), fromtokenaccount: Some(usertokenaccount.toaccountinfo()), referrertokenaccount: Some(remainingaccounts[0].toaccountinfo()), globalreferrertreasury: referrertreasury.toaccountinfo(), globalreferrertreasuryforreward: referrertreasuryforreward.toaccountinfo(), refereebuddyprofile: buddyprofile.toaccountinfo(), refereebuddy: buddy.toaccountinfo(), }, );
buddylink::cpi::transfercheckedglobalonlyreward( cpicontext, amount_referral, & [], ); ```
Here the transfer is made by the signer directly, if your "from account" is owned by a PDA, then transfer seeds would need to be provided.
```rust let cpicontext = CpiContext::new( buddylinkprogram.toaccountinfo(), buddylink::cpi::TransferCheckedGlobalOnlyReward { buddylinkprogram: buddylinkprogram.toaccountinfo(), authority: authority.toaccountinfo(), systemprogram: Some(systemprogram.toaccountinfo()), mint: None, tokenprogram: None, fromtokenaccount: None, referrertokenaccount: None, globalreferrertreasury: referrertreasury.toaccountinfo(), globalreferrertreasuryforreward: referrertreasuryforreward.toaccountinfo(), refereebuddyprofile: buddyprofile.toaccountinfo(), refereebuddy: buddy.toaccount_info(), }, );
buddylink::cpi::transfercheckedglobalonlyreward( cpicontext, amount_referral, &[], ) ```