@maplelabs/core-artifacts
Version:
Consist artifacts of the maple protocol
821 lines (820 loc) • 32.1 kB
JSON
{
"id": "53334796575684f8dbae4f09bc8f7f6f",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.6.11",
"solcLongVersion": "0.6.11+commit.5ef660b1",
"input": {
"language": "Solidity",
"sources": {
"contracts/core/debt-locker/v1/interfaces/IDebtLockerFactory.sol": {
"content": "// SPDX-License-Identifier: AGPL-3.0-or-later // hevm: flattened sources of contracts/core/debt-locker/v1/interfaces/IDebtLockerFactory.sol\npragma solidity =0.6.11;\n\n////// contracts/core/subfactory/v1/interfaces/ISubFactory.sol\n/* pragma solidity 0.6.11; */\n\n/// @title SubFactory creates instances downstream of another factory.\ninterface ISubFactory {\n\n /**\n @dev The type of the factory\n */\n function factoryType() external pure returns (uint8);\n\n}\n\n////// contracts/core/debt-locker/v1/interfaces/IDebtLockerFactory.sol\n/* pragma solidity 0.6.11; */\n\n/* import { ISubFactory } from \"../../../subfactory/v1/interfaces/ISubFactory.sol\"; */\n\n/// @title DebtLockerFactory instantiates DebtLockers.\ninterface IDebtLockerFactory is ISubFactory {\n\n /**\n @dev Emits an event indicating a DebtLocker was created.\n @param owner The owner of the DebtLocker.\n @param debtLocker The address of the DebtLocker.\n @param loan The Loan tied to the DebtLocker.\n */\n event DebtLockerCreated(address indexed owner, address debtLocker, address loan);\n\n /**\n @param debtLocker The address of a DebtLocker.\n @return The address of the owner of DebtLocker at `debtLocker`.\n */\n function owner(address debtLocker) external view returns (address);\n\n /**\n @param debtLocker Some address.\n @return Whether `debtLocker` is a DebtLocker.\n */\n function isLocker(address debtLocker) external view returns (bool);\n\n /**\n @dev The type of the factory (i.e FactoryType::DEBT_LOCKER_FACTORY).\n */\n function factoryType() external override pure returns (uint8);\n\n /**\n @dev Instantiates a DebtLocker. \n @dev It emits a `DebtLockerCreated` event. \n @param loan The Loan this DebtLocker will be tied to.\n @return debtLocker The address of the instantiated DebtLocker.\n */\n function newLocker(address loan) external returns (address debtLocker);\n\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers"
],
"": [
"ast"
]
}
}
}
},
"output": {
"contracts": {
"contracts/core/debt-locker/v1/interfaces/IDebtLockerFactory.sol": {
"IDebtLockerFactory": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "debtLocker",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "loan",
"type": "address"
}
],
"name": "DebtLockerCreated",
"type": "event"
},
{
"inputs": [],
"name": "factoryType",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "debtLocker",
"type": "address"
}
],
"name": "isLocker",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "loan",
"type": "address"
}
],
"name": "newLocker",
"outputs": [
{
"internalType": "address",
"name": "debtLocker",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "debtLocker",
"type": "address"
}
],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"factoryType()": "64e1fd55",
"isLocker(address)": "2ec63d7c",
"newLocker(address)": "19eb783a",
"owner(address)": "666e1b39"
}
}
},
"ISubFactory": {
"abi": [
{
"inputs": [],
"name": "factoryType",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "pure",
"type": "function"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"factoryType()": "64e1fd55"
}
}
}
}
},
"sources": {
"contracts/core/debt-locker/v1/interfaces/IDebtLockerFactory.sol": {
"ast": {
"absolutePath": "contracts/core/debt-locker/v1/interfaces/IDebtLockerFactory.sol",
"exportedSymbols": {
"IDebtLockerFactory": [
53
],
"ISubFactory": [
9
]
},
"id": 54,
"license": "AGPL-3.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"=",
"0.6",
".11"
],
"nodeType": "PragmaDirective",
"src": "140:24:0"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "260:71:0",
"text": "@title SubFactory creates instances downstream of another factory."
},
"fullyImplemented": false,
"id": 9,
"linearizedBaseContracts": [
9
],
"name": "ISubFactory",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": {
"id": 3,
"nodeType": "StructuredDocumentation",
"src": "360:48:0",
"text": "@dev The type of the factory"
},
"functionSelector": "64e1fd55",
"id": 8,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "factoryType",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 4,
"nodeType": "ParameterList",
"parameters": [],
"src": "433:2:0"
},
"returnParameters": {
"id": 7,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 8,
"src": "459:5:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 5,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "459:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "458:7:0"
},
"scope": 9,
"src": "413:53:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "external"
}
],
"scope": 54,
"src": "331:138:0"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 11,
"name": "ISubFactory",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 9,
"src": "748:11:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ISubFactory_$9",
"typeString": "contract ISubFactory"
}
},
"id": 12,
"nodeType": "InheritanceSpecifier",
"src": "748:11:0"
}
],
"contractDependencies": [
9
],
"contractKind": "interface",
"documentation": {
"id": 10,
"nodeType": "StructuredDocumentation",
"src": "661:55:0",
"text": "@title DebtLockerFactory instantiates DebtLockers."
},
"fullyImplemented": false,
"id": 53,
"linearizedBaseContracts": [
53,
9
],
"name": "IDebtLockerFactory",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": {
"id": 13,
"nodeType": "StructuredDocumentation",
"src": "767:249:0",
"text": "@dev Emits an event indicating a DebtLocker was created.\n@param owner The owner of the DebtLocker.\n@param debtLocker The address of the DebtLocker.\n@param loan The Loan tied to the DebtLocker."
},
"id": 21,
"name": "DebtLockerCreated",
"nodeType": "EventDefinition",
"parameters": {
"id": 20,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15,
"indexed": true,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 21,
"src": "1045:21:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 14,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1045:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 17,
"indexed": false,
"mutability": "mutable",
"name": "debtLocker",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 21,
"src": "1068:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 16,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1068:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 19,
"indexed": false,
"mutability": "mutable",
"name": "loan",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 21,
"src": "1088:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 18,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1088:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1044:57:0"
},
"src": "1021:81:0"
},
{
"body": null,
"documentation": {
"id": 22,
"nodeType": "StructuredDocumentation",
"src": "1108:139:0",
"text": "@param debtLocker The address of a DebtLocker.\n@return The address of the owner of DebtLocker at `debtLocker`."
},
"functionSelector": "666e1b39",
"id": 29,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "owner",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 25,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24,
"mutability": "mutable",
"name": "debtLocker",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 29,
"src": "1267:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 23,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1267:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1266:20:0"
},
"returnParameters": {
"id": 28,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 27,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 29,
"src": "1310:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 26,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1310:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1309:9:0"
},
"scope": 53,
"src": "1252:67:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 30,
"nodeType": "StructuredDocumentation",
"src": "1325:106:0",
"text": "@param debtLocker Some address.\n@return Whether `debtLocker` is a DebtLocker."
},
"functionSelector": "2ec63d7c",
"id": 37,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "isLocker",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 33,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 32,
"mutability": "mutable",
"name": "debtLocker",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 37,
"src": "1454:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 31,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1454:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1453:20:0"
},
"returnParameters": {
"id": 36,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 35,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 37,
"src": "1497:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 34,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1497:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1496:6:0"
},
"scope": 53,
"src": "1436:67:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"baseFunctions": [
8
],
"body": null,
"documentation": {
"id": 38,
"nodeType": "StructuredDocumentation",
"src": "1509:88:0",
"text": "@dev The type of the factory (i.e FactoryType::DEBT_LOCKER_FACTORY)."
},
"functionSelector": "64e1fd55",
"id": 44,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "factoryType",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 40,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "1634:8:0"
},
"parameters": {
"id": 39,
"nodeType": "ParameterList",
"parameters": [],
"src": "1622:2:0"
},
"returnParameters": {
"id": 43,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 42,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 44,
"src": "1657:5:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 41,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1657:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1656:7:0"
},
"scope": 53,
"src": "1602:62:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 45,
"nodeType": "StructuredDocumentation",
"src": "1670:250:0",
"text": "@dev Instantiates a DebtLocker. \n@dev It emits a `DebtLockerCreated` event. \n@param loan The Loan this DebtLocker will be tied to.\n@return debtLocker The address of the instantiated DebtLocker."
},
"functionSelector": "19eb783a",
"id": 52,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "newLocker",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 48,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 47,
"mutability": "mutable",
"name": "loan",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 52,
"src": "1944:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1944:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1943:14:0"
},
"returnParameters": {
"id": 51,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 50,
"mutability": "mutable",
"name": "debtLocker",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 52,
"src": "1976:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 49,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1976:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1975:20:0"
},
"scope": 53,
"src": "1925:71:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 54,
"src": "716:1283:0"
}
],
"src": "140:1860:0"
},
"id": 0
}
}
}
}