The LibShortRecord::burnNFT()
emits an incorrect event value.
The burnNFT()
emits an incorrect event value: nft.owner
. Specifically, the nft
variable will point to the storage object specified by the tokenId
. However, the pointing storage object will be deleted before emitting the Transfer
event.
Subsequently, the ERC721::Transfer
event will be emitted with nft.owner
== address(0)
.
https://github.com/Cyfrin/2023-09-ditto/blob/a93b4276420a092913f43169a353a6198d3c21b9/contracts/libraries/LibShortRecord.sol#L366
https://github.com/Cyfrin/2023-09-ditto/blob/a93b4276420a092913f43169a353a6198d3c21b9/contracts/libraries/LibShortRecord.sol#L371
https://github.com/Cyfrin/2023-09-ditto/blob/a93b4276420a092913f43169a353a6198d3c21b9/contracts/libraries/LibShortRecord.sol#L374
The ERC721::Transfer
is an important event. The incorrect event logs may cause off-chain services to malfunction.
Manual Review
Emit the Transfer
event before the delete
operations.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.