add missing endpoint

pull/5607/head
yann300 4 months ago
parent 60e58d179a
commit 78ff794238
  1. 2
      libs/remix-simulator/README.md
  2. 18
      libs/remix-simulator/src/methods/miner.ts
  3. 2
      libs/remix-simulator/src/provider.ts

@ -39,7 +39,7 @@
* [X] eth_getCode
* [~] eth_sign
* [X] eth_sendTransaction
* [_] eth_sendRawTransaction
* [x] eth_sendRawTransaction
* [X] eth_call
* [~] eth_estimateGas
* [X] eth_getBlockByHash

@ -0,0 +1,18 @@
export class Miner {
vmContext
constructor (vmContext) {
this.vmContext = vmContext
}
methods () {
return {
miner_start: this.miner_start.bind(this),
miner_stop: this.miner_stop.bind(this)
}
}
miner_start (payload, cb) {}
miner_stop (payload, cb) {}
}

@ -8,6 +8,7 @@ import { Filters } from './methods/filters'
import { methods as miscMethods } from './methods/misc'
import { methods as netMethods } from './methods/net'
import { Transactions } from './methods/transactions'
import { Miner } from './methods/miner'
import { Debug } from './methods/debug'
import { VMContext } from './vm-context'
import { Web3PluginBase } from 'web3'
@ -65,6 +66,7 @@ export class Provider {
this.methods = merge(this.methods, netMethods())
this.methods = merge(this.methods, this.Transactions.methods())
this.methods = merge(this.methods, (new Debug(this.vmContext)).methods())
this.methods = merge(this.methods, (new Miner(this.vmContext)).methods())
}
async init () {

Loading…
Cancel
Save