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
f74b2bdb
Commit
f74b2bdb
authored
Aug 16, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove allow-paths & fix slither arguments
parent
e1787787
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
slitherClient.ts
libs/remixd/src/services/slitherClient.ts
+4
-8
No files found.
libs/remixd/src/services/slitherClient.ts
View file @
f74b2bdb
...
...
@@ -120,29 +120,25 @@ export class SlitherClient extends PluginClient {
allowPaths
=
allowPathString
remaps
=
remapString
.
trim
()
}
const
allowPathsOption
:
string
=
allowPaths
?
`--allow-paths
${
allowPaths
}
`
:
''
const
optimizeOption
:
string
=
optimize
?
'--optimize'
:
''
const
evmOption
:
string
=
evmVersion
?
`--evm-version
${
evmVersion
}
`
:
''
let
solcArgs
=
''
if
(
allowPathsOption
)
{
if
(
!
solcArgs
.
endsWith
(
' '
))
solcArgs
+=
' '
solcArgs
+=
allowPathsOption
;
}
if
(
optimizeOption
)
{
solcArgs
+=
optimizeOption
;
solcArgs
+=
optimizeOption
+
' '
}
if
(
evmOption
)
{
if
(
!
solcArgs
.
endsWith
(
' '
))
solcArgs
+=
' '
solcArgs
+=
evmOption
;
}
if
(
solcArgs
)
{
solcArgs
=
`--solc-args "
${
solcArgs
.
trim
()}
"`
;
solcArgs
=
`--solc-args "
${
solcArgs
.
trim
Start
()}
"`
;
}
const
solcRemaps
=
remaps
?
`--solc-remaps "
${
remaps
}
"`
:
''
const
outputFile
:
string
=
'remix-slitherReport.json'
const
outputFile
:
string
=
'remix-slitherReport
_'
+
Math
.
floor
(
Date
.
now
()
/
1000
)
+
'
.json'
const
cmd
:
string
=
`slither
${
filePath
}
${
solcArgs
}
${
solcRemaps
}
--json
${
outputFile
}
`
console
.
log
(
'
\
x1b[32m%s
\
x1b[0m'
,
'[Slither Analysis]: Running Slither...'
)
console
.
log
(
cmd
)
// Added `stdio: 'ignore'` as for contract with NPM imports analysis which is exported in 'stderr'
// get too big and hangs the process. We process analysis from the report file only
const
child
=
spawn
(
cmd
,
{
cwd
:
this
.
currentSharedFolder
,
shell
:
true
,
stdio
:
'ignore'
})
...
...
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