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
1530f69a
Commit
1530f69a
authored
Nov 07, 2016
by
chriseth
Committed by
GitHub
Nov 07, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #305 from ethereum/readonly-fixes
fix safari/ie - attempted to assign to readonly property
parents
4741fc20
4db9d6cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
universal-dapp.js
src/universal-dapp.js
+16
-10
No files found.
src/universal-dapp.js
View file @
1530f69a
...
...
@@ -542,20 +542,21 @@ UniversalDApp.prototype.getCallButton = function (args) {
}
var
decoded
self
.
runTx
({
to
:
args
.
address
,
data
:
data
,
useCall
:
args
.
abi
.
constant
&&
!
isConstructor
},
function
(
err
,
result
)
{
self
.
runTx
({
to
:
args
.
address
,
data
:
data
,
useCall
:
args
.
abi
.
constant
&&
!
isConstructor
},
function
(
err
,
txResult
)
{
var
result
=
txResult
.
result
if
(
err
)
{
replaceOutput
(
$result
,
$
(
'<span/>'
).
text
(
err
).
addClass
(
'error'
))
// VM only
}
else
if
(
self
.
executionContext
.
isVM
()
&&
result
.
vm
.
exception
===
0
&&
result
.
vm
.
exceptionError
)
{
replaceOutput
(
$result
,
$
(
'<span/>'
).
text
(
'VM Exception: '
+
result
.
vm
.
exceptionError
).
addClass
(
'error'
))
$result
.
append
(
getDebugTransaction
(
r
esult
))
$result
.
append
(
getDebugTransaction
(
txR
esult
))
// VM only
}
else
if
(
self
.
executionContext
.
isVM
()
&&
result
.
vm
.
return
===
undefined
)
{
replaceOutput
(
$result
,
$
(
'<span/>'
).
text
(
'Exception during execution.'
).
addClass
(
'error'
))
$result
.
append
(
getDebugTransaction
(
r
esult
))
$result
.
append
(
getDebugTransaction
(
txR
esult
))
}
else
if
(
isConstructor
)
{
replaceOutput
(
$result
,
getGasUsedOutput
(
result
,
result
.
vm
))
$result
.
append
(
getDebugTransaction
(
r
esult
))
$result
.
append
(
getDebugTransaction
(
txR
esult
))
args
.
appendFunctions
(
self
.
executionContext
.
isVM
()
?
result
.
createdAddress
:
result
.
contractAddress
)
}
else
if
(
self
.
executionContext
.
isVM
())
{
var
outputObj
=
'0x'
+
result
.
vm
.
return
.
toString
(
'hex'
)
...
...
@@ -567,9 +568,9 @@ UniversalDApp.prototype.getCallButton = function (args) {
$result
.
append
(
decoded
)
}
if
(
args
.
abi
.
constant
)
{
$result
.
append
(
getDebugCall
(
r
esult
))
$result
.
append
(
getDebugCall
(
txR
esult
))
}
else
{
$result
.
append
(
getDebugTransaction
(
r
esult
))
$result
.
append
(
getDebugTransaction
(
txR
esult
))
}
}
else
if
(
args
.
abi
.
constant
&&
!
isConstructor
)
{
clearOutput
(
$result
)
...
...
@@ -582,7 +583,7 @@ UniversalDApp.prototype.getCallButton = function (args) {
}
else
{
clearOutput
(
$result
)
$result
.
append
(
getReturnOutput
(
result
)).
append
(
getGasUsedOutput
(
result
))
$result
.
append
(
getDebugTransaction
(
r
esult
))
$result
.
append
(
getDebugTransaction
(
txR
esult
))
}
})
}
...
...
@@ -673,7 +674,9 @@ function tryTillResponse (web3, txhash, done) {
// Try again with a bit of delay
setTimeout
(
function
()
{
tryTillResponse
(
web3
,
txhash
,
done
)
},
500
)
}
else
{
done
(
err
,
address
)
done
(
err
,
{
result
:
address
})
}
})
}
...
...
@@ -827,8 +830,11 @@ UniversalDApp.prototype.rawRunTx = function (args, cb) {
++
self
.
blockNumber
}
self
.
vm
.
runTx
({
block
:
block
,
tx
:
tx
,
skipBalance
:
true
,
skipNonce
:
true
},
function
(
err
,
result
)
{
result
.
transactionHash
=
self
.
txdebugger
.
web3
().
releaseCurrentHash
()
// used to keep track of the transaction
cb
(
err
,
result
)
var
transactionHash
=
self
.
txdebugger
.
web3
().
releaseCurrentHash
()
// used to keep track of the transaction
cb
(
err
,
{
result
:
result
,
transactionHash
:
transactionHash
})
})
}
catch
(
e
)
{
cb
(
e
,
null
)
...
...
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