Skip to content

Commit

Permalink
chore: fix logic error
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisTsai-Csie committed Sep 7, 2024
1 parent 3198565 commit 41eed3c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions hw/lib/openzeppelin-contracts
Submodule openzeppelin-contracts added at dbb610
4 changes: 2 additions & 2 deletions hw/src/Loan/BadCaller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ contract BadCaller {
return loanToken.balanceOf(address(this));
}

/// @notice Provides a flash loan with zero fees for new users
/// @dev Charges a fee for users who have previously used the platform, checks for repayment
/// @notice Provides a flash loan with zero fees for old users
/// @dev Charges a fee for new users who have never used the platform, checks for repayment
/// @param target The address to which the funds will be sent and that will execute the transaction
/// @param amount The amount of the loan
/// @param data The call data to be sent to the `target` address
Expand Down
6 changes: 6 additions & 0 deletions hw/src/NFinTech/NFinTech.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ interface IERC721 {
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
}

interface IERC721TokenReceiver {
function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data)
external
returns (bytes4);
}


contract NFinTech is IERC721 {
string private _name;
Expand Down
3 changes: 1 addition & 2 deletions hw/test/Delegation/BankBase.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ contract BankBaseTest is Test {
victim = makeAddr("victim");
deal(victim, 100 ether);

user = makeAddr("user");
deal(user, 1 ether);
deal(address(this), 1 ether);

// Contract
bank = new Bank();
Expand Down
2 changes: 1 addition & 1 deletion hw/test/NFinTech/NFinTech.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.0;

import {Test, console2} from "forge-std/Test.sol";
import "../../src/NFinTech/NFinTech.sol";
import {NFinTech, IERC721TokenReceiver, IERC721} from "../../src/NFinTech/NFinTech.sol";

/// @title NFinTech Test
/// @author Louis Tsai
Expand Down

0 comments on commit 41eed3c

Please sign in to comment.