hi guys, can anyone help me to know why this function returns error out of gas?
When I try to withdraw WETH -> ETH from my wallet it works fine.
but when i send WETH to the contract and try to do the same i get out of gas error, anyone know why is it?

tx: https://goerli.etherscan.io/tx/0xb353f732a608d939474625c9fa9f324399e72d46c6d7407e1a1e1a124a70e64a

tenderly for debug
https://dashboard.tenderly.co/tx/goerli/0xb353f732a608d939474625c9fa9f324399e72d46c6d7407e1a1e1a124a70e64a

Feb 9, 2023, 9:11 PM
does you contract has receive() external payable?
also WETH use .transfer
which is capped to 2300 so it can't send to a contract because go out of gas
Feb 9, 2023, 9:17 PM
Yes, and works fine when user send eth, but receiver don't be triggered when send weth, this is the reason because I'm need call this funcion for unwrap the weth to eth
Feb 9, 2023, 9:20 PM
yes it is for the reason I said before
.
Feb 9, 2023, 9:21 PM
Okay, yes I'm saw this on tenderly debugger, show gas used 2300, gas left 2300 and fail
Okay, now I'm understand the problem, thanks man, there are any solution?
Feb 9, 2023, 9:22 PM
probably 😂
🤔🤔
still confused
Feb 9, 2023, 9:28 PM
Okay, i will try, thanks very much guys :)
Yes, make sense
Okay, thanks very much bro ❤️❤️
Feb 9, 2023, 9:35 PM
WETH uses transfer() inside withdraw() function
missed that part my bad
but I am not sure it is fine anyway
Feb 9, 2023, 10:14 PM

© 2024 Draquery.com All rights reserved.