mirror of
https://github.com/supleed2/COMP70017-PoDL-CW.git
synced 2024-12-22 13:45:49 +00:00
More cleanup and notes
This commit is contained in:
parent
7e4356494b
commit
3afe735333
|
@ -4,3 +4,5 @@ This is the skeleton for the coursework of the Principle of Distributed Ledgers
|
|||
It contains [the interfaces](./src/interfaces) of the contracts to implement and an [ERC20 implementation](./src/contracts/PurchaseToken.sol).
|
||||
|
||||
The repository uses [Foundry](https://book.getfoundry.sh/projects/working-on-an-existing-project).
|
||||
|
||||
Coverage generated using `forge coverage --report lcov && genhtml lcov.info -o coverage --branch-coverage --function-coverage --legend --title "TicketNFT Coverage"`
|
||||
|
|
|
@ -50,7 +50,7 @@ contract BaseTicketNFTTest is Test {
|
|||
nft = new TicketNFT(token);
|
||||
}
|
||||
|
||||
// Add Purchase Tokens to `recipient` to affort `amount` tickets
|
||||
// Add Purchase Tokens to `recipient` to afford `amount` tickets
|
||||
function _topUpTokens(address recipient, uint256 amount) internal {
|
||||
vm.deal(recipient, amount * ticketPriceEth);
|
||||
vm.prank(recipient);
|
||||
|
@ -135,7 +135,7 @@ contract TicketNFTTest is BaseTicketNFTTest {
|
|||
"transferFrom: msg.sender must be current holder or approved sender"
|
||||
);
|
||||
nft.transferFrom(alice, bob, 1);
|
||||
} // TODO: unnecessary?
|
||||
}
|
||||
|
||||
function testApproval() public {
|
||||
_buyTicket(alice, "alice");
|
||||
|
@ -335,7 +335,6 @@ contract PrimaryMarketTest is BaseTicketNFTTest {
|
|||
}
|
||||
}
|
||||
|
||||
// Use vm.warp to jump forward when testing expired tickets
|
||||
contract SecondaryMarketTest is BaseTicketNFTTest {
|
||||
function testList() public {
|
||||
_buyTicket(alice, "alice");
|
||||
|
|
Loading…
Reference in a new issue