fix gaslimit when estimate gas is failing

pull/4737/head^2
yann300 7 months ago committed by Aniket
parent cab80e685a
commit f3f1127427
  1. 3
      libs/remix-lib/src/execution/txRunnerWeb3.ts
  2. 2
      libs/remix-ui/run-tab/src/lib/components/gasLimit.tsx

@ -168,7 +168,8 @@ export class TxRunnerWeb3 {
}
err = network.name === 'VM' ? null : err // just send the tx if "VM"
gasEstimationForceSend(err, () => {
tx['gas'] = gasLimit
const defaultGasLimit = 3000000
tx['gas'] = gasLimit === '0x0' ? '0x' + defaultGasLimit.toString(16) : gasLimit
if (this._api.config.getUnpersistedProperty('doNotShowTransactionConfirmationAgain')) {
return this._executeTx(tx, network, null, this._api, promptCb, callback)

@ -4,7 +4,7 @@ import React, { useEffect, useRef } from 'react'
import {FormattedMessage} from 'react-intl'
import {GasPriceProps} from '../types'
const defaultGasLimit = 500000
const defaultGasLimit = 3000000
export function GasLimitUI(props: GasPriceProps) {
const auto = useRef(true)
const inputComponent = useRef<HTMLInputElement>(null)

Loading…
Cancel
Save