File size: 2,034 Bytes
f998fcd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
{
  "language": "Solidity",
  "sources": {
    "contracts/bespokemarket/libraries/BespokeTypes.sol": {
      "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.10;\n\nlibrary BespokeTypes {\n    struct BorrowOffer {\n        uint256 reserveId;\n        address nftAddress;\n        uint256 tokenId;\n        uint256 tokenAmount; // 1 for ERC721, 1+ for ERC1155\n        address borrower;\n        uint256 borrowAmountMin;\n        uint256 borrowAmountMax;\n        uint40 borrowDurationMin;\n        uint40 borrowDurationMax;\n        uint128 borrowRate;\n        address currency;\n        uint256 nonce;\n        uint256 deadline;\n        uint8 v; // v: parameter (27 or 28)\n        bytes32 r; // r: parameter\n        bytes32 s; // s: parameter\n    }\n\n    struct LoanData {\n        uint256 reserveId;\n        address nftAddress;\n        uint256 tokenId;\n        uint256 tokenAmount; // 1 for ERC721, 1+ for ERC1155\n        address borrower;\n        uint256 amount;\n        uint128 borrowRate;\n        uint128 interestPerSecond;\n        address currency;\n        uint40 borrowDuration;\n        // after take offer\n        uint40 borrowBegin;\n        uint40 borrowOverdueTime;\n        uint40 liquidatableTime;\n        address lender;\n        LoanStatus status;\n    }\n\n    enum LoanStatus {\n        NONE,\n        BORROWING,\n        OVERDUE,\n        LIQUIDATABLE\n    }\n\n    struct WhitelistInfo {\n        bool enabled;\n        uint256 minBorrowDuration;\n        uint256 maxBorrowDuration;\n        uint256 overdueDuration;\n    }\n}\n"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "evmVersion": "london",
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "metadata": {
      "useLiteralContent": true
    },
    "libraries": {}
  }
}