UNPKG

@ethsub/sol

Version:
600 lines 20.9 kB
{ "contractName": "Context", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n", "sourcePath": "@openzeppelin/contracts/utils/Context.sol", "ast": { "absolutePath": "@openzeppelin/contracts/utils/Context.sol", "exportedSymbols": { "Context": [ 4841 ] }, "id": 4842, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 4820, "literals": [ "solidity", ">=", "0.6", ".0", "<", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "33:31:28" }, { "abstract": true, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 4841, "linearizedBaseContracts": [ 4841 ], "name": "Context", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 4828, "nodeType": "Block", "src": "668:34:28", "statements": [ { "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4825, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "685:3:28", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4826, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "685:10:28", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "functionReturnParameters": 4824, "id": 4827, "nodeType": "Return", "src": "678:17:28" } ] }, "documentation": null, "id": 4829, "implemented": true, "kind": "function", "modifiers": [], "name": "_msgSender", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4821, "nodeType": "ParameterList", "parameters": [], "src": "617:2:28" }, "returnParameters": { "id": 4824, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4823, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4829, "src": "651:15:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, "typeName": { "id": 4822, "name": "address", "nodeType": "ElementaryTypeName", "src": "651:15:28", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "value": null, "visibility": "internal" } ], "src": "650:17:28" }, "scope": 4841, "src": "598:104:28", "stateMutability": "view", "virtual": true, "visibility": "internal" }, { "body": { "id": 4839, "nodeType": "Block", "src": "773:165:28", "statements": [ { "expression": { "argumentTypes": null, "id": 4834, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "783:4:28", "typeDescriptions": { "typeIdentifier": "t_contract$_Context_$4841", "typeString": "contract Context" } }, "id": 4835, "nodeType": "ExpressionStatement", "src": "783:4:28" }, { "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4836, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "923:3:28", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4837, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "data", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "923:8:28", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata" } }, "functionReturnParameters": 4833, "id": 4838, "nodeType": "Return", "src": "916:15:28" } ] }, "documentation": null, "id": 4840, "implemented": true, "kind": "function", "modifiers": [], "name": "_msgData", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4830, "nodeType": "ParameterList", "parameters": [], "src": "725:2:28" }, "returnParameters": { "id": 4833, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4832, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4840, "src": "759:12:28", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 4831, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "759:5:28", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "758:14:28" }, "scope": 4841, "src": "708:230:28", "stateMutability": "view", "virtual": true, "visibility": "internal" } ], "scope": 4842, "src": "566:374:28" } ], "src": "33:908:28" }, "legacyAST": { "attributes": { "absolutePath": "@openzeppelin/contracts/utils/Context.sol", "exportedSymbols": { "Context": [ 4841 ] }, "license": "MIT" }, "children": [ { "attributes": { "literals": [ "solidity", ">=", "0.6", ".0", "<", "0.8", ".0" ] }, "id": 4820, "name": "PragmaDirective", "src": "33:31:28" }, { "attributes": { "abstract": true, "baseContracts": [ null ], "contractDependencies": [ null ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "linearizedBaseContracts": [ 4841 ], "name": "Context", "scope": 4842 }, "children": [ { "attributes": { "documentation": null, "implemented": true, "isConstructor": false, "kind": "function", "modifiers": [ null ], "name": "_msgSender", "overrides": null, "scope": 4841, "stateMutability": "view", "virtual": true, "visibility": "internal" }, "children": [ { "attributes": { "parameters": [ null ] }, "children": [], "id": 4821, "name": "ParameterList", "src": "617:2:28" }, { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "", "overrides": null, "scope": 4829, "stateVariable": false, "storageLocation": "default", "type": "address payable", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "address", "stateMutability": "payable", "type": "address payable" }, "id": 4822, "name": "ElementaryTypeName", "src": "651:15:28" } ], "id": 4823, "name": "VariableDeclaration", "src": "651:15:28" } ], "id": 4824, "name": "ParameterList", "src": "650:17:28" }, { "children": [ { "attributes": { "functionReturnParameters": 4824 }, "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "sender", "referencedDeclaration": null, "type": "address payable" }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": -15, "type": "msg", "value": "msg" }, "id": 4825, "name": "Identifier", "src": "685:3:28" } ], "id": 4826, "name": "MemberAccess", "src": "685:10:28" } ], "id": 4827, "name": "Return", "src": "678:17:28" } ], "id": 4828, "name": "Block", "src": "668:34:28" } ], "id": 4829, "name": "FunctionDefinition", "src": "598:104:28" }, { "attributes": { "documentation": null, "implemented": true, "isConstructor": false, "kind": "function", "modifiers": [ null ], "name": "_msgData", "overrides": null, "scope": 4841, "stateMutability": "view", "virtual": true, "visibility": "internal" }, "children": [ { "attributes": { "parameters": [ null ] }, "children": [], "id": 4830, "name": "ParameterList", "src": "725:2:28" }, { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "", "overrides": null, "scope": 4840, "stateVariable": false, "storageLocation": "memory", "type": "bytes", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "bytes", "type": "bytes" }, "id": 4831, "name": "ElementaryTypeName", "src": "759:5:28" } ], "id": 4832, "name": "VariableDeclaration", "src": "759:12:28" } ], "id": 4833, "name": "ParameterList", "src": "758:14:28" }, { "children": [ { "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": -28, "type": "contract Context", "value": "this" }, "id": 4834, "name": "Identifier", "src": "783:4:28" } ], "id": 4835, "name": "ExpressionStatement", "src": "783:4:28" }, { "attributes": { "functionReturnParameters": 4833 }, "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "data", "referencedDeclaration": null, "type": "bytes calldata" }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": -15, "type": "msg", "value": "msg" }, "id": 4836, "name": "Identifier", "src": "923:3:28" } ], "id": 4837, "name": "MemberAccess", "src": "923:8:28" } ], "id": 4838, "name": "Return", "src": "916:15:28" } ], "id": 4839, "name": "Block", "src": "773:165:28" } ], "id": 4840, "name": "FunctionDefinition", "src": "708:230:28" } ], "id": 4841, "name": "ContractDefinition", "src": "566:374:28" } ], "id": 4842, "name": "SourceUnit", "src": "33:908:28" }, "compiler": { "name": "solc", "version": "0.6.12+commit.27d51765.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.4.3", "updatedAt": "2021-11-29T02:07:34.216Z", "devdoc": { "kind": "dev", "methods": {}, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }