Allow to override tradePath
See original GitHub issueI’m trying to execute trades from WETH -> other tokens, and I really want to use the WETH that the account already owns.
It seems that the automatic getTradePath then always makes the transaction between unwrapped ETH -> token. For my purpose it would be great if the tokenpair (or createFactory) has an optional parameter to force the tradepath to stay erc20ToErc20
even though one of the tokens is WETH.
Issue Analytics
- State:
- Created 2 years ago
- Comments:37 (22 by maintainers)
Top Results From Across the Web
SnosMe/awakened-poe-trade: Path of Exile ...
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may...
Read more >The USMCA Inflection Point: Plotting a Course for Free Trade ...
Where the marking rules were more stringent than the rules of origin, importers could claim the “NAFTA preference override” to allow a NAFTA ......
Read more >TradeRoute HL Series Operation Manual Rev C
Do not allow minors (children) or inexperienced persons to operate this unit. ... pick up “skip” type containers and print weight ticket of ......
Read more >The factors that led the Red Sox down this Mookie Betts ...
The titles allow the Red Sox rightfully to ask this question: How ... The factors that led the Red Sox down this Mookie...
Read more >Path To Washington Contracts For Scherff? Or Allen?
Morgan Moses Trade: Path To Washington Contracts For Scherff? Or Allen? Morgan Moses is on his way out of Ashburn, but could the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
yes so any testnets default to direct routes it doesn’t try to go down many routes… (aka basically it uses
disableMultihops
in the background on anything but MAINNET) and as right now you cant do ETH > WETH directly it say that! As said its on list for direct swap just not had time to relook yetHey, guys just a heads up tomorrow I’m going to look at a nicer way to handle
useWETHAsERC20Route
flag, I want to create a NATIVE_ETH property you pass in instead of the WETH logic (similar to what @mathijs81) was suggesting, if you want native and if you want WETH you pass in WETH contract address, this way it’s a very clear interface for devs to know how to make it work with both native + WETH.I think I will also remove this flag as this approach seems a bit backwards (and confusing) once we clear up the way you work with native and weth in the sdk.
This is mainly due to the ability to swap WETH > ETH and the other way around, right now the library with the current approach does not support that logic, which it should!
This will also clear up the confusing @mathijs81 talked about where you get WETH balances in ETH and the other way round. So just a heads up if you do see it break on an npm install circle back to this thread. I will include the breaking changing details here and bump it to 3.0.0 once it’s done!
Due to the way the docs suggest people use it aka using
WETH..
I will probably depreciate WETH static class and make it point to NATIVE_ETH and then create a new WETH_CONTRACT class, I have not worked out full details yet but wanted to let you guys know.Thanks