Skip to content

Commit

Permalink
Fix Transfer and TransferWithQuantity events for minting and burning
Browse files Browse the repository at this point in the history
  • Loading branch information
Alirun committed Jan 16, 2020
1 parent e1dc484 commit 60723b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions contracts/ERC721OMintable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ contract ERC721OMintable is ERC721OTransferable {
}

_updateTokenBalance(_to, _tokenId, _supply, ObjectLib.Operations.ADD);
emit Transfer(address(this), _to, _tokenId);
emit TransferWithQuantity(address(this), _to, _tokenId, _supply);
emit Transfer(address(0), _to, _tokenId);
emit TransferWithQuantity(address(0), _to, _tokenId, _supply);
}

function _burn(address _tokenOwner, uint256 _tokenId, uint256 _quantity) internal {
uint256 ownerBalance = balanceOf(_tokenOwner, _tokenId);
require(ownerBalance >= _quantity, "TOKEN_MINTER:NOT_ENOUGH_POSITIONS");

_updateTokenBalance(_tokenOwner, _tokenId, _quantity, ObjectLib.Operations.SUB);
emit Transfer(_tokenOwner, address(this), _tokenId);
emit TransferWithQuantity(_tokenOwner, address(this), _tokenId, _quantity);
emit Transfer(_tokenOwner, address(0), _tokenId);
emit TransferWithQuantity(_tokenOwner, address(0), _tokenId, _quantity);
}

function _mint(address _buyer, address _seller, bytes32 _derivativeHash, uint256 _quantity) internal {
Expand Down

0 comments on commit 60723b7

Please sign in to comment.