You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8066 lines
336 KiB
JSON
8066 lines
336 KiB
JSON
{
|
|
"contractName": "Address",
|
|
"abi": [],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.11+commit.d7f03943\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Collection of functions related to the address type\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Address.sol\":\"Address\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x51b758a8815ecc9596c66c37d56b1d33883a444631a3f916b9fe65cb863ef7c4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://997ca03557985b3c6f9143a18b6c3a710b3bc1c7f189ee956d305a966ecfb922\",\"dweb:/ipfs/QmQaD3Wb62F88SHqmpLttvF6wKuPDQep2LLUcKPekeRzvz\"]}},\"version\":1}",
|
|
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f90675ae0843bd44ab3989d0ab96951e5e7a028a17b306e96809cfcb1226ead064736f6c634300080b0033",
|
|
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f90675ae0843bd44ab3989d0ab96951e5e7a028a17b306e96809cfcb1226ead064736f6c634300080b0033",
|
|
"immutableReferences": {},
|
|
"generatedSources": [],
|
|
"deployedGeneratedSources": [],
|
|
"sourceMap": "179:7729:6:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;179:7729:6;;;;;;;;;;;;;;;;;",
|
|
"deployedSourceMap": "179:7729:6:-:0;;;;;;;;",
|
|
"source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n",
|
|
"sourcePath": "@openzeppelin/contracts/utils/Address.sol",
|
|
"ast": {
|
|
"absolutePath": "@openzeppelin/contracts/utils/Address.sol",
|
|
"exportedSymbols": {
|
|
"Address": [
|
|
1521
|
|
]
|
|
},
|
|
"id": 1522,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1226,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "86:23:6"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "Address",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"documentation": {
|
|
"id": 1227,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "111:67:6",
|
|
"text": " @dev Collection of functions related to the address type"
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 1521,
|
|
"linearizedBaseContracts": [
|
|
1521
|
|
],
|
|
"name": "Address",
|
|
"nameLocation": "187:7:6",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": {
|
|
"id": 1243,
|
|
"nodeType": "Block",
|
|
"src": "837:311:6",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1236
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1236,
|
|
"mutability": "mutable",
|
|
"name": "size",
|
|
"nameLocation": "1042:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1243,
|
|
"src": "1034:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1235,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1034:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1237,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1034:12:6"
|
|
},
|
|
{
|
|
"AST": {
|
|
"nodeType": "YulBlock",
|
|
"src": "1065:52:6",
|
|
"statements": [
|
|
{
|
|
"nodeType": "YulAssignment",
|
|
"src": "1079:28:6",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "account",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1099:7:6"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "extcodesize",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1087:11:6"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1087:20:6"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "size",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1079:4:6"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "london",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 1230,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "1099:7:6",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 1236,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "1079:4:6",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 1238,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "1056:61:6"
|
|
},
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1241,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1239,
|
|
"name": "size",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1236,
|
|
"src": "1133:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 1240,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1140:1:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1133:8:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1234,
|
|
"id": 1242,
|
|
"nodeType": "Return",
|
|
"src": "1126:15:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1228,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "201:565:6",
|
|
"text": " @dev Returns true if `account` is a contract.\n [IMPORTANT]\n ====\n It is unsafe to assume that an address for which this function returns\n false is an externally-owned account (EOA) and not a contract.\n Among others, `isContract` will return false for the following\n types of addresses:\n - an externally-owned account\n - a contract in construction\n - an address where a contract will be created\n - an address where a contract lived, but was destroyed\n ===="
|
|
},
|
|
"id": 1244,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "isContract",
|
|
"nameLocation": "780:10:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1231,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1230,
|
|
"mutability": "mutable",
|
|
"name": "account",
|
|
"nameLocation": "799:7:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1244,
|
|
"src": "791:15:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1229,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "791:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "790:17:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1234,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1233,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1244,
|
|
"src": "831:4:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1232,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "831:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "830:6:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "771:377:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1277,
|
|
"nodeType": "Block",
|
|
"src": "2136:241:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1259,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1255,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967268,
|
|
"src": "2162:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Address_$1521",
|
|
"typeString": "library Address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_Address_$1521",
|
|
"typeString": "library Address"
|
|
}
|
|
],
|
|
"id": 1254,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2154:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 1253,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2154:7:6",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 1256,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2154:13:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1257,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "balance",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2154:21:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"id": 1258,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1249,
|
|
"src": "2179:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2154:31:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365",
|
|
"id": 1260,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2187:31:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9",
|
|
"typeString": "literal_string \"Address: insufficient balance\""
|
|
},
|
|
"value": "Address: insufficient balance"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9",
|
|
"typeString": "literal_string \"Address: insufficient balance\""
|
|
}
|
|
],
|
|
"id": 1252,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "2146:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1261,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2146:73:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1262,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2146:73:6"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1264,
|
|
null
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1264,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "2236:7:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1277,
|
|
"src": "2231:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1263,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2231:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
null
|
|
],
|
|
"id": 1271,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"hexValue": "",
|
|
"id": 1269,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2279:2:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
|
"typeString": "literal_string \"\""
|
|
},
|
|
"value": ""
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
|
"typeString": "literal_string \"\""
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
|
"typeString": "literal_string \"\""
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 1265,
|
|
"name": "recipient",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "2249:9:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 1266,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "call",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2249:14:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 1268,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"names": [
|
|
"value"
|
|
],
|
|
"nodeType": "FunctionCallOptions",
|
|
"options": [
|
|
{
|
|
"id": 1267,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1249,
|
|
"src": "2271:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"src": "2249:29:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value",
|
|
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 1270,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2249:33:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "tuple(bool,bytes memory)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2230:52:6"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1273,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1264,
|
|
"src": "2300:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564",
|
|
"id": 1274,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2309:60:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae",
|
|
"typeString": "literal_string \"Address: unable to send value, recipient may have reverted\""
|
|
},
|
|
"value": "Address: unable to send value, recipient may have reverted"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae",
|
|
"typeString": "literal_string \"Address: unable to send value, recipient may have reverted\""
|
|
}
|
|
],
|
|
"id": 1272,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "2292:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1275,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2292:78:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1276,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2292:78:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1245,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1154:906:6",
|
|
"text": " @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n `recipient`, forwarding all available gas and reverting on errors.\n https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n of certain opcodes, possibly making contracts go over the 2300 gas limit\n imposed by `transfer`, making them unable to receive funds via\n `transfer`. {sendValue} removes this limitation.\n https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n IMPORTANT: because control is transferred to `recipient`, care must be\n taken to not create reentrancy vulnerabilities. Consider using\n {ReentrancyGuard} or the\n https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]."
|
|
},
|
|
"id": 1278,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "sendValue",
|
|
"nameLocation": "2074:9:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1250,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1247,
|
|
"mutability": "mutable",
|
|
"name": "recipient",
|
|
"nameLocation": "2100:9:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1278,
|
|
"src": "2084:25:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 1246,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2084:15:6",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1249,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "2119:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1278,
|
|
"src": "2111:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1248,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2111:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2083:43:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1251,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2136:0:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "2065:312:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1294,
|
|
"nodeType": "Block",
|
|
"src": "3208:84:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1289,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1281,
|
|
"src": "3238:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1290,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1283,
|
|
"src": "3246:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564",
|
|
"id": 1291,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3252:32:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df",
|
|
"typeString": "literal_string \"Address: low-level call failed\""
|
|
},
|
|
"value": "Address: low-level call failed"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df",
|
|
"typeString": "literal_string \"Address: low-level call failed\""
|
|
}
|
|
],
|
|
"id": 1288,
|
|
"name": "functionCall",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1295,
|
|
1315
|
|
],
|
|
"referencedDeclaration": 1315,
|
|
"src": "3225:12:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,string memory) returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1292,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3225:60:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1287,
|
|
"id": 1293,
|
|
"nodeType": "Return",
|
|
"src": "3218:67:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1279,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2383:731:6",
|
|
"text": " @dev Performs a Solidity function call using a low level `call`. A\n plain `call` is an unsafe replacement for a function call: use this\n function instead.\n If `target` reverts with a revert reason, it is bubbled up by this\n function (like regular Solidity function calls).\n Returns the raw returned data. To convert to the expected return value,\n use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n Requirements:\n - `target` must be a contract.\n - calling `target` with `data` must not revert.\n _Available since v3.1._"
|
|
},
|
|
"id": 1295,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionCall",
|
|
"nameLocation": "3128:12:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1284,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1281,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "3149:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1295,
|
|
"src": "3141:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1280,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3141:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1283,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "3170:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1295,
|
|
"src": "3157:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1282,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3157:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3140:35:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1287,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1286,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1295,
|
|
"src": "3194:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1285,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3194:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3193:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "3119:173:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1314,
|
|
"nodeType": "Block",
|
|
"src": "3661:76:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1308,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1298,
|
|
"src": "3700:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1309,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1300,
|
|
"src": "3708:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "30",
|
|
"id": 1310,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3714:1:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
{
|
|
"id": 1311,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1302,
|
|
"src": "3717:12:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 1307,
|
|
"name": "functionCallWithValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1335,
|
|
1385
|
|
],
|
|
"referencedDeclaration": 1385,
|
|
"src": "3678:21:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1312,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3678:52:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1306,
|
|
"id": 1313,
|
|
"nodeType": "Return",
|
|
"src": "3671:59:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1296,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3298:211:6",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._"
|
|
},
|
|
"id": 1315,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionCall",
|
|
"nameLocation": "3523:12:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1303,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1298,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "3553:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1315,
|
|
"src": "3545:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1297,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3545:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1300,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "3582:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1315,
|
|
"src": "3569:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1299,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3569:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1302,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "3610:12:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1315,
|
|
"src": "3596:26:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 1301,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3596:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3535:93:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1306,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1305,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1315,
|
|
"src": "3647:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1304,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3647:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3646:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "3514:223:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1334,
|
|
"nodeType": "Block",
|
|
"src": "4242:111:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1328,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1318,
|
|
"src": "4281:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1329,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1320,
|
|
"src": "4289:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"id": 1330,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1322,
|
|
"src": "4295:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564",
|
|
"id": 1331,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4302:43:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc",
|
|
"typeString": "literal_string \"Address: low-level call with value failed\""
|
|
},
|
|
"value": "Address: low-level call with value failed"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc",
|
|
"typeString": "literal_string \"Address: low-level call with value failed\""
|
|
}
|
|
],
|
|
"id": 1327,
|
|
"name": "functionCallWithValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1335,
|
|
1385
|
|
],
|
|
"referencedDeclaration": 1385,
|
|
"src": "4259:21:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1332,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4259:87:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1326,
|
|
"id": 1333,
|
|
"nodeType": "Return",
|
|
"src": "4252:94:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1316,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3743:351:6",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but also transferring `value` wei to `target`.\n Requirements:\n - the calling contract must have an ETH balance of at least `value`.\n - the called Solidity function must be `payable`.\n _Available since v3.1._"
|
|
},
|
|
"id": 1335,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionCallWithValue",
|
|
"nameLocation": "4108:21:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1323,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1318,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "4147:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1335,
|
|
"src": "4139:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1317,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4139:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1320,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "4176:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1335,
|
|
"src": "4163:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1319,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4163:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1322,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "4198:5:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1335,
|
|
"src": "4190:13:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1321,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4190:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4129:80:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1326,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1325,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1335,
|
|
"src": "4228:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1324,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4228:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4227:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "4099:254:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1384,
|
|
"nodeType": "Block",
|
|
"src": "4780:320:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1356,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1352,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967268,
|
|
"src": "4806:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Address_$1521",
|
|
"typeString": "library Address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_Address_$1521",
|
|
"typeString": "library Address"
|
|
}
|
|
],
|
|
"id": 1351,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "4798:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 1350,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4798:7:6",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 1353,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4798:13:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1354,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "balance",
|
|
"nodeType": "MemberAccess",
|
|
"src": "4798:21:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"id": 1355,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1342,
|
|
"src": "4823:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4798:30:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c",
|
|
"id": 1357,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4830:40:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c",
|
|
"typeString": "literal_string \"Address: insufficient balance for call\""
|
|
},
|
|
"value": "Address: insufficient balance for call"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c",
|
|
"typeString": "literal_string \"Address: insufficient balance for call\""
|
|
}
|
|
],
|
|
"id": 1349,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "4790:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1358,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4790:81:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1359,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4790:81:6"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 1362,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1338,
|
|
"src": "4900:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1361,
|
|
"name": "isContract",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1244,
|
|
"src": "4889:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
|
|
"typeString": "function (address) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 1363,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4889:18:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374",
|
|
"id": 1364,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4909:31:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad",
|
|
"typeString": "literal_string \"Address: call to non-contract\""
|
|
},
|
|
"value": "Address: call to non-contract"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad",
|
|
"typeString": "literal_string \"Address: call to non-contract\""
|
|
}
|
|
],
|
|
"id": 1360,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "4881:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1365,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4881:60:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1366,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4881:60:6"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1368,
|
|
1370
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1368,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "4958:7:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1384,
|
|
"src": "4953:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1367,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4953:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1370,
|
|
"mutability": "mutable",
|
|
"name": "returndata",
|
|
"nameLocation": "4980:10:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1384,
|
|
"src": "4967:23:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1369,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4967:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1377,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 1375,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1340,
|
|
"src": "5020:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 1371,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1338,
|
|
"src": "4994:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1372,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "call",
|
|
"nodeType": "MemberAccess",
|
|
"src": "4994:11:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 1374,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"names": [
|
|
"value"
|
|
],
|
|
"nodeType": "FunctionCallOptions",
|
|
"options": [
|
|
{
|
|
"id": 1373,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1342,
|
|
"src": "5013:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"src": "4994:25:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value",
|
|
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 1376,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4994:31:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "tuple(bool,bytes memory)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "4952:73:6"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1379,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1368,
|
|
"src": "5059:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"id": 1380,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1370,
|
|
"src": "5068:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"id": 1381,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1344,
|
|
"src": "5080:12:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 1378,
|
|
"name": "verifyCallResult",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1520,
|
|
"src": "5042:16:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1382,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5042:51:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1348,
|
|
"id": 1383,
|
|
"nodeType": "Return",
|
|
"src": "5035:58:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1336,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4359:237:6",
|
|
"text": " @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n with `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._"
|
|
},
|
|
"id": 1385,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionCallWithValue",
|
|
"nameLocation": "4610:21:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1345,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1338,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "4649:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1385,
|
|
"src": "4641:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1337,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4641:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1340,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "4678:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1385,
|
|
"src": "4665:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1339,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4665:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1342,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "4700:5:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1385,
|
|
"src": "4692:13:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1341,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4692:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1344,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "4729:12:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1385,
|
|
"src": "4715:26:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 1343,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4715:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4631:116:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1348,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1347,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1385,
|
|
"src": "4766:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1346,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4766:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4765:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "4601:499:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1401,
|
|
"nodeType": "Block",
|
|
"src": "5377:97:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1396,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1388,
|
|
"src": "5413:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1397,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1390,
|
|
"src": "5421:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564",
|
|
"id": 1398,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5427:39:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0",
|
|
"typeString": "literal_string \"Address: low-level static call failed\""
|
|
},
|
|
"value": "Address: low-level static call failed"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0",
|
|
"typeString": "literal_string \"Address: low-level static call failed\""
|
|
}
|
|
],
|
|
"id": 1395,
|
|
"name": "functionStaticCall",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1402,
|
|
1437
|
|
],
|
|
"referencedDeclaration": 1437,
|
|
"src": "5394:18:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,string memory) view returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1399,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5394:73:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1394,
|
|
"id": 1400,
|
|
"nodeType": "Return",
|
|
"src": "5387:80:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1386,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5106:166:6",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._"
|
|
},
|
|
"id": 1402,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionStaticCall",
|
|
"nameLocation": "5286:18:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1391,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1388,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "5313:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1402,
|
|
"src": "5305:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1387,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5305:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1390,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "5334:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1402,
|
|
"src": "5321:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1389,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5321:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5304:35:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1394,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1393,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1402,
|
|
"src": "5363:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1392,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5363:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5362:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "5277:197:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1436,
|
|
"nodeType": "Block",
|
|
"src": "5816:228:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 1416,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1405,
|
|
"src": "5845:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1415,
|
|
"name": "isContract",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1244,
|
|
"src": "5834:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
|
|
"typeString": "function (address) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 1417,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5834:18:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7472616374",
|
|
"id": 1418,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5854:38:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9",
|
|
"typeString": "literal_string \"Address: static call to non-contract\""
|
|
},
|
|
"value": "Address: static call to non-contract"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9",
|
|
"typeString": "literal_string \"Address: static call to non-contract\""
|
|
}
|
|
],
|
|
"id": 1414,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "5826:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1419,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5826:67:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1420,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5826:67:6"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1422,
|
|
1424
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1422,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "5910:7:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1436,
|
|
"src": "5905:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1421,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5905:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1424,
|
|
"mutability": "mutable",
|
|
"name": "returndata",
|
|
"nameLocation": "5932:10:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1436,
|
|
"src": "5919:23:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1423,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5919:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1429,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 1427,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1407,
|
|
"src": "5964:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 1425,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1405,
|
|
"src": "5946:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1426,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "staticcall",
|
|
"nodeType": "MemberAccess",
|
|
"src": "5946:17:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes memory) view returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 1428,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5946:23:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "tuple(bool,bytes memory)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "5904:65:6"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1431,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1422,
|
|
"src": "6003:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"id": 1432,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1424,
|
|
"src": "6012:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"id": 1433,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1409,
|
|
"src": "6024:12:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 1430,
|
|
"name": "verifyCallResult",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1520,
|
|
"src": "5986:16:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1434,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5986:51:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1413,
|
|
"id": 1435,
|
|
"nodeType": "Return",
|
|
"src": "5979:58:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1403,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5480:173:6",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._"
|
|
},
|
|
"id": 1437,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionStaticCall",
|
|
"nameLocation": "5667:18:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1410,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1405,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "5703:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1437,
|
|
"src": "5695:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1404,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5695:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1407,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "5732:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1437,
|
|
"src": "5719:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1406,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5719:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1409,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "5760:12:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1437,
|
|
"src": "5746:26:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 1408,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5746:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5685:93:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1413,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1412,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1437,
|
|
"src": "5802:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1411,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5802:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5801:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "5658:386:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1453,
|
|
"nodeType": "Block",
|
|
"src": "6320:101:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1448,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1440,
|
|
"src": "6358:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1449,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1442,
|
|
"src": "6366:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564",
|
|
"id": 1450,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6372:41:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398",
|
|
"typeString": "literal_string \"Address: low-level delegate call failed\""
|
|
},
|
|
"value": "Address: low-level delegate call failed"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398",
|
|
"typeString": "literal_string \"Address: low-level delegate call failed\""
|
|
}
|
|
],
|
|
"id": 1447,
|
|
"name": "functionDelegateCall",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1454,
|
|
1489
|
|
],
|
|
"referencedDeclaration": 1489,
|
|
"src": "6337:20:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,string memory) returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1451,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6337:77:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1446,
|
|
"id": 1452,
|
|
"nodeType": "Return",
|
|
"src": "6330:84:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1438,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6050:168:6",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._"
|
|
},
|
|
"id": 1454,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionDelegateCall",
|
|
"nameLocation": "6232:20:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1443,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1440,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "6261:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1454,
|
|
"src": "6253:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1439,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6253:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1442,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "6282:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1454,
|
|
"src": "6269:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1441,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6269:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6252:35:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1446,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1445,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1454,
|
|
"src": "6306:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1444,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6306:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6305:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "6223:198:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1488,
|
|
"nodeType": "Block",
|
|
"src": "6762:232:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 1468,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1457,
|
|
"src": "6791:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1467,
|
|
"name": "isContract",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1244,
|
|
"src": "6780:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
|
|
"typeString": "function (address) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 1469,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6780:18:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374",
|
|
"id": 1470,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6800:40:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520",
|
|
"typeString": "literal_string \"Address: delegate call to non-contract\""
|
|
},
|
|
"value": "Address: delegate call to non-contract"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520",
|
|
"typeString": "literal_string \"Address: delegate call to non-contract\""
|
|
}
|
|
],
|
|
"id": 1466,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "6772:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1471,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6772:69:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1472,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6772:69:6"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1474,
|
|
1476
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1474,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "6858:7:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1488,
|
|
"src": "6853:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1473,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6853:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1476,
|
|
"mutability": "mutable",
|
|
"name": "returndata",
|
|
"nameLocation": "6880:10:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1488,
|
|
"src": "6867:23:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1475,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6867:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1481,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 1479,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1459,
|
|
"src": "6914:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 1477,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1457,
|
|
"src": "6894:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1478,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "delegatecall",
|
|
"nodeType": "MemberAccess",
|
|
"src": "6894:19:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes memory) returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 1480,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6894:25:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "tuple(bool,bytes memory)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "6852:67:6"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1483,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1474,
|
|
"src": "6953:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"id": 1484,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1476,
|
|
"src": "6962:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"id": 1485,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1461,
|
|
"src": "6974:12:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 1482,
|
|
"name": "verifyCallResult",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1520,
|
|
"src": "6936:16:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1486,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6936:51:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1465,
|
|
"id": 1487,
|
|
"nodeType": "Return",
|
|
"src": "6929:58:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1455,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6427:175:6",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._"
|
|
},
|
|
"id": 1489,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionDelegateCall",
|
|
"nameLocation": "6616:20:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1462,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1457,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "6654:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1489,
|
|
"src": "6646:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1456,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6646:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1459,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "6683:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1489,
|
|
"src": "6670:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1458,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6670:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1461,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "6711:12:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1489,
|
|
"src": "6697:26:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 1460,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6697:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6636:93:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1465,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1464,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1489,
|
|
"src": "6748:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1463,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6748:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6747:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "6607:387:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1519,
|
|
"nodeType": "Block",
|
|
"src": "7374:532:6",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"id": 1501,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1492,
|
|
"src": "7388:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 1517,
|
|
"nodeType": "Block",
|
|
"src": "7445:455:6",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1508,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 1505,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1494,
|
|
"src": "7529:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"id": 1506,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "7529:17:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 1507,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7549:1:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "7529:21:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 1515,
|
|
"nodeType": "Block",
|
|
"src": "7837:53:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1512,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1496,
|
|
"src": "7862:12:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 1511,
|
|
"name": "revert",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967277,
|
|
4294967277
|
|
],
|
|
"referencedDeclaration": 4294967277,
|
|
"src": "7855:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (string memory) pure"
|
|
}
|
|
},
|
|
"id": 1513,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7855:20:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1514,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7855:20:6"
|
|
}
|
|
]
|
|
},
|
|
"id": 1516,
|
|
"nodeType": "IfStatement",
|
|
"src": "7525:365:6",
|
|
"trueBody": {
|
|
"id": 1510,
|
|
"nodeType": "Block",
|
|
"src": "7552:279:6",
|
|
"statements": [
|
|
{
|
|
"AST": {
|
|
"nodeType": "YulBlock",
|
|
"src": "7672:145:6",
|
|
"statements": [
|
|
{
|
|
"nodeType": "YulVariableDeclaration",
|
|
"src": "7694:40:6",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "returndata",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7723:10:6"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mload",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7717:5:6"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "7717:17:6"
|
|
},
|
|
"variables": [
|
|
{
|
|
"name": "returndata_size",
|
|
"nodeType": "YulTypedName",
|
|
"src": "7698:15:6",
|
|
"type": ""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "7766:2:6",
|
|
"type": "",
|
|
"value": "32"
|
|
},
|
|
{
|
|
"name": "returndata",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7770:10:6"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7762:3:6"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "7762:19:6"
|
|
},
|
|
{
|
|
"name": "returndata_size",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7783:15:6"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "revert",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7755:6:6"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "7755:44:6"
|
|
},
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "7755:44:6"
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "london",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 1494,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "7723:10:6",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 1494,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "7770:10:6",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 1509,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "7663:154:6"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"id": 1518,
|
|
"nodeType": "IfStatement",
|
|
"src": "7384:516:6",
|
|
"trueBody": {
|
|
"id": 1504,
|
|
"nodeType": "Block",
|
|
"src": "7397:42:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 1502,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1494,
|
|
"src": "7418:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1500,
|
|
"id": 1503,
|
|
"nodeType": "Return",
|
|
"src": "7411:17:6"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1490,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "7000:209:6",
|
|
"text": " @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n revert reason using the provided one.\n _Available since v4.3._"
|
|
},
|
|
"id": 1520,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "verifyCallResult",
|
|
"nameLocation": "7223:16:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1497,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1492,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "7254:7:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1520,
|
|
"src": "7249:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1491,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7249:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1494,
|
|
"mutability": "mutable",
|
|
"name": "returndata",
|
|
"nameLocation": "7284:10:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1520,
|
|
"src": "7271:23:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1493,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7271:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1496,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "7318:12:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1520,
|
|
"src": "7304:26:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 1495,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7304:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7239:97:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1500,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1499,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1520,
|
|
"src": "7360:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1498,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7360:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7359:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "7214:692:6",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 1522,
|
|
"src": "179:7729:6",
|
|
"usedErrors": []
|
|
}
|
|
],
|
|
"src": "86:7823:6"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "@openzeppelin/contracts/utils/Address.sol",
|
|
"exportedSymbols": {
|
|
"Address": [
|
|
1521
|
|
]
|
|
},
|
|
"id": 1522,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1226,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "86:23:6"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "Address",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"documentation": {
|
|
"id": 1227,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "111:67:6",
|
|
"text": " @dev Collection of functions related to the address type"
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 1521,
|
|
"linearizedBaseContracts": [
|
|
1521
|
|
],
|
|
"name": "Address",
|
|
"nameLocation": "187:7:6",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": {
|
|
"id": 1243,
|
|
"nodeType": "Block",
|
|
"src": "837:311:6",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1236
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1236,
|
|
"mutability": "mutable",
|
|
"name": "size",
|
|
"nameLocation": "1042:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1243,
|
|
"src": "1034:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1235,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1034:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1237,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1034:12:6"
|
|
},
|
|
{
|
|
"AST": {
|
|
"nodeType": "YulBlock",
|
|
"src": "1065:52:6",
|
|
"statements": [
|
|
{
|
|
"nodeType": "YulAssignment",
|
|
"src": "1079:28:6",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "account",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1099:7:6"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "extcodesize",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1087:11:6"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1087:20:6"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "size",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1079:4:6"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "london",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 1230,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "1099:7:6",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 1236,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "1079:4:6",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 1238,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "1056:61:6"
|
|
},
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1241,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1239,
|
|
"name": "size",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1236,
|
|
"src": "1133:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 1240,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1140:1:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1133:8:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1234,
|
|
"id": 1242,
|
|
"nodeType": "Return",
|
|
"src": "1126:15:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1228,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "201:565:6",
|
|
"text": " @dev Returns true if `account` is a contract.\n [IMPORTANT]\n ====\n It is unsafe to assume that an address for which this function returns\n false is an externally-owned account (EOA) and not a contract.\n Among others, `isContract` will return false for the following\n types of addresses:\n - an externally-owned account\n - a contract in construction\n - an address where a contract will be created\n - an address where a contract lived, but was destroyed\n ===="
|
|
},
|
|
"id": 1244,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "isContract",
|
|
"nameLocation": "780:10:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1231,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1230,
|
|
"mutability": "mutable",
|
|
"name": "account",
|
|
"nameLocation": "799:7:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1244,
|
|
"src": "791:15:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1229,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "791:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "790:17:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1234,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1233,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1244,
|
|
"src": "831:4:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1232,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "831:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "830:6:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "771:377:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1277,
|
|
"nodeType": "Block",
|
|
"src": "2136:241:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1259,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1255,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967268,
|
|
"src": "2162:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Address_$1521",
|
|
"typeString": "library Address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_Address_$1521",
|
|
"typeString": "library Address"
|
|
}
|
|
],
|
|
"id": 1254,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2154:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 1253,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2154:7:6",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 1256,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2154:13:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1257,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "balance",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2154:21:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"id": 1258,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1249,
|
|
"src": "2179:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2154:31:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365",
|
|
"id": 1260,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2187:31:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9",
|
|
"typeString": "literal_string \"Address: insufficient balance\""
|
|
},
|
|
"value": "Address: insufficient balance"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9",
|
|
"typeString": "literal_string \"Address: insufficient balance\""
|
|
}
|
|
],
|
|
"id": 1252,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "2146:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1261,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2146:73:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1262,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2146:73:6"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1264,
|
|
null
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1264,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "2236:7:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1277,
|
|
"src": "2231:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1263,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2231:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
null
|
|
],
|
|
"id": 1271,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"hexValue": "",
|
|
"id": 1269,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2279:2:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
|
"typeString": "literal_string \"\""
|
|
},
|
|
"value": ""
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
|
"typeString": "literal_string \"\""
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
|
"typeString": "literal_string \"\""
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 1265,
|
|
"name": "recipient",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "2249:9:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 1266,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "call",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2249:14:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 1268,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"names": [
|
|
"value"
|
|
],
|
|
"nodeType": "FunctionCallOptions",
|
|
"options": [
|
|
{
|
|
"id": 1267,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1249,
|
|
"src": "2271:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"src": "2249:29:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value",
|
|
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 1270,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2249:33:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "tuple(bool,bytes memory)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2230:52:6"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1273,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1264,
|
|
"src": "2300:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564",
|
|
"id": 1274,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2309:60:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae",
|
|
"typeString": "literal_string \"Address: unable to send value, recipient may have reverted\""
|
|
},
|
|
"value": "Address: unable to send value, recipient may have reverted"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae",
|
|
"typeString": "literal_string \"Address: unable to send value, recipient may have reverted\""
|
|
}
|
|
],
|
|
"id": 1272,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "2292:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1275,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2292:78:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1276,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2292:78:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1245,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1154:906:6",
|
|
"text": " @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n `recipient`, forwarding all available gas and reverting on errors.\n https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n of certain opcodes, possibly making contracts go over the 2300 gas limit\n imposed by `transfer`, making them unable to receive funds via\n `transfer`. {sendValue} removes this limitation.\n https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n IMPORTANT: because control is transferred to `recipient`, care must be\n taken to not create reentrancy vulnerabilities. Consider using\n {ReentrancyGuard} or the\n https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]."
|
|
},
|
|
"id": 1278,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "sendValue",
|
|
"nameLocation": "2074:9:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1250,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1247,
|
|
"mutability": "mutable",
|
|
"name": "recipient",
|
|
"nameLocation": "2100:9:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1278,
|
|
"src": "2084:25:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 1246,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2084:15:6",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1249,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "2119:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1278,
|
|
"src": "2111:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1248,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2111:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2083:43:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1251,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2136:0:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "2065:312:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1294,
|
|
"nodeType": "Block",
|
|
"src": "3208:84:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1289,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1281,
|
|
"src": "3238:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1290,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1283,
|
|
"src": "3246:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564",
|
|
"id": 1291,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3252:32:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df",
|
|
"typeString": "literal_string \"Address: low-level call failed\""
|
|
},
|
|
"value": "Address: low-level call failed"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df",
|
|
"typeString": "literal_string \"Address: low-level call failed\""
|
|
}
|
|
],
|
|
"id": 1288,
|
|
"name": "functionCall",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1295,
|
|
1315
|
|
],
|
|
"referencedDeclaration": 1315,
|
|
"src": "3225:12:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,string memory) returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1292,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3225:60:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1287,
|
|
"id": 1293,
|
|
"nodeType": "Return",
|
|
"src": "3218:67:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1279,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2383:731:6",
|
|
"text": " @dev Performs a Solidity function call using a low level `call`. A\n plain `call` is an unsafe replacement for a function call: use this\n function instead.\n If `target` reverts with a revert reason, it is bubbled up by this\n function (like regular Solidity function calls).\n Returns the raw returned data. To convert to the expected return value,\n use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n Requirements:\n - `target` must be a contract.\n - calling `target` with `data` must not revert.\n _Available since v3.1._"
|
|
},
|
|
"id": 1295,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionCall",
|
|
"nameLocation": "3128:12:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1284,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1281,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "3149:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1295,
|
|
"src": "3141:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1280,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3141:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1283,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "3170:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1295,
|
|
"src": "3157:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1282,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3157:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3140:35:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1287,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1286,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1295,
|
|
"src": "3194:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1285,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3194:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3193:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "3119:173:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1314,
|
|
"nodeType": "Block",
|
|
"src": "3661:76:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1308,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1298,
|
|
"src": "3700:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1309,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1300,
|
|
"src": "3708:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "30",
|
|
"id": 1310,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3714:1:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
{
|
|
"id": 1311,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1302,
|
|
"src": "3717:12:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 1307,
|
|
"name": "functionCallWithValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1335,
|
|
1385
|
|
],
|
|
"referencedDeclaration": 1385,
|
|
"src": "3678:21:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1312,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3678:52:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1306,
|
|
"id": 1313,
|
|
"nodeType": "Return",
|
|
"src": "3671:59:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1296,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3298:211:6",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._"
|
|
},
|
|
"id": 1315,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionCall",
|
|
"nameLocation": "3523:12:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1303,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1298,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "3553:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1315,
|
|
"src": "3545:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1297,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3545:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1300,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "3582:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1315,
|
|
"src": "3569:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1299,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3569:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1302,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "3610:12:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1315,
|
|
"src": "3596:26:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 1301,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3596:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3535:93:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1306,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1305,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1315,
|
|
"src": "3647:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1304,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3647:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3646:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "3514:223:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1334,
|
|
"nodeType": "Block",
|
|
"src": "4242:111:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1328,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1318,
|
|
"src": "4281:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1329,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1320,
|
|
"src": "4289:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"id": 1330,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1322,
|
|
"src": "4295:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564",
|
|
"id": 1331,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4302:43:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc",
|
|
"typeString": "literal_string \"Address: low-level call with value failed\""
|
|
},
|
|
"value": "Address: low-level call with value failed"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc",
|
|
"typeString": "literal_string \"Address: low-level call with value failed\""
|
|
}
|
|
],
|
|
"id": 1327,
|
|
"name": "functionCallWithValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1335,
|
|
1385
|
|
],
|
|
"referencedDeclaration": 1385,
|
|
"src": "4259:21:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1332,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4259:87:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1326,
|
|
"id": 1333,
|
|
"nodeType": "Return",
|
|
"src": "4252:94:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1316,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3743:351:6",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but also transferring `value` wei to `target`.\n Requirements:\n - the calling contract must have an ETH balance of at least `value`.\n - the called Solidity function must be `payable`.\n _Available since v3.1._"
|
|
},
|
|
"id": 1335,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionCallWithValue",
|
|
"nameLocation": "4108:21:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1323,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1318,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "4147:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1335,
|
|
"src": "4139:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1317,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4139:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1320,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "4176:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1335,
|
|
"src": "4163:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1319,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4163:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1322,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "4198:5:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1335,
|
|
"src": "4190:13:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1321,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4190:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4129:80:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1326,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1325,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1335,
|
|
"src": "4228:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1324,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4228:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4227:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "4099:254:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1384,
|
|
"nodeType": "Block",
|
|
"src": "4780:320:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1356,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1352,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967268,
|
|
"src": "4806:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Address_$1521",
|
|
"typeString": "library Address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_Address_$1521",
|
|
"typeString": "library Address"
|
|
}
|
|
],
|
|
"id": 1351,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "4798:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 1350,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4798:7:6",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 1353,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4798:13:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1354,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "balance",
|
|
"nodeType": "MemberAccess",
|
|
"src": "4798:21:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"id": 1355,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1342,
|
|
"src": "4823:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4798:30:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c",
|
|
"id": 1357,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4830:40:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c",
|
|
"typeString": "literal_string \"Address: insufficient balance for call\""
|
|
},
|
|
"value": "Address: insufficient balance for call"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c",
|
|
"typeString": "literal_string \"Address: insufficient balance for call\""
|
|
}
|
|
],
|
|
"id": 1349,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "4790:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1358,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4790:81:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1359,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4790:81:6"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 1362,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1338,
|
|
"src": "4900:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1361,
|
|
"name": "isContract",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1244,
|
|
"src": "4889:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
|
|
"typeString": "function (address) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 1363,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4889:18:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374",
|
|
"id": 1364,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4909:31:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad",
|
|
"typeString": "literal_string \"Address: call to non-contract\""
|
|
},
|
|
"value": "Address: call to non-contract"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad",
|
|
"typeString": "literal_string \"Address: call to non-contract\""
|
|
}
|
|
],
|
|
"id": 1360,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "4881:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1365,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4881:60:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1366,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4881:60:6"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1368,
|
|
1370
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1368,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "4958:7:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1384,
|
|
"src": "4953:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1367,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4953:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1370,
|
|
"mutability": "mutable",
|
|
"name": "returndata",
|
|
"nameLocation": "4980:10:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1384,
|
|
"src": "4967:23:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1369,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4967:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1377,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 1375,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1340,
|
|
"src": "5020:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 1371,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1338,
|
|
"src": "4994:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1372,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "call",
|
|
"nodeType": "MemberAccess",
|
|
"src": "4994:11:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 1374,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"names": [
|
|
"value"
|
|
],
|
|
"nodeType": "FunctionCallOptions",
|
|
"options": [
|
|
{
|
|
"id": 1373,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1342,
|
|
"src": "5013:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"src": "4994:25:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value",
|
|
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 1376,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4994:31:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "tuple(bool,bytes memory)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "4952:73:6"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1379,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1368,
|
|
"src": "5059:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"id": 1380,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1370,
|
|
"src": "5068:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"id": 1381,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1344,
|
|
"src": "5080:12:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 1378,
|
|
"name": "verifyCallResult",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1520,
|
|
"src": "5042:16:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1382,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5042:51:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1348,
|
|
"id": 1383,
|
|
"nodeType": "Return",
|
|
"src": "5035:58:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1336,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4359:237:6",
|
|
"text": " @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n with `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._"
|
|
},
|
|
"id": 1385,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionCallWithValue",
|
|
"nameLocation": "4610:21:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1345,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1338,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "4649:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1385,
|
|
"src": "4641:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1337,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4641:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1340,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "4678:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1385,
|
|
"src": "4665:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1339,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4665:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1342,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "4700:5:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1385,
|
|
"src": "4692:13:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1341,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4692:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1344,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "4729:12:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1385,
|
|
"src": "4715:26:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 1343,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4715:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4631:116:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1348,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1347,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1385,
|
|
"src": "4766:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1346,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4766:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4765:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "4601:499:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1401,
|
|
"nodeType": "Block",
|
|
"src": "5377:97:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1396,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1388,
|
|
"src": "5413:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1397,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1390,
|
|
"src": "5421:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564",
|
|
"id": 1398,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5427:39:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0",
|
|
"typeString": "literal_string \"Address: low-level static call failed\""
|
|
},
|
|
"value": "Address: low-level static call failed"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0",
|
|
"typeString": "literal_string \"Address: low-level static call failed\""
|
|
}
|
|
],
|
|
"id": 1395,
|
|
"name": "functionStaticCall",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1402,
|
|
1437
|
|
],
|
|
"referencedDeclaration": 1437,
|
|
"src": "5394:18:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,string memory) view returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1399,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5394:73:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1394,
|
|
"id": 1400,
|
|
"nodeType": "Return",
|
|
"src": "5387:80:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1386,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5106:166:6",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._"
|
|
},
|
|
"id": 1402,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionStaticCall",
|
|
"nameLocation": "5286:18:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1391,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1388,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "5313:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1402,
|
|
"src": "5305:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1387,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5305:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1390,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "5334:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1402,
|
|
"src": "5321:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1389,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5321:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5304:35:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1394,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1393,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1402,
|
|
"src": "5363:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1392,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5363:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5362:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "5277:197:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1436,
|
|
"nodeType": "Block",
|
|
"src": "5816:228:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 1416,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1405,
|
|
"src": "5845:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1415,
|
|
"name": "isContract",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1244,
|
|
"src": "5834:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
|
|
"typeString": "function (address) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 1417,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5834:18:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7472616374",
|
|
"id": 1418,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5854:38:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9",
|
|
"typeString": "literal_string \"Address: static call to non-contract\""
|
|
},
|
|
"value": "Address: static call to non-contract"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9",
|
|
"typeString": "literal_string \"Address: static call to non-contract\""
|
|
}
|
|
],
|
|
"id": 1414,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "5826:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1419,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5826:67:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1420,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5826:67:6"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1422,
|
|
1424
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1422,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "5910:7:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1436,
|
|
"src": "5905:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1421,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5905:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1424,
|
|
"mutability": "mutable",
|
|
"name": "returndata",
|
|
"nameLocation": "5932:10:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1436,
|
|
"src": "5919:23:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1423,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5919:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1429,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 1427,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1407,
|
|
"src": "5964:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 1425,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1405,
|
|
"src": "5946:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1426,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "staticcall",
|
|
"nodeType": "MemberAccess",
|
|
"src": "5946:17:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes memory) view returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 1428,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5946:23:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "tuple(bool,bytes memory)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "5904:65:6"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1431,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1422,
|
|
"src": "6003:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"id": 1432,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1424,
|
|
"src": "6012:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"id": 1433,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1409,
|
|
"src": "6024:12:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 1430,
|
|
"name": "verifyCallResult",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1520,
|
|
"src": "5986:16:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1434,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5986:51:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1413,
|
|
"id": 1435,
|
|
"nodeType": "Return",
|
|
"src": "5979:58:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1403,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5480:173:6",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._"
|
|
},
|
|
"id": 1437,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionStaticCall",
|
|
"nameLocation": "5667:18:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1410,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1405,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "5703:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1437,
|
|
"src": "5695:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1404,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5695:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1407,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "5732:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1437,
|
|
"src": "5719:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1406,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5719:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1409,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "5760:12:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1437,
|
|
"src": "5746:26:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 1408,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5746:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5685:93:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1413,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1412,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1437,
|
|
"src": "5802:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1411,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5802:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5801:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "5658:386:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1453,
|
|
"nodeType": "Block",
|
|
"src": "6320:101:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1448,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1440,
|
|
"src": "6358:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1449,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1442,
|
|
"src": "6366:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564",
|
|
"id": 1450,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6372:41:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398",
|
|
"typeString": "literal_string \"Address: low-level delegate call failed\""
|
|
},
|
|
"value": "Address: low-level delegate call failed"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398",
|
|
"typeString": "literal_string \"Address: low-level delegate call failed\""
|
|
}
|
|
],
|
|
"id": 1447,
|
|
"name": "functionDelegateCall",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1454,
|
|
1489
|
|
],
|
|
"referencedDeclaration": 1489,
|
|
"src": "6337:20:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,string memory) returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1451,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6337:77:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1446,
|
|
"id": 1452,
|
|
"nodeType": "Return",
|
|
"src": "6330:84:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1438,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6050:168:6",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._"
|
|
},
|
|
"id": 1454,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionDelegateCall",
|
|
"nameLocation": "6232:20:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1443,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1440,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "6261:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1454,
|
|
"src": "6253:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1439,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6253:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1442,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "6282:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1454,
|
|
"src": "6269:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1441,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6269:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6252:35:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1446,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1445,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1454,
|
|
"src": "6306:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1444,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6306:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6305:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "6223:198:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1488,
|
|
"nodeType": "Block",
|
|
"src": "6762:232:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 1468,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1457,
|
|
"src": "6791:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1467,
|
|
"name": "isContract",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1244,
|
|
"src": "6780:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
|
|
"typeString": "function (address) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 1469,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6780:18:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374",
|
|
"id": 1470,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6800:40:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520",
|
|
"typeString": "literal_string \"Address: delegate call to non-contract\""
|
|
},
|
|
"value": "Address: delegate call to non-contract"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520",
|
|
"typeString": "literal_string \"Address: delegate call to non-contract\""
|
|
}
|
|
],
|
|
"id": 1466,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "6772:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1471,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6772:69:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1472,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6772:69:6"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1474,
|
|
1476
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1474,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "6858:7:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1488,
|
|
"src": "6853:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1473,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6853:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1476,
|
|
"mutability": "mutable",
|
|
"name": "returndata",
|
|
"nameLocation": "6880:10:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1488,
|
|
"src": "6867:23:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1475,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6867:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1481,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 1479,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1459,
|
|
"src": "6914:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 1477,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1457,
|
|
"src": "6894:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1478,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "delegatecall",
|
|
"nodeType": "MemberAccess",
|
|
"src": "6894:19:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes memory) returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 1480,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6894:25:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "tuple(bool,bytes memory)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "6852:67:6"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1483,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1474,
|
|
"src": "6953:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"id": 1484,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1476,
|
|
"src": "6962:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"id": 1485,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1461,
|
|
"src": "6974:12:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 1482,
|
|
"name": "verifyCallResult",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1520,
|
|
"src": "6936:16:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1486,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6936:51:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1465,
|
|
"id": 1487,
|
|
"nodeType": "Return",
|
|
"src": "6929:58:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1455,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6427:175:6",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._"
|
|
},
|
|
"id": 1489,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionDelegateCall",
|
|
"nameLocation": "6616:20:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1462,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1457,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "6654:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1489,
|
|
"src": "6646:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1456,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6646:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1459,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "6683:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1489,
|
|
"src": "6670:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1458,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6670:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1461,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "6711:12:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1489,
|
|
"src": "6697:26:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 1460,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6697:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6636:93:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1465,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1464,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1489,
|
|
"src": "6748:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1463,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6748:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6747:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "6607:387:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1519,
|
|
"nodeType": "Block",
|
|
"src": "7374:532:6",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"id": 1501,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1492,
|
|
"src": "7388:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 1517,
|
|
"nodeType": "Block",
|
|
"src": "7445:455:6",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1508,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 1505,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1494,
|
|
"src": "7529:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"id": 1506,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "7529:17:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 1507,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7549:1:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "7529:21:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 1515,
|
|
"nodeType": "Block",
|
|
"src": "7837:53:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1512,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1496,
|
|
"src": "7862:12:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 1511,
|
|
"name": "revert",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967277,
|
|
4294967277
|
|
],
|
|
"referencedDeclaration": 4294967277,
|
|
"src": "7855:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (string memory) pure"
|
|
}
|
|
},
|
|
"id": 1513,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7855:20:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1514,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7855:20:6"
|
|
}
|
|
]
|
|
},
|
|
"id": 1516,
|
|
"nodeType": "IfStatement",
|
|
"src": "7525:365:6",
|
|
"trueBody": {
|
|
"id": 1510,
|
|
"nodeType": "Block",
|
|
"src": "7552:279:6",
|
|
"statements": [
|
|
{
|
|
"AST": {
|
|
"nodeType": "YulBlock",
|
|
"src": "7672:145:6",
|
|
"statements": [
|
|
{
|
|
"nodeType": "YulVariableDeclaration",
|
|
"src": "7694:40:6",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "returndata",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7723:10:6"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mload",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7717:5:6"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "7717:17:6"
|
|
},
|
|
"variables": [
|
|
{
|
|
"name": "returndata_size",
|
|
"nodeType": "YulTypedName",
|
|
"src": "7698:15:6",
|
|
"type": ""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "7766:2:6",
|
|
"type": "",
|
|
"value": "32"
|
|
},
|
|
{
|
|
"name": "returndata",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7770:10:6"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7762:3:6"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "7762:19:6"
|
|
},
|
|
{
|
|
"name": "returndata_size",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7783:15:6"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "revert",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7755:6:6"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "7755:44:6"
|
|
},
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "7755:44:6"
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "london",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 1494,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "7723:10:6",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 1494,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "7770:10:6",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 1509,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "7663:154:6"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"id": 1518,
|
|
"nodeType": "IfStatement",
|
|
"src": "7384:516:6",
|
|
"trueBody": {
|
|
"id": 1504,
|
|
"nodeType": "Block",
|
|
"src": "7397:42:6",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 1502,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1494,
|
|
"src": "7418:10:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1500,
|
|
"id": 1503,
|
|
"nodeType": "Return",
|
|
"src": "7411:17:6"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1490,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "7000:209:6",
|
|
"text": " @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n revert reason using the provided one.\n _Available since v4.3._"
|
|
},
|
|
"id": 1520,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "verifyCallResult",
|
|
"nameLocation": "7223:16:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1497,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1492,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "7254:7:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1520,
|
|
"src": "7249:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1491,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7249:4:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1494,
|
|
"mutability": "mutable",
|
|
"name": "returndata",
|
|
"nameLocation": "7284:10:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1520,
|
|
"src": "7271:23:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1493,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7271:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1496,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "7318:12:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1520,
|
|
"src": "7304:26:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 1495,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7304:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7239:97:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1500,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1499,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1520,
|
|
"src": "7360:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1498,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7360:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7359:14:6"
|
|
},
|
|
"scope": 1521,
|
|
"src": "7214:692:6",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 1522,
|
|
"src": "179:7729:6",
|
|
"usedErrors": []
|
|
}
|
|
],
|
|
"src": "86:7823:6"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.8.11+commit.d7f03943.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.4.4",
|
|
"updatedAt": "2021-12-29T22:14:28.597Z",
|
|
"devdoc": {
|
|
"details": "Collection of functions related to the address type",
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
} |