diff --git a/apps/remix-ide/src/assets/js/loader.js b/apps/remix-ide/src/assets/js/loader.js index 5e5bfb631f..98a39476f1 100644 --- a/apps/remix-ide/src/assets/js/loader.js +++ b/apps/remix-ide/src/assets/js/loader.js @@ -32,13 +32,6 @@ if (domains[window.location.hostname]) { })() } -createScriptTag = function (url, type) { - var script = document.createElement('script'); - script.src = url; - script.type = type; - document.getElementsByTagName('head')[0].appendChild(script); -}; - function isElectron() { // Renderer process if (typeof window !== 'undefined' && typeof window.process === 'object' && window.process.type === 'renderer') { @@ -63,11 +56,5 @@ fetch(versionUrl, { cache: "no-store" }).then(response => { response.text().then(function (data) { const version = JSON.parse(data); console.log(`Loading Remix ${version.version}`); - createScriptTag(`polyfills.${version.version}.${version.timestamp}.js`, 'module'); - if (version.mode === 'development') { - createScriptTag(`vendor.${version.version}.${version.timestamp}.js`, 'module'); - createScriptTag(`runtime.${version.version}.${version.timestamp}.js`, 'module'); - } - createScriptTag(`main.${version.version}.${version.timestamp}.js`, 'text/javascript'); }); }); diff --git a/apps/remix-ide/src/remixEngine.js b/apps/remix-ide/src/remixEngine.js index 64fd918227..3a0c905acd 100644 --- a/apps/remix-ide/src/remixEngine.js +++ b/apps/remix-ide/src/remixEngine.js @@ -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 } } diff --git a/libs/remix-lib/src/execution/txRunnerVM.ts b/libs/remix-lib/src/execution/txRunnerVM.ts index b654ba7944..ed3562f30e 100644 --- a/libs/remix-lib/src/execution/txRunnerVM.ts +++ b/libs/remix-lib/src/execution/txRunnerVM.ts @@ -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 }, diff --git a/libs/remix-simulator/src/methods/transactions.ts b/libs/remix-simulator/src/methods/transactions.ts index bca6d05124..e7fbe6c225 100644 --- a/libs/remix-simulator/src/methods/transactions.ts +++ b/libs/remix-simulator/src/methods/transactions.ts @@ -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'}`