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

eth_subscribe RPC method returns 16-character subscription ID instead of 32-byte ID #1544

Open
krisbitney opened this issue Dec 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@krisbitney
Copy link

Description

Recently, there was a change to the behavior of eth_subscribe. It is now returning a 16-character subscription ID (e.g. TlCPBeW4fku7BlSo) instead of a 32-byte ID.

I believe the changes in this PR may be related: #1504

Steps to Reproduce

        const result = (await client.transport.request({
          method: "eth_subscribe",
          params: ["newHeads"],
        })) as any

Expected vs. Actual Behavior

The expected behavior would be to receive a 32-byte hex string representing the subscription ID. The actual received value is a 16-character string, which presumably is a UTF-8 encoded representation of the 32-byte ID.

Environment

TypeScript with Viem

@krisbitney krisbitney added the bug Something isn't working label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant