Skip to content

Commit

Permalink
Use hex values
Browse files Browse the repository at this point in the history
  • Loading branch information
cygaar committed Jun 13, 2022
1 parent d5308ee commit 1821eeb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions contracts/ERC721A.sol
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,11 @@ contract ERC721A is IERC721A {
/**
* @dev Zeroes out _tokenApprovals[tokenId]
*/
function deleteTokenApproval(uint256 tokenId) private {
function _deleteTokenApproval(uint256 tokenId) private {
mapping(uint256 => address) storage tokenApprovalPtr = _tokenApprovals;
assembly {
mstore(0, tokenId)
mstore(32, tokenApprovalPtr.slot)
mstore(0x00, tokenId)
mstore(0x20, tokenApprovalPtr.slot)
let hash := keccak256(0, 64)
sstore(hash, 0)
}
Expand Down Expand Up @@ -549,7 +549,7 @@ contract ERC721A is IERC721A {

// Clear approvals from the previous owner.
if (_addressToUint256(approvedAddress) != 0) {
deleteTokenApproval(tokenId);
_deleteTokenApproval(tokenId);
}

// Underflow of the sender's balance is impossible because we check for
Expand Down Expand Up @@ -623,7 +623,7 @@ contract ERC721A is IERC721A {

// Clear approvals from the previous owner.
if (_addressToUint256(approvedAddress) != 0) {
deleteTokenApproval(tokenId);
_deleteTokenApproval(tokenId);
}

// Underflow of the sender's balance is impossible because we check for
Expand Down

0 comments on commit 1821eeb

Please sign in to comment.