-
Notifications
You must be signed in to change notification settings - Fork 13
/
IERC721PoolFactory.sol
46 lines (38 loc) · 1.36 KB
/
IERC721PoolFactory.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// SPDX-License-Identifier: MIT
pragma solidity 0.8.14;
import { IPoolFactory } from '../IPoolFactory.sol';
/**
* @title ERC721 Pool Factory
* @dev Used to deploy non fungible pools.
*/
interface IERC721PoolFactory is IPoolFactory {
/**************/
/*** Errors ***/
/**************/
/**
* @notice User tried to deploy a pool with an array of `tokenIds` that weren't sorted, or contained duplicates.
*/
error TokenIdSubsetInvalid();
/**************************/
/*** External Functions ***/
/**************************/
/**
* @notice Deploys a cloned pool for the given collateral and quote token.
* @dev Pool must not already exist, and must use `WETH` instead of `ETH`.
* @param collateral_ Address of `NFT` collateral token.
* @param quote_ Address of `NFT` quote token.
* @param tokenIds_ Ids of subset `NFT` tokens.
* @param interestRate_ Initial interest rate of the pool.
* @return pool_ Address of the newly created pool.
*/
function deployPool(
address collateral_,
address quote_,
uint256[] memory tokenIds_,
uint256 interestRate_
) external returns (address pool_);
/**
* @notice User attempted to make pool with non supported `NFT` contract as collateral.
*/
error NFTNotSupported();
}