Skip to content

Commit

Permalink
fix: emit token transferred in deferred
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Dec 9, 2024
1 parent 9db7fad commit 10a2333
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ethereum/contracts/Deferred.sol
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ contract Deferred is ERC721, Ownable {
/// @dev Event emitted when the contract is closed
event ContractClosed(uint256 indexed sellContractId);

/// @dev Event emitted when a token is transferred
event TokenTransferred(
uint256 indexed sellContractId,
address indexed from,
address indexed to,
uint256 tokenId
);

modifier onlyMinter() {
require(
msg.sender == deferredMinter && deferredMinter != address(0),
Expand Down Expand Up @@ -420,6 +428,8 @@ contract Deferred is ERC721, Ownable {
// approve the marketplace to transfer the token
super.approve(marketplace, tokenId);

emit TokenTransferred(_contractId, from, to, tokenId);

return tokenId;
}

Expand All @@ -431,6 +441,8 @@ contract Deferred is ERC721, Ownable {
// transfer the token
super.transferFrom(from, to, tokenId);

emit TokenTransferred(_contractId, from, to, tokenId);

return tokenId;
}

Expand Down

0 comments on commit 10a2333

Please sign in to comment.