Open
Description
It might be nit, but you define _balances
in your ERC1155
implementation accordingly:
mapping(uint256 id => mapping(address account => uint256)) private _balances;
but the balanceOf
function uses the (switched) EIP-1155-compliant way as function arguments:
function balanceOf(address account, uint256 id) public view virtual returns (uint256) {
return _balances[id][account];
}
I would propose to change _balances
to:
mapping(address account => mapping(uint256 id => uint256)) private _balances;
in order to avoid confusion and to keep consistency with the balanceOf
function. My guess, why it has been implemented like this in OZ, is the official EIP implementation here.