In ERC20 standard, _allowed is defined as:
mapping (address => mapping (address => uint256)) private _allowed;
and the getter function is defined as:
function allowance(address owner, address spender) public view returns (uint256) {
return _allowed[owner][spender];
}
I'm testing the function, and calling allowance(address1, address2) I receive 0. Why is that happening? The keys address1, and address2 were not initialized in _allowed.
I was expecting a KeyError, like in another languages, (python, etc.).