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
b2eebb1b
Commit
b2eebb1b
authored
Aug 31, 2021
by
lianahus
Committed by
Aniket
Aug 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding block.basefee only if there us baseFeePerGas available
parent
4631d6e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
global-variables.tsx
...x-ui/debugger-ui/src/lib/vm-debugger/global-variables.tsx
+3
-1
No files found.
libs/remix-ui/debugger-ui/src/lib/vm-debugger/global-variables.tsx
View file @
b2eebb1b
...
@@ -5,7 +5,6 @@ import { BN } from 'ethereumjs-util'
...
@@ -5,7 +5,6 @@ import { BN } from 'ethereumjs-util'
export
const
GlobalVariables
=
({
block
,
receipt
,
tx
})
=>
{
export
const
GlobalVariables
=
({
block
,
receipt
,
tx
})
=>
{
// see https://docs.soliditylang.org/en/latest/units-and-global-variables.html#block-and-transaction-properties
// see https://docs.soliditylang.org/en/latest/units-and-global-variables.html#block-and-transaction-properties
const
globals
=
{
const
globals
=
{
'block.basefee'
:
(
new
BN
(
block
.
baseFeePerGas
.
replace
(
'0x'
,
''
),
'hex'
)).
toString
(
10
)
+
` Wei (
${
block
.
baseFeePerGas
}
)`
,
'block.chainid'
:
tx
.
chainId
,
'block.chainid'
:
tx
.
chainId
,
'block.coinbase'
:
block
.
miner
,
'block.coinbase'
:
block
.
miner
,
'block.difficulty'
:
block
.
difficulty
,
'block.difficulty'
:
block
.
difficulty
,
...
@@ -17,6 +16,9 @@ export const GlobalVariables = ({ block, receipt, tx }) => {
...
@@ -17,6 +16,9 @@ export const GlobalVariables = ({ block, receipt, tx }) => {
'msg.value'
:
tx
.
value
+
' Wei'
,
'msg.value'
:
tx
.
value
+
' Wei'
,
'tx.origin'
:
tx
.
from
'tx.origin'
:
tx
.
from
}
}
if
(
block
.
baseFeePerGas
)
globals
[
'block.basefee'
]
=
(
new
BN
(
block
.
baseFeePerGas
.
replace
(
'0x'
,
''
),
'hex'
)).
toString
(
10
)
+
` Wei (
${
block
.
baseFeePerGas
}
)`
return
(
return
(
<
div
id=
'globalvariable'
data
-
id=
'globalvariable'
>
<
div
id=
'globalvariable'
data
-
id=
'globalvariable'
>
<
DropdownPanel
hexHighlight=
{
false
}
bodyStyle=
{
{
fontFamily
:
'monospace'
}
}
dropdownName=
'Global Variables'
calldata=
{
globals
||
{}
}
/>
<
DropdownPanel
hexHighlight=
{
false
}
bodyStyle=
{
{
fontFamily
:
'monospace'
}
}
dropdownName=
'Global Variables'
calldata=
{
globals
||
{}
}
/>
...
...
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