From cbedfc359713b06924ce9099ea73566f3ae7b7c8 Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 24 Nov 2023 17:55:41 +0100 Subject: [PATCH] use toNumber --- libs/remix-debug/src/init.ts | 4 ++-- libs/remix-lib/src/init.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/remix-debug/src/init.ts b/libs/remix-debug/src/init.ts index 44ab725769..28923df9d0 100644 --- a/libs/remix-debug/src/init.ts +++ b/libs/remix-debug/src/init.ts @@ -1,6 +1,6 @@ 'use strict' import Web3, { Web3PluginBase } from 'web3' -import {toHex} from 'web3-utils' +import {toNumber} from 'web3-utils' export function extendWeb3 (web3) { if(!web3.debug){ @@ -59,7 +59,7 @@ class Web3DebugPlugin extends Web3PluginBase { public storageRangeAt(txBlockHash, txIndex, address, start, maxSize, cb) { this.requestManager.send({ method: 'debug_storageRangeAt', - params: [txBlockHash, toHex(txIndex), address, start, maxSize] + params: [txBlockHash, toNumber(txIndex), address, start, maxSize] }) .then(result => cb(null, result)) .catch(error => cb(error)) diff --git a/libs/remix-lib/src/init.ts b/libs/remix-lib/src/init.ts index 534eabbf47..511534b3f8 100644 --- a/libs/remix-lib/src/init.ts +++ b/libs/remix-lib/src/init.ts @@ -1,6 +1,6 @@ 'use strict' import Web3, { Web3PluginBase } from 'web3' -import {toHex} from 'web3-utils' +import {toNumber} from 'web3-utils' export function extendWeb3 (web3) { if(!web3.debug){ @@ -39,7 +39,7 @@ class Web3DebugPlugin extends Web3PluginBase { public storageRangeAt(txBlockHash, txIndex, address, start, maxSize, cb) { this.requestManager.send({ method: 'debug_storageRangeAt', - params: [txBlockHash, toHex(txIndex), address, start, maxSize] + params: [txBlockHash, toNumber(txIndex), address, start, maxSize] }) .then(result => cb(null, result)) .catch(error => cb(error))