From 16cb56d27087e3704e76ded1ede0f139486b1599 Mon Sep 17 00:00:00 2001 From: Calvin Lau <38898718+calvinaco@users.noreply.github.com> Date: Wed, 9 Jun 2021 15:19:08 +0800 Subject: [PATCH] rpc: fix `CodeHash` type error on build (#100) --- ethereum/rpc/eth_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethereum/rpc/eth_api.go b/ethereum/rpc/eth_api.go index 976fdbf6..7237b959 100644 --- a/ethereum/rpc/eth_api.go +++ b/ethereum/rpc/eth_api.go @@ -951,7 +951,7 @@ func (e *PublicEthAPI) GetProof(address common.Address, storageKeys []string, bl Address: address, AccountProof: []string{accProofStr}, Balance: (*hexutil.Big)(balance), - CodeHash: common.BytesToHash(res.CodeHash), + CodeHash: common.HexToHash(res.CodeHash), Nonce: hexutil.Uint64(res.Nonce), StorageHash: common.Hash{}, // NOTE: Ethermint doesn't have a storage hash. TODO: implement? StorageProof: storageProofs,