pull/3262/head^2
yann300 2 years ago committed by Aniket
parent 7accfd00ec
commit 173aabaa8b
  1. 4
      libs/remix-lib/src/execution/txRunnerVM.ts
  2. 2
      libs/remix-lib/src/index.ts
  3. 8
      libs/remix-simulator/src/methods/transactions.ts

@ -7,14 +7,14 @@ import type { Account } from '@ethereumjs/util'
import { EventManager } from '../eventManager'
import { LogsManager } from './logsManager'
export type VMxecutionResult = {
export type VMexecutionResult = {
result: RunTxResult,
transactionHash: string
block: Block,
tx: Transaction
}
export type VMExecutionCallBack = (error: string | Error, result?: VMxecutionResult) => void
export type VMExecutionCallBack = (error: string | Error, result?: VMexecutionResult) => void
export class TxRunnerVM {
event

@ -18,7 +18,7 @@ import * as txResultHelper from './helpers/txResultHelper'
export { ConsoleLogs } from './helpers/hhconsoleSigs'
export { ICompilerApi, ConfigurationSettings } from './types/ICompilerApi'
export { QueryParams } from './query-params'
export { VMxecutionResult } from './execution/txRunnerVM'
export { VMexecutionResult } from './execution/txRunnerVM'
const helpers = {
ui: uiHelper,

@ -4,7 +4,7 @@ import { toChecksumAddress, BN, Address } from 'ethereumjs-util'
import { processTx } from './txProcess'
import { execution } from '@remix-project/remix-lib'
import { ethers } from 'ethers'
import { VMxecutionResult } from '@remix-project/remix-lib'
import { VMexecutionResult } from '@remix-project/remix-lib'
import { RunTxResult } from '@ethereumjs/vm'
import { Log, EvmError } from '@ethereumjs/evm'
const TxRunnerVM = execution.TxRunnerVM
@ -82,7 +82,7 @@ export class Transactions {
if (payload.params && payload.params.length > 0 && payload.params[0].from) {
payload.params[0].from = toChecksumAddress(payload.params[0].from)
}
processTx(this.txRunnerInstance, payload, false, (error, result: VMxecutionResult) => {
processTx(this.txRunnerInstance, payload, false, (error, result: VMexecutionResult) => {
if (!error && result) {
this.vmContext.addBlock(result.block)
const hash = '0x' + result.tx.hash().toString('hex')
@ -155,7 +155,7 @@ export class Transactions {
payload.params[0].gas = 10000000 * 10
processTx(this.txRunnerInstance, payload, true, (error, value: VMxecutionResult) => {
processTx(this.txRunnerInstance, payload, true, (error, value: VMexecutionResult) => {
const result: RunTxResult = value.result
if (error) return cb(error)
if ((result as any).receipt?.status === '0x0' || (result as any).receipt?.status === 0) {
@ -202,7 +202,7 @@ export class Transactions {
const tag = payload.params[0].timestamp // e2e reference
processTx(this.txRunnerInstance, payload, true, (error, result: VMxecutionResult) => {
processTx(this.txRunnerInstance, payload, true, (error, result: VMexecutionResult) => {
if (!error && result) {
this.vmContext.addBlock(result.block)
const hash = '0x' + result.tx.hash().toString('hex')

Loading…
Cancel
Save