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
c9a27536
Commit
c9a27536
authored
Dec 01, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add renderInstanceFromABI
parent
c77be8e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
universal-dapp.js
src/universal-dapp.js
+7
-2
No files found.
src/universal-dapp.js
View file @
c9a27536
...
...
@@ -277,11 +277,16 @@ UniversalDApp.prototype.getBalance = function (address, cb) {
}
}
UniversalDApp
.
prototype
.
renderInstance
=
function
(
contract
,
address
,
contractName
)
{
var
abi
=
txHelper
.
sortAbiFunction
(
contract
.
abi
)
return
this
.
renderInstanceFromABI
(
abi
,
address
,
contractName
)
}
// TODO this function was named before "appendChild".
// this will render an instance: contract name, contract address, and all the public functions
// basically this has to be called for the "atAddress" (line 393) and when a contract creation succeed
// this returns a DOM element
UniversalDApp
.
prototype
.
renderInstance
=
function
(
contract
,
address
,
contractName
)
{
UniversalDApp
.
prototype
.
renderInstance
FromABI
=
function
(
contractABI
,
address
,
contractName
)
{
var
self
=
this
function
remove
()
{
instance
.
remove
()
}
...
...
@@ -305,7 +310,7 @@ UniversalDApp.prototype.renderInstance = function (contract, address, contractNa
$
(
instance
).
toggleClass
(
`
${
css
.
hidesub
}
`
)
}
var
abi
=
txHelper
.
sortAbiFunction
(
contract
abi
)
var
abi
=
txHelper
.
sortAbiFunction
(
contract
ABI
)
instance
.
appendChild
(
title
)
...
...
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