function tradeInputByTargetAmount(Token sourceToken, Token targetToken, uint256 targetAmount)
external view validTokensForTrade(sourceToken, targetToken) greaterThanZero(targetAmount)
This function is used to determine how many source tokens need to be swapped to receive a specific number of target tokens.
For example, this could be used to determine how many ETH would be required to swap for 1000 LINK.
This function returns the number of source tokens required to be swapped to receive a specific number of target tokens.