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
719a77ad
Commit
719a77ad
authored
Oct 05, 2016
by
chriseth
Committed by
GitHub
Oct 05, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #239 from ethereum/remove-legacy
Remove legacy
parents
ab059338
c031bee9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
30 deletions
+1
-30
universal-dapp.js
src/universal-dapp.js
+1
-30
No files found.
src/universal-dapp.js
View file @
719a77ad
...
@@ -147,10 +147,6 @@ UniversalDApp.prototype.render = function () {
...
@@ -147,10 +147,6 @@ UniversalDApp.prototype.render = function () {
self
.
$el
.
append
(
$legend
);
self
.
$el
.
append
(
$legend
);
// NOTE: this might be used in the future
if
(
self
.
contracts
.
length
===
0
)
{
self
.
$el
.
append
(
self
.
getABIInputForm
());
}
else
{
for
(
var
c
in
self
.
contracts
)
{
for
(
var
c
in
self
.
contracts
)
{
var
$contractEl
=
$
(
'<div class="contract"/>'
);
var
$contractEl
=
$
(
'<div class="contract"/>'
);
...
@@ -165,7 +161,6 @@ UniversalDApp.prototype.render = function () {
...
@@ -165,7 +161,6 @@ UniversalDApp.prototype.render = function () {
}
}
self
.
$el
.
append
(
self
.
renderOutputModifier
(
self
.
contracts
[
c
].
name
,
$contractEl
));
self
.
$el
.
append
(
self
.
renderOutputModifier
(
self
.
contracts
[
c
].
name
,
$contractEl
));
}
}
}
return
self
.
$el
;
return
self
.
$el
;
};
};
...
@@ -180,31 +175,6 @@ UniversalDApp.prototype.getContractByName = function (contractName) {
...
@@ -180,31 +175,6 @@ UniversalDApp.prototype.getContractByName = function (contractName) {
return
null
;
return
null
;
};
};
UniversalDApp
.
prototype
.
getABIInputForm
=
function
(
cb
)
{
var
self
=
this
;
var
$el
=
$
(
'<div class="udapp-setup" />'
);
var
$jsonInput
=
$
(
'<textarea class="json" placeholder=
\'
[ { "name": name, "bytecode": bytecode, "interface": abi }, { ... } ]
\'
/>'
);
var
$createButton
=
$
(
'<button class="udapp-create"/>'
).
text
(
'Render ABI'
);
$createButton
.
click
(
function
(
ev
)
{
var
contracts
=
$
.
parseJSON
(
$jsonInput
.
val
());
if
(
cb
)
{
var
err
=
null
;
var
dapp
=
null
;
try
{
dapp
=
new
UniversalDApp
(
contracts
,
self
.
options
);
}
catch
(
e
)
{
err
=
e
;
}
cb
(
err
,
dapp
);
}
else
{
self
.
contracts
=
contracts
;
self
.
$el
.
empty
().
append
(
self
.
render
());
}
});
$el
.
append
(
$jsonInput
).
append
(
$createButton
);
return
$el
;
};
UniversalDApp
.
prototype
.
getCreateInterface
=
function
(
$container
,
contract
)
{
UniversalDApp
.
prototype
.
getCreateInterface
=
function
(
$container
,
contract
)
{
var
self
=
this
;
var
self
=
this
;
var
$createInterface
=
$
(
'<div class="create"/>'
);
var
$createInterface
=
$
(
'<div class="create"/>'
);
...
@@ -381,6 +351,7 @@ UniversalDApp.prototype.getInstanceInterface = function (contract, address, $tar
...
@@ -381,6 +351,7 @@ UniversalDApp.prototype.getInstanceInterface = function (contract, address, $tar
return
$createInterface
;
return
$createInterface
;
};
};
// either return the supplied constructor or a mockup (we assume everything can be instantiated)
UniversalDApp
.
prototype
.
getConstructorInterface
=
function
(
abi
)
{
UniversalDApp
.
prototype
.
getConstructorInterface
=
function
(
abi
)
{
var
funABI
=
{
'name'
:
''
,
'inputs'
:
[],
'type'
:
'constructor'
,
'outputs'
:
[]
};
var
funABI
=
{
'name'
:
''
,
'inputs'
:
[],
'type'
:
'constructor'
,
'outputs'
:
[]
};
for
(
var
i
=
0
;
i
<
abi
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
abi
.
length
;
i
++
)
{
...
...
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