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
d074feb3
Commit
d074feb3
authored
Dec 14, 2017
by
ninabreznik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update _getInputParams
parent
4dddb109
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
contextualListener.js
src/app/editor/contextualListener.js
+11
-8
No files found.
src/app/editor/contextualListener.js
View file @
d074feb3
...
@@ -145,7 +145,7 @@ class ContextualListener {
...
@@ -145,7 +145,7 @@ class ContextualListener {
if
(
node
.
name
===
'FunctionDefinition'
)
{
if
(
node
.
name
===
'FunctionDefinition'
)
{
if
(
!
node
.
attributes
.
isConstructor
)
{
if
(
!
node
.
attributes
.
isConstructor
)
{
var
fnName
=
node
.
attributes
.
name
var
fnName
=
node
.
attributes
.
name
var
fn
=
fnName
+
this
.
_getInputParams
(
fnNam
e
)
var
fn
=
fnName
+
this
.
_getInputParams
(
nod
e
)
if
(
node
.
attributes
.
visibility
===
'public'
)
{
if
(
node
.
attributes
.
visibility
===
'public'
)
{
executionCost
=
this
.
estimationObj
.
external
[
fn
]
executionCost
=
this
.
estimationObj
.
external
[
fn
]
}
else
if
(
node
.
attributes
.
visibility
===
'internal'
)
{
}
else
if
(
node
.
attributes
.
visibility
===
'internal'
)
{
...
@@ -171,16 +171,19 @@ class ContextualListener {
...
@@ -171,16 +171,19 @@ class ContextualListener {
return
contract
return
contract
}
}
_getInputParams
(
fnName
)
{
_getInputParams
(
node
)
{
var
abi
=
this
.
contract
.
abi
var
list
=
[]
for
(
var
i
in
abi
)
{
for
(
var
i
in
node
.
children
)
{
if
(
abi
[
i
].
name
===
fnName
)
{
if
(
node
.
children
[
i
].
name
===
'ParameterList'
)
{
var
inputs
=
abi
[
i
].
inputs
list
.
push
(
node
.
children
[
i
])
var
inputParams
=
inputs
.
length
?
'('
+
inputs
[
0
].
type
+
')'
:
'()'
break
break
}
}
}
}
return
inputParams
for
(
var
j
in
list
)
{
var
params
=
list
[
j
].
children
.
length
?
list
[
j
].
children
[
0
].
attributes
.
type
:
''
break
}
return
'('
+
params
+
')'
}
}
}
}
...
...
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