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
07d2e60f
Commit
07d2e60f
authored
Jan 04, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix using compilersartefacts
parent
4f8c3099
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
20 deletions
+11
-20
app.js
src/app.js
+1
-1
righthand-panel.js
src/app/panels/righthand-panel.js
+1
-1
run-tab.js
src/app/tabs/run-tab.js
+1
-1
dropdownlogic.js
src/app/tabs/runTab/model/dropdownlogic.js
+2
-10
universal-dapp-ui.js
src/universal-dapp-ui.js
+4
-4
universal-dapp.js
src/universal-dapp.js
+2
-3
No files found.
src/app.js
View file @
07d2e60f
...
...
@@ -313,7 +313,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
registry
.
put
({
api
:
self
.
_components
.
compilersArtefacts
,
name
:
'compilersartefacts'
})
// ----------------- UniversalDApp -----------------
var
udapp
=
new
UniversalDApp
(
registry
.
get
(
'config'
).
api
)
var
udapp
=
new
UniversalDApp
(
registry
)
// TODO: to remove when possible
registry
.
put
({
api
:
udapp
,
name
:
'udapp'
})
udapp
.
event
.
register
(
'transactionBroadcasted'
,
(
txhash
,
networkName
)
=>
{
...
...
src/app/panels/righthand-panel.js
View file @
07d2e60f
...
...
@@ -47,7 +47,7 @@ const css = csjs`
`
class
RighthandPanel
{
constructor
(
localRegistry
)
{
constructor
(
{
pluginManager
,
tabs
},
localRegistry
)
{
const
self
=
this
self
.
_components
=
{}
self
.
_components
.
registry
=
localRegistry
||
globalRegistry
...
...
src/app/tabs/run-tab.js
View file @
07d2e60f
...
...
@@ -9,7 +9,7 @@ var css = require('./styles/run-tab-styles')
var
Settings
=
require
(
'./runTab/model/settings.js'
)
var
SettingsUI
=
require
(
'./runTab/settings.js'
)
var
DropdownLogic
=
require
(
'./runTab/model/dropdown
L
ogic.js'
)
var
DropdownLogic
=
require
(
'./runTab/model/dropdown
l
ogic.js'
)
var
ContractDropdownUI
=
require
(
'./runTab/contractDropdown.js'
)
var
Recorder
=
require
(
'./runTab/model/recorder.js'
)
...
...
src/app/tabs/runTab/model/dropdownlogic.js
View file @
07d2e60f
...
...
@@ -30,19 +30,11 @@ class DropdownLogic {
listenToCompilationEvents
()
{
this
.
pluginManager
.
event
.
register
(
'sendCompilationResult'
,
(
file
,
source
,
languageVersion
,
data
)
=>
{
// TODO check whether the tab is configured
let
compiler
=
new
CompilerAbstract
(
languageVersion
,
data
)
let
compiler
=
new
CompilerAbstract
(
languageVersion
,
data
,
source
)
this
.
compilersArtefacts
[
languageVersion
]
=
compiler
this
.
compilersArtefacts
[
'__last'
]
=
compiler
this
.
event
.
trigger
(
'newlyCompiled'
,
[
true
,
data
,
source
,
compiler
,
languageVersion
])
})
this
.
compiler
.
event
.
register
(
'compilationFinished'
,
(
success
,
data
,
source
)
=>
{
var
name
=
'solidity'
let
compiler
=
new
CompilerAbstract
(
name
,
data
)
this
.
compilersArtefacts
[
name
]
=
compiler
this
.
compilersArtefacts
[
'__last'
]
=
compiler
this
.
event
.
trigger
(
'newlyCompiled'
,
[
success
,
data
,
source
,
this
.
compiler
,
name
])
})
}
loadContractFromAddress
(
address
,
confirmCb
,
cb
)
{
...
...
@@ -278,7 +270,7 @@ class DropdownLogic {
this
.
filePanel
.
compilerMetadata
().
deployMetadataOf
(
selectedContract
.
name
,
(
error
,
contractMetadata
)
=>
{
if
(
error
)
return
statusCb
(
`creation of
${
selectedContract
.
name
}
errored: `
+
error
)
if
(
!
contractMetadata
||
(
contractMetadata
&&
contractMetadata
.
autoDeployLib
))
{
return
txFormat
.
buildData
(
selectedContract
.
name
,
selectedContract
.
object
,
selectedContract
.
compiler
.
getContracts
()
,
true
,
constructor
,
args
,
(
error
,
data
)
=>
{
return
txFormat
.
buildData
(
selectedContract
.
name
,
selectedContract
.
object
,
this
.
compilersArtefacts
[
'__last'
].
getData
().
contracts
,
true
,
constructor
,
args
,
(
error
,
data
)
=>
{
if
(
error
)
return
statusCb
(
`creation of
${
selectedContract
.
name
}
errored: `
+
error
)
statusCb
(
`creation of
${
selectedContract
.
name
}
pending...`
)
...
...
src/universal-dapp-ui.js
View file @
07d2e60f
...
...
@@ -26,9 +26,9 @@ function UniversalDAppUI (udapp, registry) {
this
.
registry
=
registry
this
.
compilerData
=
{
contractsDetails
:
{}}
registry
.
get
(
'compiler'
).
api
.
event
.
register
(
'compilationFinished'
,
(
success
,
data
,
source
)
=>
{
this
.
compilerData
.
contractsDetails
=
success
&&
data
?
data
.
contracts
:
{}
}
)
this
.
_deps
=
{
compilersartefacts
:
registry
.
get
(
'compilersartefacts'
).
api
}
}
function
decodeResponseToTreeView
(
response
,
fnabi
)
{
...
...
@@ -220,7 +220,7 @@ UniversalDAppUI.prototype.getCallButton = function (args) {
}
// contractsDetails is used to resolve libraries
txFormat
.
buildData
(
args
.
contractName
,
args
.
contractAbi
,
self
.
compilerData
.
contractsDetail
s
,
false
,
args
.
funABI
,
args
.
funABI
.
type
!==
'fallback'
?
value
:
''
,
(
error
,
data
)
=>
{
txFormat
.
buildData
(
args
.
contractName
,
args
.
contractAbi
,
self
.
_deps
.
compilersartefacts
[
'__last'
].
getData
().
contract
s
,
false
,
args
.
funABI
,
args
.
funABI
.
type
!==
'fallback'
?
value
:
''
,
(
error
,
data
)
=>
{
if
(
!
error
)
{
if
(
!
args
.
funABI
.
constant
)
{
self
.
registry
.
get
(
'logCallback'
).
api
(
`
${
logMsg
}
pending ... `
)
...
...
src/universal-dapp.js
View file @
07d2e60f
...
...
@@ -8,12 +8,11 @@ var txHelper = remixLib.execution.txHelper
var
EventManager
=
remixLib
.
EventManager
var
executionContext
=
remixLib
.
execution
.
executionContext
function
UniversalDApp
(
config
)
{
function
UniversalDApp
(
registry
)
{
this
.
event
=
new
EventManager
()
var
self
=
this
self
.
_deps
=
{
config
:
globalRegistry
.
get
(
'config'
).
api
,
compiler
:
globalRegistry
.
get
(
'compiler'
).
api
config
:
registry
.
get
(
'config'
).
api
}
self
.
_txRunnerAPI
=
{
config
:
self
.
_deps
.
config
,
...
...
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