title: Is it possible to transfer tokens to account declared in remaining accounts?
body: <p>Try to transfer tokens to one of the account declared in <code>remaining_accounts</code> list.</p>
  <p>Here's the way I create CpiContext:</p>
  <pre class="lang-rust prettyprint-override"><code>let cpi_context = CpiContext::new(ctx.accounts.token_program.to_account_info(), 
      Transfer {
          from: ctx.accounts.account_x.to_account_info(),
          to: ctx.remaining_accounts.first().unwrap().to_account_info(),
          authority: ctx.accounts.owner.to_account_info().clone()
    });
  </code></pre>
  <p>I got error related to <code>CpiContext</code> lifetime mismatch. Exact log error: <code>lifetime mismatch ...but data from ctx flows into ctx here</code>.</p>
  <p>Why I want to use remaining accounts to transfer tokens? This transfer is optional depending on whether user decides to pass the account (referral links/affiliation). Other methods than passing account as remaining accounts to implement the optional transfer will be also highly appreciated.</p>