-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a getter for an array of tokens held by an owner #1512
Comments
I think we could add an internal function in function _tokensOfOwner(address owner) internal view returns (uint256[] storage) {
return _ownedTokens[owner];
} |
Thank you! Will wait for this feature. |
Isn't this a duplicate of #1102? |
Hm, that issue is about an external interface, this one is about an internal one for extension purposes. |
shouldn't |
@Aniket-Engg I think it should be |
* signing prefix added * Minor improvement * Tests changed * Successfully tested * Minor improvements * Minor improvements * Revert "Dangling commas are now required. (#1359)" This reverts commit a688977. * updates * fixes #1404 * approve failing test * suggested changes done * ISafeERC20 removed * conflict fixes * fixes #1512 * Update test/token/ERC721/ERC721Full.test.js Co-Authored-By: Aniket-Engg <30843294+Aniket-Engg@users.noreply.github.com>
For some reason this was removed on bd07784 |
not work TypeError: Return argument type mapping(uint256 => uint256) is not implicitly convertible to expected type (type of first return variable) uint256[] storage pointer. |
Problem
I want to inherit
ERC721Full.sol
contract and add an extra getter for an array of tokens held by a given user.Expected behaviour
In previous versions it was possible by adding an extra function and accessing an
internal
_ownedTokens
mapping:Current behaviour
In version 2.x it is impossible to access a
private
_ownedTokens
mapping.The text was updated successfully, but these errors were encountered: