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
d471d048
Unverified
Commit
d471d048
authored
May 20, 2021
by
yann300
Committed by
GitHub
May 20, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1198 from ethereum/matomoInfo
Matomo sendTx & startDebugging
parents
c4b9385c
f8301035
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
46 deletions
+50
-46
contractDropdown.js
apps/remix-ide/src/app/tabs/runTab/contractDropdown.js
+16
-18
dropdownlogic.js
apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js
+1
-1
settings.js
apps/remix-ide/src/app/tabs/runTab/settings.js
+11
-15
universal-dapp-ui.js
apps/remix-ide/src/app/ui/universal-dapp-ui.js
+6
-2
blockchain.js
apps/remix-ide/src/blockchain/blockchain.js
+12
-9
debugger-ui.tsx
libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx
+4
-1
No files found.
apps/remix-ide/src/app/tabs/runTab/contractDropdown.js
View file @
d471d048
...
...
@@ -48,24 +48,22 @@ class ContractDropdownUI {
}
listenToContextChange
()
{
this
.
blockchain
.
event
.
register
(
'contextChanged'
,
()
=>
{
this
.
blockchain
.
updateNetwork
((
err
,
{
name
}
=
{})
=>
{
if
(
err
)
{
console
.
log
(
'can
\'
t detect network'
)
return
}
this
.
exEnvironment
=
this
.
blockchain
.
getProvider
()
this
.
networkName
=
name
this
.
blockchain
.
event
.
register
(
'networkStatus'
,
({
error
,
network
})
=>
{
if
(
error
)
{
console
.
log
(
'can
\'
t detect network'
)
return
}
this
.
exEnvironment
=
this
.
blockchain
.
getProvider
()
this
.
networkName
=
network
.
name
const
savedConfig
=
window
.
localStorage
.
getItem
(
`ipfs/
${
this
.
exEnvironment
}
/
${
this
.
networkName
}
`
)
const
savedConfig
=
window
.
localStorage
.
getItem
(
`ipfs/
${
this
.
exEnvironment
}
/
${
this
.
networkName
}
`
)
// check if an already selected option exist else use default workflow
if
(
savedConfig
!==
null
)
{
this
.
setCheckedState
(
savedConfig
)
}
else
{
this
.
setCheckedState
(
this
.
networkName
===
'Main'
)
}
})
// check if an already selected option exist else use default workflow
if
(
savedConfig
!==
null
)
{
this
.
setCheckedState
(
savedConfig
)
}
else
{
this
.
setCheckedState
(
this
.
networkName
===
'Main'
)
}
})
}
...
...
@@ -306,10 +304,10 @@ class ContractDropdownUI {
const
data
=
self
.
runView
.
compilersArtefacts
.
getCompilerAbstract
(
contractObject
.
contract
.
file
)
self
.
runView
.
compilersArtefacts
.
addResolvedContract
(
helper
.
addressToString
(
address
),
data
)
if
(
self
.
ipfsCheckedState
)
{
_paq
.
push
([
'trackEvent'
,
'udapp'
,
`DeployAndPublish_
${
this
.
networkName
}
`
])
_paq
.
push
([
'trackEvent'
,
'udapp'
,
'DeployAndPublish'
,
this
.
networkName
])
publishToStorage
(
'ipfs'
,
self
.
runView
.
fileProvider
,
self
.
runView
.
fileManager
,
selectedContract
)
}
else
{
_paq
.
push
([
'trackEvent'
,
'udapp'
,
`DeployOnly_
${
this
.
networkName
}
`
])
_paq
.
push
([
'trackEvent'
,
'udapp'
,
'DeployOnly'
,
this
.
networkName
])
}
}
...
...
apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js
View file @
d471d048
...
...
@@ -55,7 +55,7 @@ class DropdownLogic {
cb
(
null
,
'abi'
,
abi
)
})
}
else
{
_paq
.
push
([
'trackEvent'
,
'udapp'
,
'AtAddressLoadWith
Instance
'
])
_paq
.
push
([
'trackEvent'
,
'udapp'
,
'AtAddressLoadWith
Artifacts
'
])
cb
(
null
,
'instance'
)
}
}
...
...
apps/remix-ide/src/app/tabs/runTab/settings.js
View file @
d471d048
...
...
@@ -97,7 +97,7 @@ class SettingsUI {
Environment
</label>
<div class="
${
css
.
environment
}
">
<select id="selectExEnvOptions" data-id="settingsSelectEnvOptions"
onchange=
${()
=>
{
this
.
updateNetwork
()
}}
class
=
"form-control ${css.select} custom-select"
>
<select id="selectExEnvOptions" data-id="settingsSelectEnvOptions" class="form-control
${
css
.
select
}
custom-select">
<option id="vm-mode"
title="Execution environment does not connect to any node, everything is local and in memory only."
value="vm" name="executionContext"> JavaScript VM
...
...
@@ -192,8 +192,17 @@ class SettingsUI {
this
.
setFinalContext
()
})
this
.
blockchain
.
event
.
register
(
'networkStatus'
,
({
error
,
network
})
=>
{
if
(
error
)
{
this
.
netUI
.
innerHTML
=
'can
\'
t detect network '
return
}
const
networkProvider
=
this
.
_components
.
networkModule
.
getNetworkProvider
.
bind
(
this
.
_components
.
networkModule
)
this
.
netUI
.
innerHTML
=
(
networkProvider
()
!==
'vm'
)
?
`
${
network
.
name
}
(
${
network
.
id
||
'-'
}
) network`
:
''
})
setInterval
(()
=>
{
this
.
updateNetwork
()
this
.
fillAccountsList
()
},
1000
)
this
.
el
=
el
...
...
@@ -273,7 +282,6 @@ class SettingsUI {
// set the final context. Cause it is possible that this is not the one we've originaly selected
this
.
selectExEnv
.
value
=
this
.
blockchain
.
getProvider
()
this
.
event
.
trigger
(
'clearInstance'
,
[])
this
.
updateNetwork
()
this
.
updatePlusButton
()
}
...
...
@@ -390,18 +398,6 @@ class SettingsUI {
})
}
updateNetwork
()
{
this
.
blockchain
.
updateNetwork
((
err
,
{
id
,
name
}
=
{})
=>
{
if
(
err
)
{
this
.
netUI
.
innerHTML
=
'can
\'
t detect network '
return
}
const
network
=
this
.
_components
.
networkModule
.
getNetworkProvider
.
bind
(
this
.
_components
.
networkModule
)
this
.
netUI
.
innerHTML
=
(
network
()
!==
'vm'
)
?
`
${
name
}
(
${
id
||
'-'
}
) network`
:
''
})
this
.
fillAccountsList
()
}
// TODO: unclear what's the goal of accountListCallId, feels like it can be simplified
async
fillAccountsList
()
{
this
.
accountListCallId
++
...
...
apps/remix-ide/src/app/ui/universal-dapp-ui.js
View file @
d471d048
...
...
@@ -244,8 +244,12 @@ UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, i
outputOverride
.
appendChild
(
decoded
)
}
}
const
info
=
`
${
lookupOnly
?
'call'
:
args
.
funABI
.
type
!==
'fallback'
?
'lowLevelInteracions'
:
'transact'
}
_
${
this
.
blockchain
.
executionContext
.
executionContext
}
`
_paq
.
push
([
'trackEvent'
,
'udapp'
,
info
])
let
callinfo
=
''
if
(
lookupOnly
)
callinfo
=
'call'
else
if
(
args
.
funABI
.
type
===
'fallback'
||
args
.
funABI
.
type
===
'receive'
)
callinfo
=
'lowLevelInteracions'
else
callinfo
=
'transact'
_paq
.
push
([
'trackEvent'
,
'udapp'
,
callinfo
,
this
.
blockchain
.
getCurrentNetworkStatus
().
network
.
name
])
const
params
=
args
.
funABI
.
type
!==
'fallback'
?
inputsValues
:
''
this
.
blockchain
.
runOrCallContractMethod
(
args
.
contractName
,
...
...
apps/remix-ide/src/blockchain/blockchain.js
View file @
d471d048
...
...
@@ -41,6 +41,7 @@ class Blockchain {
this
.
executionContext
.
event
.
register
(
'contextChanged'
,
this
.
resetEnvironment
.
bind
(
this
))
this
.
networkcallid
=
0
this
.
networkStatus
=
{
name
:
' - '
,
id
:
' - '
}
this
.
setupEvents
()
this
.
setupProviders
()
}
...
...
@@ -57,6 +58,17 @@ class Blockchain {
this
.
executionContext
.
event
.
register
(
'removeProvider'
,
(
name
)
=>
{
this
.
event
.
trigger
(
'removeProvider'
,
[
name
])
})
setInterval
(()
=>
{
this
.
detectNetwork
((
error
,
network
)
=>
{
this
.
networkStatus
=
{
network
,
error
}
this
.
event
.
trigger
(
'networkStatus'
,
[
this
.
networkStatus
])
})
},
1000
)
}
getCurrentNetworkStatus
()
{
return
this
.
networkStatus
}
setupProviders
()
{
...
...
@@ -197,15 +209,6 @@ class Blockchain {
return
this
.
executionContext
.
setProviderFromEndpoint
(
target
,
context
,
cb
)
}
updateNetwork
(
cb
)
{
this
.
executionContext
.
detectNetwork
((
err
,
{
id
,
name
}
=
{})
=>
{
if
(
err
)
{
return
cb
(
err
)
}
cb
(
null
,
{
id
,
name
})
})
}
detectNetwork
(
cb
)
{
return
this
.
executionContext
.
detectNetwork
(
cb
)
}
...
...
libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx
View file @
d471d048
...
...
@@ -9,6 +9,7 @@ import { Toaster } from '@remix-ui/toaster' // eslint-disable-line
/* eslint-disable-next-line */
import
'./debugger-ui.css'
const
helper
=
require
(
'../../../../../apps/remix-ide/src/lib/helper'
)
const
_paq
=
(
window
as
any
).
_paq
=
(
window
as
any
).
_paq
||
[]
export
const
DebuggerUI
=
(
props
:
DebuggerUIProps
)
=>
{
const
debuggerModule
=
props
.
debuggerAPI
...
...
@@ -167,7 +168,9 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
const
web3
=
await
debuggerModule
.
getDebugWeb3
()
try
{
if
(
await
web3
.
eth
.
net
.
getId
()
===
42
)
{
const
networkId
=
await
web3
.
eth
.
net
.
getId
()
_paq
.
push
([
'trackEvent'
,
'debugger'
,
'startDebugging'
,
networkId
])
if
(
networkId
===
42
)
{
setState
(
prevState
=>
{
return
{
...
prevState
,
...
...
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