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. 5
      libs/remix-lib/src/execution/txRunnerVM.ts
  4. 2
      libs/remix-simulator/src/methods/transactions.ts

@ -32,8 +32,6 @@ if (domains[window.location.hostname]) {
})() })()
} }
function isElectron() { function isElectron() {
// Renderer process // Renderer process
if (typeof window !== 'undefined' && typeof window.process === 'object' && window.process.type === 'renderer') { 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 === 'sourcify') return { queueTimeout: 60000 * 4 }
if (name === 'fetchAndCompile') return { queueTimeout: 60000 * 4 } if (name === 'fetchAndCompile') return { queueTimeout: 60000 * 4 }
if (name === 'walletconnect') return { queueTimeout: 60000 * 4 } if (name === 'walletconnect') return { queueTimeout: 60000 * 4 }
if (name === 'udapp') return { queueTimeout: 60000 * 4 }
return { queueTimeout: 10000 } return { queueTimeout: 10000 }
} }

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

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

Loading…
Cancel
Save