@andrekorol/kollateral-contracts
Version:
Kollateral protocol, the flash loan building block
1,169 lines (1,168 loc) • 68.3 kB
JSON
{
"contractName": "ExternalCaller",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.7.3+commit.9bfce1f6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/ExternalCaller.sol\":\"ExternalCaller\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/ExternalCaller.sol\":{\"keccak256\":\"0x54f88a1f0ac5dd7ab99a0519124cb09f1e19b4efb9baf240bc2500f8caa0b4ff\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://3170671378d20b47498224d065e33fccc223ae772d7f0af2c5ef314f94b75c98\",\"dweb:/ipfs/Qme8ZEEBnBG5Vvj8uyJCD2YVPcLx6funKsSSCpGkTyn1zi\"]}},\"version\":1}",
"bytecode": "0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220cded72807d393df2d5b13fa0bcaa939c0c0792dea2cba3c67c3531a7a63f893464736f6c63430007030033",
"deployedBytecode": "0x6080604052600080fdfea2646970667358221220cded72807d393df2d5b13fa0bcaa939c0c0792dea2cba3c67c3531a7a63f893464736f6c63430007030033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "665:545:9:-:0;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "665:545:9:-:0;;;;;",
"source": "/*\n\n Copyright 2020 Kollateral LLC.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\n// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.7.0;\n\ncontract ExternalCaller {\n function externalTransfer(address _to, uint256 _value) internal {\n require(\n address(this).balance >= _value,\n \"ExternalCaller: insufficient ether balance\"\n );\n externalCall(_to, _value, \"\");\n }\n\n function externalCall(\n address _to,\n uint256 _value,\n bytes memory _data\n ) internal {\n (bool success, bytes memory returndata) = _to.call{value: _value}(\n _data\n );\n require(success, string(returndata));\n }\n}\n",
"sourcePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/ExternalCaller.sol",
"ast": {
"absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/ExternalCaller.sol",
"exportedSymbols": {
"ExternalCaller": [
1563
]
},
"id": 1564,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1508,
"literals": [
"solidity",
"^",
"0.7",
".0"
],
"nodeType": "PragmaDirective",
"src": "640:23:9"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 1563,
"linearizedBaseContracts": [
1563
],
"name": "ExternalCaller",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1532,
"nodeType": "Block",
"src": "759:176:9",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1522,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"arguments": [
{
"id": 1518,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "798:4:9",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ExternalCaller_$1563",
"typeString": "contract ExternalCaller"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ExternalCaller_$1563",
"typeString": "contract ExternalCaller"
}
],
"id": 1517,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "790:7:9",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 1516,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "790:7:9",
"typeDescriptions": {}
}
},
"id": 1519,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "790:13:9",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1520,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"src": "790:21:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 1521,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1512,
"src": "815:6:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "790:31:9",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "45787465726e616c43616c6c65723a20696e73756666696369656e742065746865722062616c616e6365",
"id": 1523,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "835:44:9",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_47e615ef39653c375952ecbdf34324d193e406d0d78277c356aadb858054e8ce",
"typeString": "literal_string \"ExternalCaller: insufficient ether balance\""
},
"value": "ExternalCaller: insufficient ether balance"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_47e615ef39653c375952ecbdf34324d193e406d0d78277c356aadb858054e8ce",
"typeString": "literal_string \"ExternalCaller: insufficient ether balance\""
}
],
"id": 1515,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "769:7:9",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1524,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "769:120:9",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1525,
"nodeType": "ExpressionStatement",
"src": "769:120:9"
},
{
"expression": {
"arguments": [
{
"id": 1527,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1510,
"src": "912:3:9",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 1528,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1512,
"src": "917:6:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"hexValue": "",
"id": 1529,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "925:2:9",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeString": "literal_string \"\""
},
"value": ""
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeString": "literal_string \"\""
}
],
"id": 1526,
"name": "externalCall",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1562,
"src": "899:12:9",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$",
"typeString": "function (address,uint256,bytes memory)"
}
},
"id": 1530,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "899:29:9",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1531,
"nodeType": "ExpressionStatement",
"src": "899:29:9"
}
]
},
"id": 1533,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "externalTransfer",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1513,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1510,
"mutability": "mutable",
"name": "_to",
"nodeType": "VariableDeclaration",
"scope": 1533,
"src": "721:11:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1509,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "721:7:9",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1512,
"mutability": "mutable",
"name": "_value",
"nodeType": "VariableDeclaration",
"scope": 1533,
"src": "734:14:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1511,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "734:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "720:29:9"
},
"returnParameters": {
"id": 1514,
"nodeType": "ParameterList",
"parameters": [],
"src": "759:0:9"
},
"scope": 1563,
"src": "695:240:9",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1561,
"nodeType": "Block",
"src": "1051:157:9",
"statements": [
{
"assignments": [
1543,
1545
],
"declarations": [
{
"constant": false,
"id": 1543,
"mutability": "mutable",
"name": "success",
"nodeType": "VariableDeclaration",
"scope": 1561,
"src": "1062:12:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1542,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1062:4:9",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1545,
"mutability": "mutable",
"name": "returndata",
"nodeType": "VariableDeclaration",
"scope": 1561,
"src": "1076:23:9",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1544,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1076:5:9",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 1552,
"initialValue": {
"arguments": [
{
"id": 1550,
"name": "_data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1539,
"src": "1140:5:9",
"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": 1546,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "1103:3:9",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1547,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "call",
"nodeType": "MemberAccess",
"src": "1103:8:9",
"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": 1549,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"names": [
"value"
],
"nodeType": "FunctionCallOptions",
"options": [
{
"id": 1548,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "1119:6:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"src": "1103:23:9",
"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": 1551,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1103:52:9",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1061:94:9"
},
{
"expression": {
"arguments": [
{
"id": 1554,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1543,
"src": "1173:7:9",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"arguments": [
{
"id": 1557,
"name": "returndata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1545,
"src": "1189:10:9",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 1556,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1182:6:9",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_string_storage_ptr_$",
"typeString": "type(string storage pointer)"
},
"typeName": {
"id": 1555,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1182:6:9",
"typeDescriptions": {}
}
},
"id": 1558,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1182:18:9",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 1553,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1165:7:9",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1559,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1165:36:9",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1560,
"nodeType": "ExpressionStatement",
"src": "1165:36:9"
}
]
},
"id": 1562,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "externalCall",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1540,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1535,
"mutability": "mutable",
"name": "_to",
"nodeType": "VariableDeclaration",
"scope": 1562,
"src": "972:11:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1534,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "972:7:9",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1537,
"mutability": "mutable",
"name": "_value",
"nodeType": "VariableDeclaration",
"scope": 1562,
"src": "993:14:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1536,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "993:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1539,
"mutability": "mutable",
"name": "_data",
"nodeType": "VariableDeclaration",
"scope": 1562,
"src": "1017:18:9",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1538,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1017:5:9",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "962:79:9"
},
"returnParameters": {
"id": 1541,
"nodeType": "ParameterList",
"parameters": [],
"src": "1051:0:9"
},
"scope": 1563,
"src": "941:267:9",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
}
],
"scope": 1564,
"src": "665:545:9"
}
],
"src": "640:571:9"
},
"legacyAST": {
"attributes": {
"absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/ExternalCaller.sol",
"exportedSymbols": {
"ExternalCaller": [
1563
]
},
"license": "Apache-2.0"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
"^",
"0.7",
".0"
]
},
"id": 1508,
"name": "PragmaDirective",
"src": "640:23:9"
},
{
"attributes": {
"abstract": false,
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts": [
1563
],
"name": "ExternalCaller",
"scope": 1564
},
"children": [
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "externalTransfer",
"scope": 1563,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "_to",
"scope": 1533,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 1509,
"name": "ElementaryTypeName",
"src": "721:7:9"
}
],
"id": 1510,
"name": "VariableDeclaration",
"src": "721:11:9"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "_value",
"scope": 1533,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 1511,
"name": "ElementaryTypeName",
"src": "734:7:9"
}
],
"id": 1512,
"name": "VariableDeclaration",
"src": "734:14:9"
}
],
"id": 1513,
"name": "ParameterList",
"src": "720:29:9"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 1514,
"name": "ParameterList",
"src": "759:0:9"
},
{
"children": [
{
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_47e615ef39653c375952ecbdf34324d193e406d0d78277c356aadb858054e8ce",
"typeString": "literal_string \"ExternalCaller: insufficient ether balance\""
}
],
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 1515,
"name": "Identifier",
"src": "769:7:9"
},
{
"attributes": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">=",
"type": "bool"
},
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "balance",
"type": "uint256"
},
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"tryCall": false,
"type": "address",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ExternalCaller_$1563",
"typeString": "contract ExternalCaller"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(address)"
},
"children": [
{
"attributes": {
"name": "address"
},
"id": 1516,
"name": "ElementaryTypeName",
"src": "790:7:9"
}
],
"id": 1517,
"name": "ElementaryTypeNameExpression",
"src": "790:7:9"
},
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": -28,
"type": "contract ExternalCaller",
"value": "this"
},
"id": 1518,
"name": "Identifier",
"src": "798:4:9"
}
],
"id": 1519,
"name": "FunctionCall",
"src": "790:13:9"
}
],
"id": 1520,
"name": "MemberAccess",
"src": "790:21:9"
},
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1512,
"type": "uint256",
"value": "_value"
},
"id": 1521,
"name": "Identifier",
"src": "815:6:9"
}
],
"id": 1522,
"name": "BinaryOperation",
"src": "790:31:9"
},
{
"attributes": {
"hexvalue": "45787465726e616c43616c6c65723a20696e73756666696369656e742065746865722062616c616e6365",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "string",
"type": "literal_string \"ExternalCaller: insufficient ether balance\"",
"value": "ExternalCaller: insufficient ether balance"
},
"id": 1523,
"name": "Literal",
"src": "835:44:9"
}
],
"id": 1524,
"name": "FunctionCall",
"src": "769:120:9"
}
],
"id": 1525,
"name": "ExpressionStatement",
"src": "769:120:9"
},
{
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeString": "literal_string \"\""
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1562,
"type": "function (address,uint256,bytes memory)",
"value": "externalCall"
},
"id": 1526,
"name": "Identifier",
"src": "899:12:9"
},
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1510,
"type": "address",
"value": "_to"
},
"id": 1527,
"name": "Identifier",
"src": "912:3:9"
},
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1512,
"type": "uint256",
"value": "_value"
},
"id": 1528,
"name": "Identifier",
"src": "917:6:9"
},
{
"attributes": {
"hexvalue": "",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "string",
"type": "literal_string \"\"",
"value": ""
},