ETH value is always 0 - How to Build Serverless Dapps

You could try to get the balance this way from console:

let balance = await web3.eth.getBalance(CONTRACT_ADDRESS);

This balance value is increasing every with every roll, so that’s good. It looks like the problem is with user not getting the ETH back after winning.

You can print user balance and contract balance before and after receiving win/lose event, it may not be easy to notice the increase or decrease when user has a huge number in WEI

1 Like

I get it now, thanks a lot for help and patience :sweat_smile: