In 0.7.6 I want to check if a bytes array is equal to "" or not, but the compiler doesn't like
bytes fingerprint = "";
if(fingerprint!=""){
// do something
}
How do I check for this?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communitybytes is a dynamic array of byte, maybe you wanted to uses bytes32 instead ?
What is the difference between bytes and bytes32?
or just check the array length of that array.