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
98cf38f6
Commit
98cf38f6
authored
Jul 13, 2020
by
aniket-engg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolved conflicts
parent
6cb42637
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1 addition
and
39 deletions
+1
-39
abstractAstView.ts
...analyzer/src/solidity-analyzer/modules/abstractAstView.ts
+0
-5
blockTimestamp.ts
...-analyzer/src/solidity-analyzer/modules/blockTimestamp.ts
+0
-4
lowLevelCalls.ts
...x-analyzer/src/solidity-analyzer/modules/lowLevelCalls.ts
+0
-6
noReturn.ts
.../remix-analyzer/src/solidity-analyzer/modules/noReturn.ts
+0
-6
selfdestruct.ts
...ix-analyzer/src/solidity-analyzer/modules/selfdestruct.ts
+1
-5
staticAnalysisCommon.ts
...zer/src/solidity-analyzer/modules/staticAnalysisCommon.ts
+0
-5
thisLocal.ts
...remix-analyzer/src/solidity-analyzer/modules/thisLocal.ts
+0
-4
txOrigin.ts
.../remix-analyzer/src/solidity-analyzer/modules/txOrigin.ts
+0
-4
No files found.
libs/remix-analyzer/src/solidity-analyzer/modules/abstractAstView.ts
View file @
98cf38f6
import
{
getStateVariableDeclarationsFromContractNode
,
getInheritsFromName
,
getContractName
,
<<<<<<<
HEAD
:
libs
/
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
abstractAstView
.
ts
getFunctionOrModifierDefinitionParameterPart
,
getType
,
getDeclaredVariableName
,
getFunctionDefinitionReturnParameterPart
,
getCompilerVersion
}
from
'./staticAnalysisCommon'
import
{
AstWalker
}
from
'remix-astwalker'
=======
getFunctionOrModifierDefinitionParameterPart
,
getType
,
getDeclaredVariableName
,
getFunctionDefinitionReturnParameterPart
}
from
'./staticAnalysisCommon'
import
{
AstWalker
}
from
'@remix-project/remix-astwalker'
>>>>>>>
3
ce30ccb299e439bf2f3c0dbb2b69d8476c73c43
:
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
abstractAstView
.
ts
import
{
FunctionDefinitionAstNode
,
ParameterListAstNode
,
ModifierDefinitionAstNode
,
ContractHLAst
,
VariableDeclarationAstNode
,
FunctionHLAst
,
ReportObj
,
ReportFunction
,
VisitFunction
,
ModifierHLAst
,
CompilationResult
}
from
'../../types'
...
...
libs/remix-analyzer/src/solidity-analyzer/modules/blockTimestamp.ts
View file @
98cf38f6
...
...
@@ -22,12 +22,8 @@ export default class blockTimestamp implements AnalyzerModule {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
report
(
compilationResults
:
CompilationResult
):
ReportObj
[]
{
<<<<<<<
HEAD
:
libs
/
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
blockTimestamp
.
ts
const
version
=
getCompilerVersion
(
compilationResults
.
contracts
)
return
this
.
warningNowNodes
.
map
((
item
,
i
)
=>
{
=======
return
this
.
warningNowNodes
.
map
((
item
)
=>
{
>>>>>>>
3
ce30ccb299e439bf2f3c0dbb2b69d8476c73c43
:
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
blockTimestamp
.
ts
return
{
warning
:
`Use of "now": "now" does not mean current time. "now" is an alias for "block.timestamp".
"block.timestamp" can be influenced by miners to a certain degree, be careful.`
,
...
...
libs/remix-analyzer/src/solidity-analyzer/modules/lowLevelCalls.ts
View file @
98cf38f6
...
...
@@ -38,16 +38,10 @@ export default class lowLevelCalls implements AnalyzerModule {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
report
(
compilationResults
:
CompilationResult
):
ReportObj
[]
{
<<<<<<<
HEAD
:
libs
/
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
lowLevelCalls
.
ts
const
version
=
getCompilerVersion
(
compilationResults
.
contracts
)
return
this
.
llcNodes
.
map
((
item
,
i
)
=>
{
let
text
:
string
=
''
let
morehref
:
string
=
''
=======
return
this
.
llcNodes
.
map
((
item
)
=>
{
let
text
=
''
let
morehref
=
''
>>>>>>>
3
ce30ccb299e439bf2f3c0dbb2b69d8476c73c43
:
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
lowLevelCalls
.
ts
switch
(
item
.
type
)
{
case
lowLevelCallTypes
.
CALL
:
text
=
`Use of "call": should be avoided whenever possible.
...
...
libs/remix-analyzer/src/solidity-analyzer/modules/noReturn.ts
View file @
98cf38f6
...
...
@@ -21,13 +21,7 @@ export default class noReturn implements AnalyzerModule {
)
report
:
ReportFunction
=
this
.
abstractAst
.
build_report
(
this
.
_report
.
bind
(
this
))
<<<<<<<
HEAD
:
libs
/
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
noReturn
.
ts
private
_report
(
contracts
:
ContractHLAst
[],
multipleContractsWithSameName
:
boolean
,
version
:
string
):
ReportObj
[]
{
=======
// eslint-disable-next-line @typescript-eslint/no-unused-vars
private
_report
(
contracts
:
ContractHLAst
[],
multipleContractsWithSameName
:
boolean
):
ReportObj
[]
{
>>>>>>>
3
ce30ccb299e439bf2f3c0dbb2b69d8476c73c43
:
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
noReturn
.
ts
const
warnings
:
ReportObj
[]
=
[]
contracts
.
forEach
((
contract
:
ContractHLAst
)
=>
{
...
...
libs/remix-analyzer/src/solidity-analyzer/modules/selfdestruct.ts
View file @
98cf38f6
...
...
@@ -20,12 +20,8 @@ export default class selfdestruct implements AnalyzerModule {
)
report
:
ReportFunction
=
this
.
abstractAst
.
build_report
(
this
.
_report
.
bind
(
this
))
<<<<<<<
HEAD
:
libs
/
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
selfdestruct
.
ts
private
_report
(
contracts
:
ContractHLAst
[],
multipleContractsWithSameName
:
boolean
,
version
:
string
):
ReportObj
[]
{
=======
// eslint-disable-next-line @typescript-eslint/no-unused-vars
private
_report
(
contracts
:
ContractHLAst
[],
multipleContractsWithSameName
:
boolean
):
ReportObj
[]
{
>>>>>>>
3
ce30ccb299e439bf2f3c0dbb2b69d8476c73c43
:
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
selfdestruct
.
ts
private
_report
(
contracts
:
ContractHLAst
[],
multipleContractsWithSameName
:
boolean
,
version
:
string
):
ReportObj
[]
{
const
warnings
:
ReportObj
[]
=
[]
contracts
.
forEach
((
contract
)
=>
{
...
...
libs/remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts
View file @
98cf38f6
...
...
@@ -3,13 +3,8 @@
import
{
FunctionDefinitionAstNode
,
ModifierDefinitionAstNode
,
ParameterListAstNode
,
ForStatementAstNode
,
WhileStatementAstNode
,
VariableDeclarationAstNode
,
ContractDefinitionAstNode
,
InheritanceSpecifierAstNode
,
MemberAccessAstNode
,
BinaryOperationAstNode
,
FunctionCallAstNode
,
ExpressionStatementAstNode
,
UnaryOperationAstNode
,
<<<<<<<
HEAD
:
libs
/
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
staticAnalysisCommon
.
ts
IdentifierAstNode
,
IndexAccessAstNode
,
BlockAstNode
,
AssignmentAstNode
,
InlineAssemblyAstNode
,
IfStatementAstNode
,
CompiledContractObj
,
ABIParameter
,
CompilationResult
,
CompiledContract
}
from
"types"
import
{
util
}
from
'remix-lib'
=======
IdentifierAstNode
,
IndexAccessAstNode
,
BlockAstNode
,
AssignmentAstNode
,
InlineAssemblyAstNode
,
IfStatementAstNode
,
CompiledContractObj
,
ABIParameter
}
from
"../../types"
import
{
util
}
from
'@remix-project/remix-lib'
>>>>>>>
3
ce30ccb299e439bf2f3c0dbb2b69d8476c73c43
:
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
staticAnalysisCommon
.
ts
type
SpecialObjDetail
=
{
obj
:
string
...
...
libs/remix-analyzer/src/solidity-analyzer/modules/thisLocal.ts
View file @
98cf38f6
...
...
@@ -19,12 +19,8 @@ export default class thisLocal implements AnalyzerModule {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
report
(
compilationResults
:
CompilationResult
):
ReportObj
[]
{
<<<<<<<
HEAD
:
libs
/
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
thisLocal
.
ts
const
version
=
getCompilerVersion
(
compilationResults
.
contracts
)
return
this
.
warningNodes
.
map
(
function
(
item
,
i
)
{
=======
return
this
.
warningNodes
.
map
(
function
(
item
)
{
>>>>>>>
3
ce30ccb299e439bf2f3c0dbb2b69d8476c73c43
:
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
thisLocal
.
ts
return
{
warning
:
`Use of "this" for local functions: Never use "this" to call functions in the same contract, it only consumes more gas than normal local calls.`
,
location
:
item
.
src
,
...
...
libs/remix-analyzer/src/solidity-analyzer/modules/txOrigin.ts
View file @
98cf38f6
...
...
@@ -20,12 +20,8 @@ export default class txOrigin implements AnalyzerModule {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
report
(
compilationResults
:
CompilationResult
):
ReportObj
[]
{
<<<<<<<
HEAD
:
libs
/
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
txOrigin
.
ts
const
version
=
getCompilerVersion
(
compilationResults
.
contracts
)
return
this
.
txOriginNodes
.
map
((
item
,
i
)
=>
{
=======
return
this
.
txOriginNodes
.
map
((
item
)
=>
{
>>>>>>>
3
ce30ccb299e439bf2f3c0dbb2b69d8476c73c43
:
remix
-
analyzer
/
src
/
solidity
-
analyzer
/
modules
/
txOrigin
.
ts
return
{
warning
:
`Use of tx.origin: "tx.origin" is useful only in very exceptional cases.
If you use it for authentication, you usually want to replace it by "msg.sender", because otherwise any contract you call can act on your behalf.`
,
...
...
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