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
f6fdab08
Commit
f6fdab08
authored
Sep 20, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log message when a library is deploying
parent
4d83fe8b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
txFormat.js
src/app/execution/txFormat.js
+11
-9
run-tab.js
src/app/tabs/run-tab.js
+2
-0
universal-dapp.js
src/universal-dapp.js
+2
-0
No files found.
src/app/execution/txFormat.js
View file @
f6fdab08
...
@@ -18,8 +18,9 @@ module.exports = {
...
@@ -18,8 +18,9 @@ module.exports = {
* @param {Object} params - input paramater of the function to call
* @param {Object} params - input paramater of the function to call
* @param {Object} udapp - udapp
* @param {Object} udapp - udapp
* @param {Function} callback - callback
* @param {Function} callback - callback
* @param {Function} callbackStep - callbackStep
*/
*/
buildData
:
function
(
contract
,
contracts
,
isConstructor
,
funAbi
,
params
,
udapp
,
callback
)
{
buildData
:
function
(
contract
,
contracts
,
isConstructor
,
funAbi
,
params
,
udapp
,
callback
,
callbackStep
)
{
var
funArgs
=
''
var
funArgs
=
''
try
{
try
{
funArgs
=
$
.
parseJSON
(
'['
+
params
+
']'
)
funArgs
=
$
.
parseJSON
(
'['
+
params
+
']'
)
...
@@ -54,7 +55,7 @@ module.exports = {
...
@@ -54,7 +55,7 @@ module.exports = {
bytecodeToDeploy
=
bytecode
+
dataHex
bytecodeToDeploy
=
bytecode
+
dataHex
return
callback
(
null
,
bytecodeToDeploy
)
return
callback
(
null
,
bytecodeToDeploy
)
}
}
})
}
,
callbackStep
)
return
return
}
else
{
}
else
{
dataHex
=
bytecodeToDeploy
+
dataHex
dataHex
=
bytecodeToDeploy
+
dataHex
...
@@ -67,7 +68,7 @@ module.exports = {
...
@@ -67,7 +68,7 @@ module.exports = {
atAddress
:
function
()
{},
atAddress
:
function
()
{},
linkBytecode
:
function
(
contract
,
contracts
,
udapp
,
callback
)
{
linkBytecode
:
function
(
contract
,
contracts
,
udapp
,
callback
,
callbackStep
)
{
var
bytecode
=
contract
.
bytecode
var
bytecode
=
contract
.
bytecode
if
(
bytecode
.
indexOf
(
'_'
)
<
0
)
{
if
(
bytecode
.
indexOf
(
'_'
)
<
0
)
{
return
callback
(
null
,
bytecode
)
return
callback
(
null
,
bytecode
)
...
@@ -95,22 +96,23 @@ module.exports = {
...
@@ -95,22 +96,23 @@ module.exports = {
bytecode
=
bytecode
.
replace
(
libLabel
,
hexAddress
)
bytecode
=
bytecode
.
replace
(
libLabel
,
hexAddress
)
}
}
contract
.
bytecode
=
bytecode
contract
.
bytecode
=
bytecode
this
.
linkBytecode
(
contract
,
contracts
,
udapp
,
callback
)
this
.
linkBytecode
(
contract
,
contracts
,
udapp
,
callback
,
callbackStep
)
})
}
,
callbackStep
)
},
},
deployLibrary
:
function
(
libraryName
,
library
,
udapp
,
callback
)
{
deployLibrary
:
function
(
libraryName
,
library
,
udapp
,
callback
,
callbackStep
)
{
var
address
=
library
.
address
var
address
=
library
.
address
if
(
address
)
{
if
(
address
)
{
return
callback
(
null
,
address
)
return
callback
(
null
,
address
)
}
}
var
bytecode
=
library
.
bytecode
var
bytecode
=
library
.
bytecode
if
(
bytecode
.
indexOf
(
'_'
)
>=
0
)
{
if
(
bytecode
.
indexOf
(
'_'
)
>=
0
)
{
this
.
linkBytecode
(
libraryName
,
(
err
,
bytecode
)
=>
{
this
.
linkBytecode
(
libraryName
,
library
,
udapp
,
(
err
,
bytecode
)
=>
{
if
(
err
)
callback
(
err
)
if
(
err
)
callback
(
err
)
else
this
.
deployLibrary
(
libraryName
,
library
,
udapp
,
callback
)
else
this
.
deployLibrary
(
libraryName
,
library
,
udapp
,
callback
,
callbackStep
)
})
}
,
callbackStep
)
}
else
{
}
else
{
callbackStep
(
`creation of library
${
libraryName
}
pending...`
)
udapp
.
runTx
({
data
:
bytecode
,
useCall
:
false
},
(
err
,
txResult
)
=>
{
udapp
.
runTx
({
data
:
bytecode
,
useCall
:
false
},
(
err
,
txResult
)
=>
{
if
(
err
)
{
if
(
err
)
{
return
callback
(
err
)
return
callback
(
err
)
...
...
src/app/tabs/run-tab.js
View file @
f6fdab08
...
@@ -323,6 +323,8 @@ function contractDropdown (appAPI, appEvents, instanceContainer) {
...
@@ -323,6 +323,8 @@ function contractDropdown (appAPI, appEvents, instanceContainer) {
}
else
{
}
else
{
appAPI
.
logMessage
(
`creation of
${
contractName
}
errored: `
+
error
)
appAPI
.
logMessage
(
`creation of
${
contractName
}
errored: `
+
error
)
}
}
},
(
msg
)
=>
{
appAPI
.
logMessage
(
msg
)
})
})
}
}
...
...
src/universal-dapp.js
View file @
f6fdab08
...
@@ -417,6 +417,8 @@ UniversalDApp.prototype.getCallButton = function (args) {
...
@@ -417,6 +417,8 @@ UniversalDApp.prototype.getCallButton = function (args) {
}
else
{
}
else
{
self
.
_api
.
logMessage
(
`
${
logMsg
}
errored:
${
error
}
`
)
self
.
_api
.
logMessage
(
`
${
logMsg
}
errored:
${
error
}
`
)
}
}
},
(
msg
)
=>
{
self
.
_api
.
logMessage
(
msg
)
})
})
}
}
...
...
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