-
Notifications
You must be signed in to change notification settings - Fork 13
/
IERC721PoolState.sol
53 lines (46 loc) · 1.67 KB
/
IERC721PoolState.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
47
48
49
50
51
52
53
// SPDX-License-Identifier: MIT
pragma solidity 0.8.14;
/**
* @title ERC721 Pool State
*/
interface IERC721PoolState {
/**
* @notice Check if a token id is allowed as collateral in pool.
* @param tokenId The token id to check.
* @return allowed `True` if token id is allowed in pool.
*/
function tokenIdsAllowed(
uint256 tokenId
) external view returns (bool allowed);
/**
* @notice Returns the token id of an `NFT` pledged by a borrower with a given index.
* @param borrower The address of borrower that pledged the `NFT`.
* @param nftIndex `NFT` index in borrower's pledged token ids array.
* @return tokenId Token id of the `NFT`.
*/
function borrowerTokenIds(
address borrower,
uint256 nftIndex
) external view returns (uint256 tokenId);
/**
* @notice Returns the token id of an `NFT`added in pool bucket (claimable from pool).
* @param nftIndex `NFT` index in bucket's token ids array.
* @return tokenId Token id of the `NFT`.
*/
function bucketTokenIds(
uint256 nftIndex
) external view returns (uint256 tokenId);
/**
* @notice Returns the total `NFT` pledged by a borrower.
* @param borrower_ The address of borrower that pledged the `NFT`.
* @return Total number of `NFT`s pledged by borrower.
*/
function totalBorrowerTokens(
address borrower_
) external view returns (uint256);
/**
* @notice Returns the total `NFT` added in pool bucket.
* @return Total number of `NFT`s in buckets (claimable from pool).
*/
function totalBucketTokens() external view returns (uint256);
}