Merge branch 'master' into mixins

pull/3391/head
bunsenstraat 2 years ago committed by GitHub
commit eb46b36354
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      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,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');
});
});

@ -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