Skip to content

Commit

Permalink
custodian updates
Browse files Browse the repository at this point in the history
  • Loading branch information
androolloyd committed Oct 12, 2023
1 parent f75ec13 commit 878e192
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Custodian.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {LoanManager} from "starport-core/LoanManager.sol";
import {ConduitHelper} from "starport-core/ConduitHelper.sol";
import {StarPortLib} from "starport-core/lib/StarPortLib.sol";

contract Custodian is ContractOffererInterface, TokenReceiverInterface, ConduitHelper, ERC721 {
abstract contract Custodian is ContractOffererInterface, TokenReceiverInterface, ConduitHelper, ERC721 {
using {StarPortLib.getId} for LoanManager.Loan;

LoanManager public immutable LM;
Expand Down Expand Up @@ -167,9 +167,7 @@ contract Custodian is ContractOffererInterface, TokenReceiverInterface, ConduitH
bytes32[] calldata orderHashes,
uint256 contractNonce,
bytes calldata context
) external virtual onlyLoanManager returns (bytes4 selector) {
selector = Custodian.custody.selector;
}
) external virtual onlyLoanManager returns (bytes4 selector);

//todo work with seaport
function getSeaportMetadata() external pure returns (string memory, Schema[] memory schemas) {
Expand Down
16 changes: 16 additions & 0 deletions src/custodians/DefaultCustodian.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {Custodian} from "starport-core/Custodian.sol";
import {LoanManager} from "starport-core/LoanManager.sol";
import {ReceivedItem} from "starport-types/src/lib/ConsiderationStructs.sol";

contract DefaultCustodian is Custodian {
constructor(LoanManager LM_, address seaport_) Custodian(LM_, seaport_) {}

function custody(
ReceivedItem[] calldata consideration,
bytes32[] calldata orderHashes,
uint256 contractNonce,
bytes calldata context
) external virtual onlyLoanManager returns (bytes4 selector) {
selector = Custodian.custody.selector;
}
}

0 comments on commit 878e192

Please sign in to comment.