|
@@ -25,9 +25,9 @@ mod token_proxy {
|
|
if let Some(token_program) = &ctx.accounts.token_program {
|
|
if let Some(token_program) = &ctx.accounts.token_program {
|
|
if let Some(mint) = &ctx.accounts.mint {
|
|
if let Some(mint) = &ctx.accounts.mint {
|
|
let cpi_accounts = TransferChecked {
|
|
let cpi_accounts = TransferChecked {
|
|
- from: ctx.accounts.from.to_account_info().clone(),
|
|
|
|
- mint: mint.to_account_info().clone(),
|
|
|
|
- to: ctx.accounts.to.to_account_info().clone(),
|
|
|
|
|
|
+ from: ctx.accounts.from.to_account_info(),
|
|
|
|
+ mint: mint.to_account_info(),
|
|
|
|
+ to: ctx.accounts.to.to_account_info(),
|
|
authority: ctx.accounts.authority.clone(),
|
|
authority: ctx.accounts.authority.clone(),
|
|
};
|
|
};
|
|
let cpi_program = token_program.to_account_info();
|
|
let cpi_program = token_program.to_account_info();
|
|
@@ -35,8 +35,8 @@ mod token_proxy {
|
|
token_interface::transfer_checked(cpi_context, amount, mint.decimals)
|
|
token_interface::transfer_checked(cpi_context, amount, mint.decimals)
|
|
} else {
|
|
} else {
|
|
let cpi_accounts = Transfer {
|
|
let cpi_accounts = Transfer {
|
|
- from: ctx.accounts.from.to_account_info().clone(),
|
|
|
|
- to: ctx.accounts.to.to_account_info().clone(),
|
|
|
|
|
|
+ from: ctx.accounts.from.to_account_info(),
|
|
|
|
+ to: ctx.accounts.to.to_account_info(),
|
|
authority: ctx.accounts.authority.clone(),
|
|
authority: ctx.accounts.authority.clone(),
|
|
};
|
|
};
|
|
let cpi_program = token_program.to_account_info();
|
|
let cpi_program = token_program.to_account_info();
|
|
@@ -208,8 +208,8 @@ impl<'a, 'b, 'c, 'info> From<&mut ProxyTransfer<'info>>
|
|
{
|
|
{
|
|
fn from(accounts: &mut ProxyTransfer<'info>) -> CpiContext<'a, 'b, 'c, 'info, Transfer<'info>> {
|
|
fn from(accounts: &mut ProxyTransfer<'info>) -> CpiContext<'a, 'b, 'c, 'info, Transfer<'info>> {
|
|
let cpi_accounts = Transfer {
|
|
let cpi_accounts = Transfer {
|
|
- from: accounts.from.to_account_info().clone(),
|
|
|
|
- to: accounts.to.to_account_info().clone(),
|
|
|
|
|
|
+ from: accounts.from.to_account_info(),
|
|
|
|
+ to: accounts.to.to_account_info(),
|
|
authority: accounts.authority.clone(),
|
|
authority: accounts.authority.clone(),
|
|
};
|
|
};
|
|
let cpi_program = accounts.token_program.to_account_info();
|
|
let cpi_program = accounts.token_program.to_account_info();
|
|
@@ -222,8 +222,8 @@ impl<'a, 'b, 'c, 'info> From<&mut ProxyMintTo<'info>>
|
|
{
|
|
{
|
|
fn from(accounts: &mut ProxyMintTo<'info>) -> CpiContext<'a, 'b, 'c, 'info, MintTo<'info>> {
|
|
fn from(accounts: &mut ProxyMintTo<'info>) -> CpiContext<'a, 'b, 'c, 'info, MintTo<'info>> {
|
|
let cpi_accounts = MintTo {
|
|
let cpi_accounts = MintTo {
|
|
- mint: accounts.mint.to_account_info().clone(),
|
|
|
|
- to: accounts.to.to_account_info().clone(),
|
|
|
|
|
|
+ mint: accounts.mint.to_account_info(),
|
|
|
|
+ to: accounts.to.to_account_info(),
|
|
authority: accounts.authority.clone(),
|
|
authority: accounts.authority.clone(),
|
|
};
|
|
};
|
|
let cpi_program = accounts.token_program.to_account_info();
|
|
let cpi_program = accounts.token_program.to_account_info();
|
|
@@ -234,8 +234,8 @@ impl<'a, 'b, 'c, 'info> From<&mut ProxyMintTo<'info>>
|
|
impl<'a, 'b, 'c, 'info> From<&mut ProxyBurn<'info>> for CpiContext<'a, 'b, 'c, 'info, Burn<'info>> {
|
|
impl<'a, 'b, 'c, 'info> From<&mut ProxyBurn<'info>> for CpiContext<'a, 'b, 'c, 'info, Burn<'info>> {
|
|
fn from(accounts: &mut ProxyBurn<'info>) -> CpiContext<'a, 'b, 'c, 'info, Burn<'info>> {
|
|
fn from(accounts: &mut ProxyBurn<'info>) -> CpiContext<'a, 'b, 'c, 'info, Burn<'info>> {
|
|
let cpi_accounts = Burn {
|
|
let cpi_accounts = Burn {
|
|
- mint: accounts.mint.to_account_info().clone(),
|
|
|
|
- from: accounts.from.to_account_info().clone(),
|
|
|
|
|
|
+ mint: accounts.mint.to_account_info(),
|
|
|
|
+ from: accounts.from.to_account_info(),
|
|
authority: accounts.authority.clone(),
|
|
authority: accounts.authority.clone(),
|
|
};
|
|
};
|
|
let cpi_program = accounts.token_program.to_account_info();
|
|
let cpi_program = accounts.token_program.to_account_info();
|