@maplelabs/core-artifacts
Version:
Consist artifacts of the maple protocol
544 lines (543 loc) • 20.4 kB
JSON
{
"id": "b9f8b5fad68046110d958f0a7d5cf38d",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.6.11",
"solcLongVersion": "0.6.11+commit.5ef660b1",
"input": {
"language": "Solidity",
"sources": {
"contracts/core/repayment-calculator/v1/interfaces/IRepaymentCalc.sol": {
"content": "// SPDX-License-Identifier: AGPL-3.0-or-later // hevm: flattened sources of contracts/core/repayment-calculator/v1/interfaces/IRepaymentCalc.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/repayment-calculator/v1/interfaces/IRepaymentCalc.sol\n/* pragma solidity 0.6.11; */\n\n/* import { ICalc } from \"../../../calculator/v1/interfaces/ICalc.sol\"; */\n\n/// @title RepaymentCalc calculates payment amounts on Loans.\ninterface IRepaymentCalc is ICalc {\n\n /**\n @dev Calculates the next payment for a Loan.\n @param _loan The address of a Loan to calculate a payment for.\n @return total The entitled interest of the next payment (Principal + Interest only when the next payment is last payment of the Loan).\n @return principalOwed The entitled principal amount needed to be paid in the next payment.\n @return interest The entitled interest amount needed to be paid in the next payment.\n */\n function getNextPayment(address _loan) external view returns (uint256 total, uint256 principalOwed, uint256 interest);\n\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers"
],
"": [
"ast"
]
}
}
}
},
"output": {
"contracts": {
"contracts/core/repayment-calculator/v1/interfaces/IRepaymentCalc.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"
}
}
},
"IRepaymentCalc": {
"abi": [
{
"inputs": [],
"name": "calcType",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_loan",
"type": "address"
}
],
"name": "getNextPayment",
"outputs": [
{
"internalType": "uint256",
"name": "total",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "principalOwed",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "interest",
"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",
"getNextPayment(address)": "a22567b0",
"name()": "06fdde03"
}
}
}
}
},
"sources": {
"contracts/core/repayment-calculator/v1/interfaces/IRepaymentCalc.sol": {
"ast": {
"absolutePath": "contracts/core/repayment-calculator/v1/interfaces/IRepaymentCalc.sol",
"exportedSymbols": {
"ICalc": [
15
],
"IRepaymentCalc": [
31
]
},
"id": 32,
"license": "AGPL-3.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"=",
"0.6",
".11"
],
"nodeType": "PragmaDirective",
"src": "145:24:0"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "259: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": "310: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": "377:2:0"
},
"returnParameters": {
"id": 7,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 8,
"src": "403:5:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 5,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "403:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "402:7:0"
},
"scope": 15,
"src": "360:50:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 9,
"nodeType": "StructuredDocumentation",
"src": "416: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": "479:2:0"
},
"returnParameters": {
"id": 13,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 14,
"src": "505:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 11,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "505:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "504:9:0"
},
"scope": 15,
"src": "466:48:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "external"
}
],
"scope": 32,
"src": "287:230:0"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 17,
"name": "ICalc",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 15,
"src": "792:5:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ICalc_$15",
"typeString": "contract ICalc"
}
},
"id": 18,
"nodeType": "InheritanceSpecifier",
"src": "792:5:0"
}
],
"contractDependencies": [
15
],
"contractKind": "interface",
"documentation": {
"id": 16,
"nodeType": "StructuredDocumentation",
"src": "702:62:0",
"text": "@title RepaymentCalc calculates payment amounts on Loans."
},
"fullyImplemented": false,
"id": 31,
"linearizedBaseContracts": [
31,
15
],
"name": "IRepaymentCalc",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": {
"id": 19,
"nodeType": "StructuredDocumentation",
"src": "805:495:0",
"text": "@dev Calculates the next payment for a Loan.\n@param _loan The address of a Loan to calculate a payment for.\n@return total The entitled interest of the next payment (Principal + Interest only when the next payment is last payment of the Loan).\n@return principalOwed The entitled principal amount needed to be paid in the next payment.\n@return interest The entitled interest amount needed to be paid in the next payment."
},
"functionSelector": "a22567b0",
"id": 30,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getNextPayment",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 22,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21,
"mutability": "mutable",
"name": "_loan",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 30,
"src": "1329:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1329:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1328:15:0"
},
"returnParameters": {
"id": 29,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24,
"mutability": "mutable",
"name": "total",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 30,
"src": "1367:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 23,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1367:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 26,
"mutability": "mutable",
"name": "principalOwed",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 30,
"src": "1382:21:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 25,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1382:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 28,
"mutability": "mutable",
"name": "interest",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 30,
"src": "1405:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 27,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1405:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1366:56:0"
},
"scope": 31,
"src": "1305:118:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"scope": 32,
"src": "764:662:0"
}
],
"src": "145:1282:0"
},
"id": 0
}
}
}
}