I've looked through all answers here but still have the question for the latest version of Solidity.
Perhaps, there exist new libraries
Is it possible to optimize this
mapping(address => uint) balances; mapping(address => bool) staked;
Into just one mapping but with the function to check if an address ever staked at this moment? Using Solidity version 0.7.5