UNPKG

@andrekorol/kollateral-contracts

Version:

Kollateral protocol, the flash loan building block

564 lines 19.5 kB
{ "contractName": "Context", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.7.3+commit.9bfce1f6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/GSN/Context.sol\":\"Context\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x910a2e625b71168563edf9eeef55a50d6d699acfe27ceba3921f291829a8f938\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://248246ac66e6479dce1ad7d4945ec5540c98ceb09881e93c93f7c48d5772925c\",\"dweb:/ipfs/QmXr8tmUiZgEYid6ixeeBRmTdUnASWjKzhP3KRxMPy8fRt\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.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/GSN/Context.sol", "ast": { "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", "exportedSymbols": { "Context": [ 5279 ] }, "id": 5280, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 5258, "literals": [ "solidity", "^", "0.7", ".0" ], "nodeType": "PragmaDirective", "src": "33:23:38" }, { "abstract": true, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 5279, "linearizedBaseContracts": [ 5279 ], "name": "Context", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 5266, "nodeType": "Block", "src": "660:34:38", "statements": [ { "expression": { "expression": { "id": 5263, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "677:3:38", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 5264, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "src": "677:10:38", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "functionReturnParameters": 5262, "id": 5265, "nodeType": "Return", "src": "670:17:38" } ] }, "id": 5267, "implemented": true, "kind": "function", "modifiers": [], "name": "_msgSender", "nodeType": "FunctionDefinition", "parameters": { "id": 5259, "nodeType": "ParameterList", "parameters": [], "src": "609:2:38" }, "returnParameters": { "id": 5262, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5261, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 5267, "src": "643:15:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, "typeName": { "id": 5260, "name": "address", "nodeType": "ElementaryTypeName", "src": "643:15:38", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "visibility": "internal" } ], "src": "642:17:38" }, "scope": 5279, "src": "590:104:38", "stateMutability": "view", "virtual": true, "visibility": "internal" }, { "body": { "id": 5277, "nodeType": "Block", "src": "765:165:38", "statements": [ { "expression": { "id": 5272, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "775:4:38", "typeDescriptions": { "typeIdentifier": "t_contract$_Context_$5279", "typeString": "contract Context" } }, "id": 5273, "nodeType": "ExpressionStatement", "src": "775:4:38" }, { "expression": { "expression": { "id": 5274, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "915:3:38", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 5275, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "data", "nodeType": "MemberAccess", "src": "915:8:38", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata" } }, "functionReturnParameters": 5271, "id": 5276, "nodeType": "Return", "src": "908:15:38" } ] }, "id": 5278, "implemented": true, "kind": "function", "modifiers": [], "name": "_msgData", "nodeType": "FunctionDefinition", "parameters": { "id": 5268, "nodeType": "ParameterList", "parameters": [], "src": "717:2:38" }, "returnParameters": { "id": 5271, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5270, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 5278, "src": "751:12:38", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 5269, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "751:5:38", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "750:14:38" }, "scope": 5279, "src": "700:230:38", "stateMutability": "view", "virtual": true, "visibility": "internal" } ], "scope": 5280, "src": "558:374:38" } ], "src": "33:900:38" }, "legacyAST": { "attributes": { "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", "exportedSymbols": { "Context": [ 5279 ] }, "license": "MIT" }, "children": [ { "attributes": { "literals": [ "solidity", "^", "0.7", ".0" ] }, "id": 5258, "name": "PragmaDirective", "src": "33:23:38" }, { "attributes": { "abstract": true, "baseContracts": [ null ], "contractDependencies": [ null ], "contractKind": "contract", "fullyImplemented": true, "linearizedBaseContracts": [ 5279 ], "name": "Context", "scope": 5280 }, "children": [ { "attributes": { "implemented": true, "isConstructor": false, "kind": "function", "modifiers": [ null ], "name": "_msgSender", "scope": 5279, "stateMutability": "view", "virtual": true, "visibility": "internal" }, "children": [ { "attributes": { "parameters": [ null ] }, "children": [], "id": 5259, "name": "ParameterList", "src": "609:2:38" }, { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "", "scope": 5267, "stateVariable": false, "storageLocation": "default", "type": "address payable", "visibility": "internal" }, "children": [ { "attributes": { "name": "address", "stateMutability": "payable", "type": "address payable" }, "id": 5260, "name": "ElementaryTypeName", "src": "643:15:38" } ], "id": 5261, "name": "VariableDeclaration", "src": "643:15:38" } ], "id": 5262, "name": "ParameterList", "src": "642:17:38" }, { "children": [ { "attributes": { "functionReturnParameters": 5262 }, "children": [ { "attributes": { "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "sender", "type": "address payable" }, "children": [ { "attributes": { "overloadedDeclarations": [ null ], "referencedDeclaration": -15, "type": "msg", "value": "msg" }, "id": 5263, "name": "Identifier", "src": "677:3:38" } ], "id": 5264, "name": "MemberAccess", "src": "677:10:38" } ], "id": 5265, "name": "Return", "src": "670:17:38" } ], "id": 5266, "name": "Block", "src": "660:34:38" } ], "id": 5267, "name": "FunctionDefinition", "src": "590:104:38" }, { "attributes": { "implemented": true, "isConstructor": false, "kind": "function", "modifiers": [ null ], "name": "_msgData", "scope": 5279, "stateMutability": "view", "virtual": true, "visibility": "internal" }, "children": [ { "attributes": { "parameters": [ null ] }, "children": [], "id": 5268, "name": "ParameterList", "src": "717:2:38" }, { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "", "scope": 5278, "stateVariable": false, "storageLocation": "memory", "type": "bytes", "visibility": "internal" }, "children": [ { "attributes": { "name": "bytes", "type": "bytes" }, "id": 5269, "name": "ElementaryTypeName", "src": "751:5:38" } ], "id": 5270, "name": "VariableDeclaration", "src": "751:12:38" } ], "id": 5271, "name": "ParameterList", "src": "750:14:38" }, { "children": [ { "children": [ { "attributes": { "overloadedDeclarations": [ null ], "referencedDeclaration": -28, "type": "contract Context", "value": "this" }, "id": 5272, "name": "Identifier", "src": "775:4:38" } ], "id": 5273, "name": "ExpressionStatement", "src": "775:4:38" }, { "attributes": { "functionReturnParameters": 5271 }, "children": [ { "attributes": { "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "data", "type": "bytes calldata" }, "children": [ { "attributes": { "overloadedDeclarations": [ null ], "referencedDeclaration": -15, "type": "msg", "value": "msg" }, "id": 5274, "name": "Identifier", "src": "915:3:38" } ], "id": 5275, "name": "MemberAccess", "src": "915:8:38" } ], "id": 5276, "name": "Return", "src": "908:15:38" } ], "id": 5277, "name": "Block", "src": "765:165:38" } ], "id": 5278, "name": "FunctionDefinition", "src": "700:230:38" } ], "id": 5279, "name": "ContractDefinition", "src": "558:374:38" } ], "id": 5280, "name": "SourceUnit", "src": "33:900:38" }, "compiler": { "name": "solc", "version": "0.7.3+commit.9bfce1f6.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.3.3", "updatedAt": "2021-02-01T23:13:33.275Z", "devdoc": { "kind": "dev", "methods": {}, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }