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

chore(blob-explorers): accomodate new blobscan API changes #68

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

Evalir
Copy link
Member

@Evalir Evalir commented Dec 8, 2024

Blobscan had some more API changes. They added a few things:

  • a field for tx category, present on both block/tx responses.
  • added the rollup field for the block response as well.
  • They renamed the DataStorageReferences fields to be storage and url.

This aligns the new responses to the new format, and another tx test. See their API docs. Although I saw #66 open, the behavior implemented in that PR doesn't seem up to date anymore.

Comment on lines -166 to -169
/// Block hash.
pub hash: B256,
/// Block timestamp.
pub timestamp: chrono::DateTime<chrono::offset::Utc>,
Copy link
Member

Choose a reason for hiding this comment

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

aren't those still available?
feels odd that those are removed

image

Copy link
Member Author

@Evalir Evalir Dec 9, 2024

Choose a reason for hiding this comment

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

These fields are present when fetching a block, for which BlockResponse<T> has these fields—BlockInfo doesn't need them as it corresponds to a transaction response (see /blocks/{id} vs /transactions/{id}).

crates/blob-explorers/src/response.rs Outdated Show resolved Hide resolved
crates/blob-explorers/src/response.rs Outdated Show resolved Hide resolved
@Evalir Evalir requested review from klkvr and mattsse December 9, 2024 12:28
@Evalir
Copy link
Member Author

Evalir commented Dec 9, 2024

@mattsse @klkvr addressed (wanted to commit your patches directly but github was complaining about an updated diff, had to commit myself)

Copy link
Member

@klkvr klkvr left a comment

Choose a reason for hiding this comment

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

lgtm, pending @mattsse

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

I see,

lgtm

@mattsse mattsse merged commit 5cb807c into main Dec 9, 2024
7 of 8 checks passed
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