UNPKG

@dolomite-exchange/dolomite-margin

Version:

Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol

595 lines 21.2 kB
{ "contractName": "Context", "abi": [ { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/GSN/Context.sol\":\"Context\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061\",\"urls\":[\"bzz-raw://216ef9d6b614db4eb46970b4e84903f2534a45572dd30a79f0041f1a5830f436\",\"dweb:/ipfs/QmNPrJ4MWKUAWzKXpUqeyKRUfosaoANZAqXgvepdrCwZAG\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "sourceMap": "", "deployedSourceMap": "", "source": "pragma solidity ^0.5.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 */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view 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": [ 37109 ] }, "id": 37110, "nodeType": "SourceUnit", "nodes": [ { "id": 37084, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:148" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 37109, "linearizedBaseContracts": [ 37109 ], "name": "Context", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 37087, "nodeType": "Block", "src": "726:3:148", "statements": [] }, "documentation": null, "id": 37088, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 37085, "nodeType": "ParameterList", "parameters": [], "src": "714:2:148" }, "returnParameters": { "id": 37086, "nodeType": "ParameterList", "parameters": [], "src": "726:0:148" }, "scope": 37109, "src": "702:27:148", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { "id": 37096, "nodeType": "Block", "src": "850:34:148", "statements": [ { "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 37093, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 38107, "src": "867:3:148", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 37094, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "867:10:148", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "functionReturnParameters": 37092, "id": 37095, "nodeType": "Return", "src": "860:17:148" } ] }, "documentation": null, "id": 37097, "implemented": true, "kind": "function", "modifiers": [], "name": "_msgSender", "nodeType": "FunctionDefinition", "parameters": { "id": 37089, "nodeType": "ParameterList", "parameters": [], "src": "807:2:148" }, "returnParameters": { "id": 37092, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 37091, "name": "", "nodeType": "VariableDeclaration", "scope": 37097, "src": "833:15:148", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, "typeName": { "id": 37090, "name": "address", "nodeType": "ElementaryTypeName", "src": "833:15:148", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "value": null, "visibility": "internal" } ], "src": "832:17:148" }, "scope": 37109, "src": "788:96:148", "stateMutability": "view", "superFunction": null, "visibility": "internal" }, { "body": { "id": 37107, "nodeType": "Block", "src": "947:165:148", "statements": [ { "expression": { "argumentTypes": null, "id": 37102, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 38291, "src": "957:4:148", "typeDescriptions": { "typeIdentifier": "t_contract$_Context_$37109", "typeString": "contract Context" } }, "id": 37103, "nodeType": "ExpressionStatement", "src": "957:4:148" }, { "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 37104, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 38107, "src": "1097:3:148", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 37105, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "data", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1097:8:148", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata" } }, "functionReturnParameters": 37101, "id": 37106, "nodeType": "Return", "src": "1090:15:148" } ] }, "documentation": null, "id": 37108, "implemented": true, "kind": "function", "modifiers": [], "name": "_msgData", "nodeType": "FunctionDefinition", "parameters": { "id": 37098, "nodeType": "ParameterList", "parameters": [], "src": "907:2:148" }, "returnParameters": { "id": 37101, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 37100, "name": "", "nodeType": "VariableDeclaration", "scope": 37108, "src": "933:12:148", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 37099, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "933:5:148", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "932:14:148" }, "scope": 37109, "src": "890:222:148", "stateMutability": "view", "superFunction": null, "visibility": "internal" } ], "scope": 37110, "src": "525:589:148" } ], "src": "0:1115:148" }, "legacyAST": { "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", "exportedSymbols": { "Context": [ 37109 ] }, "id": 37110, "nodeType": "SourceUnit", "nodes": [ { "id": 37084, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:148" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 37109, "linearizedBaseContracts": [ 37109 ], "name": "Context", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 37087, "nodeType": "Block", "src": "726:3:148", "statements": [] }, "documentation": null, "id": 37088, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 37085, "nodeType": "ParameterList", "parameters": [], "src": "714:2:148" }, "returnParameters": { "id": 37086, "nodeType": "ParameterList", "parameters": [], "src": "726:0:148" }, "scope": 37109, "src": "702:27:148", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { "id": 37096, "nodeType": "Block", "src": "850:34:148", "statements": [ { "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 37093, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 38107, "src": "867:3:148", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 37094, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "867:10:148", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "functionReturnParameters": 37092, "id": 37095, "nodeType": "Return", "src": "860:17:148" } ] }, "documentation": null, "id": 37097, "implemented": true, "kind": "function", "modifiers": [], "name": "_msgSender", "nodeType": "FunctionDefinition", "parameters": { "id": 37089, "nodeType": "ParameterList", "parameters": [], "src": "807:2:148" }, "returnParameters": { "id": 37092, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 37091, "name": "", "nodeType": "VariableDeclaration", "scope": 37097, "src": "833:15:148", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, "typeName": { "id": 37090, "name": "address", "nodeType": "ElementaryTypeName", "src": "833:15:148", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "value": null, "visibility": "internal" } ], "src": "832:17:148" }, "scope": 37109, "src": "788:96:148", "stateMutability": "view", "superFunction": null, "visibility": "internal" }, { "body": { "id": 37107, "nodeType": "Block", "src": "947:165:148", "statements": [ { "expression": { "argumentTypes": null, "id": 37102, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 38291, "src": "957:4:148", "typeDescriptions": { "typeIdentifier": "t_contract$_Context_$37109", "typeString": "contract Context" } }, "id": 37103, "nodeType": "ExpressionStatement", "src": "957:4:148" }, { "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 37104, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 38107, "src": "1097:3:148", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 37105, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "data", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1097:8:148", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata" } }, "functionReturnParameters": 37101, "id": 37106, "nodeType": "Return", "src": "1090:15:148" } ] }, "documentation": null, "id": 37108, "implemented": true, "kind": "function", "modifiers": [], "name": "_msgData", "nodeType": "FunctionDefinition", "parameters": { "id": 37098, "nodeType": "ParameterList", "parameters": [], "src": "907:2:148" }, "returnParameters": { "id": 37101, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 37100, "name": "", "nodeType": "VariableDeclaration", "scope": 37108, "src": "933:12:148", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 37099, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "933:5:148", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "932:14:148" }, "scope": 37109, "src": "890:222:148", "stateMutability": "view", "superFunction": null, "visibility": "internal" } ], "scope": 37110, "src": "525:589:148" } ], "src": "0:1115:148" }, "compiler": { "name": "solc", "version": "0.5.16+commit.9c3226ce.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.0.23", "updatedAt": "2025-06-22T04:01:54.206Z", "devdoc": { "methods": {} }, "userdoc": { "methods": {} } }