I am learning a bit more about Web3 and have created a small project in nodejs where I want to sell a BSC token for BNB. However, when I use the swapExactTokensForETHSupportingFeeOnTransferTokens function as seen below I get an error message that the buildTransaction method is missing.
- Where can I get that and where do I define it? Should it go into the ABI?
Any help on this would really be much appreciated. I am missing something here and have been trying to find an answer for my question all over the internet but canāt find anything relevant.
Thanks a lot for any pointers,
Marcus
pancakeswap2_txn = contract.functions.swapExactTokensForETHSupportingFeeOnTransferTokens(
500000000, 0,
[spending_this_token,buying_this_token],
your_wallet_address,
deadline
).buildTransaction({
'from': your_wallet_address,
// 'gasPrice': web3.toWei('20','gwei'),
'gasPrice': Web3Client.utils.toWei('20','gwei'),
'gasLimit': estimate,
'nonce': nonce,
})
The error message I get per below:
TypeError: contract.functions.swapExactTokensForETHSupportingFeeOnTransferTokens(ā¦).buildTransaction is not a function