Credit-Card-System-smartcon.../build/contracts/Address.json
2023-06-04 19:59:46 +08:00

4386 lines
188 KiB
JSON

{
"contractName": "Address",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"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\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2455248c8ddd9cc6a7af76a13973cddf222072427e7b0e2a7d1aff345145e931\",\"dweb:/ipfs/QmfYjnjRbWqYpuxurqveE6HtzsY1Xx323J428AKQgtBJZm\"]}},\"version\":1}",
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220806f5d769291c713663b0da9395ea2324347495b2b7610341add22a7c5d4e75a64736f6c63430008130033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220806f5d769291c713663b0da9395ea2324347495b2b7610341add22a7c5d4e75a64736f6c63430008130033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "194:9169:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "194:9169:4:-:0;;;;;;;;",
"source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\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 * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, \"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(address target, bytes memory data, uint256 value) 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 (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or 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 _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\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 /// @solidity memory-safe-assembly\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",
"sourcePath": "@openzeppelin/contracts/utils/Address.sol",
"ast": {
"absolutePath": "@openzeppelin/contracts/utils/Address.sol",
"exportedSymbols": {
"Address": [
1417
]
},
"id": 1418,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1089,
"literals": [
"solidity",
"^",
"0.8",
".1"
],
"nodeType": "PragmaDirective",
"src": "101:23:4"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Address",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 1090,
"nodeType": "StructuredDocumentation",
"src": "126:67:4",
"text": " @dev Collection of functions related to the address type"
},
"fullyImplemented": true,
"id": 1417,
"linearizedBaseContracts": [
1417
],
"name": "Address",
"nameLocation": "202:7:4",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1104,
"nodeType": "Block",
"src": "1478:254:4",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1102,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"expression": {
"id": 1098,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1093,
"src": "1702:7:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1099,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1710:4:4",
"memberName": "code",
"nodeType": "MemberAccess",
"src": "1702:12:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 1100,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1715:6:4",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "1702:19:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 1101,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1724:1:4",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1702:23:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1097,
"id": 1103,
"nodeType": "Return",
"src": "1695:30:4"
}
]
},
"documentation": {
"id": 1091,
"nodeType": "StructuredDocumentation",
"src": "216:1191:4",
"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 Furthermore, `isContract` will also return true if the target contract within\n the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n which only has an effect at the end of a transaction.\n ====\n [IMPORTANT]\n ====\n You shouldn't rely on `isContract` to protect against flash loan attacks!\n Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n constructor.\n ===="
},
"id": 1105,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isContract",
"nameLocation": "1421:10:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1094,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1093,
"mutability": "mutable",
"name": "account",
"nameLocation": "1440:7:4",
"nodeType": "VariableDeclaration",
"scope": 1105,
"src": "1432:15:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1092,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1432:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1431:17:4"
},
"returnParameters": {
"id": 1097,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1096,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1105,
"src": "1472:4:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1095,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1472:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "1471:6:4"
},
"scope": 1417,
"src": "1412:320:4",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1138,
"nodeType": "Block",
"src": "2718:241:4",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1120,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"arguments": [
{
"id": 1116,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967268,
"src": "2744:4:4",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Address_$1417",
"typeString": "library Address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_Address_$1417",
"typeString": "library Address"
}
],
"id": 1115,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2736:7:4",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 1114,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2736:7:4",
"typeDescriptions": {}
}
},
"id": 1117,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2736:13:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1118,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2750:7:4",
"memberName": "balance",
"nodeType": "MemberAccess",
"src": "2736:21:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 1119,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1110,
"src": "2761:6:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2736:31:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365",
"id": 1121,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2769:31:4",
"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": 1113,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "2728:7:4",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1122,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2728:73:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1123,
"nodeType": "ExpressionStatement",
"src": "2728:73:4"
},
{
"assignments": [
1125,
null
],
"declarations": [
{
"constant": false,
"id": 1125,
"mutability": "mutable",
"name": "success",
"nameLocation": "2818:7:4",
"nodeType": "VariableDeclaration",
"scope": 1138,
"src": "2813:12:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1124,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2813:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
null
],
"id": 1132,
"initialValue": {
"arguments": [
{
"hexValue": "",
"id": 1130,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2861:2:4",
"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": 1126,
"name": "recipient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1108,
"src": "2831:9:4",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"id": 1127,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2841:4:4",
"memberName": "call",
"nodeType": "MemberAccess",
"src": "2831:14:4",
"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": 1129,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"names": [
"value"
],
"nodeType": "FunctionCallOptions",
"options": [
{
"id": 1128,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1110,
"src": "2853:6:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"src": "2831:29:4",
"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": 1131,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2831:33:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2812:52:4"
},
{
"expression": {
"arguments": [
{
"id": 1134,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1125,
"src": "2882:7:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564",
"id": 1135,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2891:60:4",
"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": 1133,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "2874:7:4",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1136,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2874:78:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1137,
"nodeType": "ExpressionStatement",
"src": "2874:78:4"
}
]
},
"documentation": {
"id": 1106,
"nodeType": "StructuredDocumentation",
"src": "1738:904:4",
"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://consensys.net/diligence/blog/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.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]."
},
"id": 1139,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sendValue",
"nameLocation": "2656:9:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1111,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1108,
"mutability": "mutable",
"name": "recipient",
"nameLocation": "2682:9:4",
"nodeType": "VariableDeclaration",
"scope": 1139,
"src": "2666:25:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"typeName": {
"id": 1107,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2666:15:4",
"stateMutability": "payable",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1110,
"mutability": "mutable",
"name": "amount",
"nameLocation": "2701:6:4",
"nodeType": "VariableDeclaration",
"scope": 1139,
"src": "2693:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1109,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2693:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2665:43:4"
},
"returnParameters": {
"id": 1112,
"nodeType": "ParameterList",
"parameters": [],
"src": "2718:0:4"
},
"scope": 1417,
"src": "2647:312:4",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1156,
"nodeType": "Block",
"src": "3790:96:4",
"statements": [
{
"expression": {
"arguments": [
{
"id": 1150,
"name": "target",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1142,
"src": "3829:6:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 1151,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1144,
"src": "3837:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"hexValue": "30",
"id": 1152,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3843:1:4",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564",
"id": 1153,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3846:32:4",
"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_rational_0_by_1",
"typeString": "int_const 0"
},
{
"typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df",
"typeString": "literal_string \"Address: low-level call failed\""
}
],
"id": 1149,
"name": "functionCallWithValue",
"nodeType": "Identifier",
"overloadedDeclarations": [
1197,
1241
],
"referencedDeclaration": 1241,
"src": "3807:21:4",
"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": 1154,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3807:72:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 1148,
"id": 1155,
"nodeType": "Return",
"src": "3800:79:4"
}
]
},
"documentation": {
"id": 1140,
"nodeType": "StructuredDocumentation",
"src": "2965:731:4",
"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": 1157,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionCall",
"nameLocation": "3710:12:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1145,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1142,
"mutability": "mutable",
"name": "target",
"nameLocation": "3731:6:4",
"nodeType": "VariableDeclaration",
"scope": 1157,
"src": "3723:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1141,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3723:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1144,
"mutability": "mutable",
"name": "data",
"nameLocation": "3752:4:4",
"nodeType": "VariableDeclaration",
"scope": 1157,
"src": "3739:17:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1143,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "3739:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "3722:35:4"
},
"returnParameters": {
"id": 1148,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1147,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1157,
"src": "3776:12:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1146,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "3776:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "3775:14:4"
},
"scope": 1417,
"src": "3701:185:4",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1176,
"nodeType": "Block",
"src": "4255:76:4",
"statements": [
{
"expression": {
"arguments": [
{
"id": 1170,
"name": "target",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1160,
"src": "4294:6:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 1171,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1162,
"src": "4302:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"hexValue": "30",
"id": 1172,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4308:1:4",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"id": 1173,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1164,
"src": "4311:12:4",
"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": 1169,
"name": "functionCallWithValue",
"nodeType": "Identifier",
"overloadedDeclarations": [
1197,
1241
],
"referencedDeclaration": 1241,
"src": "4272:21:4",
"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": 1174,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4272:52:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 1168,
"id": 1175,
"nodeType": "Return",
"src": "4265:59:4"
}
]
},
"documentation": {
"id": 1158,
"nodeType": "StructuredDocumentation",
"src": "3892:211:4",
"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": 1177,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionCall",
"nameLocation": "4117:12:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1165,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1160,
"mutability": "mutable",
"name": "target",
"nameLocation": "4147:6:4",
"nodeType": "VariableDeclaration",
"scope": 1177,
"src": "4139:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1159,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4139:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1162,
"mutability": "mutable",
"name": "data",
"nameLocation": "4176:4:4",
"nodeType": "VariableDeclaration",
"scope": 1177,
"src": "4163:17:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1161,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "4163:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1164,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "4204:12:4",
"nodeType": "VariableDeclaration",
"scope": 1177,
"src": "4190:26:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 1163,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "4190:6:4",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "4129:93:4"
},
"returnParameters": {
"id": 1168,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1167,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1177,
"src": "4241:12:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1166,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "4241:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "4240:14:4"
},
"scope": 1417,
"src": "4108:223:4",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1196,
"nodeType": "Block",
"src": "4806:111:4",
"statements": [
{
"expression": {
"arguments": [
{
"id": 1190,
"name": "target",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1180,
"src": "4845:6:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 1191,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1182,
"src": "4853:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"id": 1192,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1184,
"src": "4859:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564",
"id": 1193,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4866:43:4",
"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": 1189,
"name": "functionCallWithValue",
"nodeType": "Identifier",
"overloadedDeclarations": [
1197,
1241
],
"referencedDeclaration": 1241,
"src": "4823:21:4",
"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": 1194,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4823:87:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 1188,
"id": 1195,
"nodeType": "Return",
"src": "4816:94:4"
}
]
},
"documentation": {
"id": 1178,
"nodeType": "StructuredDocumentation",
"src": "4337:351:4",
"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": 1197,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionCallWithValue",
"nameLocation": "4702:21:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1185,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1180,
"mutability": "mutable",
"name": "target",
"nameLocation": "4732:6:4",
"nodeType": "VariableDeclaration",
"scope": 1197,
"src": "4724:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1179,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4724:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1182,
"mutability": "mutable",
"name": "data",
"nameLocation": "4753:4:4",
"nodeType": "VariableDeclaration",
"scope": 1197,
"src": "4740:17:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1181,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "4740:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1184,
"mutability": "mutable",
"name": "value",
"nameLocation": "4767:5:4",
"nodeType": "VariableDeclaration",
"scope": 1197,
"src": "4759:13:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1183,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4759:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4723:50:4"
},
"returnParameters": {
"id": 1188,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1187,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1197,
"src": "4792:12:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1186,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "4792:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "4791:14:4"
},
"scope": 1417,
"src": "4693:224:4",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1240,
"nodeType": "Block",
"src": "5344:267:4",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1218,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"arguments": [
{
"id": 1214,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967268,
"src": "5370:4:4",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Address_$1417",
"typeString": "library Address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_Address_$1417",
"typeString": "library Address"
}
],
"id": 1213,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "5362:7:4",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 1212,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5362:7:4",
"typeDescriptions": {}
}
},
"id": 1215,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5362:13:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1216,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5376:7:4",
"memberName": "balance",
"nodeType": "MemberAccess",
"src": "5362:21:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 1217,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1204,
"src": "5387:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5362:30:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c",
"id": 1219,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5394:40:4",
"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": 1211,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "5354:7:4",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1220,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5354:81:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1221,
"nodeType": "ExpressionStatement",
"src": "5354:81:4"
},
{
"assignments": [
1223,
1225
],
"declarations": [
{
"constant": false,
"id": 1223,
"mutability": "mutable",
"name": "success",
"nameLocation": "5451:7:4",
"nodeType": "VariableDeclaration",
"scope": 1240,
"src": "5446:12:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1222,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "5446:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1225,
"mutability": "mutable",
"name": "returndata",
"nameLocation": "5473:10:4",
"nodeType": "VariableDeclaration",
"scope": 1240,
"src": "5460:23:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1224,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "5460:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 1232,
"initialValue": {
"arguments": [
{
"id": 1230,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1202,
"src": "5513:4:4",
"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": 1226,
"name": "target",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1200,
"src": "5487:6:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1227,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5494:4:4",
"memberName": "call",
"nodeType": "MemberAccess",
"src": "5487:11:4",
"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": 1229,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"names": [
"value"
],
"nodeType": "FunctionCallOptions",
"options": [
{
"id": 1228,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1204,
"src": "5506:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"src": "5487:25:4",
"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": 1231,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5487:31:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "5445:73:4"
},
{
"expression": {
"arguments": [
{
"id": 1234,
"name": "target",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1200,
"src": "5562:6:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 1235,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1223,
"src": "5570:7:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 1236,
"name": "returndata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1225,
"src": "5579:10:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"id": 1237,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1206,
"src": "5591:12:4",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 1233,
"name": "verifyCallResultFromTarget",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1372,
"src": "5535:26:4",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (address,bool,bytes memory,string memory) view returns (bytes memory)"
}
},
"id": 1238,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5535:69:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 1210,
"id": 1239,
"nodeType": "Return",
"src": "5528:76:4"
}
]
},
"documentation": {
"id": 1198,
"nodeType": "StructuredDocumentation",
"src": "4923:237:4",
"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": 1241,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionCallWithValue",
"nameLocation": "5174:21:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1207,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1200,
"mutability": "mutable",
"name": "target",
"nameLocation": "5213:6:4",
"nodeType": "VariableDeclaration",
"scope": 1241,
"src": "5205:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1199,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5205:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1202,
"mutability": "mutable",
"name": "data",
"nameLocation": "5242:4:4",
"nodeType": "VariableDeclaration",
"scope": 1241,
"src": "5229:17:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1201,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "5229:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1204,
"mutability": "mutable",
"name": "value",
"nameLocation": "5264:5:4",
"nodeType": "VariableDeclaration",
"scope": 1241,
"src": "5256:13:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1203,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5256:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1206,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "5293:12:4",
"nodeType": "VariableDeclaration",
"scope": 1241,
"src": "5279:26:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 1205,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "5279:6:4",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "5195:116:4"
},
"returnParameters": {
"id": 1210,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1209,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1241,
"src": "5330:12:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1208,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "5330:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "5329:14:4"
},
"scope": 1417,
"src": "5165:446:4",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1257,
"nodeType": "Block",
"src": "5888:97:4",
"statements": [
{
"expression": {
"arguments": [
{
"id": 1252,
"name": "target",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1244,
"src": "5924:6:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 1253,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1246,
"src": "5932:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"hexValue": "416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564",
"id": 1254,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5938:39:4",
"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": 1251,
"name": "functionStaticCall",
"nodeType": "Identifier",
"overloadedDeclarations": [
1258,
1287
],
"referencedDeclaration": 1287,
"src": "5905:18:4",
"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": 1255,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5905:73:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 1250,
"id": 1256,
"nodeType": "Return",
"src": "5898:80:4"
}
]
},
"documentation": {
"id": 1242,
"nodeType": "StructuredDocumentation",
"src": "5617:166:4",
"text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._"
},
"id": 1258,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionStaticCall",
"nameLocation": "5797:18:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1247,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1244,
"mutability": "mutable",
"name": "target",
"nameLocation": "5824:6:4",
"nodeType": "VariableDeclaration",
"scope": 1258,
"src": "5816:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1243,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5816:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1246,
"mutability": "mutable",
"name": "data",
"nameLocation": "5845:4:4",
"nodeType": "VariableDeclaration",
"scope": 1258,
"src": "5832:17:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1245,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "5832:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "5815:35:4"
},
"returnParameters": {
"id": 1250,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1249,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1258,
"src": "5874:12:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1248,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "5874:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "5873:14:4"
},
"scope": 1417,
"src": "5788:197:4",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1286,
"nodeType": "Block",
"src": "6327:168:4",
"statements": [
{
"assignments": [
1271,
1273
],
"declarations": [
{
"constant": false,
"id": 1271,
"mutability": "mutable",
"name": "success",
"nameLocation": "6343:7:4",
"nodeType": "VariableDeclaration",
"scope": 1286,
"src": "6338:12:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1270,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "6338:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1273,
"mutability": "mutable",
"name": "returndata",
"nameLocation": "6365:10:4",
"nodeType": "VariableDeclaration",
"scope": 1286,
"src": "6352:23:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1272,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "6352:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 1278,
"initialValue": {
"arguments": [
{
"id": 1276,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1263,
"src": "6397:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"id": 1274,
"name": "target",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1261,
"src": "6379:6:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1275,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6386:10:4",
"memberName": "staticcall",
"nodeType": "MemberAccess",
"src": "6379:17:4",
"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": 1277,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6379:23:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6337:65:4"
},
{
"expression": {
"arguments": [
{
"id": 1280,
"name": "target",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1261,
"src": "6446:6:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 1281,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1271,
"src": "6454:7:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 1282,
"name": "returndata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1273,
"src": "6463:10:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"id": 1283,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1265,
"src": "6475:12:4",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 1279,
"name": "verifyCallResultFromTarget",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1372,
"src": "6419:26:4",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (address,bool,bytes memory,string memory) view returns (bytes memory)"
}
},
"id": 1284,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6419:69:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 1269,
"id": 1285,
"nodeType": "Return",
"src": "6412:76:4"
}
]
},
"documentation": {
"id": 1259,
"nodeType": "StructuredDocumentation",
"src": "5991:173:4",
"text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._"
},
"id": 1287,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionStaticCall",
"nameLocation": "6178:18:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1266,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1261,
"mutability": "mutable",
"name": "target",
"nameLocation": "6214:6:4",
"nodeType": "VariableDeclaration",
"scope": 1287,
"src": "6206:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1260,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6206:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1263,
"mutability": "mutable",
"name": "data",
"nameLocation": "6243:4:4",
"nodeType": "VariableDeclaration",
"scope": 1287,
"src": "6230:17:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1262,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "6230:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1265,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "6271:12:4",
"nodeType": "VariableDeclaration",
"scope": 1287,
"src": "6257:26:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 1264,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "6257:6:4",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "6196:93:4"
},
"returnParameters": {
"id": 1269,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1268,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1287,
"src": "6313:12:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1267,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "6313:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "6312:14:4"
},
"scope": 1417,
"src": "6169:326:4",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1303,
"nodeType": "Block",
"src": "6771:101:4",
"statements": [
{
"expression": {
"arguments": [
{
"id": 1298,
"name": "target",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1290,
"src": "6809:6:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 1299,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1292,
"src": "6817:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"hexValue": "416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564",
"id": 1300,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6823:41:4",
"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": 1297,
"name": "functionDelegateCall",
"nodeType": "Identifier",
"overloadedDeclarations": [
1304,
1333
],
"referencedDeclaration": 1333,
"src": "6788:20:4",
"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": 1301,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6788:77:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 1296,
"id": 1302,
"nodeType": "Return",
"src": "6781:84:4"
}
]
},
"documentation": {
"id": 1288,
"nodeType": "StructuredDocumentation",
"src": "6501:168:4",
"text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._"
},
"id": 1304,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionDelegateCall",
"nameLocation": "6683:20:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1293,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1290,
"mutability": "mutable",
"name": "target",
"nameLocation": "6712:6:4",
"nodeType": "VariableDeclaration",
"scope": 1304,
"src": "6704:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1289,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6704:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1292,
"mutability": "mutable",
"name": "data",
"nameLocation": "6733:4:4",
"nodeType": "VariableDeclaration",
"scope": 1304,
"src": "6720:17:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1291,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "6720:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "6703:35:4"
},
"returnParameters": {
"id": 1296,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1295,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1304,
"src": "6757:12:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1294,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "6757:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "6756:14:4"
},
"scope": 1417,
"src": "6674:198:4",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1332,
"nodeType": "Block",
"src": "7213:170:4",
"statements": [
{
"assignments": [
1317,
1319
],
"declarations": [
{
"constant": false,
"id": 1317,
"mutability": "mutable",
"name": "success",
"nameLocation": "7229:7:4",
"nodeType": "VariableDeclaration",
"scope": 1332,
"src": "7224:12:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1316,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "7224:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1319,
"mutability": "mutable",
"name": "returndata",
"nameLocation": "7251:10:4",
"nodeType": "VariableDeclaration",
"scope": 1332,
"src": "7238:23:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1318,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "7238:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 1324,
"initialValue": {
"arguments": [
{
"id": 1322,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1309,
"src": "7285:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"id": 1320,
"name": "target",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1307,
"src": "7265:6:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1321,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7272:12:4",
"memberName": "delegatecall",
"nodeType": "MemberAccess",
"src": "7265:19:4",
"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": 1323,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7265:25:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7223:67:4"
},
{
"expression": {
"arguments": [
{
"id": 1326,
"name": "target",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1307,
"src": "7334:6:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 1327,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1317,
"src": "7342:7:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 1328,
"name": "returndata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1319,
"src": "7351:10:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"id": 1329,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1311,
"src": "7363:12:4",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 1325,
"name": "verifyCallResultFromTarget",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1372,
"src": "7307:26:4",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (address,bool,bytes memory,string memory) view returns (bytes memory)"
}
},
"id": 1330,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7307:69:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 1315,
"id": 1331,
"nodeType": "Return",
"src": "7300:76:4"
}
]
},
"documentation": {
"id": 1305,
"nodeType": "StructuredDocumentation",
"src": "6878:175:4",
"text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._"
},
"id": 1333,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionDelegateCall",
"nameLocation": "7067:20:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1312,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1307,
"mutability": "mutable",
"name": "target",
"nameLocation": "7105:6:4",
"nodeType": "VariableDeclaration",
"scope": 1333,
"src": "7097:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1306,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7097:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1309,
"mutability": "mutable",
"name": "data",
"nameLocation": "7134:4:4",
"nodeType": "VariableDeclaration",
"scope": 1333,
"src": "7121:17:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1308,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "7121:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1311,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "7162:12:4",
"nodeType": "VariableDeclaration",
"scope": 1333,
"src": "7148:26:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 1310,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "7148:6:4",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "7087:93:4"
},
"returnParameters": {
"id": 1315,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1314,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1333,
"src": "7199:12:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1313,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "7199:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "7198:14:4"
},
"scope": 1417,
"src": "7058:325:4",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1371,
"nodeType": "Block",
"src": "7865:434:4",
"statements": [
{
"condition": {
"id": 1347,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1338,
"src": "7879:7:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 1369,
"nodeType": "Block",
"src": "8235:58:4",
"statements": [
{
"expression": {
"arguments": [
{
"id": 1365,
"name": "returndata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1340,
"src": "8257:10:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"id": 1366,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1342,
"src": "8269:12:4",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 1364,
"name": "_revert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1416,
"src": "8249:7:4",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bytes memory,string memory) pure"
}
},
"id": 1367,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8249:33:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1368,
"nodeType": "ExpressionStatement",
"src": "8249:33:4"
}
]
},
"id": 1370,
"nodeType": "IfStatement",
"src": "7875:418:4",
"trueBody": {
"id": 1363,
"nodeType": "Block",
"src": "7888:341:4",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1351,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 1348,
"name": "returndata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1340,
"src": "7906:10:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 1349,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7917:6:4",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "7906:17:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 1350,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7927:1:4",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "7906:22:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1360,
"nodeType": "IfStatement",
"src": "7902:286:4",
"trueBody": {
"id": 1359,
"nodeType": "Block",
"src": "7930:258:4",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"id": 1354,
"name": "target",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1336,
"src": "8132:6:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1353,
"name": "isContract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1105,
"src": "8121:10:4",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view returns (bool)"
}
},
"id": 1355,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8121:18:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374",
"id": 1356,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8141:31:4",
"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": 1352,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "8113:7:4",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1357,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8113:60:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1358,
"nodeType": "ExpressionStatement",
"src": "8113:60:4"
}
]
}
},
{
"expression": {
"id": 1361,
"name": "returndata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1340,
"src": "8208:10:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 1346,
"id": 1362,
"nodeType": "Return",
"src": "8201:17:4"
}
]
}
}
]
},
"documentation": {
"id": 1334,
"nodeType": "StructuredDocumentation",
"src": "7389:277:4",
"text": " @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n _Available since v4.8._"
},
"id": 1372,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "verifyCallResultFromTarget",
"nameLocation": "7680:26:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1343,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1336,
"mutability": "mutable",
"name": "target",
"nameLocation": "7724:6:4",
"nodeType": "VariableDeclaration",
"scope": 1372,
"src": "7716:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1335,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7716:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1338,
"mutability": "mutable",
"name": "success",
"nameLocation": "7745:7:4",
"nodeType": "VariableDeclaration",
"scope": 1372,
"src": "7740:12:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1337,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "7740:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1340,
"mutability": "mutable",
"name": "returndata",
"nameLocation": "7775:10:4",
"nodeType": "VariableDeclaration",
"scope": 1372,
"src": "7762:23:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1339,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "7762:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1342,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "7809:12:4",
"nodeType": "VariableDeclaration",
"scope": 1372,
"src": "7795:26:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 1341,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "7795:6:4",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "7706:121:4"
},
"returnParameters": {
"id": 1346,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1345,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1372,
"src": "7851:12:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1344,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "7851:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "7850:14:4"
},
"scope": 1417,
"src": "7671:628:4",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1395,
"nodeType": "Block",
"src": "8680:135:4",
"statements": [
{
"condition": {
"id": 1384,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1375,
"src": "8694:7:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 1393,
"nodeType": "Block",
"src": "8751:58:4",
"statements": [
{
"expression": {
"arguments": [
{
"id": 1389,
"name": "returndata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1377,
"src": "8773:10:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"id": 1390,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1379,
"src": "8785:12:4",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 1388,
"name": "_revert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1416,
"src": "8765:7:4",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bytes memory,string memory) pure"
}
},
"id": 1391,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8765:33:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1392,
"nodeType": "ExpressionStatement",
"src": "8765:33:4"
}
]
},
"id": 1394,
"nodeType": "IfStatement",
"src": "8690:119:4",
"trueBody": {
"id": 1387,
"nodeType": "Block",
"src": "8703:42:4",
"statements": [
{
"expression": {
"id": 1385,
"name": "returndata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1377,
"src": "8724:10:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 1383,
"id": 1386,
"nodeType": "Return",
"src": "8717:17:4"
}
]
}
}
]
},
"documentation": {
"id": 1373,
"nodeType": "StructuredDocumentation",
"src": "8305:210:4",
"text": " @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n revert reason or using the provided one.\n _Available since v4.3._"
},
"id": 1396,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "verifyCallResult",
"nameLocation": "8529:16:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1380,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1375,
"mutability": "mutable",
"name": "success",
"nameLocation": "8560:7:4",
"nodeType": "VariableDeclaration",
"scope": 1396,
"src": "8555:12:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1374,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "8555:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1377,
"mutability": "mutable",
"name": "returndata",
"nameLocation": "8590:10:4",
"nodeType": "VariableDeclaration",
"scope": 1396,
"src": "8577:23:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1376,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "8577:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1379,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "8624:12:4",
"nodeType": "VariableDeclaration",
"scope": 1396,
"src": "8610:26:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 1378,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "8610:6:4",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "8545:97:4"
},
"returnParameters": {
"id": 1383,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1382,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1396,
"src": "8666:12:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1381,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "8666:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "8665:14:4"
},
"scope": 1417,
"src": "8520:295:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1415,
"nodeType": "Block",
"src": "8904:457:4",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1406,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 1403,
"name": "returndata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1398,
"src": "8980:10:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 1404,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8991:6:4",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "8980:17:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 1405,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9000:1:4",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "8980:21:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 1413,
"nodeType": "Block",
"src": "9310:45:4",
"statements": [
{
"expression": {
"arguments": [
{
"id": 1410,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1400,
"src": "9331:12:4",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 1409,
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967277,
4294967277
],
"referencedDeclaration": 4294967277,
"src": "9324:6:4",
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory) pure"
}
},
"id": 1411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "9324:20:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1412,
"nodeType": "ExpressionStatement",
"src": "9324:20:4"
}
]
},
"id": 1414,
"nodeType": "IfStatement",
"src": "8976:379:4",
"trueBody": {
"id": 1408,
"nodeType": "Block",
"src": "9003:301:4",
"statements": [
{
"AST": {
"nodeType": "YulBlock",
"src": "9161:133:4",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "9179:40:4",
"value": {
"arguments": [
{
"name": "returndata",
"nodeType": "YulIdentifier",
"src": "9208:10:4"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "9202:5:4"
},
"nodeType": "YulFunctionCall",
"src": "9202:17:4"
},
"variables": [
{
"name": "returndata_size",
"nodeType": "YulTypedName",
"src": "9183:15:4",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "9247:2:4",
"type": "",
"value": "32"
},
{
"name": "returndata",
"nodeType": "YulIdentifier",
"src": "9251:10:4"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "9243:3:4"
},
"nodeType": "YulFunctionCall",
"src": "9243:19:4"
},
{
"name": "returndata_size",
"nodeType": "YulIdentifier",
"src": "9264:15:4"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "9236:6:4"
},
"nodeType": "YulFunctionCall",
"src": "9236:44:4"
},
"nodeType": "YulExpressionStatement",
"src": "9236:44:4"
}
]
},
"documentation": "@solidity memory-safe-assembly",
"evmVersion": "paris",
"externalReferences": [
{
"declaration": 1398,
"isOffset": false,
"isSlot": false,
"src": "9208:10:4",
"valueSize": 1
},
{
"declaration": 1398,
"isOffset": false,
"isSlot": false,
"src": "9251:10:4",
"valueSize": 1
}
],
"id": 1407,
"nodeType": "InlineAssembly",
"src": "9152:142:4"
}
]
}
}
]
},
"id": 1416,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_revert",
"nameLocation": "8830:7:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1401,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1398,
"mutability": "mutable",
"name": "returndata",
"nameLocation": "8851:10:4",
"nodeType": "VariableDeclaration",
"scope": 1416,
"src": "8838:23:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1397,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "8838:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1400,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "8877:12:4",
"nodeType": "VariableDeclaration",
"scope": 1416,
"src": "8863:26:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 1399,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "8863:6:4",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "8837:53:4"
},
"returnParameters": {
"id": 1402,
"nodeType": "ParameterList",
"parameters": [],
"src": "8904:0:4"
},
"scope": 1417,
"src": "8821:540:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "private"
}
],
"scope": 1418,
"src": "194:9169:4",
"usedErrors": []
}
],
"src": "101:9263:4"
},
"compiler": {
"name": "solc",
"version": "0.8.19+commit.7dd6d404.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.13",
"updatedAt": "2023-06-04T09:28:33.984Z",
"devdoc": {
"details": "Collection of functions related to the address type",
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}