Merge branch 'master' into nx3

deps^2
bunsenstraat 2 years ago committed by GitHub
commit 142cd5131b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/remix-ide/src/assets/js/loader.js
  2. 1
      apps/remix-ide/src/remixEngine.js
  3. 7
      libs/remix-lib/src/execution/txRunnerVM.ts
  4. 4
      libs/remix-simulator/src/methods/transactions.ts

@ -32,8 +32,6 @@ if (domains[window.location.hostname]) {
})()
}
function isElectron() {
// Renderer process
if (typeof window !== 'undefined' && typeof window.process === 'object' && window.process.type === 'renderer') {

@ -19,6 +19,7 @@ export class RemixEngine extends Engine {
if (name === 'sourcify') return { queueTimeout: 60000 * 4 }
if (name === 'fetchAndCompile') return { queueTimeout: 60000 * 4 }
if (name === 'walletconnect') return { queueTimeout: 60000 * 4 }
if (name === 'udapp') return { queueTimeout: 60000 * 4 }
return { queueTimeout: 10000 }
}

@ -1,6 +1,6 @@
'use strict'
import BN from 'bn.js'
import { RunBlockResult, RunTxResult } from '@ethereumjs/vm'
import { ConsensusType } from '@ethereumjs/common'
import { Transaction, FeeMarketEIP1559Transaction } from '@ethereumjs/tx'
import { Block } from '@ethereumjs/block'
import { bufferToHex, Address } from '@ethereumjs/util'
@ -106,13 +106,14 @@ export class TxRunnerVM {
const coinbases = ['0x0e9281e9c6a0808672eaba6bd1220e144c9bb07a', '0x8945a1288dc78a6d8952a92c77aee6730b414778', '0x94d76e24f818426ae84aa404140e8d5f60e10e7e']
const difficulties = [69762765929000, 70762765929000, 71762765929000]
const difficulty = this.commonContext.consensusType() === ConsensusType.ProofOfStake ? 0 : difficulties[self.blockNumber % difficulties.length]
const block = Block.fromBlockData({
header: {
timestamp: new Date().getTime() / 1000 | 0,
number: self.blockNumber,
coinbase: coinbases[self.blockNumber % coinbases.length],
difficulty: difficulties[self.blockNumber % difficulties.length],
difficulty,
gasLimit,
baseFeePerGas: EIP1559 ? '0x1' : undefined
},

@ -156,9 +156,9 @@ export class Transactions {
payload.params[0].gas = 10000000 * 10
this.vmContext.web3().flagNextAsDoNotRecordEvmSteps()
processTx(this.txRunnerInstance, payload, true, (error, value: VMexecutionResult) => {
const result: RunTxResult = value.result
processTx(this.txRunnerInstance, payload, true, (error, value: VMexecutionResult) => {
if (error) return cb(error)
const result: RunTxResult = value.result
if ((result as any).receipt?.status === '0x0' || (result as any).receipt?.status === 0) {
try {
const msg = `0x${result.execResult.returnValue.toString('hex') || '0'}`

Loading…
Cancel
Save