Skip to main content
1 of 3
sola24
  • 1.2k
  • 4
  • 21

how about a different approach to the test and what's returned which might be easier.

check for length and return true/false

here I'm just passing in a string or "" as a logic tester

function isDefault(string calldata _str) external pure returns (bool) {
    if(bytes(_str).length == 0) return true;
    return false;
}
sola24
  • 1.2k
  • 4
  • 21