fix handling basefeepergas

pull/5370/head
bunsenstraat 2 years ago
parent 7ac1481a09
commit 23a088d18b
  1. 3
      libs/remix-ui/debugger-ui/src/lib/vm-debugger/global-variables.tsx

@ -1,6 +1,7 @@
import React from 'react' // eslint-disable-line
import DropdownPanel from './dropdown-panel' // eslint-disable-line
import { BN } from 'ethereumjs-util'
import Web3 from 'web3'
export const GlobalVariables = ({ block, receipt, tx }) => {
// see https://docs.soliditylang.org/en/latest/units-and-global-variables.html#block-and-transaction-properties
@ -17,7 +18,7 @@ export const GlobalVariables = ({ block, receipt, tx }) => {
'tx.origin': tx.from
}
if (block.baseFeePerGas) {
globals['block.basefee'] = (new BN(block.baseFeePerGas.replace('0x', ''), 'hex')).toString(10) + ` Wei (${block.baseFeePerGas})`
globals['block.basefee'] = (Web3.utils.toBN(block.baseFeePerGas)) + ` Wei (${block.baseFeePerGas})` //(new BN(block.baseFeePerGas.replace('0x', ''), 'hex')).toString(10) + ` Wei (${block.baseFeePerGas})`
}
return (

Loading…
Cancel
Save