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

Get account nonce via state_call; remove RPC method #1002

Merged
merged 1 commit into from
Jun 7, 2023
Merged

Conversation

jsdw
Copy link
Collaborator

@jsdw jsdw commented Jun 7, 2023

Some chains don't have the RPC method that we were using, and using state_call will be more future proof going forwards anyway.

Also make the function public because it's come up a couple of times recently where people have needed to fetch this.

@jsdw jsdw requested a review from a team as a code owner June 7, 2023 11:55
@jsdw jsdw changed the title Get account nonce via state_call Get account nonce via state_call; remove RPC method Jun 7, 2023
Copy link
Member

@niklasad1 niklasad1 left a comment

Choose a reason for hiding this comment

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

LGTM, I assume the trait bounds are changed because state_call just takes Bytes

@jsdw
Copy link
Collaborator Author

jsdw commented Jun 7, 2023

LGTM, I assume the trait bounds are changed because state_call just takes Bytes

Yeah exactly; instead of deserializing form a JSON response we're decoding from a runtime API response :)

@jsdw jsdw merged commit e711dc1 into master Jun 7, 2023
@jsdw jsdw deleted the jsdw-account-nonce branch June 7, 2023 15:15
@jsdw jsdw mentioned this pull request Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants