parent
04dccc9254
commit
dd3edce02f
@ -1,62 +1,51 @@ |
|||||||
{ |
{ |
||||||
"attributes": { |
"argumentTypes": null, |
||||||
"operator": "=", |
"id": 5, |
||||||
"type": "uint256" |
"isConstant": false, |
||||||
}, |
"isLValue": false, |
||||||
"children": [ |
"isPure": false, |
||||||
|
"lValueRequested": false, |
||||||
|
"leftHandSide": |
||||||
{ |
{ |
||||||
"attributes": { |
"argumentTypes": null, |
||||||
"type": "uint256" |
"id": 3, |
||||||
}, |
"name": "a", |
||||||
"children": [ |
"nodeType": "Identifier", |
||||||
|
"overloadedDeclarations": [], |
||||||
|
"referencedDeclaration": 22, |
||||||
|
"src": "52:1:0", |
||||||
|
"typeDescriptions": |
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_uint256", |
||||||
"type": "mapping(address => uint256)", |
"typeString": "uint256" |
||||||
"value": "c" |
} |
||||||
}, |
|
||||||
"id": 61, |
|
||||||
"name": "Identifier", |
|
||||||
"src": "873:1:0" |
|
||||||
}, |
}, |
||||||
|
"nodeType": "Assignment", |
||||||
|
"operator": "=", |
||||||
|
"rightHandSide": |
||||||
{ |
{ |
||||||
"attributes": { |
"argumentTypes": null, |
||||||
"member_name": "sender", |
"hexValue": "31", |
||||||
"type": "address" |
"id": 4, |
||||||
}, |
"isConstant": false, |
||||||
"children": [ |
"isLValue": false, |
||||||
|
"isPure": true, |
||||||
|
"kind": "number", |
||||||
|
"lValueRequested": false, |
||||||
|
"nodeType": "Literal", |
||||||
|
"src": "56:5:0", |
||||||
|
"subdenomination": "wei", |
||||||
|
"typeDescriptions": |
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_rational_1_by_1", |
||||||
"type": "msg", |
"typeString": "int_const 1" |
||||||
"value": "msg" |
|
||||||
}, |
}, |
||||||
"id": 62, |
"value": "1" |
||||||
"name": "Identifier", |
|
||||||
"src": "875:3:0" |
|
||||||
} |
|
||||||
], |
|
||||||
"id": 63, |
|
||||||
"name": "MemberAccess", |
|
||||||
"src": "875:10:0" |
|
||||||
} |
|
||||||
], |
|
||||||
"id": 64, |
|
||||||
"name": "IndexAccess", |
|
||||||
"src": "873:13:0" |
|
||||||
}, |
}, |
||||||
|
"src": "52:9:0", |
||||||
|
"typeDescriptions": |
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_uint256", |
||||||
"hexvalue": "30", |
"typeString": "uint256" |
||||||
"subdenomination": null, |
|
||||||
"token": null, |
|
||||||
"type": "int_const 0", |
|
||||||
"value": "0" |
|
||||||
}, |
|
||||||
"id": 65, |
|
||||||
"name": "Literal", |
|
||||||
"src": "889:1:0" |
|
||||||
} |
|
||||||
], |
|
||||||
"id": 66, |
|
||||||
"name": "Assignment", |
|
||||||
"src": "873:17:0" |
|
||||||
} |
} |
||||||
|
} |
@ -1,16 +1,19 @@ |
|||||||
{ |
{ |
||||||
"attributes": { |
"argumentTypes":[ |
||||||
"member_name": "blockhash", |
|
||||||
"type": "function (uint256) returns (bytes32)" |
|
||||||
}, |
|
||||||
"children": [ |
|
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_rational_3_by_1", |
||||||
"type": "block", |
"typeString": "int_const 3" |
||||||
"value": "block" |
|
||||||
}, |
|
||||||
"name": "Identifier" |
|
||||||
} |
} |
||||||
], |
], |
||||||
"name": "MemberAccess" |
"id": 5, |
||||||
|
"name": "blockhash", |
||||||
|
"nodeType": "Identifier", |
||||||
|
"overloadedDeclarations": [], |
||||||
|
"referencedDeclaration": -5, |
||||||
|
"src": "69:9:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_function_blockhash_view$_t_uint256_$returns$_t_bytes32_$", |
||||||
|
"typeString": "function (uint256) view returns (bytes32)" |
||||||
|
} |
||||||
} |
} |
@ -1,204 +1,96 @@ |
|||||||
{ |
{ |
||||||
"children": |
"body": |
||||||
[ |
|
||||||
{ |
|
||||||
"attributes": |
|
||||||
{ |
{ |
||||||
"argumentTypes": null, |
"id": 10, |
||||||
"commonType": |
"nodeType": "Block", |
||||||
{ |
"src": "113:2:0", |
||||||
"typeIdentifier": "t_uint256", |
"statements": [] |
||||||
"typeString": "uint256" |
|
||||||
}, |
|
||||||
"isConstant": false, |
|
||||||
"isLValue": false, |
|
||||||
"isPure": false, |
|
||||||
"lValueRequested": false, |
|
||||||
"operator": "<", |
|
||||||
"type": "bool" |
|
||||||
}, |
}, |
||||||
"children": |
"condition": |
||||||
[ |
|
||||||
{ |
|
||||||
"attributes": |
|
||||||
{ |
{ |
||||||
"argumentTypes": null, |
"argumentTypes": null, |
||||||
"overloadedDeclarations": |
"expression": |
||||||
[ |
|
||||||
null |
|
||||||
], |
|
||||||
"referencedDeclaration": 69, |
|
||||||
"type": "uint256", |
|
||||||
"value": "i" |
|
||||||
}, |
|
||||||
"id": 82, |
|
||||||
"name": "Identifier", |
|
||||||
"src": "592:1:0" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"attributes": |
|
||||||
{ |
{ |
||||||
"argumentTypes": null, |
"argumentTypes": null, |
||||||
"hexvalue": "3130", |
"components": |
||||||
"isConstant": false, |
|
||||||
"isLValue": false, |
|
||||||
"isPure": true, |
|
||||||
"lValueRequested": false, |
|
||||||
"subdenomination": null, |
|
||||||
"token": "number", |
|
||||||
"type": "int_const 10", |
|
||||||
"value": "10" |
|
||||||
}, |
|
||||||
"id": 83, |
|
||||||
"name": "Literal", |
|
||||||
"src": "596:2:0" |
|
||||||
} |
|
||||||
], |
|
||||||
"id": 84, |
|
||||||
"name": "BinaryOperation", |
|
||||||
"src": "592:6:0" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"children": |
|
||||||
[ |
|
||||||
{ |
|
||||||
"children": |
|
||||||
[ |
[ |
||||||
{ |
|
||||||
"attributes": |
|
||||||
{ |
{ |
||||||
"argumentTypes": null, |
"argumentTypes": null, |
||||||
|
"id": 13, |
||||||
"isConstant": false, |
"isConstant": false, |
||||||
"isLValue": false, |
"isLValue": false, |
||||||
"isPure": false, |
"isPure": false, |
||||||
"isStructConstructorCall": false, |
|
||||||
"lValueRequested": false, |
"lValueRequested": false, |
||||||
"names": |
"leftHandSide": |
||||||
[ |
|
||||||
null |
|
||||||
], |
|
||||||
"type": "uint256", |
|
||||||
"type_conversion": false |
|
||||||
}, |
|
||||||
"children": |
|
||||||
[ |
|
||||||
{ |
|
||||||
"attributes": |
|
||||||
{ |
{ |
||||||
"argumentTypes": |
"argumentTypes": null, |
||||||
[ |
"id": 11, |
||||||
{ |
"name": "c", |
||||||
"typeIdentifier": "t_uint256", |
"nodeType": "Identifier", |
||||||
"typeString": "uint256" |
"overloadedDeclarations": [], |
||||||
|
"referencedDeclaration": 8, |
||||||
|
"src": "123:1:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_struct$_S_$3_storage_ptr", |
||||||
|
"typeString": "struct C.S storage pointer" |
||||||
} |
} |
||||||
], |
|
||||||
"isConstant": false, |
|
||||||
"isLValue": false, |
|
||||||
"isPure": false, |
|
||||||
"lValueRequested": false, |
|
||||||
"member_name": "push", |
|
||||||
"referencedDeclaration": null, |
|
||||||
"type": "function (uint256) returns (uint256)" |
|
||||||
}, |
}, |
||||||
"children": |
"nodeType": "Assignment", |
||||||
[ |
"operator": "=", |
||||||
{ |
"rightHandSide": |
||||||
"attributes": |
|
||||||
{ |
{ |
||||||
"argumentTypes": null, |
"argumentTypes": null, |
||||||
"overloadedDeclarations": |
"id": 12, |
||||||
[ |
"name": "s", |
||||||
null |
"nodeType": "Identifier", |
||||||
], |
"overloadedDeclarations": [], |
||||||
"referencedDeclaration": 4, |
"referencedDeclaration": 5, |
||||||
"type": "uint256[] storage ref", |
"src": "127:1:0", |
||||||
"value": "array" |
"typeDescriptions": |
||||||
}, |
{ |
||||||
"id": 72, |
"typeIdentifier": "t_struct$_S_$3_storage", |
||||||
"name": "Identifier", |
"typeString": "struct C.S storage ref" |
||||||
"src": "544:5:0" |
|
||||||
} |
} |
||||||
], |
|
||||||
"id": 74, |
|
||||||
"name": "MemberAccess", |
|
||||||
"src": "544:10:0" |
|
||||||
}, |
}, |
||||||
|
"src": "123:5:0", |
||||||
|
"typeDescriptions": |
||||||
{ |
{ |
||||||
"attributes": |
"typeIdentifier": "t_struct$_S_$3_storage_ptr", |
||||||
{ |
"typeString": "struct C.S storage pointer" |
||||||
"argumentTypes": null, |
|
||||||
"overloadedDeclarations": |
|
||||||
[ |
|
||||||
null |
|
||||||
], |
|
||||||
"referencedDeclaration": 69, |
|
||||||
"type": "uint256", |
|
||||||
"value": "i" |
|
||||||
}, |
|
||||||
"id": 75, |
|
||||||
"name": "Identifier", |
|
||||||
"src": "555:1:0" |
|
||||||
} |
} |
||||||
], |
|
||||||
"id": 76, |
|
||||||
"name": "FunctionCall", |
|
||||||
"src": "544:13:0" |
|
||||||
} |
} |
||||||
], |
], |
||||||
"id": 77, |
"id": 14, |
||||||
"name": "ExpressionStatement", |
|
||||||
"src": "544:13:0" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"children": |
|
||||||
[ |
|
||||||
{ |
|
||||||
"attributes": |
|
||||||
{ |
|
||||||
"argumentTypes": null, |
|
||||||
"isConstant": false, |
"isConstant": false, |
||||||
|
"isInlineArray": false, |
||||||
"isLValue": false, |
"isLValue": false, |
||||||
"isPure": false, |
"isPure": false, |
||||||
"lValueRequested": false, |
"lValueRequested": false, |
||||||
"operator": "++", |
"nodeType": "TupleExpression", |
||||||
"prefix": false, |
"src": "122:7:0", |
||||||
"type": "uint256" |
"typeDescriptions": |
||||||
}, |
|
||||||
"children": |
|
||||||
[ |
|
||||||
{ |
|
||||||
"attributes": |
|
||||||
{ |
{ |
||||||
"argumentTypes": null, |
"typeIdentifier": "t_struct$_S_$3_storage_ptr", |
||||||
"overloadedDeclarations": |
"typeString": "struct C.S storage pointer" |
||||||
[ |
|
||||||
null |
|
||||||
], |
|
||||||
"referencedDeclaration": 69, |
|
||||||
"type": "uint256", |
|
||||||
"value": "i" |
|
||||||
}, |
|
||||||
"id": 78, |
|
||||||
"name": "Identifier", |
|
||||||
"src": "571:1:0" |
|
||||||
} |
} |
||||||
], |
}, |
||||||
"id": 79, |
"id": 15, |
||||||
"name": "UnaryOperation", |
"isConstant": false, |
||||||
"src": "571:3:0" |
"isLValue": true, |
||||||
} |
"isPure": false, |
||||||
], |
"lValueRequested": false, |
||||||
"id": 80, |
"memberName": "f", |
||||||
"name": "ExpressionStatement", |
"nodeType": "MemberAccess", |
||||||
"src": "571:3:0" |
"referencedDeclaration": 2, |
||||||
} |
"src": "122:9:0", |
||||||
], |
"typeDescriptions": |
||||||
"id": 81, |
{ |
||||||
"name": "Block", |
"typeIdentifier": "t_bool", |
||||||
"src": "530:55:0" |
"typeString": "bool" |
||||||
} |
|
||||||
], |
|
||||||
"id": 85, |
|
||||||
"name": "DoWhileStatement", |
|
||||||
"src": "528:72:0" |
|
||||||
} |
} |
||||||
|
}, |
||||||
|
"id": 16, |
||||||
|
"nodeType": "DoWhileStatement", |
||||||
|
"src": "110:23:0" |
||||||
|
} |
@ -1,24 +1,82 @@ |
|||||||
{ |
{ |
||||||
"attributes": { |
"body": |
||||||
"constant": true, |
|
||||||
"name": "winnerName", |
|
||||||
"payable": false, |
|
||||||
"visibility": "public" |
|
||||||
}, |
|
||||||
"children": [ |
|
||||||
{ |
{ |
||||||
"children": [ |
"id": 6, |
||||||
|
"nodeType": "Block", |
||||||
|
"src": "42:23:0", |
||||||
|
"statements": |
||||||
|
[ |
||||||
|
{ |
||||||
|
"assignments": |
||||||
|
[ |
||||||
|
4 |
||||||
], |
], |
||||||
"name": "ParameterList" |
"declarations": |
||||||
}, |
[ |
||||||
{ |
{ |
||||||
"children": [], |
"constant": false, |
||||||
"name": "ParameterList" |
"id": 4, |
||||||
|
"name": "a", |
||||||
|
"nodeType": "VariableDeclaration", |
||||||
|
"overrides": null, |
||||||
|
"scope": 6, |
||||||
|
"src": "52:6:0", |
||||||
|
"stateVariable": false, |
||||||
|
"storageLocation": "default", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_uint256", |
||||||
|
"typeString": "uint256" |
||||||
}, |
}, |
||||||
|
"typeName": |
||||||
|
{ |
||||||
|
"id": 3, |
||||||
|
"name": "uint", |
||||||
|
"nodeType": "ElementaryTypeName", |
||||||
|
"src": "52:4:0", |
||||||
|
"typeDescriptions": |
||||||
{ |
{ |
||||||
"children": [], |
"typeIdentifier": "t_uint256", |
||||||
"name": "Block" |
"typeString": "uint256" |
||||||
|
} |
||||||
|
}, |
||||||
|
"value": null, |
||||||
|
"visibility": "internal" |
||||||
} |
} |
||||||
], |
], |
||||||
"name": "FunctionDefinition" |
"id": 5, |
||||||
|
"initialValue": null, |
||||||
|
"nodeType": "VariableDeclarationStatement", |
||||||
|
"src": "52:6:0" |
||||||
} |
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"documentation": null, |
||||||
|
"functionSelector": "26121ff0", |
||||||
|
"id": 7, |
||||||
|
"implemented": true, |
||||||
|
"kind": "function", |
||||||
|
"modifiers": [], |
||||||
|
"name": "f", |
||||||
|
"nodeType": "FunctionDefinition", |
||||||
|
"overrides": null, |
||||||
|
"parameters": |
||||||
|
{ |
||||||
|
"id": 1, |
||||||
|
"nodeType": "ParameterList", |
||||||
|
"parameters": [], |
||||||
|
"src": "27:2:0" |
||||||
|
}, |
||||||
|
"returnParameters": |
||||||
|
{ |
||||||
|
"id": 2, |
||||||
|
"nodeType": "ParameterList", |
||||||
|
"parameters": [], |
||||||
|
"src": "42:0:0" |
||||||
|
}, |
||||||
|
"scope": 8, |
||||||
|
"src": "17:48:0", |
||||||
|
"stateMutability": "pure", |
||||||
|
"virtual": false, |
||||||
|
"visibility": "public" |
||||||
|
} |
@ -1,15 +1,20 @@ |
|||||||
{ |
{ |
||||||
"children": [ |
"arguments": null, |
||||||
|
"baseName": |
||||||
{ |
{ |
||||||
"attributes": { |
"contractScope": null, |
||||||
"name": "r" |
"id": 19, |
||||||
}, |
"name": "A", |
||||||
"id": 7, |
"nodeType": "UserDefinedTypeName", |
||||||
"name": "UserDefinedTypeName", |
"referencedDeclaration": 9, |
||||||
"src": "84:1:0" |
"src": "176:1:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_contract$_A_$9", |
||||||
|
"typeString": "contract A" |
||||||
} |
} |
||||||
], |
}, |
||||||
"id": 8, |
"id": 20, |
||||||
"name": "InheritanceSpecifier", |
"nodeType": "InheritanceSpecifier", |
||||||
"src": "84:1:0" |
"src": "176:1:0" |
||||||
} |
} |
@ -1,7 +1,95 @@ |
|||||||
{ |
{ |
||||||
"children": [ |
"AST": |
||||||
], |
{ |
||||||
"id": 21, |
"nodeType": "YulBlock", |
||||||
"name": "InlineAssembly", |
"src": "148:83:0", |
||||||
"src": "809:41:0" |
"statements": |
||||||
|
[ |
||||||
|
{ |
||||||
|
"nodeType": "YulVariableDeclaration", |
||||||
|
"src": "162:11:0", |
||||||
|
"value": |
||||||
|
{ |
||||||
|
"name": "x", |
||||||
|
"nodeType": "YulIdentifier", |
||||||
|
"src": "172:1:0" |
||||||
|
}, |
||||||
|
"variables": |
||||||
|
[ |
||||||
|
{ |
||||||
|
"name": "c1", |
||||||
|
"nodeType": "YulTypedName", |
||||||
|
"src": "166:2:0", |
||||||
|
"type": "" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"nodeType": "YulVariableDeclaration", |
||||||
|
"src": "186:11:0", |
||||||
|
"value": |
||||||
|
{ |
||||||
|
"name": "b", |
||||||
|
"nodeType": "YulIdentifier", |
||||||
|
"src": "196:1:0" |
||||||
|
}, |
||||||
|
"variables": |
||||||
|
[ |
||||||
|
{ |
||||||
|
"name": "c2", |
||||||
|
"nodeType": "YulTypedName", |
||||||
|
"src": "190:2:0", |
||||||
|
"type": "" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"nodeType": "YulVariableDeclaration", |
||||||
|
"src": "210:11:0", |
||||||
|
"value": |
||||||
|
{ |
||||||
|
"name": "s", |
||||||
|
"nodeType": "YulIdentifier", |
||||||
|
"src": "220:1:0" |
||||||
|
}, |
||||||
|
"variables": |
||||||
|
[ |
||||||
|
{ |
||||||
|
"name": "c3", |
||||||
|
"nodeType": "YulTypedName", |
||||||
|
"src": "214:2:0", |
||||||
|
"type": "" |
||||||
} |
} |
||||||
|
] |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"evmVersion": "istanbul", |
||||||
|
"externalReferences": |
||||||
|
[ |
||||||
|
{ |
||||||
|
"declaration": 8, |
||||||
|
"isOffset": false, |
||||||
|
"isSlot": false, |
||||||
|
"src": "196:1:0", |
||||||
|
"valueSize": 1 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"declaration": 11, |
||||||
|
"isOffset": false, |
||||||
|
"isSlot": false, |
||||||
|
"src": "220:1:0", |
||||||
|
"valueSize": 1 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"declaration": 5, |
||||||
|
"isOffset": false, |
||||||
|
"isSlot": false, |
||||||
|
"src": "172:1:0", |
||||||
|
"valueSize": 1 |
||||||
|
} |
||||||
|
], |
||||||
|
"id": 14, |
||||||
|
"nodeType": "InlineAssembly", |
||||||
|
"src": "139:92:0" |
||||||
|
} |
@ -1,16 +1,32 @@ |
|||||||
{ |
{ |
||||||
"attributes": { |
"argumentTypes": null, |
||||||
"member_name": "insert", |
"expression": |
||||||
"type": "function (struct Set.Data storage pointer,uint256) returns (bool)" |
{ |
||||||
}, |
"argumentTypes": null, |
||||||
"children": [ |
"id": 33, |
||||||
|
"name": "L", |
||||||
|
"nodeType": "Identifier", |
||||||
|
"overloadedDeclarations": [], |
||||||
|
"referencedDeclaration": 21, |
||||||
|
"src": "244:1:0", |
||||||
|
"typeDescriptions": |
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_type$_t_contract$_L_$21_$", |
||||||
"type": "type(library Set)", |
"typeString": "type(library L)" |
||||||
"value": "Set" |
} |
||||||
}, |
}, |
||||||
"name": "Identifier" |
"id": 34, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": false, |
||||||
|
"lValueRequested": false, |
||||||
|
"memberName": "f", |
||||||
|
"nodeType": "MemberAccess", |
||||||
|
"referencedDeclaration": 6, |
||||||
|
"src": "244:3:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_function_delegatecall_nonpayable$_t_uint256_$returns$__$", |
||||||
|
"typeString": "function (uint256)" |
||||||
} |
} |
||||||
], |
|
||||||
"name": "MemberAccess" |
|
||||||
} |
} |
@ -1,29 +1,34 @@ |
|||||||
{ |
{ |
||||||
"attributes": { |
"argumentTypes": null, |
||||||
"type": "tuple()", |
"arguments": [], |
||||||
"type_conversion": false |
"expression": |
||||||
}, |
|
||||||
"children": [ |
|
||||||
{ |
{ |
||||||
"attributes": { |
"argumentTypes": [], |
||||||
"type": "function (struct Ballot.Voter storage pointer)", |
"id": 13, |
||||||
"value": "bli" |
"name": "sha3", |
||||||
}, |
"nodeType": "Identifier", |
||||||
"id": 37, |
"overloadedDeclarations": [], |
||||||
"name": "Identifier", |
"referencedDeclaration": 8, |
||||||
"src": "540:3:0" |
"src": "129:4:0", |
||||||
}, |
"typeDescriptions": |
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_function_internal_pure$__$returns$_t_bool_$", |
||||||
"type": "struct Ballot.Voter storage pointer", |
"typeString": "function () pure returns (bool)" |
||||||
"value": "x" |
|
||||||
}, |
|
||||||
"id": 38, |
|
||||||
"name": "Identifier", |
|
||||||
"src": "544:1:0" |
|
||||||
} |
} |
||||||
], |
}, |
||||||
"id": 39, |
"id": 14, |
||||||
"name": "FunctionCall", |
"isConstant": false, |
||||||
"src": "540:6:0" |
"isLValue": false, |
||||||
|
"isPure": false, |
||||||
|
"kind": "functionCall", |
||||||
|
"lValueRequested": false, |
||||||
|
"names": [], |
||||||
|
"nodeType": "FunctionCall", |
||||||
|
"src": "129:6:0", |
||||||
|
"tryCall": false, |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_bool", |
||||||
|
"typeString": "bool" |
||||||
} |
} |
||||||
|
} |
@ -1,42 +1,142 @@ |
|||||||
{ |
{ |
||||||
"sendAst": { "name": "MemberAccess", |
"sendAst": { |
||||||
"children": [ |
"argumentTypes": |
||||||
|
[ |
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_rational_1_by_1", |
||||||
"value": "d", |
"typeString": "int_const 1" |
||||||
"type": "address" |
} |
||||||
|
], |
||||||
|
"expression": |
||||||
|
{ |
||||||
|
"argumentTypes": null, |
||||||
|
"id": 27, |
||||||
|
"name": "addr", |
||||||
|
"nodeType": "Identifier", |
||||||
|
"overloadedDeclarations": [], |
||||||
|
"referencedDeclaration": 4, |
||||||
|
"src": "227:4:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_address_payable", |
||||||
|
"typeString": "address payable" |
||||||
|
} |
||||||
|
}, |
||||||
|
"id": 28, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": false, |
||||||
|
"lValueRequested": false, |
||||||
|
"memberName": "send", |
||||||
|
"nodeType": "MemberAccess", |
||||||
|
"referencedDeclaration": null, |
||||||
|
"src": "227:9:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_function_send_nonpayable$_t_uint256_$returns$_t_bool_$", |
||||||
|
"typeString": "function (uint256) returns (bool)" |
||||||
|
} |
||||||
|
}, |
||||||
|
"callAst": { |
||||||
|
"argumentTypes": null, |
||||||
|
"expression": |
||||||
|
{ |
||||||
|
"argumentTypes": null, |
||||||
|
"id": 9, |
||||||
|
"name": "a", |
||||||
|
"nodeType": "Identifier", |
||||||
|
"overloadedDeclarations": [], |
||||||
|
"referencedDeclaration": 6, |
||||||
|
"src": "91:1:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_address", |
||||||
|
"typeString": "address" |
||||||
|
} |
||||||
|
}, |
||||||
|
"id": 12, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": false, |
||||||
|
"lValueRequested": false, |
||||||
|
"memberName": "call", |
||||||
|
"nodeType": "MemberAccess", |
||||||
|
"referencedDeclaration": null, |
||||||
|
"src": "91:6:0", |
||||||
|
"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)" |
||||||
} |
} |
||||||
}], |
|
||||||
"attributes": { |
|
||||||
"value": "send", |
|
||||||
"type": "function (uint256) returns (bool)" } |
|
||||||
}, |
}, |
||||||
"callAst": { "name": "MemberAccess", "children": [{ |
|
||||||
"attributes": { |
|
||||||
"value": "f", |
|
||||||
"type": "address" |
|
||||||
}}], |
|
||||||
"attributes": { |
|
||||||
"member_name": "call", |
|
||||||
"type": "function () payable returns (bool)" } }, |
|
||||||
"callcodeAst": { |
"callcodeAst": { |
||||||
"name": "MemberAccess", |
"argumentTypes": [], |
||||||
"children": [{ |
"expression": |
||||||
"attributes": { |
{ |
||||||
"value": "f", |
"argumentTypes": null, |
||||||
"type": "address" |
"id": 3, |
||||||
}}], |
"name": "test", |
||||||
"attributes": { |
"nodeType": "Identifier", |
||||||
"member_name": "callcode", |
"overloadedDeclarations": [], |
||||||
"type": "function () payable returns (bool)" } }, |
"referencedDeclaration": 10, |
||||||
|
"src": "62:4:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_type$_t_contract$_test_$10_$", |
||||||
|
"typeString": "type(contract test)" |
||||||
|
} |
||||||
|
}, |
||||||
|
"id": 5, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": false, |
||||||
|
"lValueRequested": false, |
||||||
|
"memberName": "callcode", |
||||||
|
"nodeType": "MemberAccess", |
||||||
|
"referencedDeclaration": 9, |
||||||
|
"src": "62:13:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_function_internal_pure$__$returns$__$", |
||||||
|
"typeString": "function () pure" |
||||||
|
} |
||||||
|
}, |
||||||
"delegatecallAst": { |
"delegatecallAst": { |
||||||
"name": "MemberAccess", |
"argumentTypes": |
||||||
"children": [{ |
[ |
||||||
"attributes": { |
{ |
||||||
"value": "g", |
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", |
||||||
"type": "address" |
"typeString": "literal_string \"\"" |
||||||
}}], |
} |
||||||
"attributes": { |
], |
||||||
"member_name": "delegatecall", |
"expression": |
||||||
"type": "function () returns (bool)" } } |
{ |
||||||
|
"argumentTypes": null, |
||||||
|
"id": 20, |
||||||
|
"name": "addr", |
||||||
|
"nodeType": "Identifier", |
||||||
|
"overloadedDeclarations": [], |
||||||
|
"referencedDeclaration": 4, |
||||||
|
"src": "181:4:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_address_payable", |
||||||
|
"typeString": "address payable" |
||||||
|
} |
||||||
|
}, |
||||||
|
"id": 21, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": false, |
||||||
|
"lValueRequested": false, |
||||||
|
"memberName": "delegatecall", |
||||||
|
"nodeType": "MemberAccess", |
||||||
|
"referencedDeclaration": null, |
||||||
|
"src": "181:17:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", |
||||||
|
"typeString": "function (bytes memory) returns (bool,bytes memory)" |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
@ -1,71 +1,93 @@ |
|||||||
{ |
{ |
||||||
"attributes": { |
|
||||||
"argumentTypes": null, |
"argumentTypes": null, |
||||||
|
"arguments": |
||||||
|
[ |
||||||
|
{ |
||||||
|
"argumentTypes": null, |
||||||
|
"hexValue": "32", |
||||||
|
"id": 37, |
||||||
"isConstant": false, |
"isConstant": false, |
||||||
"isLValue": false, |
"isLValue": false, |
||||||
"isPure": false, |
"isPure": true, |
||||||
"isStructConstructorCall": false, |
"kind": "number", |
||||||
"lValueRequested": false, |
"lValueRequested": false, |
||||||
"names": [ |
"nodeType": "Literal", |
||||||
null |
"src": "234:1:0", |
||||||
], |
"subdenomination": null, |
||||||
"type": "uint256", |
"typeDescriptions": |
||||||
"type_conversion": false |
{ |
||||||
|
"typeIdentifier": "t_rational_2_by_1", |
||||||
|
"typeString": "int_const 2" |
||||||
|
}, |
||||||
|
"value": "2" |
||||||
}, |
}, |
||||||
"children": [ |
|
||||||
{ |
{ |
||||||
"attributes": { |
"argumentTypes": null, |
||||||
"argumentTypes": [ |
"hexValue": "31", |
||||||
|
"id": 38, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": true, |
||||||
|
"kind": "number", |
||||||
|
"lValueRequested": false, |
||||||
|
"nodeType": "Literal", |
||||||
|
"src": "240:1:0", |
||||||
|
"subdenomination": null, |
||||||
|
"typeDescriptions": |
||||||
{ |
{ |
||||||
"typeIdentifier": "t_uint256", |
"typeIdentifier": "t_rational_1_by_1", |
||||||
"typeString": "uint256" |
"typeString": "int_const 1" |
||||||
}, |
}, |
||||||
{ |
"value": "1" |
||||||
"typeIdentifier": "t_uint256", |
|
||||||
"typeString": "uint256" |
|
||||||
} |
} |
||||||
], |
], |
||||||
"overloadedDeclarations": [ |
"expression": |
||||||
null |
|
||||||
], |
|
||||||
"referencedDeclaration": 25, |
|
||||||
"type": "function (uint256,uint256) pure returns (uint256)", |
|
||||||
"value": "f" |
|
||||||
}, |
|
||||||
"id": 34, |
|
||||||
"name": "Identifier", |
|
||||||
"src": "267:1:0" |
|
||||||
}, |
|
||||||
{ |
{ |
||||||
"attributes": { |
"argumentTypes": |
||||||
"argumentTypes": null, |
[ |
||||||
"overloadedDeclarations": [ |
{ |
||||||
null |
"typeIdentifier": "t_rational_2_by_1", |
||||||
], |
"typeString": "int_const 2" |
||||||
"referencedDeclaration": 27, |
|
||||||
"type": "uint256", |
|
||||||
"value": "x" |
|
||||||
}, |
|
||||||
"id": 35, |
|
||||||
"name": "Identifier", |
|
||||||
"src": "269:1:0" |
|
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_rational_1_by_1", |
||||||
"argumentTypes": null, |
"typeString": "int_const 1" |
||||||
"overloadedDeclarations": [ |
} |
||||||
null |
|
||||||
], |
], |
||||||
"referencedDeclaration": 29, |
|
||||||
"type": "uint256", |
|
||||||
"value": "y" |
|
||||||
}, |
|
||||||
"id": 36, |
"id": 36, |
||||||
"name": "Identifier", |
"name": "f", |
||||||
"src": "272:1:0" |
"nodeType": "Identifier", |
||||||
|
"overloadedDeclarations": |
||||||
|
[ |
||||||
|
6, |
||||||
|
14, |
||||||
|
24 |
||||||
|
], |
||||||
|
"referencedDeclaration": 14, |
||||||
|
"src": "228:1:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", |
||||||
|
"typeString": "function (uint256,uint256)" |
||||||
} |
} |
||||||
|
}, |
||||||
|
"id": 39, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": false, |
||||||
|
"kind": "functionCall", |
||||||
|
"lValueRequested": false, |
||||||
|
"names": |
||||||
|
[ |
||||||
|
"y", |
||||||
|
"x" |
||||||
], |
], |
||||||
"id": 37, |
"nodeType": "FunctionCall", |
||||||
"name": "FunctionCall", |
"src": "228:15:0", |
||||||
"src": "267:7:0" |
"tryCall": false, |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_tuple$__$", |
||||||
|
"typeString": "tuple()" |
||||||
} |
} |
||||||
|
} |
@ -1,23 +1,56 @@ |
|||||||
{ |
{ |
||||||
"attributes": { |
"argumentTypes": null, |
||||||
"type": "tuple()", |
"arguments": |
||||||
"type_conversion": false |
[ |
||||||
}, |
|
||||||
"children": [ |
|
||||||
{ |
{ |
||||||
"attributes": { |
"argumentTypes": null, |
||||||
"type": "function (address)", |
"id": 6, |
||||||
"value": "selfdestruct" |
"name": "a", |
||||||
}, |
"nodeType": "Identifier", |
||||||
"name": "Identifier" |
"overloadedDeclarations": [], |
||||||
}, |
"referencedDeclaration": 2, |
||||||
|
"src": "77:1:0", |
||||||
|
"typeDescriptions": |
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_address_payable", |
||||||
"type": "address", |
"typeString": "address payable" |
||||||
"value": "a" |
} |
||||||
}, |
|
||||||
"name": "Identifier" |
|
||||||
} |
} |
||||||
], |
], |
||||||
"name": "FunctionCall" |
"expression": |
||||||
|
{ |
||||||
|
"argumentTypes": |
||||||
|
[ |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_address_payable", |
||||||
|
"typeString": "address payable" |
||||||
|
} |
||||||
|
], |
||||||
|
"id": 5, |
||||||
|
"name": "selfdestruct", |
||||||
|
"nodeType": "Identifier", |
||||||
|
"overloadedDeclarations": [], |
||||||
|
"referencedDeclaration": -21, |
||||||
|
"src": "64:12:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_function_selfdestruct_nonpayable$_t_address_payable_$returns$__$", |
||||||
|
"typeString": "function (address payable)" |
||||||
|
} |
||||||
|
}, |
||||||
|
"id": 7, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": false, |
||||||
|
"kind": "functionCall", |
||||||
|
"lValueRequested": false, |
||||||
|
"names": [], |
||||||
|
"nodeType": "FunctionCall", |
||||||
|
"src": "64:15:0", |
||||||
|
"tryCall": false, |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_tuple$__$", |
||||||
|
"typeString": "tuple()" |
||||||
} |
} |
||||||
|
} |
@ -1,108 +1,336 @@ |
|||||||
{ |
{ |
||||||
"attributes": { |
"abstract": false, |
||||||
|
"baseContracts": [], |
||||||
|
"contractDependencies": [], |
||||||
|
"contractKind": "contract", |
||||||
|
"documentation": null, |
||||||
"fullyImplemented": true, |
"fullyImplemented": true, |
||||||
"isLibrary": false, |
"id": 24, |
||||||
"linearizedBaseContracts": [ |
"linearizedBaseContracts": |
||||||
274 |
[ |
||||||
|
24 |
||||||
], |
], |
||||||
"name": "Ballot" |
"name": "C", |
||||||
}, |
"nodeType": "ContractDefinition", |
||||||
"children": [ |
"nodes": |
||||||
|
[ |
||||||
{ |
{ |
||||||
"attributes": { |
"body": |
||||||
"name": "Voter" |
{ |
||||||
}, |
"id": 22, |
||||||
"children": [], |
"nodeType": "Block", |
||||||
"name": "StructDefinition" |
"src": "52:69:0", |
||||||
}, |
"statements": |
||||||
|
[ |
||||||
{ |
{ |
||||||
"attributes": { |
"assignments": |
||||||
"name": "Proposal" |
[ |
||||||
|
10 |
||||||
|
], |
||||||
|
"declarations": |
||||||
|
[ |
||||||
|
{ |
||||||
|
"constant": false, |
||||||
|
"id": 10, |
||||||
|
"name": "z", |
||||||
|
"nodeType": "VariableDeclaration", |
||||||
|
"overrides": null, |
||||||
|
"scope": 22, |
||||||
|
"src": "62:17:0", |
||||||
|
"stateVariable": false, |
||||||
|
"storageLocation": "memory", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_array$_t_uint8_$4_memory_ptr", |
||||||
|
"typeString": "uint8[4]" |
||||||
}, |
}, |
||||||
"children": [], |
"typeName": |
||||||
"name": "StructDefinition" |
{ |
||||||
|
"baseType": |
||||||
|
{ |
||||||
|
"id": 8, |
||||||
|
"name": "uint8", |
||||||
|
"nodeType": "ElementaryTypeName", |
||||||
|
"src": "62:5:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_uint8", |
||||||
|
"typeString": "uint8" |
||||||
|
} |
||||||
}, |
}, |
||||||
|
"id": 9, |
||||||
|
"length": |
||||||
|
{ |
||||||
|
"argumentTypes": null, |
||||||
|
"hexValue": "34", |
||||||
|
"id": 7, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": true, |
||||||
|
"kind": "number", |
||||||
|
"lValueRequested": false, |
||||||
|
"nodeType": "Literal", |
||||||
|
"src": "68:1:0", |
||||||
|
"subdenomination": null, |
||||||
|
"typeDescriptions": |
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_rational_4_by_1", |
||||||
"name": "chairperson", |
"typeString": "int_const 4" |
||||||
"type": "address" |
|
||||||
}, |
}, |
||||||
"children": [ |
"value": "4" |
||||||
|
}, |
||||||
|
"nodeType": "ArrayTypeName", |
||||||
|
"src": "62:8:0", |
||||||
|
"typeDescriptions": |
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_array$_t_uint8_$4_storage_ptr", |
||||||
"name": "address" |
"typeString": "uint8[4]" |
||||||
|
} |
||||||
}, |
}, |
||||||
"name": "ElementaryTypeName" |
"value": null, |
||||||
|
"visibility": "internal" |
||||||
} |
} |
||||||
], |
], |
||||||
"name": "VariableDeclaration" |
"id": 16, |
||||||
|
"initialValue": |
||||||
|
{ |
||||||
|
"argumentTypes": null, |
||||||
|
"components": |
||||||
|
[ |
||||||
|
{ |
||||||
|
"argumentTypes": null, |
||||||
|
"hexValue": "31", |
||||||
|
"id": 11, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": true, |
||||||
|
"kind": "number", |
||||||
|
"lValueRequested": false, |
||||||
|
"nodeType": "Literal", |
||||||
|
"src": "83:1:0", |
||||||
|
"subdenomination": null, |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_rational_1_by_1", |
||||||
|
"typeString": "int_const 1" |
||||||
|
}, |
||||||
|
"value": "1" |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"attributes": { |
"argumentTypes": null, |
||||||
"name": "voters", |
"hexValue": "32", |
||||||
"type": "mapping(address => struct Ballot.Voter storage ref)" |
"id": 12, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": true, |
||||||
|
"kind": "number", |
||||||
|
"lValueRequested": false, |
||||||
|
"nodeType": "Literal", |
||||||
|
"src": "85:1:0", |
||||||
|
"subdenomination": null, |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_rational_2_by_1", |
||||||
|
"typeString": "int_const 2" |
||||||
|
}, |
||||||
|
"value": "2" |
||||||
}, |
}, |
||||||
"children": [ |
|
||||||
{ |
{ |
||||||
"children": [ |
"argumentTypes": null, |
||||||
|
"hexValue": "33", |
||||||
|
"id": 13, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": true, |
||||||
|
"kind": "number", |
||||||
|
"lValueRequested": false, |
||||||
|
"nodeType": "Literal", |
||||||
|
"src": "87:1:0", |
||||||
|
"subdenomination": null, |
||||||
|
"typeDescriptions": |
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_rational_3_by_1", |
||||||
"name": "address" |
"typeString": "int_const 3" |
||||||
}, |
}, |
||||||
"name": "ElementaryTypeName" |
"value": "3" |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"attributes": { |
"argumentTypes": null, |
||||||
"name": "Voter" |
"hexValue": "35", |
||||||
|
"id": 14, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": true, |
||||||
|
"kind": "number", |
||||||
|
"lValueRequested": false, |
||||||
|
"nodeType": "Literal", |
||||||
|
"src": "89:1:0", |
||||||
|
"subdenomination": null, |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_rational_5_by_1", |
||||||
|
"typeString": "int_const 5" |
||||||
}, |
}, |
||||||
"name": "UserDefinedTypeName" |
"value": "5" |
||||||
} |
} |
||||||
], |
], |
||||||
"name": "Mapping" |
"id": 15, |
||||||
|
"isConstant": false, |
||||||
|
"isInlineArray": true, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": true, |
||||||
|
"lValueRequested": false, |
||||||
|
"nodeType": "TupleExpression", |
||||||
|
"src": "82:9:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_array$_t_uint8_$4_memory_ptr", |
||||||
|
"typeString": "uint8[4] memory" |
||||||
} |
} |
||||||
], |
}, |
||||||
"name": "VariableDeclaration" |
"nodeType": "VariableDeclarationStatement", |
||||||
|
"src": "62:29:0" |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"attributes": { |
"expression": |
||||||
"name": "proposals", |
{ |
||||||
"type": "struct Ballot.Proposal storage ref[] storage ref" |
"argumentTypes": null, |
||||||
|
"components": |
||||||
|
[ |
||||||
|
{ |
||||||
|
"argumentTypes": null, |
||||||
|
"baseExpression": |
||||||
|
{ |
||||||
|
"argumentTypes": null, |
||||||
|
"id": 17, |
||||||
|
"name": "z", |
||||||
|
"nodeType": "Identifier", |
||||||
|
"overloadedDeclarations": [], |
||||||
|
"referencedDeclaration": 10, |
||||||
|
"src": "109:1:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_array$_t_uint8_$4_memory_ptr", |
||||||
|
"typeString": "uint8[4] memory" |
||||||
|
} |
||||||
}, |
}, |
||||||
"children": [ |
"id": 19, |
||||||
|
"indexExpression": |
||||||
{ |
{ |
||||||
"children": [ |
"argumentTypes": null, |
||||||
|
"hexValue": "30", |
||||||
|
"id": 18, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": true, |
||||||
|
"kind": "number", |
||||||
|
"lValueRequested": false, |
||||||
|
"nodeType": "Literal", |
||||||
|
"src": "111:1:0", |
||||||
|
"subdenomination": null, |
||||||
|
"typeDescriptions": |
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_rational_0_by_1", |
||||||
"name": "Proposal" |
"typeString": "int_const 0" |
||||||
|
}, |
||||||
|
"value": "0" |
||||||
}, |
}, |
||||||
"name": "UserDefinedTypeName" |
"isConstant": false, |
||||||
|
"isLValue": true, |
||||||
|
"isPure": false, |
||||||
|
"lValueRequested": false, |
||||||
|
"nodeType": "IndexAccess", |
||||||
|
"src": "109:4:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_uint8", |
||||||
|
"typeString": "uint8" |
||||||
} |
} |
||||||
], |
|
||||||
"name": "ArrayTypeName" |
|
||||||
} |
} |
||||||
], |
], |
||||||
"name": "VariableDeclaration" |
"id": 20, |
||||||
}, |
"isConstant": false, |
||||||
|
"isInlineArray": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": false, |
||||||
|
"lValueRequested": false, |
||||||
|
"nodeType": "TupleExpression", |
||||||
|
"src": "108:6:0", |
||||||
|
"typeDescriptions": |
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_uint8", |
||||||
"constant": false, |
"typeString": "uint8" |
||||||
"name": "Ballot", |
} |
||||||
"payable": false, |
|
||||||
"visibility": "public" |
|
||||||
}, |
}, |
||||||
"children": [], |
"functionReturnParameters": 4, |
||||||
"name": "FunctionDefinition" |
"id": 21, |
||||||
|
"nodeType": "Return", |
||||||
|
"src": "101:13:0" |
||||||
|
} |
||||||
|
] |
||||||
}, |
}, |
||||||
|
"documentation": null, |
||||||
|
"functionSelector": "26121ff0", |
||||||
|
"id": 23, |
||||||
|
"implemented": true, |
||||||
|
"kind": "function", |
||||||
|
"modifiers": [], |
||||||
|
"name": "f", |
||||||
|
"nodeType": "FunctionDefinition", |
||||||
|
"overrides": null, |
||||||
|
"parameters": |
||||||
|
{ |
||||||
|
"id": 1, |
||||||
|
"nodeType": "ParameterList", |
||||||
|
"parameters": [], |
||||||
|
"src": "27:2:0" |
||||||
|
}, |
||||||
|
"returnParameters": |
||||||
|
{ |
||||||
|
"id": 4, |
||||||
|
"nodeType": "ParameterList", |
||||||
|
"parameters": |
||||||
|
[ |
||||||
{ |
{ |
||||||
"attributes": { |
|
||||||
"constant": false, |
"constant": false, |
||||||
"name": "giveRightToVote", |
"id": 3, |
||||||
"payable": false, |
"name": "", |
||||||
"visibility": "public" |
"nodeType": "VariableDeclaration", |
||||||
|
"overrides": null, |
||||||
|
"scope": 23, |
||||||
|
"src": "46:4:0", |
||||||
|
"stateVariable": false, |
||||||
|
"storageLocation": "default", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_uint256", |
||||||
|
"typeString": "uint256" |
||||||
|
}, |
||||||
|
"typeName": |
||||||
|
{ |
||||||
|
"id": 2, |
||||||
|
"name": "uint", |
||||||
|
"nodeType": "ElementaryTypeName", |
||||||
|
"src": "46:4:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_uint256", |
||||||
|
"typeString": "uint256" |
||||||
|
} |
||||||
}, |
}, |
||||||
"children": [], |
"value": null, |
||||||
"name": "FunctionDefinition" |
"visibility": "internal" |
||||||
} |
} |
||||||
], |
], |
||||||
"name": "ContractDefinition" |
"src": "45:6:0" |
||||||
|
}, |
||||||
|
"scope": 24, |
||||||
|
"src": "17:104:0", |
||||||
|
"stateMutability": "nonpayable", |
||||||
|
"virtual": false, |
||||||
|
"visibility": "public" |
||||||
} |
} |
||||||
|
], |
||||||
|
"scope": 25, |
||||||
|
"src": "0:123:0" |
||||||
|
} |
@ -1,16 +1,32 @@ |
|||||||
{ |
{ |
||||||
"attributes": { |
"argumentTypes": [], |
||||||
"member_name": "duper", |
"expression": |
||||||
"type": "function ()" |
{ |
||||||
}, |
"argumentTypes": null, |
||||||
"children": [ |
"id": 10, |
||||||
|
"name": "super", |
||||||
|
"nodeType": "Identifier", |
||||||
|
"overloadedDeclarations": [], |
||||||
|
"referencedDeclaration": -25, |
||||||
|
"src": "162:5:0", |
||||||
|
"typeDescriptions": |
||||||
{ |
{ |
||||||
"attributes": { |
"typeIdentifier": "t_super$_B_$17", |
||||||
"type": "contract super a", |
"typeString": "contract super B" |
||||||
"value": "super" |
} |
||||||
}, |
}, |
||||||
"name": "Identifier" |
"id": 12, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": false, |
||||||
|
"lValueRequested": false, |
||||||
|
"memberName": "x", |
||||||
|
"nodeType": "MemberAccess", |
||||||
|
"referencedDeclaration": 4, |
||||||
|
"src": "162:7:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_function_internal_pure$__$returns$__$", |
||||||
|
"typeString": "function () pure" |
||||||
} |
} |
||||||
], |
|
||||||
"name": "MemberAccess" |
|
||||||
} |
} |
@ -1,10 +1,32 @@ |
|||||||
{ |
{ |
||||||
"name": "MemberAccess", |
"argumentTypes": null, |
||||||
"children": [ { |
"expression": |
||||||
"attributes": { |
{ |
||||||
"value": "this", |
"argumentTypes": null, |
||||||
"type": "contract test" }, |
"id": 13, |
||||||
"name": "Identifier" } ], |
"name": "this", |
||||||
"attributes": { |
"nodeType": "Identifier", |
||||||
"value": "b", |
"overloadedDeclarations": [], |
||||||
"type": "function (bytes32,address) returns (bool)" } } |
"referencedDeclaration": -28, |
||||||
|
"src": "138:4:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_contract$_C_$21", |
||||||
|
"typeString": "contract C" |
||||||
|
} |
||||||
|
}, |
||||||
|
"id": 14, |
||||||
|
"isConstant": false, |
||||||
|
"isLValue": false, |
||||||
|
"isPure": false, |
||||||
|
"lValueRequested": false, |
||||||
|
"memberName": "h", |
||||||
|
"nodeType": "MemberAccess", |
||||||
|
"referencedDeclaration": 4, |
||||||
|
"src": "138:6:0", |
||||||
|
"typeDescriptions": |
||||||
|
{ |
||||||
|
"typeIdentifier": "t_function_external_payable$__$returns$__$", |
||||||
|
"typeString": "function () payable external" |
||||||
|
} |
||||||
|
} |
@ -1,204 +1,101 @@ |
|||||||
{ |
{ |
||||||
"children": |
"body": |
||||||
|
{ |
||||||
|
"id": 13, |
||||||
|
"nodeType": "Block", |
||||||
|
"src": "89:27:0", |
||||||
|
"statements": |
||||||
[ |
[ |
||||||
{ |
{ |
||||||
"attributes": |
"expression": |
||||||
{ |
{ |
||||||
"argumentTypes": null, |
"argumentTypes": null, |
||||||
"commonType": |
"id": 9, |
||||||
{ |
|
||||||
"typeIdentifier": "t_uint256", |
|
||||||
"typeString": "uint256" |
|
||||||
}, |
|
||||||
"isConstant": false, |
"isConstant": false, |
||||||
"isLValue": false, |
"isLValue": false, |
||||||
"isPure": false, |
"isPure": false, |
||||||
"lValueRequested": false, |
"lValueRequested": false, |
||||||
"operator": "<", |
"leftHandSide": |
||||||
"type": "bool" |
|
||||||
}, |
|
||||||
"children": |
|
||||||
[ |
|
||||||
{ |
|
||||||
"attributes": |
|
||||||
{ |
{ |
||||||
"argumentTypes": null, |
"argumentTypes": null, |
||||||
"overloadedDeclarations": |
"id": 7, |
||||||
[ |
"name": "x", |
||||||
null |
"nodeType": "Identifier", |
||||||
], |
"overloadedDeclarations": [], |
||||||
"referencedDeclaration": 45, |
"referencedDeclaration": 4, |
||||||
"type": "uint256", |
"src": "91:1:0", |
||||||
"value": "i" |
"typeDescriptions": |
||||||
}, |
|
||||||
"id": 48, |
|
||||||
"name": "Identifier", |
|
||||||
"src": "372:1:0" |
|
||||||
}, |
|
||||||
{ |
{ |
||||||
"attributes": |
"typeIdentifier": "t_uint256", |
||||||
|
"typeString": "uint256" |
||||||
|
} |
||||||
|
}, |
||||||
|
"nodeType": "Assignment", |
||||||
|
"operator": "=", |
||||||
|
"rightHandSide": |
||||||
{ |
{ |
||||||
"argumentTypes": null, |
"argumentTypes": null, |
||||||
"hexvalue": "3130", |
"hexValue": "31", |
||||||
|
"id": 8, |
||||||
"isConstant": false, |
"isConstant": false, |
||||||
"isLValue": false, |
"isLValue": false, |
||||||
"isPure": true, |
"isPure": true, |
||||||
|
"kind": "number", |
||||||
"lValueRequested": false, |
"lValueRequested": false, |
||||||
|
"nodeType": "Literal", |
||||||
|
"src": "95:1:0", |
||||||
"subdenomination": null, |
"subdenomination": null, |
||||||
"token": "number", |
"typeDescriptions": |
||||||
"type": "int_const 10", |
|
||||||
"value": "10" |
|
||||||
}, |
|
||||||
"id": 49, |
|
||||||
"name": "Literal", |
|
||||||
"src": "376:2:0" |
|
||||||
} |
|
||||||
], |
|
||||||
"id": 50, |
|
||||||
"name": "BinaryOperation", |
|
||||||
"src": "372:6:0" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"children": |
|
||||||
[ |
|
||||||
{ |
|
||||||
"children": |
|
||||||
[ |
|
||||||
{ |
{ |
||||||
"attributes": |
"typeIdentifier": "t_rational_1_by_1", |
||||||
{ |
"typeString": "int_const 1" |
||||||
"argumentTypes": null, |
|
||||||
"isConstant": false, |
|
||||||
"isLValue": false, |
|
||||||
"isPure": false, |
|
||||||
"isStructConstructorCall": false, |
|
||||||
"lValueRequested": false, |
|
||||||
"names": |
|
||||||
[ |
|
||||||
null |
|
||||||
], |
|
||||||
"type": "uint256", |
|
||||||
"type_conversion": false |
|
||||||
}, |
}, |
||||||
"children": |
"value": "1" |
||||||
[ |
}, |
||||||
{ |
"src": "91:5:0", |
||||||
"attributes": |
"typeDescriptions": |
||||||
{ |
|
||||||
"argumentTypes": |
|
||||||
[ |
|
||||||
{ |
{ |
||||||
"typeIdentifier": "t_uint256", |
"typeIdentifier": "t_uint256", |
||||||
"typeString": "uint256" |
"typeString": "uint256" |
||||||
} |
} |
||||||
], |
|
||||||
"isConstant": false, |
|
||||||
"isLValue": false, |
|
||||||
"isPure": false, |
|
||||||
"lValueRequested": false, |
|
||||||
"member_name": "push", |
|
||||||
"referencedDeclaration": null, |
|
||||||
"type": "function (uint256) returns (uint256)" |
|
||||||
}, |
}, |
||||||
"children": |
"id": 10, |
||||||
[ |
"nodeType": "ExpressionStatement", |
||||||
{ |
"src": "91:5:0" |
||||||
"attributes": |
|
||||||
{ |
|
||||||
"argumentTypes": null, |
|
||||||
"overloadedDeclarations": |
|
||||||
[ |
|
||||||
null |
|
||||||
], |
|
||||||
"referencedDeclaration": 4, |
|
||||||
"type": "uint256[] storage ref", |
|
||||||
"value": "array" |
|
||||||
}, |
|
||||||
"id": 51, |
|
||||||
"name": "Identifier", |
|
||||||
"src": "394:5:0" |
|
||||||
} |
|
||||||
], |
|
||||||
"id": 53, |
|
||||||
"name": "MemberAccess", |
|
||||||
"src": "394:10:0" |
|
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"attributes": |
"id": 11, |
||||||
{ |
"nodeType": "Break", |
||||||
"argumentTypes": null, |
"src": "98:5:0" |
||||||
"overloadedDeclarations": |
|
||||||
[ |
|
||||||
null |
|
||||||
], |
|
||||||
"referencedDeclaration": 45, |
|
||||||
"type": "uint256", |
|
||||||
"value": "i" |
|
||||||
}, |
}, |
||||||
"id": 54, |
{ |
||||||
"name": "Identifier", |
"id": 12, |
||||||
"src": "405:1:0" |
"nodeType": "Continue", |
||||||
} |
"src": "105:8:0" |
||||||
], |
|
||||||
"id": 55, |
|
||||||
"name": "FunctionCall", |
|
||||||
"src": "394:13:0" |
|
||||||
} |
} |
||||||
], |
] |
||||||
"id": 56, |
|
||||||
"name": "ExpressionStatement", |
|
||||||
"src": "394:13:0" |
|
||||||
}, |
}, |
||||||
{ |
"condition": |
||||||
"children": |
|
||||||
[ |
|
||||||
{ |
|
||||||
"attributes": |
|
||||||
{ |
{ |
||||||
"argumentTypes": null, |
"argumentTypes": null, |
||||||
|
"hexValue": "74727565", |
||||||
|
"id": 6, |
||||||
"isConstant": false, |
"isConstant": false, |
||||||
"isLValue": false, |
"isLValue": false, |
||||||
"isPure": false, |
"isPure": true, |
||||||
|
"kind": "bool", |
||||||
"lValueRequested": false, |
"lValueRequested": false, |
||||||
"operator": "++", |
"nodeType": "Literal", |
||||||
"prefix": false, |
"src": "83:4:0", |
||||||
"type": "uint256" |
"subdenomination": null, |
||||||
}, |
"typeDescriptions": |
||||||
"children": |
|
||||||
[ |
|
||||||
{ |
|
||||||
"attributes": |
|
||||||
{ |
{ |
||||||
"argumentTypes": null, |
"typeIdentifier": "t_bool", |
||||||
"overloadedDeclarations": |
"typeString": "bool" |
||||||
[ |
|
||||||
null |
|
||||||
], |
|
||||||
"referencedDeclaration": 45, |
|
||||||
"type": "uint256", |
|
||||||
"value": "i" |
|
||||||
}, |
}, |
||||||
"id": 57, |
"value": "true" |
||||||
"name": "Identifier", |
}, |
||||||
"src": "421:1:0" |
"id": 14, |
||||||
} |
"nodeType": "WhileStatement", |
||||||
], |
"src": "76:40:0" |
||||||
"id": 58, |
} |
||||||
"name": "UnaryOperation", |
|
||||||
"src": "421:3:0" |
|
||||||
} |
|
||||||
], |
|
||||||
"id": 59, |
|
||||||
"name": "ExpressionStatement", |
|
||||||
"src": "421:3:0" |
|
||||||
} |
|
||||||
], |
|
||||||
"id": 60, |
|
||||||
"name": "Block", |
|
||||||
"src": "380:55:0" |
|
||||||
} |
|
||||||
], |
|
||||||
"id": 61, |
|
||||||
"name": "WhileStatement", |
|
||||||
"src": "365:70:0" |
|
||||||
} |
|
Loading…
Reference in new issue