Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth_getStorageAt returns 0 #1447

Closed
fedeaviles opened this issue Apr 27, 2023 · 0 comments · Fixed by #1558
Closed

eth_getStorageAt returns 0 #1447

fedeaviles opened this issue Apr 27, 2023 · 0 comments · Fixed by #1558

Comments

@fedeaviles
Copy link

eth_getStorageAt returns 0

Description

eth_getStorageAt method always returns 0x0000000000000000000000000000000000000000000000000000000000000000 in versions 0.6.2, 0.6.3, 0.7.3-beta3, 0.8.0 and 0.8.1. But it works fine in version 0.6.1

Your environment

  • OS and version. macOs Ventura 13.3.1
  • The version of the Polygon Edge. 0.6.2, 0.6.3, 0.7.3-beta3, 0.8.0, 0.8.1
  • The branch that causes this issue. v0.6.2, v0.6.3, v0.7.3-beta3, v0.8.0, v0.8.1
  • Locally or Cloud hosted (which provider). Local and also Cloud (Linux with polygon-edge v0.6.3 on AWS)
  • Please confirm if the validators are running under containerized environment (K8s, Docker, etc.). Docker

Steps to reproduce

  • Tell us how to reproduce this issue.
  1. deploy a smart contract
 // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

contract Storage {
    uint256 public value;
    
    constructor() {
        value = 42;
    }
    
    function setValue(uint256 _newValue) public {
        value = _newValue;
    }
}
  1. Use the eth_getStorageAt method (with the correct contract address)
curl --request POST \
   --url http://localhost:10002/ \
   --header 'accept: application/json' \
   --header 'content-type: application/json' \
   --data '
{
"method": "eth_getStorageAt",
"params": [
  "0xAE975071Be8F8eE67addBC1A82488F1C24858067",
  "0x0",
  "latest"
],
"id": 1,
"jsonrpc": "2.0"
}
'

Expected behavior

  • Tell us what should happen.
    It should return:
 {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x000000000000000000000000000000000000000000000000000000000000002A"
} 
  • Tell us what happened instead.
    It returns:
 {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x0000000000000000000000000000000000000000000000000000000000000000"
} 

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant