Skip to content

Commit

Permalink
Bug! spurious Transfer events
Browse files Browse the repository at this point in the history
  • Loading branch information
duncancmt committed Jan 8, 2024
1 parent d4b5402 commit 9c84ac5
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/deployer/Deployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -180,17 +180,15 @@ contract Deployer is TwoStepOwnable, IERC721ViewMetadata {
if (next == 0) {
// assert(_featureNonce[feature] == nonce);
_featureNonce[feature] = prev;
} else {
_deploymentLists[next].prev = prev;
}
if (prev == 0) {
emit Transfer(AddressDerivation.deriveContract(address(this), nonce), address(0), feature);
} else {
emit Transfer(
AddressDerivation.deriveContract(address(this), nonce),
AddressDerivation.deriveContract(address(this), prev),
prev == 0 ? address(0) : AddressDerivation.deriveContract(address(this), prev),
feature
);
} else {
_deploymentLists[next].prev = prev;
}
if (prev != 0) {
_deploymentLists[prev].next = next;
}
delete entry.prev;
Expand Down

0 comments on commit 9c84ac5

Please sign in to comment.