UNPKG

@maplelabs/core-artifacts

Version:

Consist artifacts of the maple protocol

554 lines (553 loc) 20 kB
{ "id": "14a45399a22af71805fca6fd3ee16330", "_format": "hh-sol-build-info-1", "solcVersion": "0.6.11", "solcLongVersion": "0.6.11+commit.5ef660b1", "input": { "language": "Solidity", "sources": { "contracts/core/late-fee-calculator/v1/interfaces/ILateFeeCalc.sol": { "content": "// SPDX-License-Identifier: AGPL-3.0-or-later // hevm: flattened sources of contracts/core/late-fee-calculator/v1/interfaces/ILateFeeCalc.sol\npragma solidity =0.6.11;\n\n////// contracts/core/calculator/v1/interfaces/ICalc.sol\n/* pragma solidity 0.6.11; */\n\n/// @title Calc calculates.\ninterface ICalc {\n\n /**\n @dev The Calculator type.\n */\n function calcType() external pure returns (uint8);\n\n /**\n @dev The Calculator name.\n */\n function name() external pure returns (bytes32);\n\n}\n\n////// contracts/core/late-fee-calculator/v1/interfaces/ILateFeeCalc.sol\n/* pragma solidity 0.6.11; */\n\n/* import { ICalc } from \"../../../calculator/v1/interfaces/ICalc.sol\"; */\n\n/// @title LateFeeCalc calculates late fees on Loans.\ninterface ILateFeeCalc is ICalc {\n\n /**\n @dev The fee in basis points, charged on the payment amount.\n */\n function lateFee() external view returns (uint256);\n\n /**\n @dev Calculates the late fee payment for a Loan.\n @param interest Amount of interest to be used to calculate late fee for.\n @return Late fee that is charged to the Borrower.\n */\n function getLateFee(uint256 interest) external view returns (uint256);\n\n}\n" } }, "settings": { "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "abi", "evm.bytecode", "evm.deployedBytecode", "evm.methodIdentifiers" ], "": [ "ast" ] } } } }, "output": { "contracts": { "contracts/core/late-fee-calculator/v1/interfaces/ILateFeeCalc.sol": { "ICalc": { "abi": [ { "inputs": [], "name": "calcType", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "pure", "type": "function" } ], "evm": { "bytecode": { "linkReferences": {}, "object": "", "opcodes": "", "sourceMap": "" }, "deployedBytecode": { "immutableReferences": {}, "linkReferences": {}, "object": "", "opcodes": "", "sourceMap": "" }, "methodIdentifiers": { "calcType()": "9d8ae446", "name()": "06fdde03" } } }, "ILateFeeCalc": { "abi": [ { "inputs": [], "name": "calcType", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "interest", "type": "uint256" } ], "name": "getLateFee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lateFee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "pure", "type": "function" } ], "evm": { "bytecode": { "linkReferences": {}, "object": "", "opcodes": "", "sourceMap": "" }, "deployedBytecode": { "immutableReferences": {}, "linkReferences": {}, "object": "", "opcodes": "", "sourceMap": "" }, "methodIdentifiers": { "calcType()": "9d8ae446", "getLateFee(uint256)": "53b7e0e5", "lateFee()": "3f4de62f", "name()": "06fdde03" } } } } }, "sources": { "contracts/core/late-fee-calculator/v1/interfaces/ILateFeeCalc.sol": { "ast": { "absolutePath": "contracts/core/late-fee-calculator/v1/interfaces/ILateFeeCalc.sol", "exportedSymbols": { "ICalc": [ 15 ], "ILateFeeCalc": [ 33 ] }, "id": 34, "license": "AGPL-3.0-or-later", "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "=", "0.6", ".11" ], "nodeType": "PragmaDirective", "src": "142:24:0" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": { "id": 2, "nodeType": "StructuredDocumentation", "src": "256:28:0", "text": "@title Calc calculates." }, "fullyImplemented": false, "id": 15, "linearizedBaseContracts": [ 15 ], "name": "ICalc", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": { "id": 3, "nodeType": "StructuredDocumentation", "src": "307:45:0", "text": "@dev The Calculator type." }, "functionSelector": "9d8ae446", "id": 8, "implemented": false, "kind": "function", "modifiers": [], "name": "calcType", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4, "nodeType": "ParameterList", "parameters": [], "src": "374:2:0" }, "returnParameters": { "id": 7, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8, "src": "400:5:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 5, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "400:5:0", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "src": "399:7:0" }, "scope": 15, "src": "357:50:0", "stateMutability": "pure", "virtual": false, "visibility": "external" }, { "body": null, "documentation": { "id": 9, "nodeType": "StructuredDocumentation", "src": "413:45:0", "text": "@dev The Calculator name." }, "functionSelector": "06fdde03", "id": 14, "implemented": false, "kind": "function", "modifiers": [], "name": "name", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 10, "nodeType": "ParameterList", "parameters": [], "src": "476:2:0" }, "returnParameters": { "id": 13, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 12, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14, "src": "502:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 11, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "502:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "501:9:0" }, "scope": 15, "src": "463:48:0", "stateMutability": "pure", "virtual": false, "visibility": "external" } ], "scope": 34, "src": "284:230:0" }, { "abstract": false, "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 17, "name": "ICalc", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 15, "src": "776:5:0", "typeDescriptions": { "typeIdentifier": "t_contract$_ICalc_$15", "typeString": "contract ICalc" } }, "id": 18, "nodeType": "InheritanceSpecifier", "src": "776:5:0" } ], "contractDependencies": [ 15 ], "contractKind": "interface", "documentation": { "id": 16, "nodeType": "StructuredDocumentation", "src": "696:54:0", "text": "@title LateFeeCalc calculates late fees on Loans." }, "fullyImplemented": false, "id": 33, "linearizedBaseContracts": [ 33, 15 ], "name": "ILateFeeCalc", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": { "id": 19, "nodeType": "StructuredDocumentation", "src": "789:80:0", "text": "@dev The fee in basis points, charged on the payment amount." }, "functionSelector": "3f4de62f", "id": 24, "implemented": false, "kind": "function", "modifiers": [], "name": "lateFee", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 20, "nodeType": "ParameterList", "parameters": [], "src": "890:2:0" }, "returnParameters": { "id": 23, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 22, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 24, "src": "916:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 21, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "916:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "915:9:0" }, "scope": 33, "src": "874:51:0", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": { "id": 25, "nodeType": "StructuredDocumentation", "src": "931:211:0", "text": "@dev Calculates the late fee payment for a Loan.\n@param interest Amount of interest to be used to calculate late fee for.\n@return Late fee that is charged to the Borrower." }, "functionSelector": "53b7e0e5", "id": 32, "implemented": false, "kind": "function", "modifiers": [], "name": "getLateFee", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 28, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 27, "mutability": "mutable", "name": "interest", "nodeType": "VariableDeclaration", "overrides": null, "scope": 32, "src": "1167:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 26, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1167:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1166:18:0" }, "returnParameters": { "id": 31, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 30, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 32, "src": "1208:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 29, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1208:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1207:9:0" }, "scope": 33, "src": "1147:70:0", "stateMutability": "view", "virtual": false, "visibility": "external" } ], "scope": 34, "src": "750:470:0" } ], "src": "142:1079:0" }, "id": 0 } } } }