eth-blob-indexer/pkg/blobscan/models.go
Roy Crihfield 1d1ee73ff2
Some checks failed
Tests / Run Blobscan scraper tests (push) Successful in 2m23s
Tests / Run Beacon collector tests (push) Failing after 22m23s
Implement Blobscan scraper (#2)
New utility to backfill data from Blobscan.

Reviewed-on: #2
2024-07-01 14:01:27 +00:00

34 lines
1.1 KiB
Go

package blobscan
import "github.com/protolambda/zrnt/eth2/beacon/common"
type VersionedHash = common.Bytes32
// BlobscanBlock represents an EL block from the Blobscan API
type BlobscanBlock struct {
Slot common.Slot `json:"slot"`
Hash common.Root `json:"hash"`
Number uint64 `json:"number"`
Transactions []BlobscanBlockTransaction `json:"transactions"`
Timestamp string `json:"timestamp"`
}
// BlobscanBlockTransaction represents a transaction within a block from the Blobscan API
type BlobscanBlockTransaction struct {
Hash common.Root `json:"hash"`
Blobs []struct {
Index uint64 `json:"index"`
VersionedHash VersionedHash `json:"versionedHash"`
} `json:"blobs"`
Rollup string `json:"rollup"`
}
// BlobscanBlob represents a blob from the Blobscan API
type BlobscanBlob struct {
Commitment common.KZGCommitment `json:"commitment"`
Proof string `json:"proof"`
Size int `json:"size"`
VersionedHash VersionedHash `json:"versionedHash"`
Data string `json:"data"`
}