I'm trying to swap a pair not having wbnb on pancakeswap. For ex. BUSD -> LUNA. As far as the pair doesn't have wbnb I use swapExactTokensForTokens (meanwhile WBNB -> BUSD with swapExactETHForTokens works well)
Preparing transaction call and trying to estimate gas beforehand, but it fails with
web3.exceptions.ContractLogicError: execution reverted
build function..
func = self._router_contract.functions.swapExactTokensForTokens( <= self._router_contract - pancake router2
20000000000000000, <= amount_min
79925366079999995746, <= amount_out_min
['0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56', '0x55d398326f99059fF775485246999027B3197955', '0x156ab3346823B651294766e23e6Cf87254d68962'], <= path BUSD->USDT->LUNA
self._settings.self_address, <= my wallet
1652635609, <= deadline
)
Вот сама оценка газа
func.estimateGas(
{
"from": self._settings.self_address,
"value": amount_min,
"gas_price": gas_price,
}
)
Digging for many hours, but no success(