solana-py icon indicating copy to clipboard operation
solana-py copied to clipboard

TokenClient.transfer ignores the constructor's payer argument

Open max-block opened this issue 3 years ago • 1 comments

I'm trying to transfer spl token from acc1 to acc2 using a payer as a totally different account acc3.

So, I have a token client: client = Token(...., payer=acc3). When I call client.transfer() it fails with: {'code': -32002, 'message': 'Transaction simulation failed: Attempt to debit an account but found no record of a prior credit.', 'data': {'accounts': None, 'err': 'AccountNotFound', 'logs': []}}

I'm absolutely sure that acc3 has enoch SOL.

P.S. The problem only with transfer method. TokenClient.create_account works fine, it uses payer=acc3 as a payer.

max-block avatar Nov 22 '21 09:11 max-block

For me even tokenclient.create_account results in this same issue. Using mainnet and have SOL to cover any fees

ZenRepublic avatar Jul 29 '22 12:07 ZenRepublic