Open Z-Hau opened 3 years ago
is this only for testnet?
I've experienced same on mainnet as well, swapped into ETH.MAINNET().contractAddress
and got WETH back!
Can you give me a code sample so I can test this please. You should not get WETH using ETH logic like that and that would be something we should fix ASAP. ETH > WETH is supported on mainnet on this lib. A demo project on GitHub would be great. @vm06007
@joshstevens19 it looks like the route-path is not generated correctly, here is the output of trade object after it is created
so despite the toToken is NO_CONTRACT_ADDRESS
I'm still getting WETH swap, and not swapExactTokensForETH
as expected
I can't share code, but it is straight forward just making pairFactory and then setting .trade(value);
following by
const signer = library.getSigner(account); await signer.sendTransaction(trade.transaction);
if I can help somehow to resolve this let me know, happy to assist, meanwhile really cool package, sent you some dai: https://etherscan.io/tx/0x7f12891d19597ea32a419f932281f8ea228f244fed2f02a79ed649d1c4971908
Ahh nice spot ok will check this out tomorrow thanks a lot for your donation means a lot! Thanks for raising this issue 👍👍👍
So this is not part of this ticket but that is now fixed on version 3.4.2 for you @vm06007 great spot!! it now uses multicall to unwrap the weth for you so you get eth back now. I have tested this on rinkeby + mainnet both on input and output and seems to work fine. Let me know its all good your end and thanks again for raising.
In terms of unwrap and wrap eth on testnets should be pretty simple for me to add now I've done the changes for this so will look at that when I get a second as the ticket is quite old.
Okay cool! I'll upgrade, test it out and let you know
awesome this issue was only happening on v3 not v2 it seemed this was just an oversight from me that I forgot to unwrap it once the swap had done (after i refactored to allow native and weth to be separate things) yeah do let me know. Thanks again
looks good! tried on ropsten https://ropsten.etherscan.io/tx/0x21452ea2d7e895b2fb0b7a0fb993fa56af896210df397542b3676e72e45dee2f will give it a bit more testing on mainnet tomorrow.
Awesome!!!
All looks good! @joshstevens19 I've tried to send you another 0.05 ETH, but I think I've forgot one 0
https://etherscan.io/tx/0x6bf2ba27226061d09ddc680a9669fc7257812f71388faedd702f27baada38529
could you send it back to same wallet please? 😇
Haha!! Oh gosh @vm06007 thanks for the donation!! Yes you defo added a forgot a 0 haha il send it back to you once back on a computer later today, back to the same address yeah?
thanks again for your donation your a legend!!!!!
yeah :) same should be fine (0x6dbc5fbb69d43442a5bec07e18037896b1e2ef6d)
Sure will do this once back on PC (will be today) will send tx etherscan link once done. Thanks again for 0.05 ETH donation 👍
@vm06007 https://etherscan.io/tx/0xe0da6b719b9581af448ba2b56f99d0ef02467bc1da8c3fb019e5089aebfb63b8 < sent 0.45 ETH back! thanks again for the 0.05 donation! 👍
Unable to perform ETH > WETH and WETH > ETH on Testnet.