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

Add createHttpTransportForSolanaRpc function #3196

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

lorisleiva
Copy link
Contributor

@lorisleiva lorisleiva commented Sep 2, 2024

This PR creates a new HTTP transport specific to the Solana RPC API that prevents loss of precision for large integers, in both the request and the response of the RPC cycle.

It does so by using the previously added helpers:

  • isSolanaRequest: to figure out if we should customise the way we parse/stringify the response/request respectively.
  • parseJsonWithBigInts: for our custom fromJson option, if a Solana request has been identified.
  • stringifyJsonWithBigInts: for our custom toJson option, if a Solana request has been identified.

Copy link

changeset-bot bot commented Sep 2, 2024

🦋 Changeset detected

Latest commit: ac099d6

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@lorisleiva lorisleiva marked this pull request as ready for review September 2, 2024 15:42
@lorisleiva lorisleiva force-pushed the loris/is-solana-request branch from fa57791 to 94e1ede Compare September 2, 2024 15:43
@lorisleiva lorisleiva force-pushed the loris/http-transport-for-solana-rpc branch from 63f1c2f to 7d05aec Compare September 2, 2024 15:43
@lorisleiva lorisleiva force-pushed the loris/is-solana-request branch from 94e1ede to 4d54dbb Compare September 2, 2024 15:47
@lorisleiva lorisleiva force-pushed the loris/http-transport-for-solana-rpc branch 2 times, most recently from fbb79ae to f1f5511 Compare September 2, 2024 15:50
@lorisleiva lorisleiva force-pushed the loris/is-solana-request branch from 4d54dbb to 37e83c2 Compare September 3, 2024 21:25
@lorisleiva lorisleiva force-pushed the loris/http-transport-for-solana-rpc branch from f1f5511 to 1c162f6 Compare September 3, 2024 21:25
@lorisleiva lorisleiva force-pushed the loris/is-solana-request branch from 37e83c2 to d3a3d56 Compare September 3, 2024 21:29
@lorisleiva lorisleiva force-pushed the loris/http-transport-for-solana-rpc branch from 1c162f6 to ad1559a Compare September 3, 2024 21:30
@lorisleiva lorisleiva force-pushed the loris/is-solana-request branch from d3a3d56 to cdf7109 Compare September 3, 2024 21:36
@lorisleiva lorisleiva force-pushed the loris/http-transport-for-solana-rpc branch from ad1559a to 674b13b Compare September 3, 2024 21:36
@lorisleiva lorisleiva force-pushed the loris/is-solana-request branch from cdf7109 to 9f89fc6 Compare September 3, 2024 22:11
@lorisleiva lorisleiva force-pushed the loris/http-transport-for-solana-rpc branch from 674b13b to 6b996b2 Compare September 3, 2024 22:11
@lorisleiva lorisleiva force-pushed the loris/is-solana-request branch from 9f89fc6 to b159be0 Compare September 5, 2024 09:23
@lorisleiva lorisleiva force-pushed the loris/http-transport-for-solana-rpc branch from 6b996b2 to f6f7579 Compare September 5, 2024 09:23
@lorisleiva lorisleiva force-pushed the loris/is-solana-request branch from b159be0 to 26af60a Compare September 6, 2024 11:49
@lorisleiva lorisleiva force-pushed the loris/http-transport-for-solana-rpc branch from f6f7579 to e5a3363 Compare September 6, 2024 11:49
@lorisleiva lorisleiva force-pushed the loris/is-solana-request branch from 26af60a to 5c4c50b Compare September 10, 2024 07:55
@lorisleiva lorisleiva force-pushed the loris/http-transport-for-solana-rpc branch from e5a3363 to db92783 Compare September 10, 2024 07:56
@lorisleiva lorisleiva force-pushed the loris/is-solana-request branch from 5c4c50b to 2d06c42 Compare September 10, 2024 08:17
@lorisleiva lorisleiva force-pushed the loris/http-transport-for-solana-rpc branch from db92783 to 6163547 Compare September 10, 2024 08:17
@lorisleiva lorisleiva force-pushed the loris/is-solana-request branch from 2d06c42 to d566b79 Compare September 10, 2024 08:51
@lorisleiva lorisleiva force-pushed the loris/http-transport-for-solana-rpc branch from 6163547 to c3c60e2 Compare September 10, 2024 08:51
@lorisleiva lorisleiva force-pushed the loris/is-solana-request branch from d566b79 to 7dbb7d1 Compare September 10, 2024 09:01
@lorisleiva lorisleiva force-pushed the loris/http-transport-for-solana-rpc branch 2 times, most recently from 868cda0 to ce1d907 Compare September 10, 2024 09:07
@lorisleiva lorisleiva force-pushed the loris/is-solana-request branch from 7dbb7d1 to f2d3b70 Compare September 10, 2024 10:13
@lorisleiva lorisleiva force-pushed the loris/http-transport-for-solana-rpc branch from ce1d907 to 584fd59 Compare September 10, 2024 10:13
Copy link
Collaborator

@steveluscher steveluscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added via Giphy

Copy link
Contributor Author

lorisleiva commented Sep 11, 2024

Merge activity

  • Sep 11, 4:12 AM EDT: @lorisleiva started a stack merge that includes this pull request via Graphite.
  • Sep 11, 4:26 AM EDT: Graphite rebased this pull request as part of a merge.
  • Sep 11, 4:27 AM EDT: @lorisleiva merged this pull request with Graphite.

@lorisleiva lorisleiva changed the base branch from loris/is-solana-request to graphite-base/3196 September 11, 2024 08:22
@lorisleiva lorisleiva changed the base branch from graphite-base/3196 to master September 11, 2024 08:24
@lorisleiva lorisleiva force-pushed the loris/http-transport-for-solana-rpc branch from 584fd59 to ac099d6 Compare September 11, 2024 08:25
@lorisleiva lorisleiva merged commit 512853e into master Sep 11, 2024
7 checks passed
@lorisleiva lorisleiva deleted the loris/http-transport-for-solana-rpc branch September 11, 2024 08:27
@github-actions github-actions bot mentioned this pull request Sep 11, 2024
Copy link
Contributor

Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants