depositEth function


Hello guys, I followed each and every video of Philip, but I couldn’t see where is “depositEth” function. This is in the “Smart Contract 201” course and in the final project. Thank you.

Hi @jieunpro

Also answered in the previous question.
depositETH was mentioned in the Assignment Limit order test , probably because it is a simple function. Here is how it looks. You can add it in your dex contract. That should fix the errors related to depositETH.

function depositETH() payable public {
        balances[msg.sender]["ETH"] = balances[msg.sender]["ETH"].add(msg.value); 
    }

Got it. Thank you so much for your answer. Have a good day!

1 Like