From 91d941a91caddf2a31141504613c5508f04c2085 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 24 Oct 2023 21:44:21 +0200 Subject: [PATCH] remove call by simulator --- libs/remix-lib/src/execution/txRunnerWeb3.ts | 12 +++--------- libs/remix-simulator/src/methods/transactions.ts | 7 ------- libs/remix-simulator/src/provider.ts | 7 ------- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/libs/remix-lib/src/execution/txRunnerWeb3.ts b/libs/remix-lib/src/execution/txRunnerWeb3.ts index a18c66b3732..49b8c9cc33c 100644 --- a/libs/remix-lib/src/execution/txRunnerWeb3.ts +++ b/libs/remix-lib/src/execution/txRunnerWeb3.ts @@ -102,19 +102,13 @@ export class TxRunnerWeb3 { if (useCall) { tx['gas'] = gasLimit if (this._api && this._api.isVM()) { - tx['timestamp'] = timestamp; - (this.getWeb3() as any).remix.callBySimulator(tx) - .then((result: any) => callback(null, { - result: result - })) - .catch(error => callback(error)) - } else { - this.getWeb3().eth.call(tx) + (this.getWeb3() as any).remix.registerCallId(timestamp) + } + this.getWeb3().eth.call(tx) .then((result: any) => callback(null, { result: result })) .catch(error => callback(error)) - } return } this._api.detectNetwork((errNetWork, network) => { diff --git a/libs/remix-simulator/src/methods/transactions.ts b/libs/remix-simulator/src/methods/transactions.ts index 90bcc886003..25c751ed4d5 100644 --- a/libs/remix-simulator/src/methods/transactions.ts +++ b/libs/remix-simulator/src/methods/transactions.ts @@ -74,7 +74,6 @@ export class Transactions { eth_getExecutionResultFromSimulator: this.eth_getExecutionResultFromSimulator.bind(this), eth_getHHLogsForTx: this.eth_getHHLogsForTx.bind(this), eth_getHashFromTagBySimulator: this.eth_getHashFromTagBySimulator.bind(this), - eth_callBySimulator: this.eth_callBySimulator.bind(this), eth_registerCallId: this.eth_registerCallId.bind(this) } } @@ -191,12 +190,6 @@ export class Transactions { }) } - eth_callBySimulator (payload, cb) { - this.eth_call(payload, (error, returnValue) => { - cb(error, returnValue) - }) - } - eth_registerCallId (payload, cb) { this.comingCallId = payload.params[0] cb() diff --git a/libs/remix-simulator/src/provider.ts b/libs/remix-simulator/src/provider.ts index 513c123b181..2d2da213f19 100644 --- a/libs/remix-simulator/src/provider.ts +++ b/libs/remix-simulator/src/provider.ts @@ -162,13 +162,6 @@ class Web3TestPlugin extends Web3PluginBase { }) } - public callBySimulator(payload) { - return this.requestManager.send({ - method: 'eth_callBySimulator', - params: [payload] - }) - } - public registerCallId(id) { return this.requestManager.send({ method: 'eth_registerCallId',