简体   繁体   中英

SendTransactionError: failed to send transaction: Transaction simulation failed: Attempt to debit an account but found no record of a prior credit

How to fix this Solana error?

throw new SendTransactionError( ^ SendTransactionError: failed to send transaction: Transaction simulation failed: Attempt to debit an account but found no record of a prior credit. at Connection.sendEncodedTransaction (C:\Users\Alisa'sTech\node_modules@solana\web3.js\src\connection.ts:4546:13) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Connection.sendRawTransaction (C:\Users\Alisa'sTech\node_modules@solana\web3.js\src\connection.ts:4505:20) at async Connection.sendTransaction (C:\Users\Alisa'sTech\node_modules@solana\web3.js\src\connection.ts:4493:12) at async Object.sendAndConfirmTransaction (C:\Users\Alisa'sTech\node_modules@solana\web3.js\src\util\send-and-confirm-transaction.ts:31:21) at async main (C:\Users\Alisa'sTech\Desktop\mpl\main.ts:63:18) { logs: [] }

The error says it all: "Attempt to debit an account but found no record of a prior credit."

This means that you're trying to move SOL from an account with no SOL. If you're on devnet / testnet / localnet, you can airdrop SOL directly to the account with solana airdrop 1 <ACCOUNT_PUBKEY> .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM