UNPKG

@etherisc/registry-contracts

Version:

Etherisc's smart contracts for the registry.

1,181 lines 194 kB
{ "abi": [], "allSourcePaths": { "22": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Address.sol" }, "ast": { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Address.sol", "exportedSymbols": { "Address": [ 17676 ] }, "id": 17677, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 17348, "literals": [ "solidity", "^", "0.8", ".1" ], "nodeType": "PragmaDirective", "src": "101:23:22" }, { "abstract": false, "baseContracts": [], "canonicalName": "Address", "contractDependencies": [], "contractKind": "library", "documentation": { "id": 17349, "nodeType": "StructuredDocumentation", "src": "126:67:22", "text": " @dev Collection of functions related to the address type" }, "fullyImplemented": true, "id": 17676, "linearizedBaseContracts": [ 17676 ], "name": "Address", "nameLocation": "202:7:22", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 17363, "nodeType": "Block", "src": "1241:254:22", "statements": [ { "expression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 17361, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "expression": { "id": 17357, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17352, "src": "1465:7:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 17358, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1473:4:22", "memberName": "code", "nodeType": "MemberAccess", "src": "1465:12:22", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 17359, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1478:6:22", "memberName": "length", "nodeType": "MemberAccess", "src": "1465:19:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "hexValue": "30", "id": 17360, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1487:1:22", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1465:23:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 17356, "id": 17362, "nodeType": "Return", "src": "1458:30:22" } ] }, "documentation": { "id": 17350, "nodeType": "StructuredDocumentation", "src": "216:954:22", "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 ====\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": 17364, "implemented": true, "kind": "function", "modifiers": [], "name": "isContract", "nameLocation": "1184:10:22", "nodeType": "FunctionDefinition", "parameters": { "id": 17353, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 17352, "mutability": "mutable", "name": "account", "nameLocation": "1203:7:22", "nodeType": "VariableDeclaration", "scope": 17364, "src": "1195:15:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 17351, "name": "address", "nodeType": "ElementaryTypeName", "src": "1195:7:22", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "1194:17:22" }, "returnParameters": { "id": 17356, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 17355, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 17364, "src": "1235:4:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 17354, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1235:4:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "1234:6:22" }, "scope": 17676, "src": "1175:320:22", "stateMutability": "view", "virtual": false, "visibility": "internal" }, { "body": { "id": 17397, "nodeType": "Block", "src": "2483:241:22", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 17379, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "arguments": [ { "id": 17375, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "2509:4:22", "typeDescriptions": { "typeIdentifier": "t_contract$_Address_$17676", "typeString": "library Address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Address_$17676", "typeString": "library Address" } ], "id": 17374, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2501:7:22", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 17373, "name": "address", "nodeType": "ElementaryTypeName", "src": "2501:7:22", "typeDescriptions": {} } }, "id": 17376, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2501:13:22", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 17377, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2515:7:22", "memberName": "balance", "nodeType": "MemberAccess", "src": "2501:21:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "id": 17378, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17369, "src": "2526:6:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2501:31:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", "id": 17380, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2534:31:22", "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": 17372, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "2493:7:22", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 17381, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2493:73:22", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 17382, "nodeType": "ExpressionStatement", "src": "2493:73:22" }, { "assignments": [ 17384, null ], "declarations": [ { "constant": false, "id": 17384, "mutability": "mutable", "name": "success", "nameLocation": "2583:7:22", "nodeType": "VariableDeclaration", "scope": 17397, "src": "2578:12:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 17383, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2578:4:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" }, null ], "id": 17391, "initialValue": { "arguments": [ { "hexValue": "", "id": 17389, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2626:2:22", "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": 17385, "name": "recipient", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17367, "src": "2596:9:22", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "id": 17386, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2606:4:22", "memberName": "call", "nodeType": "MemberAccess", "src": "2596:14:22", "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": 17388, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "names": [ "value" ], "nodeType": "FunctionCallOptions", "options": [ { "id": 17387, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17369, "src": "2618:6:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "src": "2596:29:22", "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": 17390, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2596:33:22", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "tuple(bool,bytes memory)" } }, "nodeType": "VariableDeclarationStatement", "src": "2577:52:22" }, { "expression": { "arguments": [ { "id": 17393, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17384, "src": "2647:7:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", "id": 17394, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2656:60:22", "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": 17392, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "2639:7:22", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 17395, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2639:78:22", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 17396, "nodeType": "ExpressionStatement", "src": "2639:78:22" } ] }, "documentation": { "id": 17365, "nodeType": "StructuredDocumentation", "src": "1501:906:22", "text": " @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n `recipient`, forwarding all available gas and reverting on errors.\n https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n of certain opcodes, possibly making contracts go over the 2300 gas limit\n imposed by `transfer`, making them unable to receive funds via\n `transfer`. {sendValue} removes this limitation.\n https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n IMPORTANT: because control is transferred to `recipient`, care must be\n taken to not create reentrancy vulnerabilities. Consider using\n {ReentrancyGuard} or the\n https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]." }, "id": 17398, "implemented": true, "kind": "function", "modifiers": [], "name": "sendValue", "nameLocation": "2421:9:22", "nodeType": "FunctionDefinition", "parameters": { "id": 17370, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 17367, "mutability": "mutable", "name": "recipient", "nameLocation": "2447:9:22", "nodeType": "VariableDeclaration", "scope": 17398, "src": "2431:25:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, "typeName": { "id": 17366, "name": "address", "nodeType": "ElementaryTypeName", "src": "2431:15:22", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "visibility": "internal" }, { "constant": false, "id": 17369, "mutability": "mutable", "name": "amount", "nameLocation": "2466:6:22", "nodeType": "VariableDeclaration", "scope": 17398, "src": "2458:14:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 17368, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2458:7:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "2430:43:22" }, "returnParameters": { "id": 17371, "nodeType": "ParameterList", "parameters": [], "src": "2483:0:22" }, "scope": 17676, "src": "2412:312:22", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 17415, "nodeType": "Block", "src": "3555:96:22", "statements": [ { "expression": { "arguments": [ { "id": 17409, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17401, "src": "3594:6:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 17410, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17403, "src": "3602:4:22", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "hexValue": "30", "id": 17411, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3608:1:22", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, { "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564", "id": 17412, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3611:32:22", "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": 17408, "name": "functionCallWithValue", "nodeType": "Identifier", "overloadedDeclarations": [ 17456, 17500 ], "referencedDeclaration": 17500, "src": "3572:21:22", "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": 17413, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3572:72:22", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "functionReturnParameters": 17407, "id": 17414, "nodeType": "Return", "src": "3565:79:22" } ] }, "documentation": { "id": 17399, "nodeType": "StructuredDocumentation", "src": "2730:731:22", "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": 17416, "implemented": true, "kind": "function", "modifiers": [], "name": "functionCall", "nameLocation": "3475:12:22", "nodeType": "FunctionDefinition", "parameters": { "id": 17404, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 17401, "mutability": "mutable", "name": "target", "nameLocation": "3496:6:22", "nodeType": "VariableDeclaration", "scope": 17416, "src": "3488:14:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 17400, "name": "address", "nodeType": "ElementaryTypeName", "src": "3488:7:22", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 17403, "mutability": "mutable", "name": "data", "nameLocation": "3517:4:22", "nodeType": "VariableDeclaration", "scope": 17416, "src": "3504:17:22", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 17402, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3504:5:22", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "3487:35:22" }, "returnParameters": { "id": 17407, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 17406, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 17416, "src": "3541:12:22", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 17405, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3541:5:22", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "3540:14:22" }, "scope": 17676, "src": "3466:185:22", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 17435, "nodeType": "Block", "src": "4020:76:22", "statements": [ { "expression": { "arguments": [ { "id": 17429, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17419, "src": "4059:6:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 17430, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17421, "src": "4067:4:22", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "hexValue": "30", "id": 17431, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4073:1:22", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, { "id": 17432, "name": "errorMessage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17423, "src": "4076:12:22", "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": 17428, "name": "functionCallWithValue", "nodeType": "Identifier", "overloadedDeclarations": [ 17456, 17500 ], "referencedDeclaration": 17500, "src": "4037:21:22", "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": 17433, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4037:52:22", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "functionReturnParameters": 17427, "id": 17434, "nodeType": "Return", "src": "4030:59:22" } ] }, "documentation": { "id": 17417, "nodeType": "StructuredDocumentation", "src": "3657:211:22", "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": 17436, "implemented": true, "kind": "function", "modifiers": [], "name": "functionCall", "nameLocation": "3882:12:22", "nodeType": "FunctionDefinition", "parameters": { "id": 17424, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 17419, "mutability": "mutable", "name": "target", "nameLocation": "3912:6:22", "nodeType": "VariableDeclaration", "scope": 17436, "src": "3904:14:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 17418, "name": "address", "nodeType": "ElementaryTypeName", "src": "3904:7:22", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 17421, "mutability": "mutable", "name": "data", "nameLocation": "3941:4:22", "nodeType": "VariableDeclaration", "scope": 17436, "src": "3928:17:22", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 17420, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3928:5:22", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" }, { "constant": false, "id": 17423, "mutability": "mutable", "name": "errorMessage", "nameLocation": "3969:12:22", "nodeType": "VariableDeclaration", "scope": 17436, "src": "3955:26:22", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 17422, "name": "string", "nodeType": "ElementaryTypeName", "src": "3955:6:22", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "3894:93:22" }, "returnParameters": { "id": 17427, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 17426, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 17436, "src": "4006:12:22", "stateVariable": false, "storageLocation": "memory", "typeDe