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
daaddd48
Commit
daaddd48
authored
Dec 11, 2017
by
ninabreznik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add if (node.name === FunctionDefinition)
parent
d9c50a8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
contextView.js
src/app/editor/contextView.js
+8
-7
No files found.
src/app/editor/contextView.js
View file @
daaddd48
...
...
@@ -172,16 +172,17 @@ class ContextView {
</div>`
function
showGasEstimation
()
{
var
result
=
self
.
_api
.
contextualListener
.
gasEstimation
(
node
)
var
executionCost
=
'Execution cost: '
+
result
.
executionCost
+
' gas'
var
codeDepositCost
=
'Code deposit cost: '
+
result
.
codeDepositCost
+
' gas'
var
estimatedGas
=
result
.
codeDepositCost
?
`
${
codeDepositCost
}
,
${
executionCost
}
`
:
`
${
executionCost
}
`
return
yo
`<div class=
${
css
.
gasEstimation
}
>
if
(
node
.
name
===
'FunctionDefinition'
)
{
var
result
=
self
.
_api
.
contextualListener
.
gasEstimation
(
node
)
var
executionCost
=
'Execution cost: '
+
result
.
executionCost
+
' gas'
var
codeDepositCost
=
'Code deposit cost: '
+
result
.
codeDepositCost
+
' gas'
var
estimatedGas
=
result
.
codeDepositCost
?
`
${
codeDepositCost
}
,
${
executionCost
}
`
:
`
${
executionCost
}
`
return
yo
`<div class=
${
css
.
gasEstimation
}
>
<img class=
${
css
.
gasStationIcon
}
title='Gas estimation' src='assets/img/gasStation_50.png'>
${
estimatedGas
}
</div>`
</div>`
}
}
}
}
...
...
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