I have the following functions
function balance() public view returns(uint152) {
return uint152(IERC20(token).balanceOf(address(this)));
}
function balance1() public view returns(IERC20) {
return IERC20(token);
}
The first one throws the error mentioned in the title, but the second one works just fine. Can you please help me understand, why does the function needs to be payable when I'm just checking the balance of a certain token. Thank you.