Replies: 4 comments 2 replies
-
I believe that you're using the older API that's using zkSync Lite instead of zkSync Era. Try the following intead:
That should return: And |
Beta Was this translation helpful? Give feedback.
-
Hey @MexicanAce thank you for this! Is there any documents that can support this? I was looking at the V2 version so I thought it was the newest. |
Beta Was this translation helpful? Give feedback.
-
Also @MexicanAce just to confirm I can do this via HTTP API and not only RPC, correct? I specifically need the HTTP API call. |
Beta Was this translation helpful? Give feedback.
-
So many questions... |
Beta Was this translation helpful? Give feedback.
-
Environment
Testnet
Provide a brief description of the functionality you're trying to implement.
Hey there :) I am using zkSync API to return the latest block, if I use:
https://goerli-api.zksync.io/api/v0.2/blocks?from=latest&limit=1&direction=older
It returns:
But if you look on the block explorer, the latest
blockNumber
is currently:https://goerli.explorer.zksync.io/block/9699807
How do I input the API to return
blockNumber
to give me 9699807Sorry if submitting an issue was wrong by the way. I didn't know if this was expected behavior but seems wrong to me.
Thank you for any help/feedback in advance!
What is the specific issue or error you're encountering?
looking for
BlockNumber
being returned properlyCan you share the error messages or logs you're receiving, if any?
N/A
Have you made any recent changes to the contract before encountering this issue?
N/A
Are there any external libraries or contracts that your contract interacts with?
N/A
Can you provide the relevant portions of your contract code where the issue is occurring?
N/A
Have you tried to isolate the problem, and if so, what were the results?
N/A
What steps have you already taken to try to resolve the issue?
Trying to read the docs here and follow the "latest" and "lastCommitted" instructions
https://docs.zksync.io/apiv02-docs/#blocks-api-v0.2-blocks-get
Repo Link (Optional)
No response
Additional Details
No response
Beta Was this translation helpful? Give feedback.
All reactions