Commit 13e113df by Nicolás Venturo

Improve usage of toString

parent cca71ab7
...@@ -21,6 +21,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable ...@@ -21,6 +21,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable
using Address for address; using Address for address;
using EnumerableSet for EnumerableSet.UintSet; using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap; using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`
...@@ -153,7 +154,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable ...@@ -153,7 +154,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable
return string(abi.encodePacked(_baseURI, _tokenURI)); return string(abi.encodePacked(_baseURI, _tokenURI));
} }
// If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI. // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.
return string(abi.encodePacked(_baseURI, Strings.toString(tokenId))); return string(abi.encodePacked(_baseURI, tokenId.toString()));
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment