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
1732e9e7
Commit
1732e9e7
authored
Jan 02, 2020
by
Iuri Matias
Committed by
yann300
Feb 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abstract udapp plugin so it maintains backwards compatibilify with the plugin api
parent
18cadabd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
3 deletions
+40
-3
app.js
src/app.js
+3
-0
run-tab.js
src/app/udapp/run-tab.js
+2
-2
pluginUDapp.js
src/blockchain/pluginUDapp.js
+35
-0
universalDapp.js
src/blockchain/universalDapp.js
+0
-1
No files found.
src/app.js
View file @
1732e9e7
...
...
@@ -23,6 +23,7 @@ var CompilerMetadata = require('./app/files/compiler-metadata')
var
CompilerImport
=
require
(
'./app/compiler/compiler-imports'
)
const
Blockchain
=
require
(
'./blockchain/blockchain.js'
)
const
PluginUDapp
=
require
(
'./blockchain/pluginUDapp.js'
)
const
PluginManagerComponent
=
require
(
'./app/components/plugin-manager-component'
)
const
CompilersArtefacts
=
require
(
'./app/compiler/compiler-artefacts'
)
...
...
@@ -223,6 +224,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
registry
.
put
({
api
:
fileManager
,
name
:
'filemanager'
})
const
blockchain
=
new
Blockchain
(
registry
.
get
(
'config'
).
api
)
const
pluginUdapp
=
new
PluginUDapp
(
blockchain
)
// ----------------- compilation metadata generation servive ----------------------------
const
compilerMetadataGenerator
=
new
CompilerMetadata
(
blockchain
,
fileManager
,
registry
.
get
(
'config'
).
api
)
...
...
@@ -295,6 +297,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
)
const
run
=
new
RunTab
(
blockchain
,
pluginUdapp
,
registry
.
get
(
'config'
).
api
,
registry
.
get
(
'filemanager'
).
api
,
registry
.
get
(
'editor'
).
api
,
...
...
src/app/udapp/run-tab.js
View file @
1732e9e7
...
...
@@ -33,8 +33,8 @@ const profile = {
export
class
RunTab
extends
LibraryPlugin
{
constructor
(
blockchain
,
config
,
fileManager
,
editor
,
filePanel
,
compilersArtefacts
,
networkModule
,
mainView
)
{
super
(
blockchain
.
ud
app
,
profile
)
constructor
(
blockchain
,
pluginUDapp
,
config
,
fileManager
,
editor
,
filePanel
,
compilersArtefacts
,
networkModule
,
mainView
)
{
super
(
pluginUD
app
,
profile
)
this
.
event
=
new
EventManager
()
this
.
config
=
config
this
.
blockchain
=
blockchain
...
...
src/blockchain/pluginUDapp.js
0 → 100644
View file @
1732e9e7
const
{
EventEmitter
}
=
require
(
'events'
)
class
PluginUdapp
{
constructor
(
blockchain
)
{
this
.
blockchain
=
blockchain
this
.
events
=
new
EventEmitter
()
this
.
setupEvents
()
}
setupEvents
()
{
this
.
blockchain
.
event
.
register
(
'newTransaction'
,
(
tx
,
receipt
)
=>
{
this
.
events
.
trigger
(
'newTransaction'
,
[
tx
,
receipt
])
})
}
createVMAccount
(
newAccount
)
{
return
this
.
blockchain
.
udapp
.
createVMAccount
(
newAccount
)
}
sendTransaction
(
tx
)
{
return
this
.
blockchain
.
udapp
.
sendTransaction
(
tx
)
}
getAccounts
(
cb
)
{
return
this
.
blockchain
.
udapp
.
getAccounts
(
cb
)
}
pendingTransactionsCount
()
{
return
this
.
blockchain
.
udapp
.
pendingTransactionsCount
()
}
}
module
.
exports
=
PluginUdapp
src/blockchain/universalDapp.js
View file @
1732e9e7
...
...
@@ -6,7 +6,6 @@ const { EventEmitter } = require('events')
const
remixLib
=
require
(
'remix-lib'
)
const
TxRunner
=
remixLib
.
execution
.
txRunner
const
txHelper
=
remixLib
.
execution
.
txHelper
const
EventManager
=
remixLib
.
EventManager
const
Web3
=
require
(
'web3'
)
...
...
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