I'm designing a forwarder wallet contract, user will deposit ERC/BEP-20 tokens and i will collect them back to a central wallet by calling my contract's function which will simply make a transfer of tokens from the forwarder wallet to my central wallet.
I need to predict the gas needed to run the function, same function call in goerli takes different gas each time:
Same goes for the mainnet:
I'm estimating the gasPrice based on last few blocks, but still stuck to estimate the gas for a simple transfer function.
Please advise