@@ -30,24 +30,24 @@ func (pr *Prover) getAccountProof(height int64) ([]byte, common.Hash, error) {
3030
3131func (pr * Prover ) getStateCommitmentProof (path []byte , height exported.Height ) ([]byte , error ) {
3232 // calculate slot for commitment
33- slot := crypto .Keccak256Hash (append (
33+ storageKey := crypto .Keccak256Hash (append (
3434 crypto .Keccak256Hash (path ).Bytes (),
35- common. Hash {} .Bytes ()... ,
35+ IBCCommitmentsSlot .Bytes ()... ,
3636 ))
37- marshaledSlot , err := slot .MarshalText ()
37+ storageKeyHex , err := storageKey .MarshalText ()
3838 if err != nil {
3939 return nil , fmt .Errorf ("failed to marshal slot: height = %d, %+v" , height .GetRevisionHeight (), err )
4040 }
4141
4242 // call eth_getProof
4343 stateProof , err := pr .chain .GetProof (
4444 pr .chain .IBCAddress (),
45- [][]byte {marshaledSlot },
45+ [][]byte {storageKeyHex },
4646 big .NewInt (int64 (height .GetRevisionHeight ())),
4747 )
4848 if err != nil {
4949 return nil , fmt .Errorf ("failed to get state commitment proof : address = %s, height = %d, slot = %v, %+v" ,
50- pr .chain .IBCAddress (), height .GetRevisionHeight (), marshaledSlot , err )
50+ pr .chain .IBCAddress (), height .GetRevisionHeight (), storageKeyHex , err )
5151 }
5252 return stateProof .StorageProofRLP [0 ], nil
5353}
0 commit comments