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
628bb925
Commit
628bb925
authored
Jun 23, 2021
by
aniket-engg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timestamp added for VM only
parent
45cf8dd3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
11 deletions
+3
-11
blockchain.js
apps/remix-ide/src/blockchain/blockchain.js
+2
-0
txRunnerWeb3.ts
libs/remix-lib/src/execution/txRunnerWeb3.ts
+1
-11
No files found.
apps/remix-ide/src/blockchain/blockchain.js
View file @
628bb925
...
@@ -23,6 +23,7 @@ class Blockchain {
...
@@ -23,6 +23,7 @@ class Blockchain {
detectNetwork
:
(
cb
)
=>
{
detectNetwork
:
(
cb
)
=>
{
this
.
executionContext
.
detectNetwork
(
cb
)
this
.
executionContext
.
detectNetwork
(
cb
)
},
},
isVM
:
()
=>
{
return
this
.
executionContext
.
isVM
()
},
personalMode
:
()
=>
{
personalMode
:
()
=>
{
return
this
.
getProvider
()
===
'web3'
?
this
.
config
.
get
(
'settings/personal-mode'
)
:
false
return
this
.
getProvider
()
===
'web3'
?
this
.
config
.
get
(
'settings/personal-mode'
)
:
false
}
}
...
@@ -322,6 +323,7 @@ class Blockchain {
...
@@ -322,6 +323,7 @@ class Blockchain {
detectNetwork
:
(
cb
)
=>
{
detectNetwork
:
(
cb
)
=>
{
this
.
executionContext
.
detectNetwork
(
cb
)
this
.
executionContext
.
detectNetwork
(
cb
)
},
},
isVM
:
()
=>
{
return
this
.
executionContext
.
isVM
()
},
personalMode
:
()
=>
{
personalMode
:
()
=>
{
return
this
.
getProvider
()
===
'web3'
?
this
.
config
.
get
(
'settings/personal-mode'
)
:
false
return
this
.
getProvider
()
===
'web3'
?
this
.
config
.
get
(
'settings/personal-mode'
)
:
false
}
}
...
...
libs/remix-lib/src/execution/txRunnerWeb3.ts
View file @
628bb925
...
@@ -73,23 +73,13 @@ export class TxRunnerWeb3 {
...
@@ -73,23 +73,13 @@ export class TxRunnerWeb3 {
if
(
useCall
)
{
if
(
useCall
)
{
tx
[
'gas'
]
=
gasLimit
tx
[
'gas'
]
=
gasLimit
tx
[
'timestamp'
]
=
timestamp
if
(
this
.
_api
&&
this
.
_api
.
isVM
())
tx
[
'timestamp'
]
=
timestamp
return
this
.
_api
.
detectNetwork
((
err
,
network
)
=>
{
if
(
err
)
{
console
.
log
(
err
)
return
// Remove `timestamp` from tx if network is Kovan
// It shows: 'Error: Returned error: Invalid params: unknown field `timestamp`'
// See: https://github.com/ethereum/remix-project/issues/1282
}
else
if
(
network
&&
network
.
name
===
'Kovan'
)
delete
tx
[
'timestamp'
]
return
this
.
getWeb3
().
eth
.
call
(
tx
,
function
(
error
,
result
:
any
)
{
return
this
.
getWeb3
().
eth
.
call
(
tx
,
function
(
error
,
result
:
any
)
{
if
(
error
)
return
callback
(
error
)
if
(
error
)
return
callback
(
error
)
callback
(
null
,
{
callback
(
null
,
{
result
:
result
result
:
result
})
})
})
})
})
}
}
this
.
getWeb3
().
eth
.
estimateGas
(
tx
,
(
err
,
gasEstimation
)
=>
{
this
.
getWeb3
().
eth
.
estimateGas
(
tx
,
(
err
,
gasEstimation
)
=>
{
if
(
err
&&
err
.
message
.
indexOf
(
'Invalid JSON RPC response'
)
!==
-
1
)
{
if
(
err
&&
err
.
message
.
indexOf
(
'Invalid JSON RPC response'
)
!==
-
1
)
{
...
...
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