UNPKG

core-artifacts

Version:

Consist artifacts of the maple protocol

821 lines (820 loc) 32.4 kB
{ "id": "7187521f4cebe704dcfd9ac275e03651", "_format": "hh-sol-build-info-1", "solcVersion": "0.6.11", "solcLongVersion": "0.6.11+commit.5ef660b1", "input": { "language": "Solidity", "sources": { "contracts/core/funding-locker/v1/interfaces/IFundingLockerFactory.sol": { "content": "// SPDX-License-Identifier: AGPL-3.0-or-later // hevm: flattened sources of contracts/core/funding-locker/v1/interfaces/IFundingLockerFactory.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/funding-locker/v1/interfaces/IFundingLockerFactory.sol\n/* pragma solidity 0.6.11; */\n\n/* import { ISubFactory } from \"../../../subfactory/v1/interfaces/ISubFactory.sol\"; */\n\n/// @title FundingLockerFactory instantiates FundingLockers.\ninterface IFundingLockerFactory is ISubFactory {\n\n /**\n @dev Emits an event indicating a FundingLocker was created.\n @param owner The owner of the FundingLocker.\n @param fundingLocker The address of the FundingLocker.\n @param liquidityAsset The Liquidity Asset this FundingLocker will escrow.\n */\n event FundingLockerCreated(address indexed owner, address fundingLocker, address liquidityAsset);\n\n /**\n @param fundingLocker The address of a FundingLocker.\n @return The address of the owner of FundingLocker at `fundingLocker`.\n */\n function owner(address fundingLocker) external view returns (address);\n\n /**\n @param fundingLocker Some address.\n @return Whether `fundingLocker` is a FundingLocker.\n */\n function isLocker(address fundingLocker) external view returns (bool);\n\n /**\n @dev The type of the factory (i.e FactoryType::FUNDING_LOCKER_FACTORY).\n */\n function factoryType() external override pure returns (uint8);\n\n /**\n @dev Instantiates a FundingLocker. \n @dev It emits a `FundingLockerCreated` event. \n @param liquidityAsset The Liquidity Asset this FundingLocker will escrow.\n @return fundingLocker The address of the instantiated FundingLocker.\n */\n function newLocker(address liquidityAsset) external returns (address fundingLocker);\n\n}\n" } }, "settings": { "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "abi", "evm.bytecode", "evm.deployedBytecode", "evm.methodIdentifiers" ], "": [ "ast" ] } } } }, "output": { "contracts": { "contracts/core/funding-locker/v1/interfaces/IFundingLockerFactory.sol": { "IFundingLockerFactory": { "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": false, "internalType": "address", "name": "fundingLocker", "type": "address" }, { "indexed": false, "internalType": "address", "name": "liquidityAsset", "type": "address" } ], "name": "FundingLockerCreated", "type": "event" }, { "inputs": [], "name": "factoryType", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "fundingLocker", "type": "address" } ], "name": "isLocker", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "liquidityAsset", "type": "address" } ], "name": "newLocker", "outputs": [ { "internalType": "address", "name": "fundingLocker", "type": "address" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "fundingLocker", "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/funding-locker/v1/interfaces/IFundingLockerFactory.sol": { "ast": { "absolutePath": "contracts/core/funding-locker/v1/interfaces/IFundingLockerFactory.sol", "exportedSymbols": { "IFundingLockerFactory": [ 53 ], "ISubFactory": [ 9 ] }, "id": 54, "license": "AGPL-3.0-or-later", "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "=", "0.6", ".11" ], "nodeType": "PragmaDirective", "src": "146:24:0" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": { "id": 2, "nodeType": "StructuredDocumentation", "src": "266: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": "366: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": "439:2:0" }, "returnParameters": { "id": 7, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8, "src": "465:5:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 5, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "465:5:0", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "src": "464:7:0" }, "scope": 9, "src": "419:53:0", "stateMutability": "pure", "virtual": false, "visibility": "external" } ], "scope": 54, "src": "337:138:0" }, { "abstract": false, "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 11, "name": "ISubFactory", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 9, "src": "769:11:0", "typeDescriptions": { "typeIdentifier": "t_contract$_ISubFactory_$9", "typeString": "contract ISubFactory" } }, "id": 12, "nodeType": "InheritanceSpecifier", "src": "769:11:0" } ], "contractDependencies": [ 9 ], "contractKind": "interface", "documentation": { "id": 10, "nodeType": "StructuredDocumentation", "src": "673:61:0", "text": "@title FundingLockerFactory instantiates FundingLockers." }, "fullyImplemented": false, "id": 53, "linearizedBaseContracts": [ 53, 9 ], "name": "IFundingLockerFactory", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": { "id": 13, "nodeType": "StructuredDocumentation", "src": "788:289:0", "text": "@dev Emits an event indicating a FundingLocker was created.\n@param owner The owner of the FundingLocker.\n@param fundingLocker The address of the FundingLocker.\n@param liquidityAsset The Liquidity Asset this FundingLocker will escrow." }, "id": 21, "name": "FundingLockerCreated", "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": "1109:21:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 14, "name": "address", "nodeType": "ElementaryTypeName", "src": "1109:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 17, "indexed": false, "mutability": "mutable", "name": "fundingLocker", "nodeType": "VariableDeclaration", "overrides": null, "scope": 21, "src": "1132:21:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 16, "name": "address", "nodeType": "ElementaryTypeName", "src": "1132:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 19, "indexed": false, "mutability": "mutable", "name": "liquidityAsset", "nodeType": "VariableDeclaration", "overrides": null, "scope": 21, "src": "1155:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 18, "name": "address", "nodeType": "ElementaryTypeName", "src": "1155:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1108:70:0" }, "src": "1082:97:0" }, { "body": null, "documentation": { "id": 22, "nodeType": "StructuredDocumentation", "src": "1185:151:0", "text": "@param fundingLocker The address of a FundingLocker.\n@return The address of the owner of FundingLocker at `fundingLocker`." }, "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": "fundingLocker", "nodeType": "VariableDeclaration", "overrides": null, "scope": 29, "src": "1356:21:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 23, "name": "address", "nodeType": "ElementaryTypeName", "src": "1356:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1355:23:0" }, "returnParameters": { "id": 28, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 27, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 29, "src": "1402:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 26, "name": "address", "nodeType": "ElementaryTypeName", "src": "1402:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1401:9:0" }, "scope": 53, "src": "1341:70:0", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": { "id": 30, "nodeType": "StructuredDocumentation", "src": "1417:115:0", "text": "@param fundingLocker Some address.\n@return Whether `fundingLocker` is a FundingLocker." }, "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": "fundingLocker", "nodeType": "VariableDeclaration", "overrides": null, "scope": 37, "src": "1555:21:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 31, "name": "address", "nodeType": "ElementaryTypeName", "src": "1555:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1554:23:0" }, "returnParameters": { "id": 36, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 35, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 37, "src": "1601:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 34, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1601:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "1600:6:0" }, "scope": 53, "src": "1537:70:0", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "baseFunctions": [ 8 ], "body": null, "documentation": { "id": 38, "nodeType": "StructuredDocumentation", "src": "1613:91:0", "text": "@dev The type of the factory (i.e FactoryType::FUNDING_LOCKER_FACTORY)." }, "functionSelector": "64e1fd55", "id": 44, "implemented": false, "kind": "function", "modifiers": [], "name": "factoryType", "nodeType": "FunctionDefinition", "overrides": { "id": 40, "nodeType": "OverrideSpecifier", "overrides": [], "src": "1741:8:0" }, "parameters": { "id": 39, "nodeType": "ParameterList", "parameters": [], "src": "1729:2:0" }, "returnParameters": { "id": 43, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 42, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 44, "src": "1764:5:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 41, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "1764:5:0", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "src": "1763:7:0" }, "scope": 53, "src": "1709:62:0", "stateMutability": "pure", "virtual": false, "visibility": "external" }, { "body": null, "documentation": { "id": 45, "nodeType": "StructuredDocumentation", "src": "1777:277:0", "text": "@dev Instantiates a FundingLocker. \n@dev It emits a `FundingLockerCreated` event. \n@param liquidityAsset The Liquidity Asset this FundingLocker will escrow.\n@return fundingLocker The address of the instantiated FundingLocker." }, "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": "liquidityAsset", "nodeType": "VariableDeclaration", "overrides": null, "scope": 52, "src": "2078:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 46, "name": "address", "nodeType": "ElementaryTypeName", "src": "2078:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "2077:24:0" }, "returnParameters": { "id": 51, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 50, "mutability": "mutable", "name": "fundingLocker", "nodeType": "VariableDeclaration", "overrides": null, "scope": 52, "src": "2120:21:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 49, "name": "address", "nodeType": "ElementaryTypeName", "src": "2120:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "2119:23:0" }, "scope": 53, "src": "2059:84:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 54, "src": "734:1412:0" } ], "src": "146:2001:0" }, "id": 0 } } } }