remove call by simulator

pull/4108/head
yann300 1 year ago
parent 368d58458a
commit d6b6f9d959
  1. 18
      libs/remix-lib/src/execution/txRunnerWeb3.ts
  2. 7
      libs/remix-simulator/src/methods/transactions.ts
  3. 7
      libs/remix-simulator/src/provider.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)
.then((result: any) => callback(null, {
result: result
}))
.catch(error => callback(error))
(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) => {

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

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

Loading…
Cancel
Save