Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: AddressBytesToString and AddressStringToBytes HTTP annotation maps to the same URI #23281

Open
1 task done
technicallyty opened this issue Jan 9, 2025 · 0 comments
Labels

Comments

@technicallyty
Copy link
Contributor

technicallyty commented Jan 9, 2025

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

The queries resolve to the same endpoint, making the one of them defunct.

  // AddressBytesToString converts Account Address bytes to string
  rpc AddressBytesToString(AddressBytesToStringRequest) returns (AddressBytesToStringResponse) {
    option (cosmos_proto.method_added_in) = "cosmos-sdk 0.46";
    option (google.api.http).get          = "/cosmos/auth/v1beta1/bech32/{address_bytes}";
  }

  // AddressStringToBytes converts Address string to bytes
  rpc AddressStringToBytes(AddressStringToBytesRequest) returns (AddressStringToBytesResponse) {
    option (cosmos_proto.method_added_in) = "cosmos-sdk 0.46";
    option (google.api.http).get          = "/cosmos/auth/v1beta1/bech32/{address_string}";
  }

These both end up producing /cosmos/auth/v1beta1/bech32/:wildcard.

Should probably change the string RPC annotation?

Cosmos SDK Version

main

How to reproduce?

query the endpoint above. no way to get the string version. it always uses the bytes endpoint.

@github-project-automation github-project-automation bot moved this to 📋 Backlog in Cosmos-SDK Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant