Skip to content

Commit

Permalink
add slither config, add view modifiers to _feeRake, update fee type t…
Browse files Browse the repository at this point in the history
…o uint88
  • Loading branch information
androolloyd committed Oct 9, 2023
1 parent d91712f commit bcdf589
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
19 changes: 15 additions & 4 deletions .slither.config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
{
"solc_remaps": [
"solady/=./lib/solady/",
"ds-test/=./lib/ds-test/src/",
"openzeppelin/=./lib/openzeppelin-contracts/contracts/",
"seaport/=./lib/seaport/contracts/"
"@openzeppelin/=lib/seaport/lib/openzeppelin-contracts/",
"@rari-capital/solmate/=lib/seaport/lib/solmate/",
"ds-test/=lib/seaport/lib/ds-test/src/",
"erc4626-tests/=lib/seaport/lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"murky/=lib/seaport/lib/murky/src/",
"openzeppelin-contracts/=lib/seaport/lib/openzeppelin-contracts/",
"seaport-core/=lib/seaport/lib/seaport-core/",
"seaport-sol/=lib/seaport/lib/seaport-sol/",
"seaport-types/=lib/seaport/lib/seaport-types/",
"seaport/=lib/seaport/",
"solady/=lib/solady/",
"solarray/=lib/seaport/lib/solarray/src/",
"solmate/=lib/solmate/src/",
"starport-core/=src/"
]
}
8 changes: 4 additions & 4 deletions src/LoanManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,10 @@ contract LoanManager is ERC721, ContractOffererInterface, ConduitHelper, Ownable
struct Fee {
ItemType itemType;
address token;
uint96 rake;
uint88 rake;
}

function setFeeData(address feeTo_, uint96 defaultFeeRake_) external onlyOwner {
function setFeeData(address feeTo_, uint88 defaultFeeRake_) external onlyOwner {
feeTo = feeTo_;
defaultFeeRake = defaultFeeRake_;
}
Expand All @@ -327,7 +327,7 @@ contract LoanManager is ERC721, ContractOffererInterface, ConduitHelper, Ownable
return exoticFee[exotic.token];
}

function _feeRake(SpentItem[] memory debt) internal view returns (ReceivedItem[] memory feeConsideration) {
function _feeRake(SpentItem[] memory debt) internal pure returns (ReceivedItem[] memory feeConsideration) {
uint256 i = 0;
feeConsideration = new ReceivedItem[](debt.length);
for (; i < debt.length;) {
Expand All @@ -343,7 +343,7 @@ contract LoanManager is ERC721, ContractOffererInterface, ConduitHelper, Ownable
Fee memory fee = getExoticFee(debt[i]);
feeConsideration[i].itemType = fee.itemType;
feeConsideration[i].token = fee.token;
feeConsideration[i].amount = fee.rake;
feeConsideration[i].amount = fee.rake; //flat fee
}
unchecked {
++i;
Expand Down

0 comments on commit bcdf589

Please sign in to comment.