virtual 1155.balanceOf function
spengrah opened this issue · 1 comments
spengrah commented
Currently, the 1155 implementation relies on solc to generate a balanceOf getter function from the public balanceOf
mapping, which means that the resulting getter cannot be overriden by contracts inheriting from 1155.
However, balanceOfBatch()
is a virtual function, creating a disparity between the two methods of reading balances.
Please consider:
- Adding a virtual
balanceOf
function
function balanceOf(address owner, uint256 id) public view virtual returns (uint256 balance) {
balance = balanceOf[owner][id];
}
- Marking
balanceOf
mapping private to avoid declaring a duplicate identifier
transmissions11 commented
thanks for the issue and PR, but sadly this is not something im interested in including at this time