ganache icon indicating copy to clipboard operation
ganache copied to clipboard

Leading zeros are trimmed in getStorageAt result

Open VladLupashevskyi opened this issue 2 years ago • 0 comments

Here is the example of request made to a normal Ethereum client:

 curl -X POST --data '{"jsonrpc":"2.0","method": "eth_getStorageAt","params": ["0xC62ad447cb9Ccb9875935B438A1520662a7B863a","0x123123123","latest"],"id": 53}' http://127.0.0.1:8545

{
  "jsonrpc" : "2.0",
  "id" : 53,
  "result" : "0x0000000000000000000000000000000000000000000000000000000000000000"
}

And here is request made to a ganache client:

$ curl -X POST --data '{"jsonrpc":"2.0","method": "eth_getStorageAt","params": ["0xC62ad447cb9Ccb9875935B438A1520662a7B863a","0x123123123","latest"],"id": 53}' http://127.0.0.1:8555

{"id":53,"jsonrpc":"2.0","result":"0x"}

Leading zeros are trimmed, which should not happen.

Tested with version 7.4.0 of ganache.

VladLupashevskyi avatar Aug 11 '22 15:08 VladLupashevskyi