diff --git a/.gas-snapshot b/.gas-snapshot index 2ff10bc7..e23ab5cc 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,41 +1,41 @@ -EnforcerTest:testCollateralEnforcer() (gas: 964781) -EnforcerTest:testFailCollateralEnforcerDifferentCollateral() (gas: 846753) -EnforcerTest:testFailRateEnforcerMaxCarryRate() (gas: 801907) -EnforcerTest:testFailRateEnforcerMaxRate() (gas: 801857) -EnforcerTest:testFailRateEnforcerMaxRateAndMaxCarryRate() (gas: 801722) -EnforcerTest:testRateEnforcerBasic() (gas: 922038) -EnforcerTest:testTermEnforcerBasic() (gas: 994300) -TestAstariaV1Loan:testNewLoanERC721CollateralDefaultTermsRecall() (gas: 983680) -TestAstariaV1Loan:testNewLoanERC721CollateralDefaultTermsRecallLender() (gas: 901571) -TestAstariaV1Loan:testNewLoanERC721CollateralDefaultTermsRecallLiquidation() (gas: 948381) +EnforcerTest:testCollateralEnforcer() (gas: 964716) +EnforcerTest:testFailCollateralEnforcerDifferentCollateral() (gas: 846709) +EnforcerTest:testFailRateEnforcerMaxCarryRate() (gas: 801863) +EnforcerTest:testFailRateEnforcerMaxRate() (gas: 801813) +EnforcerTest:testFailRateEnforcerMaxRateAndMaxCarryRate() (gas: 801678) +EnforcerTest:testRateEnforcerBasic() (gas: 921973) +EnforcerTest:testTermEnforcerBasic() (gas: 994235) +TestAstariaV1Loan:testNewLoanERC721CollateralDefaultTermsRecall() (gas: 983549) +TestAstariaV1Loan:testNewLoanERC721CollateralDefaultTermsRecallLender() (gas: 901484) +TestAstariaV1Loan:testNewLoanERC721CollateralDefaultTermsRecallLiquidation() (gas: 948294) TestCustodian:testCustodySelector() (gas: 7152) -TestCustodian:testGenerateOrderRepay() (gas: 174179) +TestCustodian:testGenerateOrderRepay() (gas: 174157) TestCustodian:testGenerateOrderRepayNotBorrower() (gas: 102146) TestCustodian:testGenerateOrderSettlement() (gas: 125008) TestCustodian:testGenerateOrderSettlementUnauthorized() (gas: 100145) TestCustodian:testGetBorrower() (gas: 75840) TestCustodian:testOnlySeaport() (gas: 17931) TestCustodian:testPreviewOrderNoActiveLoan() (gas: 229) -TestCustodian:testPreviewOrderRepay() (gas: 224750) +TestCustodian:testPreviewOrderRepay() (gas: 224728) TestCustodian:testPreviewOrderSettlement() (gas: 152470) -TestCustodian:testRatifyOrder() (gas: 188760) +TestCustodian:testRatifyOrder() (gas: 188738) TestCustodian:testSafeTransferReceive() (gas: 159061) TestCustodian:testSeaportMetadata() (gas: 8519) TestCustodian:testSupportsInterface() (gas: 5791) -TestExoticLoans:testSwap() (gas: 1163700) +TestExoticLoans:testSwap() (gas: 1163635) TestLoanCombinations:testLoan20For721SimpleInterestDutchFixedRepay() (gas: 252) -TestLoanCombinations:testLoan20for20SimpleInterestDutchFixedRepay() (gas: 517630) -TestLoanCombinations:testLoan721for20SimpleInterestDutchFixedRepay() (gas: 749358) -TestLoanCombinations:testLoanAstariaSettlementRepay() (gas: 515545) -TestLoanCombinations:testLoanSimpleInterestEnglishFixed() (gas: 735700) -TestLoanManager:testGenerateOrder() (gas: 1008482) +TestLoanCombinations:testLoan20for20SimpleInterestDutchFixedRepay() (gas: 517565) +TestLoanCombinations:testLoan721for20SimpleInterestDutchFixedRepay() (gas: 748890) +TestLoanCombinations:testLoanAstariaSettlementRepay() (gas: 515480) +TestLoanCombinations:testLoanSimpleInterestEnglishFixed() (gas: 735232) +TestLoanManager:testGenerateOrder() (gas: 1008458) TestLoanManager:testGenerateOrderInvalidSender() (gas: 12986) TestLoanManager:testSupportsInterface() (gas: 7003) -TestNewLoan:testBuyNowPayLater() (gas: 1146513) -TestNewLoan:testNewLoanERC721CollateralDefaultTerms2():((uint256,address,address,address,address,(uint8,address,uint256,uint256)[],(uint8,address,uint256,uint256)[],(address,bytes,address,bytes,address,bytes))) (gas: 993154) -TestNewLoan:testNewLoanERC721CollateralDefaultTermsRefinance() (gas: 653724) -TestNewLoan:testSettleLoan() (gas: 1274568) -TestRepayLoan:testRepayLoan() (gas: 732514) +TestNewLoan:testBuyNowPayLater() (gas: 1146962) +TestNewLoan:testNewLoanERC721CollateralDefaultTerms2():((uint256,address,address,address,address,(uint8,address,uint256,uint256)[],(uint8,address,uint256,uint256)[],(address,bytes,address,bytes,address,bytes))) (gas: 993089) +TestNewLoan:testNewLoanERC721CollateralDefaultTermsRefinance() (gas: 653637) +TestNewLoan:testSettleLoan() (gas: 1274481) +TestRepayLoan:testRepayLoan() (gas: 732046) TestStarLiteUtils:testEncodeReceivedWithRecipient() (gas: 17955) TestStarLiteUtils:testSpentToReceived() (gas: 17708) TestStarLiteUtils:testValidateSaltOpt(address,bytes32) (runs: 256, μ: 26479, ~: 26479) diff --git a/.slither.config.json b/.slither.config.json index a28d70f3..db732542 100644 --- a/.slither.config.json +++ b/.slither.config.json @@ -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/" ] } \ No newline at end of file diff --git a/remappings.txt b/remappings.txt index 662dffdd..a5b2a78c 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,6 +1,16 @@ -solady/=lib/solady/ -seaport/=lib/seaport/ -seaport-types/=lib/seaport/lib/seaport-types/ +@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/ -starport-core/=src -@chainlink/contracts/=node_modules/@chainlink/contracts/ \ No newline at end of file +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/ +starport-test/=test/ \ No newline at end of file diff --git a/src/Custodian.sol b/src/Custodian.sol index a2eaaf23..fa110a50 100644 --- a/src/Custodian.sol +++ b/src/Custodian.sol @@ -4,9 +4,9 @@ import {ERC721} from "solady/src/tokens/ERC721.sol"; import {ERC20} from "solady/src/tokens/ERC20.sol"; import {ERC1155} from "solady/src/tokens/ERC1155.sol"; -import {ItemType, Schema, SpentItem, ReceivedItem} from "seaport/lib/seaport-types/src/lib/ConsiderationStructs.sol"; +import {ItemType, Schema, SpentItem, ReceivedItem} from "seaport-types/src/lib/ConsiderationStructs.sol"; -import {ContractOffererInterface} from "seaport/lib/seaport-types/src/interfaces/ContractOffererInterface.sol"; +import {ContractOffererInterface} from "seaport-types/src/interfaces/ContractOffererInterface.sol"; import {TokenReceiverInterface} from "starport-core/interfaces/TokenReceiverInterface.sol"; import {FixedPointMathLib} from "solady/src/utils/FixedPointMathLib.sol"; import {Originator} from "starport-core/originators/Originator.sol"; @@ -25,11 +25,6 @@ contract Custodian is ContractOffererInterface, TokenReceiverInterface, ConduitH mapping(address => mapping(address => bool)) public repayApproval; - function setRepayApproval(address payer, bool approved) external { - repayApproval[msg.sender][payer] = approved; - emit RepayApproval(msg.sender, payer, approved); - } - event RepayApproval(address borrower, address repayer, bool approved); event SeaportCompatibleContractDeployed(); @@ -49,16 +44,6 @@ contract Custodian is ContractOffererInterface, TokenReceiverInterface, ConduitH return _exists(loanId) ? ownerOf(loanId) : loan.borrower; } - function mint(LoanManager.Loan calldata loan) external { - bytes memory encodedLoan = abi.encode(loan); - uint256 loanId = uint256(keccak256(encodedLoan)); - if (loan.custodian != address(this) || !LM.issued(loanId)) { - revert("Custodian: Invalid loan"); //setup with proper error - } - - _safeMint(loan.issuer, loanId, encodedLoan); - } - function tokenURI(uint256 tokenId) public view override returns (string memory) { if (!_exists(tokenId)) { revert("Custodian: Invalid token id"); @@ -95,6 +80,21 @@ contract Custodian is ContractOffererInterface, TokenReceiverInterface, ConduitH //EXTERNAL FUNCTIONS + function mint(LoanManager.Loan calldata loan) external { + bytes memory encodedLoan = abi.encode(loan); + uint256 loanId = uint256(keccak256(encodedLoan)); + if (loan.custodian != address(this) || !LM.issued(loanId)) { + revert("Custodian: Invalid loan"); //setup with proper error + } + + _safeMint(loan.issuer, loanId, encodedLoan); + } + + function setRepayApproval(address who, bool approved) external { + repayApproval[msg.sender][who] = approved; + emit RepayApproval(msg.sender, who, approved); + } + /** * @dev Generates the order for this contract offerer. * diff --git a/src/LoanManager.sol b/src/LoanManager.sol index 15d3d44a..3d24e69d 100644 --- a/src/LoanManager.sol +++ b/src/LoanManager.sol @@ -263,8 +263,8 @@ contract LoanManager is ERC721, ContractOffererInterface, ConduitHelper, Ownable * * @param caller The address of the contract fulfiller. * @param fulfiller The address of the contract fulfiller. - * @param minimumReceived The minimum the fulfiller must receive. - * @param maximumSpent The most a fulfiller will spend + * @param minimumReceivedFromBorrower The minimum the fulfiller must receive. + * @param maximumSpentFromBorrower The most a fulfiller will spend * @param context The context of the order. * @return offer The items spent by the order. * @return consideration The items received by the order. @@ -272,31 +272,43 @@ contract LoanManager is ERC721, ContractOffererInterface, ConduitHelper, Ownable function previewOrder( address caller, address fulfiller, - SpentItem[] calldata minimumReceived, - SpentItem[] calldata maximumSpent, + SpentItem[] calldata minimumReceivedFromBorrower, + SpentItem[] calldata maximumSpentFromBorrower, bytes calldata context // encoded based on the schemaID ) public view returns (SpentItem[] memory offer, ReceivedItem[] memory consideration) { - function( - address, - SpentItem[] calldata, - bytes calldata, - bool - ) internal view returns (SpentItem[] memory, ReceivedItem[] memory) fn; - function( - address, - SpentItem[] calldata, - bytes calldata, - bool - ) - internal - returns ( - SpentItem[] memory, - ReceivedItem[] memory - ) fn2 = _fillObligationAndVerify; - assembly { - fn := fn2 + LoanManager.Obligation memory obligation = abi.decode(context, (LoanManager.Obligation)); + + if (obligation.debt.length == 0) { + revert InvalidDebt(); + } + if (maximumSpentFromBorrower.length == 0) { + revert InvalidMaximumSpentEmpty(); + } + consideration = maximumSpentFromBorrower.toReceivedItems(obligation.custodian); + if (feeTo != address(0)) { + consideration = _mergeFees(consideration, _feeRake(obligation.debt)); + } + address receiver = obligation.borrower; + + // we settle via seaport channels if caveats are present + if (fulfiller != receiver || obligation.caveats.length > 0) { + SpentItem[] memory debt = obligation.debt; + offer = new SpentItem[](debt.length + 1); + + for (uint256 i; i < debt.length;) { + offer[i] = debt[i]; + unchecked { + ++i; + } + } + + offer[debt.length] = SpentItem({ + itemType: ItemType.ERC721, + token: address(this), + identifier: uint256(keccak256(abi.encode(obligation.caveats))), + amount: 1 + }); } - (offer, consideration) = fn(fulfiller, maximumSpent, context, false); } /** @@ -314,10 +326,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_; } @@ -346,7 +358,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; @@ -378,8 +390,7 @@ contract LoanManager is ERC721, ContractOffererInterface, ConduitHelper, Ownable function _fillObligationAndVerify( address fulfiller, SpentItem[] calldata maximumSpentFromBorrower, - bytes calldata context, - bool withEffects + bytes calldata context ) internal returns (SpentItem[] memory offer, ReceivedItem[] memory consideration) { LoanManager.Obligation memory obligation = abi.decode(context, (LoanManager.Obligation)); @@ -418,18 +429,18 @@ contract LoanManager is ERC721, ContractOffererInterface, ConduitHelper, Ownable debt: obligation.debt, terms: response.terms }); + // we settle via seaport channels if caveats are present + if (enforceCaveats) { bytes32 caveatHash = keccak256( encodeWithSaltAndBorrowerCounter( obligation.borrower, obligation.salt, keccak256(abi.encode(obligation.caveats)) ) ); - - //prevent replay on the salt usedSalts.validateSalt(obligation.borrower, obligation.salt); - - for (uint256 i = 0; i < obligation.caveats.length;) { + uint256 i = 0; + for (; i < obligation.caveats.length;) { if (!CaveatEnforcer(obligation.caveats[i].enforcer).enforceCaveat(obligation.caveats[i].terms, loan)) { revert InvalidOrigination(); } @@ -439,10 +450,7 @@ contract LoanManager is ERC721, ContractOffererInterface, ConduitHelper, Ownable } offer = _setOffer(loan.debt, caveatHash); } - - if (withEffects) { - _issueLoanManager(loan, response.issuer.code.length > 0); - } + _issueLoanManager(loan, response.issuer.code.length > 0); } function _issueLoanManager(Loan memory loan, bool mint) internal { @@ -472,7 +480,7 @@ contract LoanManager is ERC721, ContractOffererInterface, ConduitHelper, Ownable SpentItem[] calldata maximumSpent, bytes calldata context // encoded based on the schemaID ) external onlySeaport returns (SpentItem[] memory offer, ReceivedItem[] memory consideration) { - (offer, consideration) = _fillObligationAndVerify(fulfiller, maximumSpent, context, true); + (offer, consideration) = _fillObligationAndVerify(fulfiller, maximumSpent, context); } function _enableDebtWithSeaport(SpentItem memory debt) internal { diff --git a/src/originators/Originator.sol b/src/originators/Originator.sol index 7cd80250..d865e736 100644 --- a/src/originators/Originator.sol +++ b/src/originators/Originator.sol @@ -38,9 +38,6 @@ abstract contract Originator is Ownable { CLOSED } - error InvalidDebt(); - error InvalidOffer(); - struct Response { LoanManager.Terms terms; address issuer; @@ -60,7 +57,6 @@ abstract contract Originator is Ownable { } struct Details { - // uint16 offerType; address custodian; address conduit; address issuer; @@ -81,25 +77,20 @@ abstract contract Originator is Ownable { modifier onlyLoanManager() { if (msg.sender != address(LM)) { - revert InvalidCaller(); + revert NotLoanManager(); } _; } - error InvalidCaller(); + error NotLoanManager(); + error NotStrategist(); + error InvalidDebtLength(); + error InvalidDebtAmount(); error InvalidCustodian(); - error InvalidDeadline(); - error InvalidOriginator(); error InvalidCollateral(); - error InvalidBorrowAmount(); - error InvalidAmount(); - error InvalidDebtToken(); - error InvalidRate(); + error InvalidDeadline(); + error InvalidOffer(); error InvalidSigner(); - error InvalidLoan(); - error InvalidTerms(); - error InvalidDebtLength(); - error InvalidDebtAmount(); error ConduitTransferError(); LoanManager public immutable LM; @@ -174,12 +165,7 @@ abstract contract Originator is Ownable { return abi.decode(details, (Details)).offer.terms; } - function execute(Request calldata params) external virtual onlyLoanManager returns (Response memory response) { - Details memory details = abi.decode(params.details, (Details)); - _validateOffer(params, details); - _execute(params, details); - response = _buildResponse(params, details); - } + function execute(Request calldata params) external virtual returns (Response memory response); function _buildResponse(Request calldata params, Details memory details) internal @@ -210,10 +196,9 @@ abstract contract Originator is Ownable { return _counter; } - // Function to increment the nonce of the sender function incrementCounter() external { if (msg.sender != strategist) { - revert InvalidCaller(); + revert NotStrategist(); } _counter += uint256(blockhash(block.number - 1) << 0x80); emit CounterUpdated(); @@ -224,9 +209,20 @@ abstract contract Originator is Ownable { return _DOMAIN_SEPARATOR; } - function _validateOffer(Request calldata params, Details memory details) internal virtual { - bytes32 contextHash = keccak256(params.details); - _validateSignature(keccak256(encodeWithAccountCounter(strategist, keccak256(params.details))), params.approval); + function _validateAsk(Request calldata request, Details memory details) internal virtual {} + + function _validateOffer(Request calldata request, Details memory details) internal virtual { + bytes32 contextHash = keccak256(request.details); + _validateSignature( + keccak256(encodeWithAccountCounter(strategist, keccak256(request.details))), request.approval + ); + if (request.custodian != details.custodian) { + revert InvalidCustodian(); + } + if (request.debt.length != details.offer.debt.length) { + revert InvalidDebtLength(); + } + _validateAsk(request, details); if (details.offer.salt != bytes32(0)) { if (!usedHashes[contextHash]) { @@ -241,8 +237,6 @@ abstract contract Originator is Ownable { } function _execute(Request calldata request, Details memory details) internal virtual { - _validateAsk(request, details); - if ( ConduitInterface(details.conduit).execute(_packageTransfers(request.debt, request.receiver, details.issuer)) != ConduitInterface.execute.selector @@ -251,18 +245,6 @@ abstract contract Originator is Ownable { } } - function _validateAsk(Request calldata request, Details memory details) internal view { - if (request.custodian != details.custodian) { - revert InvalidCustodian(); - } - if (block.timestamp > details.deadline) { - revert InvalidDeadline(); - } - if (request.debt.length > 1) { - revert InvalidDebtLength(); - } - } - function _validateSignature(bytes32 hash, bytes memory signature) internal view virtual { if (!SignatureCheckerLib.isValidSignatureNow(strategist, hash, signature)) { revert InvalidSigner(); diff --git a/src/originators/UniqueOriginator.sol b/src/originators/UniqueOriginator.sol index ab104760..1415dae1 100644 --- a/src/originators/UniqueOriginator.sol +++ b/src/originators/UniqueOriginator.sol @@ -6,4 +6,17 @@ import "starport-core/originators/Originator.sol"; contract UniqueOriginator is Originator { constructor(LoanManager LM_, address strategist_, uint256 fee_) Originator(LM_, strategist_, fee_, msg.sender) {} + + function execute(Request calldata params) + external + virtual + override + onlyLoanManager + returns (Response memory response) + { + Details memory details = abi.decode(params.details, (Details)); + _validateOffer(params, details); + _execute(params, details); + response = _buildResponse(params, details); + } } diff --git a/test/StarPortTest.sol b/test/StarPortTest.sol index 5bc854cf..a1d14edd 100644 --- a/test/StarPortTest.sol +++ b/test/StarPortTest.sol @@ -57,7 +57,7 @@ import {Pricing} from "starport-core/pricing/Pricing.sol"; import {TermEnforcer} from "starport-core/enforcers/TermEnforcer.sol"; import {FixedRateEnforcer} from "starport-core/enforcers/RateEnforcer.sol"; import {CollateralEnforcer} from "starport-core/enforcers/CollateralEnforcer.sol"; -import {Cast} from "test/utils/Cast.sol"; +import {Cast} from "starport-test/utils/Cast.sol"; import {ERC20} from "solady/src/tokens/ERC20.sol"; import {ERC721} from "solady/src/tokens/ERC721.sol"; import {ContractOffererInterface} from "seaport-types/src/interfaces/ContractOffererInterface.sol"; @@ -371,7 +371,7 @@ contract StarPortTest is BaseOrderTest { }); uint256 balanceBefore = erc20s[0].balanceOf(borrower.addr); - vm.recordLogs(); + // vm.recordLogs(); vm.startPrank(borrower.addr); consideration.fulfillAdvancedOrder({ advancedOrder: x, @@ -505,7 +505,15 @@ contract StarPortTest is BaseOrderTest { consideration.matchAdvancedOrders(orders, new CriteriaResolver[](0), fill, address(borrower.addr)); - (, loan) = abi.decode(vm.getRecordedLogs()[debt.length + 1].data, (uint256, LoanManager.Loan)); + Vm.Log[] memory logs = vm.getRecordedLogs(); + + // console.logBytes32(logs[logs.length - 4].topics[0]); + for (uint256 i = 0; i < logs.length; i++) { + if (logs[i].topics[0] == bytes32(0x57cb72d73c48fadf55428537f6c9efbe080ae111339b0c5af42d9027ed20ba17)) { + (, loan) = abi.decode(logs[i].data, (uint256, LoanManager.Loan)); + break; + } + } assertEq(erc721s[1].ownerOf(1), address(nlr.custodian)); assertEq(erc20s[0].balanceOf(seller.addr), balanceBefore + x.parameters.consideration[0].startAmount); diff --git a/test/TestCustodian.sol b/test/TestCustodian.sol index 78907930..c068b247 100644 --- a/test/TestCustodian.sol +++ b/test/TestCustodian.sol @@ -1,6 +1,6 @@ import "./StarPortTest.sol"; -import {DeepEq} from "test/utils/DeepEq.sol"; -import {MockCall} from "test/utils/MockCall.sol"; +import {DeepEq} from "starport-test/utils/DeepEq.sol"; +import {MockCall} from "starport-test/utils/MockCall.sol"; import "forge-std/Test.sol"; contract TestCustodian is StarPortTest, DeepEq, MockCall { diff --git a/test/TestNewLoan.sol b/test/TestNewLoan.sol index 595800c2..9ff5aaaa 100644 --- a/test/TestNewLoan.sol +++ b/test/TestNewLoan.sol @@ -114,7 +114,7 @@ contract TestNewLoan is StarPortTest { recipient: payable(seller.addr) }); - //order 1, which lets is the selller, they have something that we can borrower againt (ERC721) + //order 1, which lets is the seller, they have something that we can borrower againt (ERC721) //order 2 which is the OfferItem[] memory sellingNFT = new OfferItem[](1); diff --git a/test/utils/Bound.sol b/test/utils/Bound.sol index 83ae37e6..3f5149b7 100644 --- a/test/utils/Bound.sol +++ b/test/utils/Bound.sol @@ -1,8 +1,8 @@ pragma solidity =0.8.17; import {ItemType, SpentItem, ReceivedItem} from "seaport-types/src/lib/ConsiderationStructs.sol"; -import {Cast} from "test/utils/Cast.sol"; -import "test/utils/FuzzStructs.sol" as Fuzz; +import {Cast} from "starport-test/utils/Cast.sol"; +import "starport-test/utils/FuzzStructs.sol" as Fuzz; import "forge-std/Test.sol"; abstract contract Bound is StdUtils { diff --git a/test/utils/Cast.sol b/test/utils/Cast.sol index 0cd84834..e1b24f12 100644 --- a/test/utils/Cast.sol +++ b/test/utils/Cast.sol @@ -1,7 +1,7 @@ pragma solidity =0.8.17; import {ItemType, SpentItem, ReceivedItem, ConsiderationItem} from "seaport-types/src/lib/ConsiderationStructs.sol"; -import "test/utils/FuzzStructs.sol" as Fuzz; +import "starport-test/utils/FuzzStructs.sol" as Fuzz; import "forge-std/Test.sol"; import {LoanManager} from "starport-core/LoanManager.sol"; diff --git a/test/utils/DeepEq.sol b/test/utils/DeepEq.sol index d1290199..959ffe5c 100644 --- a/test/utils/DeepEq.sol +++ b/test/utils/DeepEq.sol @@ -1,6 +1,6 @@ import {ItemType, SpentItem, ReceivedItem} from "seaport-types/src/lib/ConsiderationStructs.sol"; -import {Cast} from "test/utils/Cast.sol"; -import "test/utils/FuzzStructs.sol" as Fuzz; +import {Cast} from "starport-test/utils/Cast.sol"; +import "starport-test/utils/FuzzStructs.sol" as Fuzz; import "forge-std/Test.sol"; abstract contract DeepEq {