UNPKG

@etherisc/depeg-contracts

Version:

Etherisc's smart contracts for a depeg insurance for stable coins.

1,190 lines 178 kB
{ "abi": [], "allSourcePaths": { "10": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol" }, "ast": { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol", "exportedSymbols": { "Address": [ 24852 ] }, "id": 24853, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 24559, "literals": [ "solidity", "^", "0.8", ".1" ], "nodeType": "PragmaDirective", "src": "101:23:10" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": { "id": 24560, "nodeType": "StructuredDocumentation", "src": "126:67:10", "text": " @dev Collection of functions related to the address type" }, "fullyImplemented": true, "id": 24852, "linearizedBaseContracts": [ 24852 ], "name": "Address", "nameLocation": "202:7:10", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 24574, "nodeType": "Block", "src": "1241:254:10", "statements": [ { "expression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 24572, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "expression": { "id": 24568, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24563, "src": "1465:7:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 24569, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "code", "nodeType": "MemberAccess", "src": "1465:12:10", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 24570, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "src": "1465:19:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "hexValue": "30", "id": 24571, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1487:1:10", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1465:23:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 24567, "id": 24573, "nodeType": "Return", "src": "1458:30:10" } ] }, "documentation": { "id": 24561, "nodeType": "StructuredDocumentation", "src": "216:954:10", "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": 24575, "implemented": true, "kind": "function", "modifiers": [], "name": "isContract", "nameLocation": "1184:10:10", "nodeType": "FunctionDefinition", "parameters": { "id": 24564, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 24563, "mutability": "mutable", "name": "account", "nameLocation": "1203:7:10", "nodeType": "VariableDeclaration", "scope": 24575, "src": "1195:15:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 24562, "name": "address", "nodeType": "ElementaryTypeName", "src": "1195:7:10", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "1194:17:10" }, "returnParameters": { "id": 24567, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 24566, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 24575, "src": "1235:4:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 24565, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1235:4:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "1234:6:10" }, "scope": 24852, "src": "1175:320:10", "stateMutability": "view", "virtual": false, "visibility": "internal" }, { "body": { "id": 24608, "nodeType": "Block", "src": "2483:241:10", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 24590, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "arguments": [ { "id": 24586, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "2509:4:10", "typeDescriptions": { "typeIdentifier": "t_contract$_Address_$24852", "typeString": "library Address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Address_$24852", "typeString": "library Address" } ], "id": 24585, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2501:7:10", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 24584, "name": "address", "nodeType": "ElementaryTypeName", "src": "2501:7:10", "typeDescriptions": {} } }, "id": 24587, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2501:13:10", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 24588, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balance", "nodeType": "MemberAccess", "src": "2501:21:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "id": 24589, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24580, "src": "2526:6:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2501:31:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", "id": 24591, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2534:31:10", "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": 24583, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "2493:7:10", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 24592, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2493:73:10", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 24593, "nodeType": "ExpressionStatement", "src": "2493:73:10" }, { "assignments": [ 24595, null ], "declarations": [ { "constant": false, "id": 24595, "mutability": "mutable", "name": "success", "nameLocation": "2583:7:10", "nodeType": "VariableDeclaration", "scope": 24608, "src": "2578:12:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 24594, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2578:4:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" }, null ], "id": 24602, "initialValue": { "arguments": [ { "hexValue": "", "id": 24600, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2626:2:10", "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": 24596, "name": "recipient", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24578, "src": "2596:9:10", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "id": 24597, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "call", "nodeType": "MemberAccess", "src": "2596:14:10", "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": 24599, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "names": [ "value" ], "nodeType": "FunctionCallOptions", "options": [ { "id": 24598, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24580, "src": "2618:6:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "src": "2596:29:10", "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": 24601, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2596:33:10", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "tuple(bool,bytes memory)" } }, "nodeType": "VariableDeclarationStatement", "src": "2577:52:10" }, { "expression": { "arguments": [ { "id": 24604, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24595, "src": "2647:7:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", "id": 24605, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2656:60:10", "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": 24603, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "2639:7:10", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 24606, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2639:78:10", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 24607, "nodeType": "ExpressionStatement", "src": "2639:78:10" } ] }, "documentation": { "id": 24576, "nodeType": "StructuredDocumentation", "src": "1501:906:10", "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": 24609, "implemented": true, "kind": "function", "modifiers": [], "name": "sendValue", "nameLocation": "2421:9:10", "nodeType": "FunctionDefinition", "parameters": { "id": 24581, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 24578, "mutability": "mutable", "name": "recipient", "nameLocation": "2447:9:10", "nodeType": "VariableDeclaration", "scope": 24609, "src": "2431:25:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, "typeName": { "id": 24577, "name": "address", "nodeType": "ElementaryTypeName", "src": "2431:15:10", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "visibility": "internal" }, { "constant": false, "id": 24580, "mutability": "mutable", "name": "amount", "nameLocation": "2466:6:10", "nodeType": "VariableDeclaration", "scope": 24609, "src": "2458:14:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 24579, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2458:7:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "2430:43:10" }, "returnParameters": { "id": 24582, "nodeType": "ParameterList", "parameters": [], "src": "2483:0:10" }, "scope": 24852, "src": "2412:312:10", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 24625, "nodeType": "Block", "src": "3555:84:10", "statements": [ { "expression": { "arguments": [ { "id": 24620, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24612, "src": "3585:6:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 24621, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24614, "src": "3593:4:10", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564", "id": 24622, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3599:32:10", "typeDescriptions": { "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", "typeString": "literal_string \"Address: low-level call failed\"" }, "value": "Address: low-level call failed" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", "typeString": "literal_string \"Address: low-level call failed\"" } ], "id": 24619, "name": "functionCall", "nodeType": "Identifier", "overloadedDeclarations": [ 24626, 24646 ], "referencedDeclaration": 24646, "src": "3572:12:10", "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": 24623, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3572:60:10", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "functionReturnParameters": 24618, "id": 24624, "nodeType": "Return", "src": "3565:67:10" } ] }, "documentation": { "id": 24610, "nodeType": "StructuredDocumentation", "src": "2730:731:10", "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": 24626, "implemented": true, "kind": "function", "modifiers": [], "name": "functionCall", "nameLocation": "3475:12:10", "nodeType": "FunctionDefinition", "parameters": { "id": 24615, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 24612, "mutability": "mutable", "name": "target", "nameLocation": "3496:6:10", "nodeType": "VariableDeclaration", "scope": 24626, "src": "3488:14:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 24611, "name": "address", "nodeType": "ElementaryTypeName", "src": "3488:7:10", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 24614, "mutability": "mutable", "name": "data", "nameLocation": "3517:4:10", "nodeType": "VariableDeclaration", "scope": 24626, "src": "3504:17:10", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 24613, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3504:5:10", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "3487:35:10" }, "returnParameters": { "id": 24618, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 24617, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 24626, "src": "3541:12:10", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 24616, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3541:5:10", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "3540:14:10" }, "scope": 24852, "src": "3466:173:10", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 24645, "nodeType": "Block", "src": "4008:76:10", "statements": [ { "expression": { "arguments": [ { "id": 24639, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24629, "src": "4047:6:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 24640, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24631, "src": "4055:4:10", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "hexValue": "30", "id": 24641, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4061:1:10", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, { "id": 24642, "name": "errorMessage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24633, "src": "4064:12:10", "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": 24638, "name": "functionCallWithValue", "nodeType": "Identifier", "overloadedDeclarations": [ 24666, 24716 ], "referencedDeclaration": 24716, "src": "4025:21:10", "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": 24643, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4025:52:10", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "functionReturnParameters": 24637, "id": 24644, "nodeType": "Return", "src": "4018:59:10" } ] }, "documentation": { "id": 24627, "nodeType": "StructuredDocumentation", "src": "3645:211:10", "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": 24646, "implemented": true, "kind": "function", "modifiers": [], "name": "functionCall", "nameLocation": "3870:12:10", "nodeType": "FunctionDefinition", "parameters": { "id": 24634, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 24629, "mutability": "mutable", "name": "target", "nameLocation": "3900:6:10", "nodeType": "VariableDeclaration", "scope": 24646, "src": "3892:14:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 24628, "name": "address", "nodeType": "ElementaryTypeName", "src": "3892:7:10", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 24631, "mutability": "mutable", "name": "data", "nameLocation": "3929:4:10", "nodeType": "VariableDeclaration", "scope": 24646, "src": "3916:17:10", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 24630, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3916:5:10", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" }, { "constant": false, "id": 24633, "mutability": "mutable", "name": "errorMessage", "nameLocation": "3957:12:10", "nodeType": "VariableDeclaration", "scope": 24646, "src": "3943:26:10", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 24632, "name": "string", "nodeType": "ElementaryTypeName", "src": "3943:6:10", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "3882:93:10" }, "returnParameters": { "id": 24637, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 24636, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 24646, "src": "3994:12:10", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 24635, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3994:5:10", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "3993:14:10" }, "scope": 24852, "src": "3861:223:10", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 24665, "nodeType": "Block", "src": "4589:111:10", "statements": [ { "expression": { "arguments": [ { "id": 24659, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24649, "sr