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
1926889d
Commit
1926889d
authored
Dec 10, 2019
by
aniket-engg
Committed by
Aniket
Dec 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more web update
parent
cdd3dd2e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
execution-context.js
remix-lib/src/execution/execution-context.js
+4
-3
web3VmProvider.js
remix-lib/src/web3Provider/web3VmProvider.js
+9
-9
No files found.
remix-lib/src/execution/execution-context.js
View file @
1926889d
...
...
@@ -147,7 +147,7 @@ function ExecutionContext () {
if
(
this
.
isVM
())
{
callback
(
null
,
{
id
:
'-'
,
name
:
'VM'
})
}
else
{
this
.
web3
().
version
.
getNetwork
((
err
,
id
)
=>
{
web3
.
eth
.
net
.
getId
((
err
,
id
)
=>
{
var
name
=
null
if
(
err
)
name
=
'Unknown'
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md
...
...
@@ -160,7 +160,7 @@ function ExecutionContext () {
else
name
=
'Custom'
if
(
id
===
'1'
)
{
this
.
web3
()
.
eth
.
getBlock
(
0
,
(
error
,
block
)
=>
{
web3
.
eth
.
getBlock
(
0
,
(
error
,
block
)
=>
{
if
(
error
)
console
.
log
(
'cant query first block'
)
if
(
block
&&
block
.
hash
!==
mainNetGenesisHash
)
name
=
'Custom'
callback
(
err
,
{
id
,
name
})
...
...
@@ -279,6 +279,7 @@ function ExecutionContext () {
}
else
{
web3
.
setProvider
(
new
web3
.
providers
.
HttpProvider
(
endpoint
))
}
// fixed
if
(
web3
.
isConnected
())
{
executionContext
=
context
self
.
_updateBlockGasLimit
()
...
...
@@ -305,7 +306,7 @@ function ExecutionContext () {
if
(
blockNumber
===
'0x'
)
{
blockNumber
=
'0x0'
}
blockNumber
=
web3
.
toHex
(
web3
.
toBigNumber
(
blockNumber
))
blockNumber
=
web3
.
utils
.
toHex
(
web3
.
utils
.
toBN
(
blockNumber
))
self
.
blocks
[
'0x'
+
block
.
hash
().
toString
(
'hex'
)]
=
block
self
.
blocks
[
blockNumber
]
=
block
...
...
remix-lib/src/web3Provider/web3VmProvider.js
View file @
1926889d
...
...
@@ -32,15 +32,15 @@ function web3VmProvider () {
this
.
lastProcessedStorageTxHash
=
{}
this
.
sha3Preimages
=
{}
// util
this
.
sha3
=
function
()
{
return
self
.
web3
.
sha3
.
apply
(
self
.
web3
,
arguments
)
}
this
.
toHex
=
function
()
{
return
self
.
web3
.
toHex
.
apply
(
self
.
web3
,
arguments
)
}
this
.
toAscii
=
function
()
{
return
self
.
web3
.
t
oAscii
.
apply
(
self
.
web3
,
arguments
)
}
this
.
fromAscii
=
function
()
{
return
self
.
web3
.
fromAscii
.
apply
(
self
.
web3
,
arguments
)
}
this
.
fromDecimal
=
function
()
{
return
self
.
web3
.
fromDecimal
.
apply
(
self
.
web3
,
arguments
)
}
this
.
fromWei
=
function
()
{
return
self
.
web3
.
fromWei
.
apply
(
self
.
web3
,
arguments
)
}
this
.
toWei
=
function
()
{
return
self
.
web3
.
toWei
.
apply
(
self
.
web3
,
arguments
)
}
this
.
toBigNumber
=
function
()
{
return
self
.
web3
.
toBigNumber
.
apply
(
self
.
web3
,
arguments
)
}
this
.
isAddress
=
function
()
{
return
self
.
web3
.
isAddress
.
apply
(
self
.
web3
,
arguments
)
}
this
.
sha3
=
function
()
{
return
self
.
web3
.
utils
.
sha3
.
apply
(
self
.
web3
,
arguments
)
}
this
.
toHex
=
function
()
{
return
self
.
web3
.
utils
.
toHex
.
apply
(
self
.
web3
,
arguments
)
}
this
.
toAscii
=
function
()
{
return
self
.
web3
.
utils
.
hexT
oAscii
.
apply
(
self
.
web3
,
arguments
)
}
this
.
fromAscii
=
function
()
{
return
self
.
web3
.
utils
.
asciiToHex
.
apply
(
self
.
web3
,
arguments
)
}
this
.
fromDecimal
=
function
()
{
return
self
.
web3
.
utils
.
numberToHex
.
apply
(
self
.
web3
,
arguments
)
}
this
.
fromWei
=
function
()
{
return
self
.
web3
.
utils
.
fromWei
.
apply
(
self
.
web3
,
arguments
)
}
this
.
toWei
=
function
()
{
return
self
.
web3
.
utils
.
toWei
.
apply
(
self
.
web3
,
arguments
)
}
this
.
toBigNumber
=
function
()
{
return
self
.
web3
.
utils
.
toBN
.
apply
(
self
.
web3
,
arguments
)
}
this
.
isAddress
=
function
()
{
return
self
.
web3
.
utils
.
isAddress
.
apply
(
self
.
web3
,
arguments
)
}
this
.
utils
=
Web3
.
utils
||
[]
}
...
...
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