diff --git a/rpc/backend/account_info.go b/rpc/backend/account_info.go index bc1799740f..604acc4873 100644 --- a/rpc/backend/account_info.go +++ b/rpc/backend/account_info.go @@ -110,7 +110,8 @@ func (b *Backend) GetProof(address common.Address, storageKeys []string, blockNr } // query account proofs - _, proof, err := b.queryClient.GetProof(clientCtx, authtypes.StoreKey, address.Bytes()) + accountKey := append(authtypes.AddressStoreKeyPrefix.Bytes(), address.Bytes()...) + _, proof, err := b.queryClient.GetProof(clientCtx, authtypes.StoreKey, accountKey) if err != nil { return nil, err } diff --git a/rpc/backend/account_info_test.go b/rpc/backend/account_info_test.go index 87ce26f9a8..6108f018a5 100644 --- a/rpc/backend/account_info_test.go +++ b/rpc/backend/account_info_test.go @@ -5,6 +5,7 @@ import ( "math/big" tmrpcclient "github.com/cometbft/cometbft/rpc/client" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "google.golang.org/grpc/metadata" @@ -140,7 +141,7 @@ func (suite *BackendTestSuite) TestGetProof() { client, bn.Int64(), "store/acc/key", - address1.Bytes(), + append(authtypes.AddressStoreKeyPrefix.Bytes(), address1.Bytes()...), tmrpcclient.ABCIQueryOptions{Height: iavlHeight, Prove: true}, ) }, diff --git a/rpc/backend/sign_tx_test.go b/rpc/backend/sign_tx_test.go index 56632d68ab..b6e030d4fa 100644 --- a/rpc/backend/sign_tx_test.go +++ b/rpc/backend/sign_tx_test.go @@ -202,7 +202,7 @@ func (suite *BackendTestSuite) TestSign() { responseBz, err := suite.backend.Sign(tc.fromAddr, tc.inputBz) if tc.expPass { - signature, _, err := suite.backend.clientCtx.Keyring.SignByAddress((sdk.AccAddress)(from.Bytes()), tc.inputBz, signing.SignMode_SIGN_MODE_DIRECT) + signature, _, err := suite.backend.clientCtx.Keyring.SignByAddress((sdk.AccAddress)(from.Bytes()), tc.inputBz, signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) signature[goethcrypto.RecoveryIDOffset] += 27 suite.Require().NoError(err) suite.Require().Equal((hexutil.Bytes)(signature), responseBz) @@ -251,7 +251,7 @@ func (suite *BackendTestSuite) TestSignTypedData() { if tc.expPass { sigHash, _, err := apitypes.TypedDataAndHash(tc.inputTypedData) - signature, _, err := suite.backend.clientCtx.Keyring.SignByAddress((sdk.AccAddress)(from.Bytes()), sigHash, signing.SignMode_SIGN_MODE_DIRECT) + signature, _, err := suite.backend.clientCtx.Keyring.SignByAddress((sdk.AccAddress)(from.Bytes()), sigHash, signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) signature[goethcrypto.RecoveryIDOffset] += 27 suite.Require().NoError(err) suite.Require().Equal((hexutil.Bytes)(signature), responseBz)