From d5308ee76b047e0db0bc8e6741e52d942e20b660 Mon Sep 17 00:00:00 2001 From: cygaar Date: Mon, 13 Jun 2022 13:01:57 -0700 Subject: [PATCH] Use pointer --- contracts/ERC721A.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/ERC721A.sol b/contracts/ERC721A.sol index 46f4e500..fe38b9be 100644 --- a/contracts/ERC721A.sol +++ b/contracts/ERC721A.sol @@ -508,9 +508,10 @@ contract ERC721A is IERC721A { * @dev Zeroes out _tokenApprovals[tokenId] */ function deleteTokenApproval(uint256 tokenId) private { + mapping(uint256 => address) storage tokenApprovalPtr = _tokenApprovals; assembly { mstore(0, tokenId) - mstore(32, _tokenApprovals.slot) + mstore(32, tokenApprovalPtr.slot) let hash := keccak256(0, 64) sstore(hash, 0) }