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 hex-encoded IdProvider #203

Merged

Conversation

tgmichel
Copy link
Contributor

Add a custom IdProvider that returns an hex encoded 32 characters long string - prefixed with 0x - and use it in SubscriptionManager.

This is the format used in Ethereum MainNet for subscription ids.

@sorpaas
Copy link
Member

sorpaas commented Nov 20, 2020

Please merge master!

@tgmichel
Copy link
Contributor Author

@sorpaas a bit of context.

The default RandomStringProvider in jsonrpc-pubsub returns a 16 alphanumeric character string as SubscriptionId when calling eth_subscribe. This PR adds a new IdProvider, so subscriptions return whatever we want - in this case the original 16 character string, but hex encoded.

@sorpaas sorpaas merged commit 4497bd3 into polkadot-evm:master Nov 24, 2020
@tgmichel tgmichel deleted the tgmichel-pubsub-idprovider branch April 1, 2022 09:56
abhijeetbhagat pushed a commit to web3labs/frontier that referenced this pull request Jan 11, 2023
* Add hex-encoded IdProvider

* Update tests

* Merge remote-tracking branch 'upstream/master' into tgmichel-pubsub-idprovider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants