uint256 USDT;
uint256 BUSD;
}
mapping (address => Deposit) Deposits;
How I can check if key exists in mapping? Something like: if (!Deposits.hasOwnProperty(msg.sender)) {}
you cannot check the existence of something in a mapping, but you can check it's value. By default, all addresses are False in a mapping, you can use that like if(Deposits[user].BUSD > 0) {do things}
Обсуждают сегодня