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
23a412df
Commit
23a412df
authored
Oct 08, 2015
by
chriseth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formatting.
parent
c6062c53
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
universal-dapp.js
libs/universal-dapp.js
+1
-5
No files found.
libs/universal-dapp.js
View file @
23a412df
...
@@ -249,7 +249,7 @@ UniversalDApp.prototype.getCallButton = function(args) {
...
@@ -249,7 +249,7 @@ UniversalDApp.prototype.getCallButton = function(args) {
}
}
});
});
else
else
$result
.
replaceWe
th
(
getOutput
(
$
(
'<span>Contract needs to be linked to a library, this is only supported in the JavaScript VM for now.</span>'
)));
$result
.
replaceWi
th
(
getOutput
(
$
(
'<span>Contract needs to be linked to a library, this is only supported in the JavaScript VM for now.</span>'
)));
return
;
return
;
}
else
}
else
data
=
args
.
bytecode
+
data
.
slice
(
8
);
data
=
args
.
bytecode
+
data
.
slice
(
8
);
...
@@ -316,7 +316,6 @@ UniversalDApp.prototype.getCallButton = function(args) {
...
@@ -316,7 +316,6 @@ UniversalDApp.prototype.getCallButton = function(args) {
}
}
UniversalDApp
.
prototype
.
linkBytecode
=
function
(
contractName
,
cb
)
{
UniversalDApp
.
prototype
.
linkBytecode
=
function
(
contractName
,
cb
)
{
console
.
log
(
"linking "
+
contractName
);
var
bytecode
=
this
.
getContractByName
(
contractName
).
bytecode
;
var
bytecode
=
this
.
getContractByName
(
contractName
).
bytecode
;
if
(
bytecode
.
indexOf
(
'_'
)
<
0
)
if
(
bytecode
.
indexOf
(
'_'
)
<
0
)
return
cb
(
null
,
bytecode
);
return
cb
(
null
,
bytecode
);
...
@@ -341,7 +340,6 @@ console.log("linking " + contractName);
...
@@ -341,7 +340,6 @@ console.log("linking " + contractName);
};
};
UniversalDApp
.
prototype
.
deployLibrary
=
function
(
contractName
,
cb
)
{
UniversalDApp
.
prototype
.
deployLibrary
=
function
(
contractName
,
cb
)
{
console
.
log
(
"deploying librari "
+
contractName
);
if
(
this
.
getContractByName
(
contractName
).
address
)
if
(
this
.
getContractByName
(
contractName
).
address
)
return
cb
(
null
,
this
.
getContractByName
(
contractName
).
address
);
return
cb
(
null
,
this
.
getContractByName
(
contractName
).
address
);
var
self
=
this
;
var
self
=
this
;
...
@@ -352,9 +350,7 @@ console.log("deploying librari " + contractName);
...
@@ -352,9 +350,7 @@ console.log("deploying librari " + contractName);
else
self
.
deployLibrary
(
contractName
,
cb
);
else
self
.
deployLibrary
(
contractName
,
cb
);
});
});
else
{
else
{
console
.
log
(
cb
);
this
.
runTx
(
bytecode
,
{
abi
:
{
constant
:
false
},
bytecode
:
bytecode
},
function
(
err
,
result
)
{
this
.
runTx
(
bytecode
,
{
abi
:
{
constant
:
false
},
bytecode
:
bytecode
},
function
(
err
,
result
)
{
console
.
log
(
cb
);
if
(
err
)
return
cb
(
err
);
if
(
err
)
return
cb
(
err
);
self
.
getContractByName
(
contractName
).
address
=
result
.
createdAddress
;
self
.
getContractByName
(
contractName
).
address
=
result
.
createdAddress
;
cb
(
err
,
result
.
createdAddress
);
cb
(
err
,
result
.
createdAddress
);
...
...
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