@etherisc/gif-contracts
Version:
This repository holds the GIF core contracts and tools to develop, test and deploy GIF instances.
1,337 lines • 54.2 kB
JSON
{
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "_value",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"name": "onTokenTransfer",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"allSourcePaths": {
"70": "contracts/examples/mock/ChainlinkToken.sol"
},
"ast": {
"absolutePath": "contracts/examples/mock/ChainlinkToken.sol",
"exportedSymbols": {
"ChainlinkToken": [
2833
],
"Context": [
24074
],
"ERC20": [
21536
],
"ERC677Receiver": [
2739
],
"IERC20": [
18510
],
"IERC20Metadata": [
27166
]
},
"id": 2834,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2728,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "32:22:70"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/ERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
"id": 2729,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 2834,
"sourceUnit": 21537,
"src": "56:55:70",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": true,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": false,
"id": 2739,
"linearizedBaseContracts": [
2739
],
"name": "ERC677Receiver",
"nameLocation": "131:14:70",
"nodeType": "ContractDefinition",
"nodes": [
{
"functionSelector": "a4c0ed36",
"id": 2738,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "onTokenTransfer",
"nameLocation": "161:15:70",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2736,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2731,
"mutability": "mutable",
"name": "_sender",
"nameLocation": "186:7:70",
"nodeType": "VariableDeclaration",
"scope": 2738,
"src": "178:15:70",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2730,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "178:7:70",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2733,
"mutability": "mutable",
"name": "_value",
"nameLocation": "200:6:70",
"nodeType": "VariableDeclaration",
"scope": 2738,
"src": "195:11:70",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2732,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "195:4:70",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2735,
"mutability": "mutable",
"name": "_data",
"nameLocation": "223:5:70",
"nodeType": "VariableDeclaration",
"scope": 2738,
"src": "208:20:70",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2734,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "208:5:70",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "177:52:70"
},
"returnParameters": {
"id": 2737,
"nodeType": "ParameterList",
"parameters": [],
"src": "244:0:70"
},
"scope": 2739,
"src": "152:93:70",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
}
],
"scope": 2834,
"src": "113:134:70"
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 2740,
"name": "ERC20",
"nodeType": "IdentifierPath",
"referencedDeclaration": 21536,
"src": "276:5:70"
},
"id": 2741,
"nodeType": "InheritanceSpecifier",
"src": "276:5:70"
}
],
"contractDependencies": [
18510,
21536,
24074,
27166
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 2833,
"linearizedBaseContracts": [
2833,
21536,
27166,
18510,
24074
],
"name": "ChainlinkToken",
"nameLocation": "258:14:70",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 2757,
"nodeType": "Block",
"src": "368:37:70",
"statements": [
{
"expression": {
"arguments": [
{
"id": 2753,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2743,
"src": "384:5:70",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 2754,
"name": "supply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2745,
"src": "391:6:70",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2752,
"name": "_mint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21353,
"src": "378:5:70",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 2755,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "378:20:70",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2756,
"nodeType": "ExpressionStatement",
"src": "378:20:70"
}
]
},
"id": 2758,
"implemented": true,
"kind": "constructor",
"modifiers": [
{
"arguments": [
{
"hexValue": "436861696e6c696e6b2044756d6d7920546f6b656e",
"id": 2748,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "337:23:70",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_f5764680349dd2c79b01e0cc34a69b8d81e7e56e2e2af1d9f48762f21bfc38ec",
"typeString": "literal_string \"Chainlink Dummy Token\""
},
"value": "Chainlink Dummy Token"
},
{
"hexValue": "434454",
"id": 2749,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "362:5:70",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_434eb163d5d83d0f1ffd9839d5b9c74759647f334d007a0d4510797d38b7e519",
"typeString": "literal_string \"CDT\""
},
"value": "CDT"
}
],
"id": 2750,
"modifierName": {
"id": 2747,
"name": "ERC20",
"nodeType": "IdentifierPath",
"referencedDeclaration": 21536,
"src": "331:5:70"
},
"nodeType": "ModifierInvocation",
"src": "331:37:70"
}
],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2746,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2743,
"mutability": "mutable",
"name": "owner",
"nameLocation": "308:5:70",
"nodeType": "VariableDeclaration",
"scope": 2758,
"src": "300:13:70",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2742,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "300:7:70",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2745,
"mutability": "mutable",
"name": "supply",
"nameLocation": "323:6:70",
"nodeType": "VariableDeclaration",
"scope": 2758,
"src": "315:14:70",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2744,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "315:7:70",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "299:31:70"
},
"returnParameters": {
"id": 2751,
"nodeType": "ParameterList",
"parameters": [],
"src": "368:0:70"
},
"scope": 2833,
"src": "288:117:70",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 2789,
"nodeType": "Block",
"src": "513:210:70",
"statements": [
{
"expression": {
"arguments": [
{
"id": 2772,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2760,
"src": "538:3:70",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 2773,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2762,
"src": "543:6:70",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 2769,
"name": "super",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -25,
"src": "523:5:70",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_super$_ChainlinkToken_$2833_$",
"typeString": "type(contract super ChainlinkToken)"
}
},
"id": 2771,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 21074,
"src": "523:14:70",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,uint256) returns (bool)"
}
},
"id": 2774,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "523:27:70",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2775,
"nodeType": "ExpressionStatement",
"src": "523:27:70"
},
{
"condition": {
"arguments": [
{
"id": 2777,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2760,
"src": "629:3:70",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2776,
"name": "isContract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2832,
"src": "618:10:70",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view returns (bool)"
}
},
"id": 2778,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "618:15:70",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2786,
"nodeType": "IfStatement",
"src": "614:82:70",
"trueBody": {
"id": 2785,
"nodeType": "Block",
"src": "635:61:70",
"statements": [
{
"expression": {
"arguments": [
{
"id": 2780,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2760,
"src": "666:3:70",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 2781,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2762,
"src": "671:6:70",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 2782,
"name": "_data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2764,
"src": "679:5:70",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
],
"id": 2779,
"name": "contractFallback",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2816,
"src": "649:16:70",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bytes_calldata_ptr_$returns$__$",
"typeString": "function (address,uint256,bytes calldata)"
}
},
"id": 2783,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "649:36:70",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2784,
"nodeType": "ExpressionStatement",
"src": "649:36:70"
}
]
}
},
{
"expression": {
"hexValue": "74727565",
"id": 2787,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "712:4:70",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 2768,
"id": 2788,
"nodeType": "Return",
"src": "705:11:70"
}
]
},
"functionSelector": "4000aea0",
"id": 2790,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "transferAndCall",
"nameLocation": "420:15:70",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2765,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2760,
"mutability": "mutable",
"name": "_to",
"nameLocation": "444:3:70",
"nodeType": "VariableDeclaration",
"scope": 2790,
"src": "436:11:70",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2759,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "436:7:70",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2762,
"mutability": "mutable",
"name": "_value",
"nameLocation": "454:6:70",
"nodeType": "VariableDeclaration",
"scope": 2790,
"src": "449:11:70",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2761,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "449:4:70",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2764,
"mutability": "mutable",
"name": "_data",
"nameLocation": "477:5:70",
"nodeType": "VariableDeclaration",
"scope": 2790,
"src": "462:20:70",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2763,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "462:5:70",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "435:48:70"
},
"returnParameters": {
"id": 2768,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2767,
"mutability": "mutable",
"name": "success",
"nameLocation": "505:7:70",
"nodeType": "VariableDeclaration",
"scope": 2790,
"src": "500:12:70",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2766,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "500:4:70",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "499:14:70"
},
"scope": 2833,
"src": "411:312:70",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 2815,
"nodeType": "Block",
"src": "811:123:70",
"statements": [
{
"assignments": [
2801
],
"declarations": [
{
"constant": false,
"id": 2801,
"mutability": "mutable",
"name": "receiver",
"nameLocation": "836:8:70",
"nodeType": "VariableDeclaration",
"scope": 2815,
"src": "821:23:70",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC677Receiver_$2739",
"typeString": "contract ERC677Receiver"
},
"typeName": {
"id": 2800,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 2799,
"name": "ERC677Receiver",
"nodeType": "IdentifierPath",
"referencedDeclaration": 2739,
"src": "821:14:70"
},
"referencedDeclaration": 2739,
"src": "821:14:70",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC677Receiver_$2739",
"typeString": "contract ERC677Receiver"
}
},
"visibility": "internal"
}
],
"id": 2805,
"initialValue": {
"arguments": [
{
"id": 2803,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2792,
"src": "862:3:70",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2802,
"name": "ERC677Receiver",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2739,
"src": "847:14:70",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ERC677Receiver_$2739_$",
"typeString": "type(contract ERC677Receiver)"
}
},
"id": 2804,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "847:19:70",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC677Receiver_$2739",
"typeString": "contract ERC677Receiver"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "821:45:70"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 2809,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "901:3:70",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2810,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"src": "901:10:70",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 2811,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2794,
"src": "913:6:70",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 2812,
"name": "_data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2796,
"src": "921:5:70",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
],
"expression": {
"id": 2806,
"name": "receiver",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2801,
"src": "876:8:70",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC677Receiver_$2739",
"typeString": "contract ERC677Receiver"
}
},
"id": 2808,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "onTokenTransfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 2738,
"src": "876:24:70",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$",
"typeString": "function (address,uint256,bytes memory) external"
}
},
"id": 2813,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "876:51:70",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2814,
"nodeType": "ExpressionStatement",
"src": "876:51:70"
}
]
},
"id": 2816,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "contractFallback",
"nameLocation": "738:16:70",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2797,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2792,
"mutability": "mutable",
"name": "_to",
"nameLocation": "763:3:70",
"nodeType": "VariableDeclaration",
"scope": 2816,
"src": "755:11:70",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2791,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "755:7:70",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2794,
"mutability": "mutable",
"name": "_value",
"nameLocation": "773:6:70",
"nodeType": "VariableDeclaration",
"scope": 2816,
"src": "768:11:70",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2793,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "768:4:70",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2796,
"mutability": "mutable",
"name": "_data",
"nameLocation": "796:5:70",
"nodeType": "VariableDeclaration",
"scope": 2816,
"src": "781:20:70",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2795,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "781:5:70",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "754:48:70"
},
"returnParameters": {
"id": 2798,
"nodeType": "ParameterList",
"parameters": [],
"src": "811:0:70"
},
"scope": 2833,
"src": "729:205:70",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 2831,
"nodeType": "Block",
"src": "1011:105:70",
"statements": [
{
"assignments": [
2824
],
"declarations": [
{
"constant": false,
"id": 2824,
"mutability": "mutable",
"name": "length",
"nameLocation": "1026:6:70",
"nodeType": "VariableDeclaration",
"scope": 2831,
"src": "1021:11:70",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2823,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1021:4:70",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 2825,
"nodeType": "VariableDeclarationStatement",
"src": "1021:11:70"
},
{
"AST": {
"nodeType": "YulBlock",
"src": "1051:32:70",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1053:28:70",
"value": {
"arguments": [
{
"name": "_addr",
"nodeType": "YulIdentifier",
"src": "1075:5:70"
}
],
"functionName": {
"name": "extcodesize",
"nodeType": "YulIdentifier",
"src": "1063:11:70"
},
"nodeType": "YulFunctionCall",
"src": "1063:18:70"
},
"variableNames": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1053:6:70"
}
]
}
]
},
"evmVersion": "istanbul",
"externalReferences": [
{
"declaration": 2818,
"isOffset": false,
"isSlot": false,
"src": "1075:5:70",
"valueSize": 1
},
{
"declaration": 2824,
"isOffset": false,
"isSlot": false,
"src": "1053:6:70",
"valueSize": 1
}
],
"id": 2826,
"nodeType": "InlineAssembly",
"src": "1042:41:70"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2829,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2827,
"name": "length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2824,
"src": "1099:6:70",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 2828,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1108:1:70",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1099:10:70",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 2822,
"id": 2830,
"nodeType": "Return",
"src": "1092:17:70"
}
]
},
"id": 2832,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isContract",
"nameLocation": "949:10:70",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2819,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2818,
"mutability": "mutable",
"name": "_addr",
"nameLocation": "968:5:70",
"nodeType": "VariableDeclaration",
"scope": 2832,
"src": "960:13:70",
"stateVariable