mirror of
https://github.com/supleed2/COMP70017-PoDL-CW.git
synced 2024-12-22 13:45:49 +00:00
Cleanup Comments
This commit is contained in:
parent
1abdf8893c
commit
94e9786b88
|
@ -165,7 +165,6 @@ contract TicketNFT is ITicketNFT, IPrimaryMarket, ISecondaryMarket {
|
|||
require(price > 0, "listTicket: price cannot be 0");
|
||||
_listers[ticketID] = msg.sender;
|
||||
_prices[ticketID] = price;
|
||||
// This uses a message call but is required as `transferFrom` is declared as `external`
|
||||
this.transferFrom(msg.sender, address(this), ticketID);
|
||||
emit Listing(ticketID, msg.sender, price);
|
||||
}
|
||||
|
@ -193,13 +192,11 @@ contract TicketNFT is ITicketNFT, IPrimaryMarket, ISecondaryMarket {
|
|||
ticketRevenue
|
||||
);
|
||||
_purchaseToken.transferFrom(msg.sender, _admin, ticketFee);
|
||||
// This uses a message call but is required as `transferFrom` is declared as `external`
|
||||
this.transferFrom(address(this), msg.sender, ticketID);
|
||||
_listers[ticketID] = address(0);
|
||||
_prices[ticketID] = 0;
|
||||
_holderNames[ticketID] = name;
|
||||
emit Purchase(msg.sender, ticketID, ticketPrice, name);
|
||||
// emit Delisting(ticketID); // TODO: Apparently not needed in this coursework?
|
||||
}
|
||||
|
||||
function delistTicket(uint256 ticketID) external {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
pragma solidity ^0.8.10;
|
||||
|
||||
import "forge-std/Test.sol";
|
||||
import "forge-std/console.sol";
|
||||
import "../src/contracts/PurchaseToken.sol";
|
||||
import "../src/contracts/TicketNFT.sol";
|
||||
|
||||
|
|
Loading…
Reference in a new issue