Lesson 13: Conversion from ETH to WETH failed #5783
-
Hello, I'm at lesson 13 and Patrick shows how to use etherscan to convert ETH to WETH. And I have found this contract for sepolia testnet: https://sepolia.etherscan.io/token/0x7b79995e5f793a07bc00c21412e50ecae098e7f9#writeContract But when I try to convert 0.05 or 0.1 ETH to WETH, the transaction fails always. And this is the message: Do you know how to resolve this problem or how to convert ETH to WETH for sepolia testnet? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
As far as I can see here you are calling In order to buy WETH from this contract first use After transaction pass just import this token addres into your metamask wallet "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9" |
Beta Was this translation helpful? Give feedback.
Hi @software-dev2010
As far as I can see here you are calling
withdraw
function. It wont work for you as you are probably do not have anything to withdraw. To use withdraw function first you need to usedeposit
function and all of it will be in ETH, no converting included.In order to buy WETH from this contract first use
deposit
function and then simply calltransfer
function fill your wallet address and amount in WEI.After transaction pass just import this token addres into your metamask wallet "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9"