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
979db851
Commit
979db851
authored
May 28, 2020
by
aniket-engg
Committed by
Aniket
Jun 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no doc version handling
parent
af3280d7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
staticAnalysisCommon.ts
...zer/src/solidity-analyzer/modules/staticAnalysisCommon.ts
+12
-1
No files found.
remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts
View file @
979db851
...
...
@@ -1122,7 +1122,14 @@ function getTypeStringFromComponents(components: ABIParameter[]) {
return
typeString
}
/**
* Get compiler version from compiler contract object
* This is used to redirect the user to specific version of Solidity documentation
* @param contractFiles compiled contract object
*/
function
getCompilerVersion
(
contractFiles
:
CompiledContractObj
):
string
{
// Solidity documentation is not available for these versions
const
noDocVersions
=
[
'0.4.26'
,
'0.5.16'
,
'0.5.17'
]
let
version
=
'develop'
const
fileNames
:
string
[]
=
Object
.
keys
(
contractFiles
)
const
contracts
=
contractFiles
[
fileNames
[
0
]]
...
...
@@ -1130,7 +1137,11 @@ function getCompilerVersion(contractFiles: CompiledContractObj): string {
const
contract
:
CompiledContract
=
contracts
[
contractNames
[
0
]]
const
metadata
=
JSON
.
parse
(
contract
.
metadata
)
const
compilerVersion
:
string
=
metadata
.
compiler
.
version
if
(
!
compilerVersion
.
includes
(
'nightly'
))
version
=
'v'
+
compilerVersion
.
split
(
'+commit'
)[
0
]
if
(
!
compilerVersion
.
includes
(
'nightly'
))
{
const
solVersion
=
compilerVersion
.
split
(
'+commit'
)[
0
]
if
(
!
noDocVersions
.
includes
(
solVersion
))
version
=
'v'
+
solVersion
}
return
version
}
...
...
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