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
35a3152b
Commit
35a3152b
authored
Jan 04, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code refactor
parent
0ff6128f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
13 deletions
+8
-13
compiler-helpers.js
apps/remix-ide/src/app/compiler/compiler-helpers.js
+1
-1
compiler-imports.js
apps/remix-ide/src/app/compiler/compiler-imports.js
+2
-6
debugger-tab.js
apps/remix-ide/src/app/tabs/debugger-tab.js
+2
-2
internalCallTree.ts
libs/remix-debug/src/solidity-decoder/internalCallTree.ts
+2
-3
traceHelper.ts
libs/remix-debug/src/trace/traceHelper.ts
+1
-1
No files found.
apps/remix-ide/src/app/compiler/compiler-helpers.js
View file @
35a3152b
...
@@ -6,7 +6,7 @@ import CompilerAbstract from './compiler-abstract'
...
@@ -6,7 +6,7 @@ import CompilerAbstract from './compiler-abstract'
export
const
compile
=
async
(
compilationTargets
,
settings
,
contentResolverCallback
)
=>
{
export
const
compile
=
async
(
compilationTargets
,
settings
,
contentResolverCallback
)
=>
{
const
res
=
await
(()
=>
{
const
res
=
await
(()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
compiler
=
new
Compiler
(
contentResolverCallback
||
(()
=>
{})
)
const
compiler
=
new
Compiler
(
contentResolverCallback
)
compiler
.
set
(
'evmVersion'
,
settings
.
evmVersion
)
compiler
.
set
(
'evmVersion'
,
settings
.
evmVersion
)
compiler
.
set
(
'optimize'
,
settings
.
optimize
)
compiler
.
set
(
'optimize'
,
settings
.
optimize
)
compiler
.
set
(
'language'
,
settings
.
language
)
compiler
.
set
(
'language'
,
settings
.
language
)
...
...
apps/remix-ide/src/app/compiler/compiler-imports.js
View file @
35a3152b
...
@@ -106,12 +106,8 @@ module.exports = class CompilerImports extends Plugin {
...
@@ -106,12 +106,8 @@ module.exports = class CompilerImports extends Plugin {
}
}
isExternalUrl
(
url
)
{
isExternalUrl
(
url
)
{
for
(
const
handler
of
this
.
handlers
())
{
const
handlers
=
this
.
handlers
()
if
(
handler
.
match
.
exec
(
url
))
{
return
handlers
.
some
(
handler
=>
handler
.
match
.
exec
(
url
))
return
true
}
}
return
false
}
}
/**
/**
...
...
apps/remix-ide/src/app/tabs/debugger-tab.js
View file @
35a3152b
...
@@ -140,8 +140,8 @@ class DebuggerTab extends ViewPlugin {
...
@@ -140,8 +140,8 @@ class DebuggerTab extends ViewPlugin {
fetchContractAndCompile
(
address
,
receipt
)
{
fetchContractAndCompile
(
address
,
receipt
)
{
const
target
=
(
address
&&
remixDebug
.
traceHelper
.
isContractCreation
(
address
))
?
receipt
.
contractAddress
:
address
const
target
=
(
address
&&
remixDebug
.
traceHelper
.
isContractCreation
(
address
))
?
receipt
.
contractAddress
:
address
const
targetAddress
=
target
||
receipt
.
contractAddress
||
receipt
.
to
return
this
.
call
(
'fetchAndCompile'
,
'resolve'
,
target
||
receipt
.
contractAddress
||
receipt
.
to
,
'browser/.debug'
,
this
.
blockchain
.
web3
())
return
this
.
call
(
'fetchAndCompile'
,
'resolve'
,
target
Address
,
'browser/.debug'
,
this
.
blockchain
.
web3
())
}
}
// debugger () {
// debugger () {
...
...
libs/remix-debug/src/solidity-decoder/internalCallTree.ts
View file @
35a3152b
...
@@ -357,9 +357,8 @@ function extractVariableDeclarations (ast, astWalker) {
...
@@ -357,9 +357,8 @@ function extractVariableDeclarations (ast, astWalker) {
if
(
node
.
nodeType
===
'VariableDeclaration'
||
node
.
nodeType
===
'YulVariableDeclaration'
)
{
if
(
node
.
nodeType
===
'VariableDeclaration'
||
node
.
nodeType
===
'YulVariableDeclaration'
)
{
ret
[
node
.
src
]
=
[
node
]
ret
[
node
.
src
]
=
[
node
]
}
}
if
(
node
.
initialValue
&&
(
node
.
nodeType
===
'VariableDeclarationStatement'
||
node
.
nodeType
===
'YulVariableDeclarationStatement'
))
{
const
hasChild
=
node
.
initialValue
&&
(
node
.
nodeType
===
'VariableDeclarationStatement'
||
node
.
nodeType
===
'YulVariableDeclarationStatement'
)
ret
[
node
.
initialValue
.
src
]
=
node
.
declarations
if
(
hasChild
)
ret
[
node
.
initialValue
.
src
]
=
node
.
declarations
}
})
})
return
ret
return
ret
}
}
...
...
libs/remix-debug/src/trace/traceHelper.ts
View file @
35a3152b
...
@@ -15,7 +15,7 @@ export function resolveCalledAddress (vmTraceIndex, trace) {
...
@@ -15,7 +15,7 @@ export function resolveCalledAddress (vmTraceIndex, trace) {
}
}
export
function
isCallInstruction
(
step
)
{
export
function
isCallInstruction
(
step
)
{
return
step
.
op
===
'CALL'
||
step
.
op
===
'STATICCALL'
||
step
.
op
===
'CALLCODE'
||
step
.
op
===
'CREATE'
||
step
.
op
===
'DELEGATECALL'
return
[
'CALL'
,
'STATICCALL'
,
'CALLCODE'
,
'CREATE'
,
'DELEGATECALL'
].
includes
(
step
.
op
)
}
}
export
function
isCreateInstruction
(
step
)
{
export
function
isCreateInstruction
(
step
)
{
...
...
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