Skip to content

Commit

Permalink
remove call by simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Oct 24, 2023
1 parent 368d584 commit 91d941a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
12 changes: 3 additions & 9 deletions libs/remix-lib/src/execution/txRunnerWeb3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
7 changes: 0 additions & 7 deletions libs/remix-simulator/src/methods/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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()
Expand Down
7 changes: 0 additions & 7 deletions libs/remix-simulator/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 91d941a

Please sign in to comment.