Hey guys,

when buying tokens on Uniswap my first 3-6 transactions fail and I lose gas. I researched on internet and it said it happens because automatically set gasPrice and gasLimit is too low for tokens that just launched and transaction fails.

I thought of writing program using ethers.js to set my custom gasPrice and gasLimit. My idea was to set gasPrice to 2x gasPrice of last block and some custom gasLimit (about 250000).

Have anyone tried such thing, does transaction succedes at first after increasing gasLimit and gasPrice and do you have any tips to optimize gasPrice and gasLimit even more?

Jun 7, 2022, 8:22 AM

© 2024 Draquery.com All rights reserved.