{
  "id": "6feb2a95587ea0d9256e33ae57c24b03",
  "_format": "hh-sol-build-info-1",
  "solcVersion": "0.6.12",
  "solcLongVersion": "0.6.12+commit.27d51765",
  "input": {
    "language": "Solidity",
    "sources": {
      "contracts/FunctionSelector.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.6.12;\r\n\r\ncontract FunctionSelector {\r\n    function getSelector(string calldata _func) external pure returns (bytes4) {\r\n        return bytes4(keccak256(bytes(_func)));\r\n    }\r\n}\r\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "abi",
            "evm.bytecode",
            "evm.deployedBytecode",
            "evm.methodIdentifiers",
            "metadata",
            "devdoc",
            "userdoc",
            "storageLayout",
            "evm.gasEstimates"
          ],
          "": [
            "ast"
          ]
        }
      },
      "metadata": {
        "useLiteralContent": true
      }
    }
  },
  "output": {
    "contracts": {
      "contracts/FunctionSelector.sol": {
        "FunctionSelector": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "string",
                  "name": "_func",
                  "type": "string"
                }
              ],
              "name": "getSelector",
              "outputs": [
                {
                  "internalType": "bytes4",
                  "name": "",
                  "type": "bytes4"
                }
              ],
              "stateMutability": "pure",
              "type": "function"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "608060405234801561001057600080fd5b5061010e806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806380a003ff14602d575b600080fd5b609760048036036020811015604157600080fd5b810190602081018135640100000000811115605b57600080fd5b820183602082011115606c57600080fd5b80359060200191846001830284011164010000000083111715608d57600080fd5b50909250905060b4565b604080516001600160e01b03199092168252519081900360200190f35b6000828260405180838380828437604051920182900390912097965050505050505056fea26469706673582212203971922d42597f52f39f228e430914e406c778e3882e1db0322d0ef22a387a5764736f6c634300060c0033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10E DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x80A003FF EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x97 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x41 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 PUSH1 0x20 DUP2 ADD DUP2 CALLDATALOAD PUSH5 0x100000000 DUP2 GT ISZERO PUSH1 0x5B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH1 0x6C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH5 0x100000000 DUP4 GT OR ISZERO PUSH1 0x8D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP SWAP1 SWAP3 POP SWAP1 POP PUSH1 0xB4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP3 DUP3 PUSH1 0x40 MLOAD DUP1 DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x40 MLOAD SWAP3 ADD DUP3 SWAP1 SUB SWAP1 SWAP2 KECCAK256 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CODECOPY PUSH18 0x922D42597F52F39F228E430914E406C778E3 DUP9 0x2E SAR 0xB0 ORIGIN 0x2D 0xE CALLCODE 0x2A CODESIZE PUSH27 0x5764736F6C634300060C0033000000000000000000000000000000 ",
              "sourceMap": "60:168:0:-:0;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "6080604052348015600f57600080fd5b506004361060285760003560e01c806380a003ff14602d575b600080fd5b609760048036036020811015604157600080fd5b810190602081018135640100000000811115605b57600080fd5b820183602082011115606c57600080fd5b80359060200191846001830284011164010000000083111715608d57600080fd5b50909250905060b4565b604080516001600160e01b03199092168252519081900360200190f35b6000828260405180838380828437604051920182900390912097965050505050505056fea26469706673582212203971922d42597f52f39f228e430914e406c778e3882e1db0322d0ef22a387a5764736f6c634300060c0033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x80A003FF EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x97 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x41 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 PUSH1 0x20 DUP2 ADD DUP2 CALLDATALOAD PUSH5 0x100000000 DUP2 GT ISZERO PUSH1 0x5B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH1 0x6C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH5 0x100000000 DUP4 GT OR ISZERO PUSH1 0x8D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP SWAP1 SWAP3 POP SWAP1 POP PUSH1 0xB4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP3 DUP3 PUSH1 0x40 MLOAD DUP1 DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x40 MLOAD SWAP3 ADD DUP3 SWAP1 SUB SWAP1 SWAP2 KECCAK256 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CODECOPY PUSH18 0x922D42597F52F39F228E430914E406C778E3 DUP9 0x2E SAR 0xB0 ORIGIN 0x2D 0xE CALLCODE 0x2A CODESIZE PUSH27 0x5764736F6C634300060C0033000000000000000000000000000000 ",
              "sourceMap": "60:168:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;93:132;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;93:132:0;;-1:-1:-1;93:132:0;-1:-1:-1;93:132:0;:::i;:::-;;;;-1:-1:-1;;;;;;93:132:0;;;;;;;;;;;;;;;160:6;209:5;;193:23;;;;;;;;;;;;;;;;;;;;93:132;-1:-1:-1;;;;;;;93:132:0:o"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "54000",
                "executionCost": "105",
                "totalCost": "54105"
              },
              "external": {
                "getSelector(string)": "infinite"
              }
            },
            "methodIdentifiers": {
              "getSelector(string)": "80a003ff"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_func\",\"type\":\"string\"}],\"name\":\"getSelector\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/FunctionSelector.sol\":\"FunctionSelector\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/FunctionSelector.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\r\\npragma solidity 0.6.12;\\r\\n\\r\\ncontract FunctionSelector {\\r\\n    function getSelector(string calldata _func) external pure returns (bytes4) {\\r\\n        return bytes4(keccak256(bytes(_func)));\\r\\n    }\\r\\n}\\r\\n\",\"keccak256\":\"0x141c1c90efad8bbd0ec3bf8ba1bb38e373fb01012734906ec981f688688d6e51\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      }
    },
    "sources": {
      "contracts/FunctionSelector.sol": {
        "ast": {
          "absolutePath": "contracts/FunctionSelector.sol",
          "exportedSymbols": {
            "FunctionSelector": [
              20
            ]
          },
          "id": 21,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 1,
              "literals": [
                "solidity",
                "0.6",
                ".12"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:0"
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "contract",
              "documentation": null,
              "fullyImplemented": true,
              "id": 20,
              "linearizedBaseContracts": [
                20
              ],
              "name": "FunctionSelector",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 18,
                    "nodeType": "Block",
                    "src": "168:57:0",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 13,
                                      "name": "_func",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3,
                                      "src": "209:5:0",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_string_calldata_ptr",
                                        "typeString": "string calldata"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_string_calldata_ptr",
                                        "typeString": "string calldata"
                                      }
                                    ],
                                    "id": 12,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "203:5:0",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
                                      "typeString": "type(bytes storage pointer)"
                                    },
                                    "typeName": {
                                      "id": 11,
                                      "name": "bytes",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "203:5:0",
                                      "typeDescriptions": {
                                        "typeIdentifier": null,
                                        "typeString": null
                                      }
                                    }
                                  },
                                  "id": 14,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "203:12:0",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_calldata_ptr",
                                    "typeString": "bytes calldata"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes_calldata_ptr",
                                    "typeString": "bytes calldata"
                                  }
                                ],
                                "id": 10,
                                "name": "keccak256",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -8,
                                "src": "193:9:0",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                  "typeString": "function (bytes memory) pure returns (bytes32)"
                                }
                              },
                              "id": 15,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "193:23:0",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 9,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "186:6:0",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_bytes4_$",
                              "typeString": "type(bytes4)"
                            },
                            "typeName": {
                              "id": 8,
                              "name": "bytes4",
                              "nodeType": "ElementaryTypeName",
                              "src": "186:6:0",
                              "typeDescriptions": {
                                "typeIdentifier": null,
                                "typeString": null
                              }
                            }
                          },
                          "id": 16,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "186:31:0",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes4",
                            "typeString": "bytes4"
                          }
                        },
                        "functionReturnParameters": 7,
                        "id": 17,
                        "nodeType": "Return",
                        "src": "179:38:0"
                      }
                    ]
                  },
                  "documentation": null,
                  "functionSelector": "80a003ff",
                  "id": 19,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getSelector",
                  "nodeType": "FunctionDefinition",
                  "overrides": null,
                  "parameters": {
                    "id": 4,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3,
                        "mutability": "mutable",
                        "name": "_func",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 19,
                        "src": "114:21:0",
                        "stateVariable": false,
                        "storageLocation": "calldata",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_calldata_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 2,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "114:6:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "113:23:0"
                  },
                  "returnParameters": {
                    "id": 7,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "overrides": null,
                        "scope": 19,
                        "src": "160:6:0",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        "typeName": {
                          "id": 5,
                          "name": "bytes4",
                          "nodeType": "ElementaryTypeName",
                          "src": "160:6:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes4",
                            "typeString": "bytes4"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "src": "159:8:0"
                  },
                  "scope": 20,
                  "src": "93:132:0",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 21,
              "src": "60:168:0"
            }
          ],
          "src": "33:197:0"
        },
        "id": 0
      }
    }
  }
}
