Skip to content

Commit

Permalink
Merge branch 'v0.8.0' into thiagodeev/rpcv08-getMessagesStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagodeev committed Oct 28, 2024
2 parents d59f540 + 470f18c commit 78c87a0
Show file tree
Hide file tree
Showing 10 changed files with 366 additions and 190 deletions.
15 changes: 15 additions & 0 deletions mocks/mock_rpc_provider.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions rpc/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,21 @@ func (provider *Provider) EstimateMessageFee(ctx context.Context, msg MsgFromL1,
}
return &raw, nil
}

// Get merkle paths in one of the state tries: global state, classes, individual contract.
// A single request can query for any mix of the three types of storage proofs (classes, contracts, and storage)
//
// Parameters:
// - ctx: The context of the function call
// - storageProofInput: an input containing at least one of the fields filled
// Returns:
// - *StorageProofResult: the proofs of the field passed in the input
// - error: an error if any occurred during the execution
func (provider *Provider) GetStorageProof(ctx context.Context, storageProofInput StorageProofInput) (*StorageProofResult, error) {
var raw StorageProofResult
if err := do(ctx, provider.c, "starknet_getStorageProof", &raw, storageProofInput); err != nil {

return nil, tryUnwrapToRPCErr(err, ErrBlockNotFound, ErrStorageProofNotSupported)
}
return &raw, nil
}
Loading

0 comments on commit 78c87a0

Please sign in to comment.