remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
remix-project/libs/remix-simulator/src/methods/debug.ts

33 lines
778 B

export class Debug {
vmContext
constructor (vmContext) {
this.vmContext = vmContext
}
methods () {
return {
debug_traceTransaction: this.debug_traceTransaction.bind(this),
debug_preimage: this.debug_preimage.bind(this),
debug_storageRangeAt: this.debug_storageRangeAt.bind(this)
}
}
debug_traceTransaction (payload, cb) {
this.vmContext.web3().debug.traceTransaction(payload.params[0], {}, cb)
}
debug_preimage (payload, cb) {
this.vmContext.web3().debug.preimage(payload.params[0], cb)
}
debug_storageRangeAt (payload, cb) {
this.vmContext.web3().debug.storageRangeAt(
payload.params[0],
payload.params[1],
payload.params[2],
payload.params[3],
payload.params[4],
cb)
}
}