Skip to content

Commit 9a9af6f

Browse files
committed
fix using BigNum
1 parent ce22c26 commit 9a9af6f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

libs/remix-debug/src/init.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict'
22
import Web3, { Web3PluginBase } from 'web3'
3+
import {toHex} from 'web3-utils'
34

45
export function extendWeb3 (web3) {
56
if(!web3.debug){
@@ -58,7 +59,7 @@ class Web3DebugPlugin extends Web3PluginBase {
5859
public storageRangeAt(txBlockHash, txIndex, address, start, maxSize, cb) {
5960
this.requestManager.send({
6061
method: 'debug_storageRangeAt',
61-
params: [txBlockHash, txIndex, address, start, maxSize]
62+
params: [txBlockHash, toHex(txIndex), address, start, maxSize]
6263
})
6364
.then(result => cb(null, result))
6465
.catch(error => cb(error))

libs/remix-lib/src/init.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict'
22
import Web3, { Web3PluginBase } from 'web3'
3+
import {toHex} from 'web3-utils'
34

45
export function extendWeb3 (web3) {
56
if(!web3.debug){
@@ -38,7 +39,7 @@ class Web3DebugPlugin extends Web3PluginBase {
3839
public storageRangeAt(txBlockHash, txIndex, address, start, maxSize, cb) {
3940
this.requestManager.send({
4041
method: 'debug_storageRangeAt',
41-
params: [txBlockHash, txIndex, address, start, maxSize]
42+
params: [txBlockHash, toHex(txIndex), address, start, maxSize]
4243
})
4344
.then(result => cb(null, result))
4445
.catch(error => cb(error))

0 commit comments

Comments
 (0)