ethclient: return storage proofs in GetProof #24697 (#1369)

This commit is contained in:
Daniel Liu 2025-08-22 16:42:46 +08:00 committed by GitHub
parent 34073a1925
commit 1bf181eda6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -80,7 +80,6 @@ type StorageResult struct {
// GetProof returns the account and storage values of the specified account including the Merkle-proof.
// The block number can be nil, in which case the value is taken from the latest known block.
func (ec *Client) GetProof(ctx context.Context, account common.Address, keys []string, blockNumber *big.Int) (*AccountResult, error) {
type storageResult struct {
Key string `json:"key"`
Value *hexutil.Big `json:"value"`
@ -115,6 +114,7 @@ func (ec *Client) GetProof(ctx context.Context, account common.Address, keys []s
Nonce: uint64(res.Nonce),
CodeHash: res.CodeHash,
StorageHash: res.StorageHash,
StorageProof: storageResults,
}
return &result, err
}