I'm trying to send some USDT (BEP20) from a wallet to another wallet. But always getting the same error. Warning! Error encountered during contract execution [out of gas] The Transaction on BSCscan: 0xa224a5757494cc173de7a23eb9914c5750e57a7b95c30cc70fb81034395b9266 https://bscscan.com/tx/0xa224a5757494cc173de7a23eb9914c5750e57a7b95c30cc70fb81034395b9266
I have BNB in the sender wallet.
From wallet address: 0x373bd209104ac808a22fb1d7e8094aa62d11209f To wallet address: 0x4Cd0c1A9142A0a33C18789942A481373f6E14358
The error received:
TransactionRevertedWithoutReasonError: Transaction has been reverted by the EVM:
{"type":"0","from":"0x373bd209104ac808a22fb1d7e8094aa62d11209f","to":"0x55d398326f99059ff775485246999027b3197955","status":"0","cumulativeGasUsed":"3508488","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","logs":[],"transactionHash":"0xa224a5757494cc173de7a23eb9914c5750e57a7b95c30cc70fb81034395b9266","gasUsed":"51043","blockHash":"0x57d1e55f1caed746496393585c8b0127e174454953a742e943e411603838cd99","blockNumber":"30938532","transactionIndex":"50","effectiveGasPrice":"3000000000"}
at /usr/src/app/node_modules/web3-eth/lib/commonjs/utils/get_transaction_error.js:45:21
at Generator.next (<anonymous>)
at /usr/src/app/node_modules/web3-eth/lib/commonjs/utils/get_transaction_error.js:24:71
at new Promise (<anonymous>)
at __awaiter (/usr/src/app/node_modules/web3-eth/lib/commonjs/utils/get_transaction_error.js:20:12)
at getTransactionError (/usr/src/app/node_modules/web3-eth/lib/commonjs/utils/get_transaction_error.js:33:12)
at /usr/src/app/node_modules/web3-eth/lib/commonjs/rpc_method_wrappers.js:381:96
at Generator.next (<anonymous>)
at fulfilled (/usr/src/app/node_modules/web3-eth/lib/commonjs/rpc_method_wrappers.js:21:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
innerError: undefined,
receipt: {
type: 0n,
from: '0x373bd209104ac808a22fb1d7e8094aa62d11209f',
to: '0x55d398326f99059ff775485246999027b3197955',
status: 0n,
cumulativeGasUsed: 3508488n,
logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
logs: [],
transactionHash: '0xa224a5757494cc173de7a23eb9914c5750e57a7b95c30cc70fb81034395b9266',
gasUsed: 51043n,
blockHash: '0x57d1e55f1caed746496393585c8b0127e174454953a742e943e411603838cd99',
blockNumber: 30938532n,
transactionIndex: 50n,
effectiveGasPrice: 3000000000n
},
code: 405
}
const web3 = new Web3('https://bsc-dataseed1.binance.org:443');
let contract = new web3.eth.Contract(config.contractABI, config.contractUSDT, {
from: fromAddress
})
web3.eth.accounts.wallet.add(fromPrivKey);
let resultTransfer = await contract.methods.transfer(toAddress, usdtAmount.toString()).send({
gas: gasLimit,
gasPrice: gasP
});```