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
f9b824dd
Unverified
Commit
f9b824dd
authored
Mar 02, 2018
by
yann300
Committed by
GitHub
Mar 02, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #713 from ethereum/fallbacknode
Add debug nodes reference
parents
22106703
1cb3d8bf
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
7 deletions
+30
-7
mappingPreimages.js
remix-core/src/storage/mappingPreimages.js
+1
-1
storageResolver.js
remix-core/src/storage/storageResolver.js
+1
-1
traceRetriever.js
remix-core/src/trace/traceRetriever.js
+1
-1
traceManager.js
remix-core/test/traceManager.js
+1
-0
Ethdebugger.js
remix-debugger/src/ui/Ethdebugger.js
+10
-0
vmdebugger.js
remix-debugger/test-browser/test/vmdebugger.js
+0
-1
global.js
remix-lib/src/global.js
+2
-1
init.js
remix-lib/src/init.js
+14
-2
No files found.
remix-core/src/storage/mappingPreimages.js
View file @
f9b824dd
...
...
@@ -44,7 +44,7 @@ async function decodeMappingsKeys (storage, callback) {
*/
function
getPreimage
(
key
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
global
.
web3
.
debug
.
preimage
(
key
.
indexOf
(
'0x'
)
===
0
?
key
:
'0x'
+
key
,
function
(
error
,
preimage
)
{
global
.
web3
Debug
.
debug
.
preimage
(
key
.
indexOf
(
'0x'
)
===
0
?
key
:
'0x'
+
key
,
function
(
error
,
preimage
)
{
if
(
error
)
{
resolve
(
null
)
}
else
{
...
...
remix-core/src/storage/storageResolver.js
View file @
f9b824dd
...
...
@@ -146,7 +146,7 @@ function storageRangeWeb3Call (tx, address, start, maxSize, callback) {
if
(
traceHelper
.
isContractCreation
(
address
))
{
callback
(
null
,
{},
null
)
}
else
{
global
.
web3
.
debug
.
storageRangeAt
(
global
.
web3
Debug
.
debug
.
storageRangeAt
(
tx
.
blockHash
,
tx
.
transactionIndex
===
undefined
?
tx
.
hash
:
tx
.
transactionIndex
,
address
,
start
,
...
...
remix-core/src/trace/traceRetriever.js
View file @
f9b824dd
...
...
@@ -12,7 +12,7 @@ TraceRetriever.prototype.getTrace = function (txHash, callback) {
disableStack
:
false
,
fullStorage
:
false
}
global
.
web3
.
debug
.
traceTransaction
(
txHash
,
options
,
function
(
error
,
result
)
{
global
.
web3
Debug
.
debug
.
traceTransaction
(
txHash
,
options
,
function
(
error
,
result
)
{
callback
(
error
,
result
)
})
}
...
...
remix-core/test/traceManager.js
View file @
f9b824dd
...
...
@@ -19,6 +19,7 @@ tape('TraceManager', function (t) {
st
.
fail
(
mes
)
}
else
{
global
.
web3
=
obj
global
.
web3Debug
=
obj
traceManager
=
new
TraceManager
()
st
.
end
()
}
...
...
remix-debugger/src/ui/Ethdebugger.js
View file @
f9b824dd
...
...
@@ -6,6 +6,8 @@ var TraceManager = remixCore.trace.TraceManager
var
VmDebugger
=
require
(
'./VmDebugger'
)
var
remixLib
=
require
(
'remix-lib'
)
var
global
=
remixLib
.
global
var
init
=
remixLib
.
init
var
executionContext
=
remixLib
.
execution
.
executionContext
var
EventManager
=
remixLib
.
EventManager
var
yo
=
require
(
'yo-yo'
)
var
csjs
=
require
(
'csjs-inject'
)
...
...
@@ -97,6 +99,14 @@ Ethdebugger.prototype.switchProvider = function (type) {
console
.
log
(
'provider '
+
type
+
' not defined'
)
}
else
{
global
.
web3
=
obj
executionContext
.
detectNetwork
((
error
,
network
)
=>
{
if
(
error
||
!
network
)
{
global
.
web3Debug
=
obj
}
else
{
var
webDebugNode
=
init
.
web3DebugNode
(
network
.
name
)
global
.
web3Debug
=
!
webDebugNode
?
obj
:
webDebugNode
}
})
self
.
event
.
trigger
(
'providerChanged'
,
[
type
])
}
})
...
...
remix-debugger/test-browser/test/vmdebugger.js
View file @
f9b824dd
...
...
@@ -59,7 +59,6 @@ function loadTrace (browser) {
.
execute
(
function
()
{
return
document
.
querySelector
(
'#txinfo .dropdownpanel .dropdownrawcontent'
).
innerHTML
},
[],
function
(
result
)
{
console
.
log
(
result
.
value
)
if
(
result
.
value
.
indexOf
(
'0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51'
)
===
-
1
)
{
browser
.
assert
.
fail
(
' txinput panel does not contain 0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51 '
,
'info about error'
,
''
)
}
...
...
remix-lib/src/global.js
View file @
f9b824dd
module
.
exports
=
{
web3
:
null
web3
:
null
,
web3Debug
:
null
// this node should support the debug endpoint
}
remix-lib/src/init.js
View file @
f9b824dd
...
...
@@ -2,9 +2,10 @@
var
Web3
=
require
(
'web3'
)
module
.
exports
=
{
loadWeb3
:
function
()
{
loadWeb3
:
function
(
url
)
{
if
(
!
url
)
url
=
'http://localhost:8545'
var
web3
=
new
Web3
()
web3
.
setProvider
(
new
web3
.
providers
.
HttpProvider
(
'http://localhost:8545'
))
web3
.
setProvider
(
new
web3
.
providers
.
HttpProvider
(
url
))
this
.
extend
(
web3
)
return
web3
},
...
...
@@ -17,6 +18,13 @@ module.exports = {
web3
.
setProvider
(
new
web3
.
providers
.
HttpProvider
(
url
))
},
web3DebugNode
:
function
(
network
)
{
if
(
web3DebugNodes
[
network
])
{
return
this
.
loadWeb3
(
web3DebugNodes
[
network
])
}
return
null
},
extend
:
function
(
web3
)
{
if
(
!
web3
.
_extend
)
{
return
...
...
@@ -58,3 +66,7 @@ module.exports = {
}
}
}
var
web3DebugNodes
=
{
'Main'
:
'https://mainnet.infura.io/remix'
}
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