Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
062cb9b4
Unverified
Commit
062cb9b4
authored
Oct 04, 2019
by
yann300
Committed by
GitHub
Oct 04, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1308 from ethereum/separate_ast_blocks
Separate AST blocks in remix-analyzer tests
parents
4507a805
0e1aa435
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1410 additions
and
0 deletions
+1410
-0
assignment.json
remix-analyzer/test/analysis/astBlocks/assignment.json
+63
-0
blockHashAccess.json
remix-analyzer/test/analysis/astBlocks/blockHashAccess.json
+17
-0
doWhileLoopNode.json
remix-analyzer/test/analysis/astBlocks/doWhileLoopNode.json
+205
-0
externalDirect.json
remix-analyzer/test/analysis/astBlocks/externalDirect.json
+21
-0
forLoopNode.json
remix-analyzer/test/analysis/astBlocks/forLoopNode.json
+265
-0
fullyQualifiedFunctionDefinition.json
.../analysis/astBlocks/fullyQualifiedFunctionDefinition.json
+75
-0
functionDefinition.json
...-analyzer/test/analysis/astBlocks/functionDefinition.json
+25
-0
index.js
remix-analyzer/test/analysis/astBlocks/index.js
+22
-0
inheritance.json
remix-analyzer/test/analysis/astBlocks/inheritance.json
+16
-0
inlineAssembly.json
remix-analyzer/test/analysis/astBlocks/inlineAssembly.json
+8
-0
libCall.json
remix-analyzer/test/analysis/astBlocks/libCall.json
+17
-0
localCall.json
remix-analyzer/test/analysis/astBlocks/localCall.json
+30
-0
lowlevelCall.json
remix-analyzer/test/analysis/astBlocks/lowlevelCall.json
+43
-0
parameterFunction.json
...x-analyzer/test/analysis/astBlocks/parameterFunction.json
+72
-0
parameterFunctionCall.json
...alyzer/test/analysis/astBlocks/parameterFunctionCall.json
+90
-0
selfdestruct.json
remix-analyzer/test/analysis/astBlocks/selfdestruct.json
+24
-0
stateVariableContractNode.json
...er/test/analysis/astBlocks/stateVariableContractNode.json
+109
-0
storageVariableNodes.json
...nalyzer/test/analysis/astBlocks/storageVariableNodes.json
+75
-0
superLocal.json
remix-analyzer/test/analysis/astBlocks/superLocal.json
+17
-0
thisLocalCall.json
remix-analyzer/test/analysis/astBlocks/thisLocalCall.json
+11
-0
whileLoopNode.json
remix-analyzer/test/analysis/astBlocks/whileLoopNode.json
+205
-0
staticAnalysisCommon-test.js
remix-analyzer/test/analysis/staticAnalysisCommon-test.js
+0
-0
No files found.
remix-analyzer/test/analysis/astBlocks/assignment.json
0 → 100644
View file @
062cb9b4
{
"attributes"
:
{
"operator"
:
"="
,
"type"
:
"uint256"
},
"children"
:
[
{
"attributes"
:
{
"type"
:
"uint256"
},
"children"
:
[
{
"attributes"
:
{
"type"
:
"mapping(address => uint256)"
,
"value"
:
"c"
},
"id"
:
61
,
"name"
:
"Identifier"
,
"src"
:
"873:1:0"
},
{
"attributes"
:
{
"member_name"
:
"sender"
,
"type"
:
"address"
},
"children"
:
[
{
"attributes"
:
{
"type"
:
"msg"
,
"value"
:
"msg"
},
"id"
:
62
,
"name"
:
"Identifier"
,
"src"
:
"875:3:0"
}
],
"id"
:
63
,
"name"
:
"MemberAccess"
,
"src"
:
"875:10:0"
}
],
"id"
:
64
,
"name"
:
"IndexAccess"
,
"src"
:
"873:13:0"
},
{
"attributes"
:
{
"hexvalue"
:
"30"
,
"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"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/blockHashAccess.json
0 → 100644
View file @
062cb9b4
{
"attributes"
:
{
"member_name"
:
"blockhash"
,
"type"
:
"function (uint256) returns (bytes32)"
},
"children"
:
[
{
"attributes"
:
{
"type"
:
"block"
,
"value"
:
"block"
},
"name"
:
"Identifier"
}
],
"name"
:
"MemberAccess"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/doWhileLoopNode.json
0 → 100644
View file @
062cb9b4
{
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
null
,
"commonType"
:
{
"typeIdentifier"
:
"t_uint256"
,
"typeString"
:
"uint256"
},
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
false
,
"lValueRequested"
:
false
,
"operator"
:
"<"
,
"type"
:
"bool"
},
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
69
,
"type"
:
"uint256"
,
"value"
:
"i"
},
"id"
:
82
,
"name"
:
"Identifier"
,
"src"
:
"592:1:0"
},
{
"attributes"
:
{
"argumentTypes"
:
null
,
"hexvalue"
:
"3130"
,
"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
,
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
false
,
"isStructConstructorCall"
:
false
,
"lValueRequested"
:
false
,
"names"
:
[
null
],
"type"
:
"uint256"
,
"type_conversion"
:
false
},
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
[
{
"typeIdentifier"
:
"t_uint256"
,
"typeString"
:
"uint256"
}
],
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
false
,
"lValueRequested"
:
false
,
"member_name"
:
"push"
,
"referencedDeclaration"
:
null
,
"type"
:
"function (uint256) returns (uint256)"
},
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
4
,
"type"
:
"uint256[] storage ref"
,
"value"
:
"array"
},
"id"
:
72
,
"name"
:
"Identifier"
,
"src"
:
"544:5:0"
}
],
"id"
:
74
,
"name"
:
"MemberAccess"
,
"src"
:
"544:10:0"
},
{
"attributes"
:
{
"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
,
"name"
:
"ExpressionStatement"
,
"src"
:
"544:13:0"
},
{
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
null
,
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
false
,
"lValueRequested"
:
false
,
"operator"
:
"++"
,
"prefix"
:
false
,
"type"
:
"uint256"
},
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
69
,
"type"
:
"uint256"
,
"value"
:
"i"
},
"id"
:
78
,
"name"
:
"Identifier"
,
"src"
:
"571:1:0"
}
],
"id"
:
79
,
"name"
:
"UnaryOperation"
,
"src"
:
"571:3:0"
}
],
"id"
:
80
,
"name"
:
"ExpressionStatement"
,
"src"
:
"571:3:0"
}
],
"id"
:
81
,
"name"
:
"Block"
,
"src"
:
"530:55:0"
}
],
"id"
:
85
,
"name"
:
"DoWhileStatement"
,
"src"
:
"528:72:0"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/externalDirect.json
0 → 100644
View file @
062cb9b4
{
"attributes"
:
{
"member_name"
:
"info"
,
"type"
:
"function () payable external returns (uint256)"
},
"children"
:
[
{
"attributes"
:
{
"type"
:
"contract InfoFeed"
,
"value"
:
"f"
},
"id"
:
30
,
"name"
:
"Identifier"
,
"src"
:
"405:1:0"
}
],
"id"
:
32
,
"name"
:
"MemberAccess"
,
"src"
:
"405:6:0"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/forLoopNode.json
0 → 100644
View file @
062cb9b4
{
"children"
:
[
{
"attributes"
:
{
"assignments"
:
[
21
]
},
"children"
:
[
{
"attributes"
:
{
"constant"
:
false
,
"name"
:
"i"
,
"scope"
:
39
,
"stateVariable"
:
false
,
"storageLocation"
:
"default"
,
"type"
:
"uint256"
,
"value"
:
null
,
"visibility"
:
"internal"
},
"children"
:
[
{
"attributes"
:
{
"name"
:
"uint"
,
"type"
:
"uint256"
},
"id"
:
20
,
"name"
:
"ElementaryTypeName"
,
"src"
:
"207:4:0"
}
],
"id"
:
21
,
"name"
:
"VariableDeclaration"
,
"src"
:
"207:6:0"
},
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
17
,
"type"
:
"uint256"
,
"value"
:
"index"
},
"id"
:
22
,
"name"
:
"Identifier"
,
"src"
:
"216:5:0"
}
],
"id"
:
23
,
"name"
:
"VariableDeclarationStatement"
,
"src"
:
"207:14:0"
},
{
"attributes"
:
{
"argumentTypes"
:
null
,
"commonType"
:
{
"typeIdentifier"
:
"t_uint256"
,
"typeString"
:
"uint256"
},
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
false
,
"lValueRequested"
:
false
,
"operator"
:
"<"
,
"type"
:
"bool"
},
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
21
,
"type"
:
"uint256"
,
"value"
:
"i"
},
"id"
:
24
,
"name"
:
"Identifier"
,
"src"
:
"223:1:0"
},
{
"attributes"
:
{
"argumentTypes"
:
null
,
"hexvalue"
:
"3130"
,
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
true
,
"lValueRequested"
:
false
,
"subdenomination"
:
null
,
"token"
:
"number"
,
"type"
:
"int_const 10"
,
"value"
:
"10"
},
"id"
:
25
,
"name"
:
"Literal"
,
"src"
:
"227:2:0"
}
],
"id"
:
26
,
"name"
:
"BinaryOperation"
,
"src"
:
"223:6:0"
},
{
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
null
,
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
false
,
"lValueRequested"
:
false
,
"operator"
:
"++"
,
"prefix"
:
false
,
"type"
:
"uint256"
},
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
21
,
"type"
:
"uint256"
,
"value"
:
"i"
},
"id"
:
27
,
"name"
:
"Identifier"
,
"src"
:
"231:1:0"
}
],
"id"
:
28
,
"name"
:
"UnaryOperation"
,
"src"
:
"231:3:0"
}
],
"id"
:
29
,
"name"
:
"ExpressionStatement"
,
"src"
:
"231:3:0"
},
{
"children"
:
[
{
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
null
,
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
false
,
"isStructConstructorCall"
:
false
,
"lValueRequested"
:
false
,
"names"
:
[
null
],
"type"
:
"uint256"
,
"type_conversion"
:
false
},
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
[
{
"typeIdentifier"
:
"t_uint256"
,
"typeString"
:
"uint256"
}
],
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
false
,
"lValueRequested"
:
false
,
"member_name"
:
"push"
,
"referencedDeclaration"
:
null
,
"type"
:
"function (uint256) returns (uint256)"
},
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
4
,
"type"
:
"uint256[] storage ref"
,
"value"
:
"array"
},
"id"
:
30
,
"name"
:
"Identifier"
,
"src"
:
"250:5:0"
}
],
"id"
:
32
,
"name"
:
"MemberAccess"
,
"src"
:
"250:10:0"
},
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
21
,
"type"
:
"uint256"
,
"value"
:
"i"
},
"id"
:
33
,
"name"
:
"Identifier"
,
"src"
:
"261:1:0"
}
],
"id"
:
34
,
"name"
:
"FunctionCall"
,
"src"
:
"250:13:0"
}
],
"id"
:
35
,
"name"
:
"ExpressionStatement"
,
"src"
:
"250:13:0"
}
],
"id"
:
36
,
"name"
:
"Block"
,
"src"
:
"236:38:0"
}
],
"id"
:
37
,
"name"
:
"ForStatement"
,
"src"
:
"202:72:0"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/fullyQualifiedFunctionDefinition.json
0 → 100644
View file @
062cb9b4
{
"attributes"
:
{
"constant"
:
false
,
"name"
:
"getY"
,
"payable"
:
false
,
"visibility"
:
"public"
},
"children"
:
[
{
"children"
:
[
{
"attributes"
:
{
"name"
:
"z"
,
"type"
:
"uint256"
},
"children"
:
[
{
"attributes"
:
{
"name"
:
"uint"
},
"name"
:
"ElementaryTypeName"
}
],
"name"
:
"VariableDeclaration"
},
{
"attributes"
:
{
"name"
:
"r"
,
"type"
:
"bool"
},
"children"
:
[
{
"attributes"
:
{
"name"
:
"bool"
},
"name"
:
"ElementaryTypeName"
}
],
"name"
:
"VariableDeclaration"
}
],
"name"
:
"ParameterList"
},
{
"children"
:
[
{
"attributes"
:
{
"name"
:
""
,
"type"
:
"uint256"
},
"children"
:
[
{
"attributes"
:
{
"name"
:
"uint"
},
"id"
:
34
,
"name"
:
"ElementaryTypeName"
,
"src"
:
"285:4:0"
}
],
"id"
:
35
,
"name"
:
"VariableDeclaration"
,
"src"
:
"285:4:0"
}
],
"name"
:
"ParameterList"
},
{
"children"
:
[],
"name"
:
"Block"
}
],
"name"
:
"FunctionDefinition"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/functionDefinition.json
0 → 100644
View file @
062cb9b4
{
"attributes"
:
{
"constant"
:
true
,
"name"
:
"winnerName"
,
"payable"
:
false
,
"visibility"
:
"public"
},
"children"
:
[
{
"children"
:
[
],
"name"
:
"ParameterList"
},
{
"children"
:
[],
"name"
:
"ParameterList"
},
{
"children"
:
[],
"name"
:
"Block"
}
],
"name"
:
"FunctionDefinition"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/index.js
0 → 100644
View file @
062cb9b4
module
.
exports
=
{
localCall
:
require
(
'./localCall.json'
),
thisLocalCall
:
require
(
'./thisLocalCall.json'
),
libCall
:
require
(
'./libCall.json'
),
externalDirect
:
require
(
'./externalDirect.json'
),
superLocal
:
require
(
'./superLocal.json'
),
assignment
:
require
(
'./assignment.json'
),
inlineAssembly
:
require
(
'./inlineAssembly.json'
),
forLoopNode
:
require
(
'./forLoopNode.json'
),
whileLoopNode
:
require
(
'./whileLoopNode.json'
),
doWhileLoopNode
:
require
(
'./doWhileLoopNode.json'
),
stateVariableContractNode
:
require
(
'./stateVariableContractNode.json'
),
functionDefinition
:
require
(
'./functionDefinition.json'
),
fullyQualifiedFunctionDefinition
:
require
(
'./fullyQualifiedFunctionDefinition.json'
),
selfdestruct
:
require
(
'./selfdestruct.json'
),
storageVariableNodes
:
require
(
'./storageVariableNodes.json'
),
lowlevelCall
:
require
(
'./lowlevelCall.json'
),
parameterFunction
:
require
(
'./parameterFunction.json'
),
parameterFunctionCall
:
require
(
'./parameterFunctionCall.json'
),
inheritance
:
require
(
'./inheritance.json'
),
blockHashAccess
:
require
(
'./blockHashAccess.json'
)
}
remix-analyzer/test/analysis/astBlocks/inheritance.json
0 → 100644
View file @
062cb9b4
{
"children"
:
[
{
"attributes"
:
{
"name"
:
"r"
},
"id"
:
7
,
"name"
:
"UserDefinedTypeName"
,
"src"
:
"84:1:0"
}
],
"id"
:
8
,
"name"
:
"InheritanceSpecifier"
,
"src"
:
"84:1:0"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/inlineAssembly.json
0 → 100644
View file @
062cb9b4
{
"children"
:
[
],
"id"
:
21
,
"name"
:
"InlineAssembly"
,
"src"
:
"809:41:0"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/libCall.json
0 → 100644
View file @
062cb9b4
{
"attributes"
:
{
"member_name"
:
"insert"
,
"type"
:
"function (struct Set.Data storage pointer,uint256) returns (bool)"
},
"children"
:
[
{
"attributes"
:
{
"type"
:
"type(library Set)"
,
"value"
:
"Set"
},
"name"
:
"Identifier"
}
],
"name"
:
"MemberAccess"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/localCall.json
0 → 100644
View file @
062cb9b4
{
"attributes"
:
{
"type"
:
"tuple()"
,
"type_conversion"
:
false
},
"children"
:
[
{
"attributes"
:
{
"type"
:
"function (struct Ballot.Voter storage pointer)"
,
"value"
:
"bli"
},
"id"
:
37
,
"name"
:
"Identifier"
,
"src"
:
"540:3:0"
},
{
"attributes"
:
{
"type"
:
"struct Ballot.Voter storage pointer"
,
"value"
:
"x"
},
"id"
:
38
,
"name"
:
"Identifier"
,
"src"
:
"544:1:0"
}
],
"id"
:
39
,
"name"
:
"FunctionCall"
,
"src"
:
"540:6:0"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/lowlevelCall.json
0 → 100644
View file @
062cb9b4
{
"sendAst"
:
{
"name"
:
"MemberAccess"
,
"children"
:
[
{
"attributes"
:
{
"value"
:
"d"
,
"type"
:
"address"
}
}],
"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"
:
{
"name"
:
"MemberAccess"
,
"children"
:
[{
"attributes"
:
{
"value"
:
"f"
,
"type"
:
"address"
}}],
"attributes"
:
{
"member_name"
:
"callcode"
,
"type"
:
"function () payable returns (bool)"
}
},
"delegatecallAst"
:
{
"name"
:
"MemberAccess"
,
"children"
:
[{
"attributes"
:
{
"value"
:
"g"
,
"type"
:
"address"
}}],
"attributes"
:
{
"member_name"
:
"delegatecall"
,
"type"
:
"function () returns (bool)"
}
}
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/parameterFunction.json
0 → 100644
View file @
062cb9b4
{
"attributes"
:
{
"argumentTypes"
:
null
,
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
false
,
"isStructConstructorCall"
:
false
,
"lValueRequested"
:
false
,
"names"
:
[
null
],
"type"
:
"uint256"
,
"type_conversion"
:
false
},
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
[
{
"typeIdentifier"
:
"t_uint256"
,
"typeString"
:
"uint256"
},
{
"typeIdentifier"
:
"t_uint256"
,
"typeString"
:
"uint256"
}
],
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
25
,
"type"
:
"function (uint256,uint256) pure returns (uint256)"
,
"value"
:
"f"
},
"id"
:
34
,
"name"
:
"Identifier"
,
"src"
:
"267:1:0"
},
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
27
,
"type"
:
"uint256"
,
"value"
:
"x"
},
"id"
:
35
,
"name"
:
"Identifier"
,
"src"
:
"269:1:0"
},
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
29
,
"type"
:
"uint256"
,
"value"
:
"y"
},
"id"
:
36
,
"name"
:
"Identifier"
,
"src"
:
"272:1:0"
}
],
"id"
:
37
,
"name"
:
"FunctionCall"
,
"src"
:
"267:7:0"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/parameterFunctionCall.json
0 → 100644
View file @
062cb9b4
{
"attributes"
:
{
"argumentTypes"
:
null
,
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
false
,
"isStructConstructorCall"
:
false
,
"lValueRequested"
:
false
,
"names"
:
[
null
],
"type"
:
"uint256"
,
"type_conversion"
:
false
},
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
[
{
"typeIdentifier"
:
"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$"
,
"typeString"
:
"function (uint256,uint256) pure returns (uint256)"
},
{
"typeIdentifier"
:
"t_uint256"
,
"typeString"
:
"uint256"
},
{
"typeIdentifier"
:
"t_uint256"
,
"typeString"
:
"uint256"
}
],
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
40
,
"type"
:
"function (function (uint256,uint256) pure returns (uint256),uint256,uint256) pure returns (uint256)"
,
"value"
:
"eval"
},
"id"
:
49
,
"name"
:
"Identifier"
,
"src"
:
"361:4:0"
},
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
15
,
"type"
:
"function (uint256,uint256) pure returns (uint256)"
,
"value"
:
"plus"
},
"id"
:
50
,
"name"
:
"Identifier"
,
"src"
:
"366:4:0"
},
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
42
,
"type"
:
"uint256"
,
"value"
:
"x"
},
"id"
:
51
,
"name"
:
"Identifier"
,
"src"
:
"372:1:0"
},
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
44
,
"type"
:
"uint256"
,
"value"
:
"y"
},
"id"
:
52
,
"name"
:
"Identifier"
,
"src"
:
"375:1:0"
}
],
"id"
:
53
,
"name"
:
"FunctionCall"
,
"src"
:
"361:16:0"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/selfdestruct.json
0 → 100644
View file @
062cb9b4
{
"attributes"
:
{
"type"
:
"tuple()"
,
"type_conversion"
:
false
},
"children"
:
[
{
"attributes"
:
{
"type"
:
"function (address)"
,
"value"
:
"selfdestruct"
},
"name"
:
"Identifier"
},
{
"attributes"
:
{
"type"
:
"address"
,
"value"
:
"a"
},
"name"
:
"Identifier"
}
],
"name"
:
"FunctionCall"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/stateVariableContractNode.json
0 → 100644
View file @
062cb9b4
{
"attributes"
:
{
"fullyImplemented"
:
true
,
"isLibrary"
:
false
,
"linearizedBaseContracts"
:
[
274
],
"name"
:
"Ballot"
},
"children"
:
[
{
"attributes"
:
{
"name"
:
"Voter"
},
"children"
:
[],
"name"
:
"StructDefinition"
},
{
"attributes"
:
{
"name"
:
"Proposal"
},
"children"
:
[],
"name"
:
"StructDefinition"
},
{
"attributes"
:
{
"name"
:
"chairperson"
,
"type"
:
"address"
},
"children"
:
[
{
"attributes"
:
{
"name"
:
"address"
},
"name"
:
"ElementaryTypeName"
}
],
"name"
:
"VariableDeclaration"
},
{
"attributes"
:
{
"name"
:
"voters"
,
"type"
:
"mapping(address => struct Ballot.Voter storage ref)"
},
"children"
:
[
{
"children"
:
[
{
"attributes"
:
{
"name"
:
"address"
},
"name"
:
"ElementaryTypeName"
},
{
"attributes"
:
{
"name"
:
"Voter"
},
"name"
:
"UserDefinedTypeName"
}
],
"name"
:
"Mapping"
}
],
"name"
:
"VariableDeclaration"
},
{
"attributes"
:
{
"name"
:
"proposals"
,
"type"
:
"struct Ballot.Proposal storage ref[] storage ref"
},
"children"
:
[
{
"children"
:
[
{
"attributes"
:
{
"name"
:
"Proposal"
},
"name"
:
"UserDefinedTypeName"
}
],
"name"
:
"ArrayTypeName"
}
],
"name"
:
"VariableDeclaration"
},
{
"attributes"
:
{
"constant"
:
false
,
"name"
:
"Ballot"
,
"payable"
:
false
,
"visibility"
:
"public"
},
"children"
:
[],
"name"
:
"FunctionDefinition"
},
{
"attributes"
:
{
"constant"
:
false
,
"name"
:
"giveRightToVote"
,
"payable"
:
false
,
"visibility"
:
"public"
},
"children"
:
[],
"name"
:
"FunctionDefinition"
}
],
"name"
:
"ContractDefinition"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/storageVariableNodes.json
0 → 100644
View file @
062cb9b4
{
"node1"
:
{
"attributes"
:
{
"name"
:
"x"
,
"type"
:
"struct Ballot.Voter storage pointer"
},
"children"
:
[
{
"attributes"
:
{
"name"
:
"Voter"
},
"id"
:
43
,
"name"
:
"UserDefinedTypeName"
,
"src"
:
"604:5:0"
}
],
"id"
:
44
,
"name"
:
"VariableDeclaration"
,
"src"
:
"604:15:0"
},
"node2"
:
{
"attributes"
:
{
"name"
:
"voters"
,
"type"
:
"mapping(address => struct Ballot.Voter storage ref)"
},
"children"
:
[
{
"children"
:
[
{
"attributes"
:
{
"name"
:
"address"
},
"id"
:
16
,
"name"
:
"ElementaryTypeName"
,
"src"
:
"235:7:0"
},
{
"attributes"
:
{
"name"
:
"Voter"
},
"id"
:
17
,
"name"
:
"UserDefinedTypeName"
,
"src"
:
"246:5:0"
}
],
"id"
:
18
,
"name"
:
"Mapping"
,
"src"
:
"227:25:0"
}
],
"id"
:
19
,
"name"
:
"VariableDeclaration"
,
"src"
:
"227:32:0"
},
"node3"
:
{
"attributes"
:
{
"name"
:
"voters"
,
"type"
:
"bytes32"
},
"children"
:
[
{
"attributes"
:
{
"name"
:
"bytes"
},
"id"
:
16
,
"name"
:
"ElementaryTypeName"
,
"src"
:
"235:7:0"
}
],
"id"
:
19
,
"name"
:
"VariableDeclaration"
,
"src"
:
"227:32:0"
}
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/superLocal.json
0 → 100644
View file @
062cb9b4
{
"attributes"
:
{
"member_name"
:
"duper"
,
"type"
:
"function ()"
},
"children"
:
[
{
"attributes"
:
{
"type"
:
"contract super a"
,
"value"
:
"super"
},
"name"
:
"Identifier"
}
],
"name"
:
"MemberAccess"
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/thisLocalCall.json
0 → 100644
View file @
062cb9b4
{
"name"
:
"MemberAccess"
,
"children"
:
[
{
"attributes"
:
{
"value"
:
"this"
,
"type"
:
"contract test"
},
"name"
:
"Identifier"
}
],
"attributes"
:
{
"value"
:
"b"
,
"type"
:
"function (bytes32,address) returns (bool)"
}
}
\ No newline at end of file
remix-analyzer/test/analysis/astBlocks/whileLoopNode.json
0 → 100644
View file @
062cb9b4
{
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
null
,
"commonType"
:
{
"typeIdentifier"
:
"t_uint256"
,
"typeString"
:
"uint256"
},
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
false
,
"lValueRequested"
:
false
,
"operator"
:
"<"
,
"type"
:
"bool"
},
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
45
,
"type"
:
"uint256"
,
"value"
:
"i"
},
"id"
:
48
,
"name"
:
"Identifier"
,
"src"
:
"372:1:0"
},
{
"attributes"
:
{
"argumentTypes"
:
null
,
"hexvalue"
:
"3130"
,
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
true
,
"lValueRequested"
:
false
,
"subdenomination"
:
null
,
"token"
:
"number"
,
"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"
:
{
"argumentTypes"
:
null
,
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
false
,
"isStructConstructorCall"
:
false
,
"lValueRequested"
:
false
,
"names"
:
[
null
],
"type"
:
"uint256"
,
"type_conversion"
:
false
},
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
[
{
"typeIdentifier"
:
"t_uint256"
,
"typeString"
:
"uint256"
}
],
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
false
,
"lValueRequested"
:
false
,
"member_name"
:
"push"
,
"referencedDeclaration"
:
null
,
"type"
:
"function (uint256) returns (uint256)"
},
"children"
:
[
{
"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"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
45
,
"type"
:
"uint256"
,
"value"
:
"i"
},
"id"
:
54
,
"name"
:
"Identifier"
,
"src"
:
"405:1:0"
}
],
"id"
:
55
,
"name"
:
"FunctionCall"
,
"src"
:
"394:13:0"
}
],
"id"
:
56
,
"name"
:
"ExpressionStatement"
,
"src"
:
"394:13:0"
},
{
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
null
,
"isConstant"
:
false
,
"isLValue"
:
false
,
"isPure"
:
false
,
"lValueRequested"
:
false
,
"operator"
:
"++"
,
"prefix"
:
false
,
"type"
:
"uint256"
},
"children"
:
[
{
"attributes"
:
{
"argumentTypes"
:
null
,
"overloadedDeclarations"
:
[
null
],
"referencedDeclaration"
:
45
,
"type"
:
"uint256"
,
"value"
:
"i"
},
"id"
:
57
,
"name"
:
"Identifier"
,
"src"
:
"421:1: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"
}
\ No newline at end of file
remix-analyzer/test/analysis/staticAnalysisCommon-test.js
View file @
062cb9b4
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment