@etherisc/registry-contracts
Version:
Etherisc's smart contracts for the registry.
1,181 lines (1,180 loc) • 169 kB
JSON
{
"abi": [],
"allSourcePaths": {
"2": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/utils/AddressUpgradeable.sol"
},
"ast": {
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/utils/AddressUpgradeable.sol",
"exportedSymbols": {
"AddressUpgradeable": [
18366
]
},
"id": 18367,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 18084,
"literals": [
"solidity",
"^",
"0.8",
".1"
],
"nodeType": "PragmaDirective",
"src": "101:23:2"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "AddressUpgradeable",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 18085,
"nodeType": "StructuredDocumentation",
"src": "126:67:2",
"text": " @dev Collection of functions related to the address type"
},
"fullyImplemented": true,
"id": 18366,
"linearizedBaseContracts": [
18366
],
"name": "AddressUpgradeable",
"nameLocation": "202:18:2",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 18099,
"nodeType": "Block",
"src": "1252:254:2",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 18097,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"expression": {
"id": 18093,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18088,
"src": "1476:7:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 18094,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1484:4:2",
"memberName": "code",
"nodeType": "MemberAccess",
"src": "1476:12:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 18095,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1489:6:2",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "1476:19:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 18096,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1498:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1476:23:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 18092,
"id": 18098,
"nodeType": "Return",
"src": "1469:30:2"
}
]
},
"documentation": {
"id": 18086,
"nodeType": "StructuredDocumentation",
"src": "227:954:2",
"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": 18100,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isContract",
"nameLocation": "1195:10:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 18089,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18088,
"mutability": "mutable",
"name": "account",
"nameLocation": "1214:7:2",
"nodeType": "VariableDeclaration",
"scope": 18100,
"src": "1206:15:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 18087,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1206:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1205:17:2"
},
"returnParameters": {
"id": 18092,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18091,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 18100,
"src": "1246:4:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 18090,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1246:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "1245:6:2"
},
"scope": 18366,
"src": "1186:320:2",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 18133,
"nodeType": "Block",
"src": "2494:241:2",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 18115,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"arguments": [
{
"id": 18111,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "2520:4:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_AddressUpgradeable_$18366",
"typeString": "library AddressUpgradeable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_AddressUpgradeable_$18366",
"typeString": "library AddressUpgradeable"
}
],
"id": 18110,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2512:7:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 18109,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2512:7:2",
"typeDescriptions": {}
}
},
"id": 18112,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2512:13:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 18113,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2526:7:2",
"memberName": "balance",
"nodeType": "MemberAccess",
"src": "2512:21:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 18114,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18105,
"src": "2537:6:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2512:31:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365",
"id": 18116,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2545:31:2",
"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": 18108,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "2504:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 18117,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2504:73:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 18118,
"nodeType": "ExpressionStatement",
"src": "2504:73:2"
},
{
"assignments": [
18120,
null
],
"declarations": [
{
"constant": false,
"id": 18120,
"mutability": "mutable",
"name": "success",
"nameLocation": "2594:7:2",
"nodeType": "VariableDeclaration",
"scope": 18133,
"src": "2589:12:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 18119,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2589:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
null
],
"id": 18127,
"initialValue": {
"arguments": [
{
"hexValue": "",
"id": 18125,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2637:2:2",
"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": 18121,
"name": "recipient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18103,
"src": "2607:9:2",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"id": 18122,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2617:4:2",
"memberName": "call",
"nodeType": "MemberAccess",
"src": "2607:14:2",
"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": 18124,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"names": [
"value"
],
"nodeType": "FunctionCallOptions",
"options": [
{
"id": 18123,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18105,
"src": "2629:6:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"src": "2607:29:2",
"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": 18126,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2607:33:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2588:52:2"
},
{
"expression": {
"arguments": [
{
"id": 18129,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18120,
"src": "2658:7:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564",
"id": 18130,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2667:60:2",
"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": 18128,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "2650:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 18131,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2650:78:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 18132,
"nodeType": "ExpressionStatement",
"src": "2650:78:2"
}
]
},
"documentation": {
"id": 18101,
"nodeType": "StructuredDocumentation",
"src": "1512:906:2",
"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": 18134,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sendValue",
"nameLocation": "2432:9:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 18106,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18103,
"mutability": "mutable",
"name": "recipient",
"nameLocation": "2458:9:2",
"nodeType": "VariableDeclaration",
"scope": 18134,
"src": "2442:25:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"typeName": {
"id": 18102,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2442:15:2",
"stateMutability": "payable",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 18105,
"mutability": "mutable",
"name": "amount",
"nameLocation": "2477:6:2",
"nodeType": "VariableDeclaration",
"scope": 18134,
"src": "2469:14:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 18104,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2469:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2441:43:2"
},
"returnParameters": {
"id": 18107,
"nodeType": "ParameterList",
"parameters": [],
"src": "2494:0:2"
},
"scope": 18366,
"src": "2423:312:2",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 18151,
"nodeType": "Block",
"src": "3566:96:2",
"statements": [
{
"expression": {
"arguments": [
{
"id": 18145,
"name": "target",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18137,
"src": "3605:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 18146,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18139,
"src": "3613:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"hexValue": "30",
"id": 18147,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3619:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564",
"id": 18148,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3622:32:2",
"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": 18144,
"name": "functionCallWithValue",
"nodeType": "Identifier",
"overloadedDeclarations": [
18192,
18236
],
"referencedDeclaration": 18236,
"src": "3583:21:2",
"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": 18149,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3583:72:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 18143,
"id": 18150,
"nodeType": "Return",
"src": "3576:79:2"
}
]
},
"documentation": {
"id": 18135,
"nodeType": "StructuredDocumentation",
"src": "2741:731:2",
"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": 18152,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionCall",
"nameLocation": "3486:12:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 18140,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18137,
"mutability": "mutable",
"name": "target",
"nameLocation": "3507:6:2",
"nodeType": "VariableDeclaration",
"scope": 18152,
"src": "3499:14:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 18136,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3499:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 18139,
"mutability": "mutable",
"name": "data",
"nameLocation": "3528:4:2",
"nodeType": "VariableDeclaration",
"scope": 18152,
"src": "3515:17:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 18138,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "3515:5:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "3498:35:2"
},
"returnParameters": {
"id": 18143,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18142,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 18152,
"src": "3552:12:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 18141,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "3552:5:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "3551:14:2"
},
"scope": 18366,
"src": "3477:185:2",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 18171,
"nodeType": "Block",
"src": "4031:76:2",
"statements": [
{
"expression": {
"arguments": [
{
"id": 18165,
"name": "target",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18155,
"src": "4070:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 18166,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18157,
"src": "4078:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"hexValue": "30",
"id": 18167,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4084:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"id": 18168,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18159,
"src": "4087:12:2",
"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": 18164,
"name": "functionCallWithValue",
"nodeType": "Identifier",
"overloadedDeclarations": [
18192,
18236
],
"referencedDeclaration": 18236,
"src": "4048:21:2",
"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": 18169,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4048:52:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 18163,
"id": 18170,
"nodeType": "Return",
"src": "4041:59:2"
}
]
},
"documentation": {
"id": 18153,
"nodeType": "StructuredDocumentation",
"src": "3668:211:2",
"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": 18172,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionCall",
"nameLocation": "3893:12:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 18160,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18155,
"mutability": "mutable",
"name": "target",
"nameLocation": "3923:6:2",
"nodeType": "VariableDeclaration",
"scope": 18172,
"src": "3915:14:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 18154,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3915:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 18157,
"mutability": "mutable",
"name": "data",
"nameLocation": "3952:4:2",
"nodeType": "VariableDeclaration",
"scope": 18172,
"src": "3939:17:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 18156,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "3939:5:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 18159,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "3980:12:2",
"nodeType": "VariableDeclaration",
"scope": 18172,
"src": "3966:26:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 18158,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "3966:6:2",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "3905:93:2"
},
"returnParameters": {
"id": 18163,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18162,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 18172,
"src": "4017:12:2",
"stateVariable": false,
"storageLocation": "memory",