Hello, I hope it’s okay to respond on such an old guide!
I tried this out and it worked great for any tokens, but failed every time for ETH. Is it possible to do the same thing with ETH directly? I want to be able to send ETH and any tokens to MyContract.sol via the contract address, then be able to call withdraw and withdraw ETH or a token of my choosing.
That makes sense, but I’m unable to send ETH to it directly as well (i.e. just sending ETH to the contract address will always return Out of Gas, while sending ERC20 tokens to it works fine).
I think I’m approaching this wrong anyways, as I’ve read in other posts about the non-uniformity between ETH and tokens and how there’s no real solution just yet to gracefully handle both. Thank you!