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
68d540c2
Commit
68d540c2
authored
Dec 27, 2019
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move txDetailsLink into remix-ide
parent
4efd1804
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
make-udapp.js
src/app/udapp/make-udapp.js
+15
-1
No files found.
src/app/udapp/make-udapp.js
View file @
68d540c2
...
...
@@ -4,11 +4,25 @@ var yo = require('yo-yo')
var
EventsDecoder
=
remixLib
.
execution
.
EventsDecoder
var
TransactionReceiptResolver
=
require
(
'../../lib/transactionReceiptResolver'
)
const
transactionDetailsLinks
=
{
'Main'
:
'https://www.etherscan.io/tx/'
,
'Rinkeby'
:
'https://rinkeby.etherscan.io/tx/'
,
'Ropsten'
:
'https://ropsten.etherscan.io/tx/'
,
'Kovan'
:
'https://kovan.etherscan.io/tx/'
,
'Goerli'
:
'https://goerli.etherscan.io/tx/'
}
function
txDetailsLink
(
network
,
hash
)
{
if
(
transactionDetailsLinks
[
network
])
{
return
transactionDetailsLinks
[
network
]
+
hash
}
}
export
function
makeUdapp
(
blockchain
,
udapp
,
executionContext
,
compilersArtefacts
,
logHtmlCallback
)
{
// ----------------- UniversalDApp -----------------
// TODO: to remove when possible
udapp
.
event
.
register
(
'transactionBroadcasted'
,
(
txhash
,
networkName
)
=>
{
var
txLink
=
executionContext
.
txDetailsLink
(
networkName
,
txhash
)
var
txLink
=
txDetailsLink
(
networkName
,
txhash
)
if
(
txLink
&&
logHtmlCallback
)
logHtmlCallback
(
yo
`<a href="
${
txLink
}
" target="_blank">
${
txLink
}
</a>`
)
})
...
...
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