fix test && linting

pull/3262/head^2
yann300 2 years ago committed by Aniket
parent 16a13f3b80
commit c01e1dc85e
  1. 3
      libs/remix-lib/src/execution/txRunnerWeb3.ts
  2. 8
      libs/remix-simulator/src/VmProxy.ts
  3. 2
      libs/remix-simulator/src/methods/blocks.ts
  4. 2
      libs/remix-simulator/test/blocks.ts

@ -47,8 +47,7 @@ export class TxRunnerWeb3 {
}
_sendTransaction (sendTx, tx, pass, callback) {
var currentDateTime = new Date();
let currentDateTime = new Date();
const start = currentDateTime.getTime() / 1000
console.log('start', start)
const cb = (err, resp) => {

@ -92,11 +92,13 @@ export class VmProxy {
this.vm.evm.events.on('step', async (data: InterpreterStep) => {
await this.pushTrace(data)
})
this.vm.events.on('afterTx', async (data: AfterTxEvent) => {
this.vm.events.on('afterTx', async (data: AfterTxEvent, resolve: (result?: any) => void) => {
await this.txProcessed(data)
resolve()
})
this.vm.events.on('beforeTx', async (data: TypedTransaction) => {
this.vm.events.on('beforeTx', async (data: TypedTransaction, resolve: (result?: any) => void) => {
await this.txWillProcess(data)
resolve()
})
}
@ -318,7 +320,7 @@ export class VmProxy {
}
// Before https://github.com/ethereum/remix-project/pull/1703, it used to throw error as
// 'unable to retrieve storage ' + txIndex + ' ' + address
cb(null, { storage: {} })
cb(null, '0x0')
}
storageRangeAt (blockNumber, txIndex, address, start, maxLength, cb) {

@ -66,7 +66,7 @@ export class Blocks {
const b = {
baseFeePerGas: '0x01',
number: bigIntToHex(block.header.number),
hash: block.hash(),
hash: this.toHex(block.hash()),
parentHash: this.toHex(block.header.parentHash),
nonce: this.toHex(block.header.nonce),
sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',

@ -18,7 +18,7 @@ describe('blocks', () => {
const block = await web3.eth.getBlock(0)
const expectedBlock = {
baseFeePerGas: '0x01',
baseFeePerGas: 1,
difficulty: '69762765929000',
extraData: '0x0',
gasLimit: 8000000,

Loading…
Cancel
Save