Last active
September 28, 2021 16:44
-
-
Save grampabacon/b8ce4e11cca850955fd9d988270ec945 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function walletOfOwner(address _owner) public view returns(uint256[] memory) { | |
uint256 tokenCount = balanceOf(_owner); | |
uint256[] memory tokensId = new uint256[](tokenCount); | |
for(uint256 i; i < tokenCount; i++) { | |
tokensId[i] = tokenOfOwnerByIndex(_owner, i); | |
} | |
return tokensId; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment