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

Defer all camel-casing to the Typescript client #896

Closed
kevinheavey opened this issue Oct 19, 2021 · 2 comments
Closed

Defer all camel-casing to the Typescript client #896

kevinheavey opened this issue Oct 19, 2021 · 2 comments
Labels
idl related to the IDL, either program or client side lang ts

Comments

@kevinheavey
Copy link
Contributor

I think it's confusing how some names are converted to camel case when being written to the IDL, and then the Typescript client adds some camel casing of its own. It means the IDL names don't match either the smart contract code or the client code.

This gets extra confusing when writing Python client code where the casing conventions line up with Rust conventions - if the camel casing was all deferred to Typescript then the Python names could match the Rust names and the IDL names.

I'd be willing to make a PR for this. The result would be that IDLs would change but there would be no breaking changes for Typescript client users.

@armaniferrante
Copy link
Member

I think this is worth changing, as the IDL casing isn't very consistent. But in regardless, clients should probably just change the case into whatever it wants and try to be agnostic to the IDL casing. The typescript client, for example, should always translate into the camel case.

@acheroncrypto acheroncrypto mentioned this issue Feb 25, 2024
@acheroncrypto acheroncrypto added the idl related to the IDL, either program or client side label Mar 10, 2024
@acheroncrypto
Copy link
Collaborator

Fixed in #2824.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idl related to the IDL, either program or client side lang ts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants