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
222e698e
Commit
222e698e
authored
Dec 27, 2019
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abstract txlistener
parent
30fe405b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
blockchain.js
src/app/tabs/runTab/model/blockchain.js
+7
-0
make-udapp.js
src/app/udapp/make-udapp.js
+4
-3
No files found.
src/app/tabs/runTab/model/blockchain.js
View file @
222e698e
...
...
@@ -2,6 +2,7 @@ const remixLib = require('remix-lib')
const
txFormat
=
remixLib
.
execution
.
txFormat
const
txExecution
=
remixLib
.
execution
.
txExecution
const
typeConversion
=
remixLib
.
execution
.
typeConversion
const
Txlistener
=
remixLib
.
execution
.
txListener
const
EventManager
=
remixLib
.
EventManager
const
ethJSUtil
=
require
(
'ethereumjs-util'
)
const
Personal
=
require
(
'web3-eth-personal'
)
...
...
@@ -247,6 +248,12 @@ class Blockchain {
web3
()
{
return
this
.
executionContext
.
web3
()
}
getTxListener
(
opts
)
{
const
txlistener
=
new
Txlistener
(
opts
,
this
.
executionContext
)
return
txlistener
}
}
module
.
exports
=
Blockchain
src/app/udapp/make-udapp.js
View file @
222e698e
var
registry
=
require
(
'../../global/registry'
)
var
remixLib
=
require
(
'remix-lib'
)
var
yo
=
require
(
'yo-yo'
)
var
Txlistener
=
remixLib
.
execution
.
txListener
var
EventsDecoder
=
remixLib
.
execution
.
EventsDecoder
var
TransactionReceiptResolver
=
require
(
'../../lib/transactionReceiptResolver'
)
...
...
@@ -16,7 +15,7 @@ export function makeUdapp (blockchain, udapp, executionContext, compilersArtefac
// ----------------- Tx listener -----------------
const
transactionReceiptResolver
=
new
TransactionReceiptResolver
(
blockchain
)
const
txlistener
=
new
Txl
istener
({
const
txlistener
=
blockchain
.
getTxL
istener
({
api
:
{
contracts
:
function
()
{
if
(
compilersArtefacts
[
'__last'
])
return
compilersArtefacts
[
'__last'
].
getContracts
()
...
...
@@ -28,7 +27,9 @@ export function makeUdapp (blockchain, udapp, executionContext, compilersArtefac
},
event
:
{
udapp
:
udapp
.
event
}},
executionContext
)
}
})
registry
.
put
({
api
:
txlistener
,
name
:
'txlistener'
})
udapp
.
startListening
(
txlistener
)
...
...
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