jcc-solidity-utils
Version:
jcc solidity utils
801 lines • 31 kB
JSON
{
"contractName": "SupportsInterface",
"abi": [
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"constant": true,
"inputs": [
{
"name": "_interfaceID",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"name\":\"_interfaceID\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{\"supportsInterface(bytes4)\":{\"details\":\"Function to check which interfaces are suported by this contract.\",\"params\":{\"_interfaceID\":\"Id of the interface.\"}}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/erc/SupportsInterface.sol\":\"SupportsInterface\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/erc/SupportsInterface.sol\":{\"keccak256\":\"0x55bd292395343e0f439730aed21655daddef44616216371de1a9db8f03144039\",\"urls\":[\"bzzr://a8febb7b812577e6a674a6c472a84f54b22c759b2ef738eabbdd409b2b0fa36c\"]},\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/interface/IERC165.sol\":{\"keccak256\":\"0xee81abfa8e8f99b1cae1f1446edd26ef7cafc1d181dfd2de20c35b757870197d\",\"urls\":[\"bzzr://da0ab0847b6d4911112d76c608f92763cc89c7574dc0c71c4da86821baffbc8c\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b507f01ffc9a70000000000000000000000000000000000000000000000000000000060009081526020527f67be87c3ff9960ca1e9cfac5cab2ff4747269cf9ed20c9b7306235ac35a491c5805460ff1916600117905560eb806100746000396000f300608060405260043610603e5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146043575b600080fd5b348015604e57600080fd5b5060777bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1960043516608b565b604080519115158252519081900360200190f35b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660009081526020819052604090205460ff16905600a165627a7a72305820850a23a2ebaf688f5fdc79cff0f2d3aaf8c05498898e2959aa74e297b1c758200029",
"deployedBytecode": "0x608060405260043610603e5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146043575b600080fd5b348015604e57600080fd5b5060777bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1960043516608b565b604080519115158252519081900360200190f35b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660009081526020819052604090205460ff16905600a165627a7a72305820850a23a2ebaf688f5fdc79cff0f2d3aaf8c05498898e2959aa74e297b1c758200029",
"sourceMap": "144:604:3:-;;;400:80;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;427:31:3;:19;:31;;;;;;:38;;-1:-1:-1;;427:38:3;461:4;427:38;;;144:604;;;;;;",
"deployedSourceMap": "144:604:3:-;;;;;;;;;;;;;;;;;;;;;;;618:128;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;618:128:3;-1:-1:-1;;618:128:3;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;708:33:3;689:4;708:33;;;;;;;;;;;;;;618:128::o",
"source": "pragma solidity >=0.4.24;\n\nimport \"../interface/IERC165.sol\";\n\n/**\n * @dev Implementation of standard for detect smart contract interfaces.\n */\ncontract SupportsInterface is IERC165 {\n /**\n * @dev Mapping of supported intefraces.\n * @notice You must not set element 0xffffffff to true.\n */\n mapping(bytes4 => bool) internal supportedInterfaces;\n\n /**\n * @dev Contract constructor.\n */\n constructor() public {\n supportedInterfaces[0x01ffc9a7] = true; // ERC165\n }\n\n /**\n * @dev Function to check which interfaces are suported by this contract.\n * @param _interfaceID Id of the interface.\n */\n function supportsInterface(bytes4 _interfaceID) external view returns (bool) {\n return supportedInterfaces[_interfaceID];\n }\n}\n",
"sourcePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/erc/SupportsInterface.sol",
"ast": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/erc/SupportsInterface.sol",
"exportedSymbols": {
"SupportsInterface": [
816
]
},
"id": 817,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 786,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:3"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/interface/IERC165.sol",
"file": "../interface/IERC165.sol",
"id": 787,
"nodeType": "ImportDirective",
"scope": 817,
"sourceUnit": 907,
"src": "27:34:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 788,
"name": "IERC165",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 906,
"src": "174:7:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC165_$906",
"typeString": "contract IERC165"
}
},
"id": 789,
"nodeType": "InheritanceSpecifier",
"src": "174:7:3"
}
],
"contractDependencies": [
906
],
"contractKind": "contract",
"documentation": "@dev Implementation of standard for detect smart contract interfaces.",
"fullyImplemented": true,
"id": 816,
"linearizedBaseContracts": [
816,
906
],
"name": "SupportsInterface",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 793,
"name": "supportedInterfaces",
"nodeType": "VariableDeclaration",
"scope": 816,
"src": "299:52:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_bool_$",
"typeString": "mapping(bytes4 => bool)"
},
"typeName": {
"id": 792,
"keyType": {
"id": 790,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "307:6:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "Mapping",
"src": "299:23:3",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_bool_$",
"typeString": "mapping(bytes4 => bool)"
},
"valueType": {
"id": 791,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "317:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 802,
"nodeType": "Block",
"src": "421:59:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 800,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 796,
"name": "supportedInterfaces",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 793,
"src": "427:19:3",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_bool_$",
"typeString": "mapping(bytes4 => bool)"
}
},
"id": 798,
"indexExpression": {
"argumentTypes": null,
"hexValue": "30783031666663396137",
"id": 797,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "447:10:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_33540519_by_1",
"typeString": "int_const 33540519"
},
"value": "0x01ffc9a7"
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "427:31:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 799,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "461:4:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "427:38:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 801,
"nodeType": "ExpressionStatement",
"src": "427:38:3"
}
]
},
"documentation": "@dev Contract constructor.",
"id": 803,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 794,
"nodeType": "ParameterList",
"parameters": [],
"src": "411:2:3"
},
"payable": false,
"returnParameters": {
"id": 795,
"nodeType": "ParameterList",
"parameters": [],
"src": "421:0:3"
},
"scope": 816,
"src": "400:80:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 814,
"nodeType": "Block",
"src": "695:51:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 810,
"name": "supportedInterfaces",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 793,
"src": "708:19:3",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_bool_$",
"typeString": "mapping(bytes4 => bool)"
}
},
"id": 812,
"indexExpression": {
"argumentTypes": null,
"id": 811,
"name": "_interfaceID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "728:12:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "708:33:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 809,
"id": 813,
"nodeType": "Return",
"src": "701:40:3"
}
]
},
"documentation": "@dev Function to check which interfaces are suported by this contract.\n@param _interfaceID Id of the interface.",
"id": 815,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "supportsInterface",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 806,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 805,
"name": "_interfaceID",
"nodeType": "VariableDeclaration",
"scope": 815,
"src": "645:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 804,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "645:6:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "644:21:3"
},
"payable": false,
"returnParameters": {
"id": 809,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 808,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 815,
"src": "689:4:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 807,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "689:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "688:6:3"
},
"scope": 816,
"src": "618:128:3",
"stateMutability": "view",
"superFunction": 905,
"visibility": "external"
}
],
"scope": 817,
"src": "144:604:3"
}
],
"src": "0:749:3"
},
"legacyAST": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/erc/SupportsInterface.sol",
"exportedSymbols": {
"SupportsInterface": [
816
]
},
"id": 817,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 786,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:3"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/interface/IERC165.sol",
"file": "../interface/IERC165.sol",
"id": 787,
"nodeType": "ImportDirective",
"scope": 817,
"sourceUnit": 907,
"src": "27:34:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 788,
"name": "IERC165",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 906,
"src": "174:7:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC165_$906",
"typeString": "contract IERC165"
}
},
"id": 789,
"nodeType": "InheritanceSpecifier",
"src": "174:7:3"
}
],
"contractDependencies": [
906
],
"contractKind": "contract",
"documentation": "@dev Implementation of standard for detect smart contract interfaces.",
"fullyImplemented": true,
"id": 816,
"linearizedBaseContracts": [
816,
906
],
"name": "SupportsInterface",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 793,
"name": "supportedInterfaces",
"nodeType": "VariableDeclaration",
"scope": 816,
"src": "299:52:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_bool_$",
"typeString": "mapping(bytes4 => bool)"
},
"typeName": {
"id": 792,
"keyType": {
"id": 790,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "307:6:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "Mapping",
"src": "299:23:3",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_bool_$",
"typeString": "mapping(bytes4 => bool)"
},
"valueType": {
"id": 791,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "317:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 802,
"nodeType": "Block",
"src": "421:59:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 800,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 796,
"name": "supportedInterfaces",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 793,
"src": "427:19:3",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_bool_$",
"typeString": "mapping(bytes4 => bool)"
}
},
"id": 798,
"indexExpression": {
"argumentTypes": null,
"hexValue": "30783031666663396137",
"id": 797,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "447:10:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_33540519_by_1",
"typeString": "int_const 33540519"
},
"value": "0x01ffc9a7"
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "427:31:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 799,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "461:4:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "427:38:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 801,
"nodeType": "ExpressionStatement",
"src": "427:38:3"
}
]
},
"documentation": "@dev Contract constructor.",
"id": 803,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 794,
"nodeType": "ParameterList",
"parameters": [],
"src": "411:2:3"
},
"payable": false,
"returnParameters": {
"id": 795,
"nodeType": "ParameterList",
"parameters": [],
"src": "421:0:3"
},
"scope": 816,
"src": "400:80:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 814,
"nodeType": "Block",
"src": "695:51:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 810,
"name": "supportedInterfaces",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 793,
"src": "708:19:3",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_bool_$",
"typeString": "mapping(bytes4 => bool)"
}
},
"id": 812,
"indexExpression": {
"argumentTypes": null,
"id": 811,
"name": "_interfaceID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "728:12:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "708:33:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 809,
"id": 813,
"nodeType": "Return",
"src": "701:40:3"
}
]
},
"documentation": "@dev Function to check which interfaces are suported by this contract.\n@param _interfaceID Id of the interface.",
"id": 815,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "supportsInterface",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 806,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 805,
"name": "_interfaceID",
"nodeType": "VariableDeclaration",
"scope": 815,
"src": "645:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 804,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "645:6:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "644:21:3"
},
"payable": false,
"returnParameters": {
"id": 809,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 808,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 815,
"src": "689:4:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 807,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "689:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "688:6:3"
},
"scope": 816,
"src": "618:128:3",
"stateMutability": "view",
"superFunction": 905,
"visibility": "external"
}
],
"scope": 817,
"src": "144:604:3"
}
],
"src": "0:749:3"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.0.16",
"updatedAt": "2021-03-06T09:30:00.936Z",
"devdoc": {
"methods": {
"supportsInterface(bytes4)": {
"details": "Function to check which interfaces are suported by this contract.",
"params": {
"_interfaceID": "Id of the interface."
}
}
}
},
"userdoc": {
"methods": {}
}
}