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
5d36088d
Commit
5d36088d
authored
Apr 26, 2020
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
activate source-verifier plugin & try/catch
parent
d20b1015
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
compiler-sourceVerifier-fetchAndCompile.js
src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js
+8
-2
debugger-tab.js
src/app/tabs/debugger-tab.js
+5
-0
remixAppManager.js
src/remixAppManager.js
+1
-1
No files found.
src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js
View file @
5d36088d
...
@@ -75,8 +75,14 @@ export default class FetchAndCompile extends Plugin {
...
@@ -75,8 +75,14 @@ export default class FetchAndCompile extends Plugin {
let
name
=
network
.
name
.
toLowerCase
()
let
name
=
network
.
name
.
toLowerCase
()
name
===
'main'
?
'mainnet'
:
name
// source-verifier api expect "mainnet" and not "main"
name
===
'main'
?
'mainnet'
:
name
// source-verifier api expect "mainnet" and not "main"
await
this
.
call
(
'manager'
,
'activatePlugin'
,
'source-verification'
)
let
data
const
data
=
await
this
.
call
(
'source-verification'
,
'fetch'
,
contractAddress
,
name
.
toLowerCase
())
try
{
data
=
await
this
.
call
(
'source-verification'
,
'fetch'
,
contractAddress
,
name
.
toLowerCase
())
}
catch
(
e
)
{
setTimeout
(
_
=>
this
.
emit
(
'sourceVerificationNotAvailable'
),
0
)
this
.
unresolvedAddresses
.
push
(
contractAddress
)
return
localCompilation
()
}
if
(
!
data
||
!
data
.
metadata
)
{
if
(
!
data
||
!
data
.
metadata
)
{
setTimeout
(
_
=>
this
.
emit
(
'notFound'
,
contractAddress
),
0
)
setTimeout
(
_
=>
this
.
emit
(
'notFound'
,
contractAddress
),
0
)
this
.
unresolvedAddresses
.
push
(
contractAddress
)
this
.
unresolvedAddresses
.
push
(
contractAddress
)
...
...
src/app/tabs/debugger-tab.js
View file @
5d36088d
...
@@ -50,11 +50,16 @@ class DebuggerTab extends ViewPlugin {
...
@@ -50,11 +50,16 @@ class DebuggerTab extends ViewPlugin {
toaster
(
yo
`<div><b>Using compilation result from Solidity module</b></div>`
)
toaster
(
yo
`<div><b>Using compilation result from Solidity module</b></div>`
)
})
})
this
.
on
(
'fetchAndCompile'
,
'sourceVerificationNotAvailable'
,
()
=>
{
toaster
(
yo
`<div><b>Source verification plugin not activated or not available.</b> continuing <i>without</i> source code debugging.</div>`
)
})
this
.
debuggerUI
=
new
DebuggerUI
(
this
.
debuggerUI
=
new
DebuggerUI
(
this
.
el
.
querySelector
(
'#debugger'
),
this
.
el
.
querySelector
(
'#debugger'
),
this
.
blockchain
,
this
.
blockchain
,
adddress
=>
this
.
call
(
'fetchAndCompile'
,
'resolve'
,
adddress
,
'.debug'
,
this
.
blockchain
.
web3
()))
adddress
=>
this
.
call
(
'fetchAndCompile'
,
'resolve'
,
adddress
,
'.debug'
,
this
.
blockchain
.
web3
()))
this
.
call
(
'manager'
,
'activatePlugin'
,
'source-verification'
)
// this.call('manager', 'activatePlugin', 'udapp')
// this.call('manager', 'activatePlugin', 'udapp')
return
this
.
el
return
this
.
el
...
...
src/remixAppManager.js
View file @
5d36088d
...
@@ -15,7 +15,7 @@ export function isNative (name) {
...
@@ -15,7 +15,7 @@ export function isNative (name) {
}
}
export
function
canActivate
(
name
)
{
export
function
canActivate
(
name
)
{
return
[
'manager'
].
includes
(
name
)
return
[
'manager'
,
'debugger'
].
includes
(
name
)
}
}
export
class
RemixAppManager
extends
PluginManager
{
export
class
RemixAppManager
extends
PluginManager
{
...
...
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