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
1a38fbfb
Unverified
Commit
1a38fbfb
authored
Dec 13, 2017
by
yann300
Committed by
GitHub
Dec 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #942 from ethereum/fixInput
Misc fixes
parents
a646f103
19844b14
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
16 deletions
+22
-16
txExecution.js
src/app/execution/txExecution.js
+2
-2
txFormat.js
src/app/execution/txFormat.js
+1
-1
txListener.js
src/app/execution/txListener.js
+1
-1
terminal.js
src/app/panels/terminal.js
+0
-4
run-tab.js
src/app/tabs/run-tab.js
+4
-3
testRecorder.js
test-browser/tests/units/testRecorder.js
+14
-5
No files found.
src/app/execution/txExecution.js
View file @
1a38fbfb
...
...
@@ -57,13 +57,13 @@ module.exports = {
var
error
=
`VM error:
${
txResult
.
result
.
vm
.
exceptionError
}
.\n`
var
msg
if
(
txResult
.
result
.
vm
.
exceptionError
===
errorCode
.
INVALID_OPCODE
)
{
msg
=
`\t
The constructor should be payable if you send value.
\n\tThe execution might have thrown.\n`
msg
=
`\t\n\tThe execution might have thrown.\n`
ret
.
error
=
true
}
else
if
(
txResult
.
result
.
vm
.
exceptionError
===
errorCode
.
OUT_OF_GAS
)
{
msg
=
`\tThe transaction ran out of gas. Please increase the Gas Limit.\n`
ret
.
error
=
true
}
else
if
(
txResult
.
result
.
vm
.
exceptionError
===
errorCode
.
REVERT
)
{
msg
=
`\tThe transaction has been reverted to the initial state.\n`
msg
=
`\tThe transaction has been reverted to the initial state.\n
Note: The constructor should be payable if you send value.
`
ret
.
error
=
true
}
else
if
(
txResult
.
result
.
vm
.
exceptionError
===
errorCode
.
STATIC_STATE_CHANGE
)
{
msg
=
`\tState changes is not allowed in Static Call context\n`
...
...
src/app/execution/txFormat.js
View file @
1a38fbfb
...
...
@@ -138,7 +138,7 @@ module.exports = {
}
var
bytecode
=
library
.
evm
.
bytecode
.
object
if
(
bytecode
.
indexOf
(
'_'
)
>=
0
)
{
this
.
linkBytecode
(
library
Name
,
contracts
,
udapp
,
(
err
,
bytecode
)
=>
{
this
.
linkBytecode
(
library
,
contracts
,
udapp
,
(
err
,
bytecode
)
=>
{
if
(
err
)
callback
(
err
)
else
this
.
deployLibrary
(
libraryName
,
libraryShortName
,
library
,
contracts
,
udapp
,
callback
,
callbackStep
)
},
callbackStep
)
...
...
src/app/execution/txListener.js
View file @
1a38fbfb
...
...
@@ -217,7 +217,7 @@ class TxListener {
var
contracts
=
this
.
_api
.
contracts
()
if
(
!
contracts
)
return
cb
()
var
contractName
if
(
!
tx
.
to
)
{
if
(
!
tx
.
to
||
tx
.
to
===
'0x0'
)
{
// testrpc returns 0x0 in that case
// contract creation / resolve using the creation bytes code
// if web3: we have to call getTransactionReceipt to get the created address
// if VM: created address already included
...
...
src/app/panels/terminal.js
View file @
1a38fbfb
...
...
@@ -67,9 +67,6 @@ var css = csjs`
display : flex;
flex-direction : column;
height : 100%;
padding-left : 5px;
padding-right : 5px;
padding-bottom : 3px;
overflow-y : auto;
font-family : monospace;
}
...
...
@@ -129,7 +126,6 @@ var css = csjs`
word-break : break-all;
outline : none;
font-family : monospace;
font-family: FontAwesome;
}
.search {
display: flex;
...
...
src/app/tabs/run-tab.js
View file @
1a38fbfb
...
...
@@ -214,7 +214,7 @@ function runTab (container, appAPI, appEvents, opts) {
var
el
=
yo
`
<div class="
${
css
.
runTabView
}
" id="runTabView">
${
settings
(
appAPI
,
appEvents
)}
${
settings
(
container
,
appAPI
,
appEvents
)}
${
contractDropdown
(
events
,
appAPI
,
appEvents
,
instanceContainer
)}
${
pendingTxsContainer
}
${
instanceContainer
}
...
...
@@ -243,7 +243,7 @@ function runTab (container, appAPI, appEvents, opts) {
setInterval
(()
=>
{
updateAccountBalances
(
container
,
appAPI
)
updatePendingTxs
(
container
,
appAPI
)
},
5
00
)
},
100
00
)
events
.
register
(
'clearInstance'
,
()
=>
{
instanceContainer
.
innerHTML
=
''
// clear the instances list
...
...
@@ -498,7 +498,7 @@ function contractDropdown (events, appAPI, appEvents, instanceContainer) {
/* ------------------------------------------------
section SETTINGS: Environment, Account, Gas, Value
------------------------------------------------ */
function
settings
(
appAPI
,
appEvents
)
{
function
settings
(
container
,
appAPI
,
appEvents
)
{
// SETTINGS HTML
var
net
=
yo
`<span class=
${
css
.
network
}
></span>`
const
updateNetwork
=
()
=>
{
...
...
@@ -574,6 +574,7 @@ function settings (appAPI, appEvents) {
appEvents
.
udapp
.
register
(
'transactionExecuted'
,
(
error
,
from
,
to
,
data
,
lookupOnly
,
txResult
)
=>
{
if
(
error
)
return
if
(
!
lookupOnly
)
el
.
querySelector
(
'#value'
).
value
=
'0'
updateAccountBalances
(
container
,
appAPI
)
})
return
el
...
...
test-browser/tests/units/testRecorder.js
View file @
1a38fbfb
...
...
@@ -2,6 +2,7 @@
var
contractHelper
=
require
(
'../../helpers/contracts'
)
module
.
exports
=
{
'@disabled'
:
true
,
// run by compiling.j
'@sources'
:
function
()
{
return
sources
},
...
...
@@ -22,8 +23,16 @@ module.exports = {
.
click
(
'i[class^="clearinstance"]'
)
.
perform
((
client
,
done
)
=>
{
contractHelper
.
testContracts
(
browser
,
'testRecorder.sol'
,
sources
[
0
][
'browser/testRecorder.sol'
],
[
'testRecorder'
],
function
()
{
contractHelper
.
createContract
(
browser
,
'12'
,
function
()
{
browser
.
clickFunction
(
'set - transact (not payable)'
,
{
types
:
'uint256 _p'
,
values
:
'34'
})
done
()
})
})
.
perform
((
client
,
done
)
=>
{
contractHelper
.
createContract
(
browser
,
'12'
,
function
()
{
done
()
})
})
.
perform
((
client
,
done
)
=>
{
browser
.
clickFunction
(
'set - transact (not payable)'
,
{
types
:
'uint256 _p'
,
values
:
'34'
})
.
click
(
'i.savetransaction'
).
modalFooterOKClick
().
getEditorValue
(
function
(
result
)
{
var
parsed
=
JSON
.
parse
(
result
)
browser
.
assert
.
equal
(
JSON
.
stringify
(
parsed
.
transactions
[
0
].
record
.
parameters
),
JSON
.
stringify
(
scenario
.
transactions
[
0
].
record
.
parameters
))
...
...
@@ -36,10 +45,10 @@ module.exports = {
browser
.
assert
.
equal
(
JSON
.
stringify
(
parsed
.
transactions
[
1
].
record
.
name
),
JSON
.
stringify
(
scenario
.
transactions
[
1
].
record
.
name
))
browser
.
assert
.
equal
(
JSON
.
stringify
(
parsed
.
transactions
[
1
].
record
.
type
),
JSON
.
stringify
(
scenario
.
transactions
[
1
].
record
.
type
))
browser
.
assert
.
equal
(
JSON
.
stringify
(
parsed
.
transactions
[
1
].
record
.
from
),
JSON
.
stringify
(
scenario
.
transactions
[
1
].
record
.
from
))
callback
()
done
()
})
})
}
)
}).
perform
(()
=>
{
callback
(
)
})
})
}
...
...
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