@maplelabs/core-artifacts
Version:
Consist artifacts of the maple protocol
961 lines (960 loc) • 38.9 kB
JSON
{
"id": "b01d33ff9f6ee28f1e706d20a822b0d7",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.6.11",
"solcLongVersion": "0.6.11+commit.5ef660b1",
"input": {
"language": "Solidity",
"sources": {
"contracts/core/stake-locker/v1/interfaces/IStakeLockerFactory.sol": {
"content": "// SPDX-License-Identifier: AGPL-3.0-or-later // hevm: flattened sources of contracts/core/stake-locker/v1/interfaces/IStakeLockerFactory.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/stake-locker/v1/interfaces/IStakeLockerFactory.sol\n/* pragma solidity 0.6.11; */\n\n/* import { ISubFactory } from \"../../../subfactory/v1/interfaces/ISubFactory.sol\"; */\n\n/// @title StakeLockerFactory instantiates StakeLockers.\ninterface IStakeLockerFactory is ISubFactory {\n\n /**\n @dev Emits an event indicating a StakeLocker was created.\n @param owner The owner of the StakeLocker.\n @param stakeLocker The address of the StakeLocker.\n @param stakeAsset The Stake Asset this StakeLocker will escrow.\n @param liquidityAsset The address of the Liquidity Asset (as defined in the Pool).\n @param name The name of the StakeLockerFDTs.\n @param symbol The symbol of the StakeLockerFDTs.\n */\n event StakeLockerCreated(\n address indexed owner,\n address stakeLocker,\n address stakeAsset,\n address liquidityAsset,\n string name,\n string symbol\n );\n\n /**\n @param stakeLocker The address of a StakeLocker.\n @return The address of the owner of StakeLocker at `stakeLocker`.\n */\n function owner(address stakeLocker) external returns (address);\n\n /**\n @param stakeLocker Some address.\n @return Whether `stakeLocker` is a StakeLocker.\n */\n function isLocker(address stakeLocker) external returns (bool);\n\n /**\n @dev The type of the factory (i.e FactoryType::STAKE_LOCKER_FACTORY).\n */\n function factoryType() external override pure returns (uint8);\n\n /**\n @dev Instantiate a StakeLocker.\n @dev It emits a `StakeLockerCreated` event.\n @param stakeAsset The address of the Stake Asset (generally Balancer Pool BPTs).\n @param liquidityAsset The address of the Liquidity Asset (as defined in the Pool).\n @return stakeLocker The address of the instantiated StakeLocker.\n */\n function newLocker(address stakeAsset, address liquidityAsset) external returns (address stakeLocker);\n\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers"
],
"": [
"ast"
]
}
}
}
},
"output": {
"contracts": {
"contracts/core/stake-locker/v1/interfaces/IStakeLockerFactory.sol": {
"IStakeLockerFactory": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "stakeLocker",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "stakeAsset",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "liquidityAsset",
"type": "address"
},
{
"indexed": false,
"internalType": "string",
"name": "name",
"type": "string"
},
{
"indexed": false,
"internalType": "string",
"name": "symbol",
"type": "string"
}
],
"name": "StakeLockerCreated",
"type": "event"
},
{
"inputs": [],
"name": "factoryType",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "stakeLocker",
"type": "address"
}
],
"name": "isLocker",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "stakeAsset",
"type": "address"
},
{
"internalType": "address",
"name": "liquidityAsset",
"type": "address"
}
],
"name": "newLocker",
"outputs": [
{
"internalType": "address",
"name": "stakeLocker",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "stakeLocker",
"type": "address"
}
],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"factoryType()": "64e1fd55",
"isLocker(address)": "2ec63d7c",
"newLocker(address,address)": "85de067e",
"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/stake-locker/v1/interfaces/IStakeLockerFactory.sol": {
"ast": {
"absolutePath": "contracts/core/stake-locker/v1/interfaces/IStakeLockerFactory.sol",
"exportedSymbols": {
"IStakeLockerFactory": [
61
],
"ISubFactory": [
9
]
},
"id": 62,
"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": "262: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": "362: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": "435:2:0"
},
"returnParameters": {
"id": 7,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 8,
"src": "461:5:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 5,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "461:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "460:7:0"
},
"scope": 9,
"src": "415:53:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "external"
}
],
"scope": 62,
"src": "333:138:0"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 11,
"name": "ISubFactory",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 9,
"src": "755:11:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ISubFactory_$9",
"typeString": "contract ISubFactory"
}
},
"id": 12,
"nodeType": "InheritanceSpecifier",
"src": "755:11:0"
}
],
"contractDependencies": [
9
],
"contractKind": "interface",
"documentation": {
"id": 10,
"nodeType": "StructuredDocumentation",
"src": "665:57:0",
"text": "@title StakeLockerFactory instantiates StakeLockers."
},
"fullyImplemented": false,
"id": 61,
"linearizedBaseContracts": [
61,
9
],
"name": "IStakeLockerFactory",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": {
"id": 13,
"nodeType": "StructuredDocumentation",
"src": "774:496:0",
"text": "@dev Emits an event indicating a StakeLocker was created.\n@param owner The owner of the StakeLocker.\n@param stakeLocker The address of the StakeLocker.\n@param stakeAsset The Stake Asset this StakeLocker will escrow.\n@param liquidityAsset The address of the Liquidity Asset (as defined in the Pool).\n@param name The name of the StakeLockerFDTs.\n@param symbol The symbol of the StakeLockerFDTs."
},
"id": 27,
"name": "StakeLockerCreated",
"nodeType": "EventDefinition",
"parameters": {
"id": 26,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15,
"indexed": true,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 27,
"src": "1309:21:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 14,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1309:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 17,
"indexed": false,
"mutability": "mutable",
"name": "stakeLocker",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 27,
"src": "1340:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 16,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1340:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 19,
"indexed": false,
"mutability": "mutable",
"name": "stakeAsset",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 27,
"src": "1369:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 18,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1369:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 21,
"indexed": false,
"mutability": "mutable",
"name": "liquidityAsset",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 27,
"src": "1397:22:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1397:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 23,
"indexed": false,
"mutability": "mutable",
"name": "name",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 27,
"src": "1429:11:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 22,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1429:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 25,
"indexed": false,
"mutability": "mutable",
"name": "symbol",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 27,
"src": "1450:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 24,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1450:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1299:170:0"
},
"src": "1275:195:0"
},
{
"body": null,
"documentation": {
"id": 28,
"nodeType": "StructuredDocumentation",
"src": "1476:143:0",
"text": "@param stakeLocker The address of a StakeLocker.\n@return The address of the owner of StakeLocker at `stakeLocker`."
},
"functionSelector": "666e1b39",
"id": 35,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "owner",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 31,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 30,
"mutability": "mutable",
"name": "stakeLocker",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 35,
"src": "1639:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 29,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1639:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1638:21:0"
},
"returnParameters": {
"id": 34,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 33,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 35,
"src": "1678:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 32,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1678:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1677:9:0"
},
"scope": 61,
"src": "1624:63:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 36,
"nodeType": "StructuredDocumentation",
"src": "1693:109:0",
"text": "@param stakeLocker Some address.\n@return Whether `stakeLocker` is a StakeLocker."
},
"functionSelector": "2ec63d7c",
"id": 43,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "isLocker",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 39,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 38,
"mutability": "mutable",
"name": "stakeLocker",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 43,
"src": "1825:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 37,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1825:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1824:21:0"
},
"returnParameters": {
"id": 42,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 41,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 43,
"src": "1864:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 40,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1864:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1863:6:0"
},
"scope": 61,
"src": "1807:63:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"baseFunctions": [
8
],
"body": null,
"documentation": {
"id": 44,
"nodeType": "StructuredDocumentation",
"src": "1876:89:0",
"text": "@dev The type of the factory (i.e FactoryType::STAKE_LOCKER_FACTORY)."
},
"functionSelector": "64e1fd55",
"id": 50,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "factoryType",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 46,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "2002:8:0"
},
"parameters": {
"id": 45,
"nodeType": "ParameterList",
"parameters": [],
"src": "1990:2:0"
},
"returnParameters": {
"id": 49,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 48,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 50,
"src": "2025:5:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 47,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "2025:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2024:7:0"
},
"scope": 61,
"src": "1970:62:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 51,
"nodeType": "StructuredDocumentation",
"src": "2038:371:0",
"text": "@dev Instantiate a StakeLocker.\n@dev It emits a `StakeLockerCreated` event.\n@param stakeAsset The address of the Stake Asset (generally Balancer Pool BPTs).\n@param liquidityAsset The address of the Liquidity Asset (as defined in the Pool).\n@return stakeLocker The address of the instantiated StakeLocker."
},
"functionSelector": "85de067e",
"id": 60,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "newLocker",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 56,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 53,
"mutability": "mutable",
"name": "stakeAsset",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 60,
"src": "2433:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 52,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2433:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 55,
"mutability": "mutable",
"name": "liquidityAsset",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 60,
"src": "2453:22:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 54,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2453:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2432:44:0"
},
"returnParameters": {
"id": 59,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 58,
"mutability": "mutable",
"name": "stakeLocker",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 60,
"src": "2495:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 57,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2495:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2494:21:0"
},
"scope": 61,
"src": "2414:102:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 62,
"src": "722:1797:0"
}
],
"src": "142:2378:0"
},
"id": 0
}
}
}
}