diff --git a/rpc/src/v1/impls/eth.rs b/rpc/src/v1/impls/eth.rs index a72b243a6..4929c0ee5 100644 --- a/rpc/src/v1/impls/eth.rs +++ b/rpc/src/v1/impls/eth.rs @@ -375,7 +375,7 @@ impl Eth for EthClient where match block_number { BlockNumber::Pending => to_value(&RpcU256::from(take_weak!(self.miner).storage_at(&*take_weak!(self.client), &address, &H256::from(position)))), id => match take_weak!(self.client).storage_at(&address, &H256::from(position), id.into()) { - Some(s) => to_value(&RpcU256::from(s)), + Some(s) => to_value(&RpcH256::from(s)), None => Err(make_unsupported_err()), // None is only returned on unsupported requests. } } diff --git a/rpc/src/v1/tests/mocked/eth.rs b/rpc/src/v1/tests/mocked/eth.rs index b04e48133..0a9275bd8 100644 --- a/rpc/src/v1/tests/mocked/eth.rs +++ b/rpc/src/v1/tests/mocked/eth.rs @@ -299,7 +299,7 @@ fn rpc_eth_storage_at() { "params": ["0x0000000000000000000000000000000000000001", "0x4", "latest"], "id": 1 }"#; - let response = r#"{"jsonrpc":"2.0","result":"0x07","id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":"0x0000000000000000000000000000000000000000000000000000000000000007","id":1}"#; assert_eq!(tester.io.handle_request(request), Some(response.to_owned())); }