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
e5b1df07
Commit
e5b1df07
authored
Feb 06, 2018
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove execution tx-helper from UI
parent
8f49c8fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
9 deletions
+20
-9
universal-dapp-ui.js
src/universal-dapp-ui.js
+4
-8
universal-dapp.js
src/universal-dapp.js
+16
-1
No files found.
src/universal-dapp-ui.js
View file @
e5b1df07
...
@@ -2,14 +2,13 @@
...
@@ -2,14 +2,13 @@
'use strict'
'use strict'
var
$
=
require
(
'jquery'
)
var
$
=
require
(
'jquery'
)
var
remixLib
=
require
(
'remix-lib'
)
var
yo
=
require
(
'yo-yo'
)
var
yo
=
require
(
'yo-yo'
)
var
txHelper
=
require
(
'./app/execution/txHelper'
)
var
helper
=
require
(
'./lib/helper'
)
var
helper
=
require
(
'./lib/helper'
)
var
copyToClipboard
=
require
(
'./app/ui/copy-to-clipboard'
)
var
copyToClipboard
=
require
(
'./app/ui/copy-to-clipboard'
)
// -------------- styling ----------------------
// -------------- styling ----------------------
var
csjs
=
require
(
'csjs-inject'
)
var
csjs
=
require
(
'csjs-inject'
)
var
remixLib
=
require
(
'remix-lib'
)
var
styleGuide
=
remixLib
.
ui
.
themeChooser
var
styleGuide
=
remixLib
.
ui
.
themeChooser
var
styles
=
styleGuide
.
chooser
()
var
styles
=
styleGuide
.
chooser
()
...
@@ -155,7 +154,7 @@ UniversalDAppUI.prototype.reset = function (contracts, transactionContextAPI) {
...
@@ -155,7 +154,7 @@ UniversalDAppUI.prototype.reset = function (contracts, transactionContextAPI) {
}
}
UniversalDAppUI
.
prototype
.
renderInstance
=
function
(
contract
,
address
,
contractName
)
{
UniversalDAppUI
.
prototype
.
renderInstance
=
function
(
contract
,
address
,
contractName
)
{
var
abi
=
t
xHelper
.
sortAbiFunction
(
contract
.
abi
)
var
abi
=
t
his
.
udapp
.
getABI
(
contract
)
return
this
.
renderInstanceFromABI
(
abi
,
address
,
contractName
)
return
this
.
renderInstanceFromABI
(
abi
,
address
,
contractName
)
}
}
...
@@ -190,7 +189,7 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address
...
@@ -190,7 +189,7 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address
instance
.
appendChild
(
title
)
instance
.
appendChild
(
title
)
// Add the fallback function
// Add the fallback function
var
fallback
=
txHelper
.
getFallbackInterface
(
contractABI
)
var
fallback
=
self
.
udapp
.
getFallbackInterface
(
contractABI
)
if
(
fallback
)
{
if
(
fallback
)
{
instance
.
appendChild
(
this
.
getCallButton
({
instance
.
appendChild
(
this
.
getCallButton
({
funABI
:
fallback
,
funABI
:
fallback
,
...
@@ -224,10 +223,7 @@ UniversalDAppUI.prototype.getCallButton = function (args) {
...
@@ -224,10 +223,7 @@ UniversalDAppUI.prototype.getCallButton = function (args) {
// args.contractName [constr only]
// args.contractName [constr only]
var
lookupOnly
=
args
.
funABI
.
constant
var
lookupOnly
=
args
.
funABI
.
constant
var
inputs
=
''
var
inputs
=
self
.
udapp
.
getInputs
(
args
.
funABI
)
if
(
args
.
funABI
.
inputs
)
{
inputs
=
txHelper
.
inputParametersDeclarationToString
(
args
.
funABI
.
inputs
)
}
var
inputField
=
yo
`<input></input>`
var
inputField
=
yo
`<input></input>`
inputField
.
setAttribute
(
'placeholder'
,
inputs
)
inputField
.
setAttribute
(
'placeholder'
,
inputs
)
inputField
.
setAttribute
(
'title'
,
inputs
)
inputField
.
setAttribute
(
'title'
,
inputs
)
...
...
src/universal-dapp.js
View file @
e5b1df07
...
@@ -8,7 +8,7 @@ var EventManager = remixLib.EventManager
...
@@ -8,7 +8,7 @@ var EventManager = remixLib.EventManager
var
crypto
=
require
(
'crypto'
)
var
crypto
=
require
(
'crypto'
)
var
TxRunner
=
require
(
'./app/execution/txRunner'
)
var
TxRunner
=
require
(
'./app/execution/txRunner'
)
var
txFormat
=
require
(
'./app/execution/txFormat'
)
var
txFormat
=
require
(
'./app/execution/txFormat'
)
//
var txHelper = require('./app/execution/txHelper')
var
txHelper
=
require
(
'./app/execution/txHelper'
)
var
txExecution
=
require
(
'./app/execution/txExecution'
)
var
txExecution
=
require
(
'./app/execution/txExecution'
)
var
executionContext
=
require
(
'./execution-context'
)
var
executionContext
=
require
(
'./execution-context'
)
var
modalCustom
=
require
(
'./app/ui/modal-dialog-custom'
)
var
modalCustom
=
require
(
'./app/ui/modal-dialog-custom'
)
...
@@ -187,6 +187,21 @@ UniversalDAppModel.prototype.context = function () {
...
@@ -187,6 +187,21 @@ UniversalDAppModel.prototype.context = function () {
return
(
executionContext
.
isVM
()
?
'memory'
:
'blockchain'
)
return
(
executionContext
.
isVM
()
?
'memory'
:
'blockchain'
)
}
}
UniversalDAppModel
.
prototype
.
getABI
=
function
(
contract
)
{
return
txHelper
.
sortAbiFunction
(
contract
.
abi
)
}
UniversalDAppModel
.
prototype
.
getFallbackInterface
=
function
(
contractABI
)
{
return
txHelper
.
getFallbackInterface
(
contractABI
)
}
UniversalDAppModel
.
prototype
.
getInputs
=
function
(
funABI
)
{
if
(
!
funABI
.
inputs
)
{
return
''
}
return
txHelper
.
inputParametersDeclarationToString
(
funABI
.
inputs
)
}
function
execute
(
pipeline
,
env
,
callback
)
{
function
execute
(
pipeline
,
env
,
callback
)
{
function
next
(
err
,
env
)
{
function
next
(
err
,
env
)
{
if
(
err
)
return
callback
(
err
)
if
(
err
)
return
callback
(
err
)
...
...
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