Git Product home page Git Product logo

Comments (7)

DaniPopes avatar DaniPopes commented on July 17, 2024 1

I would like us to split this report into multiple crates as this is not related to etherscan.

from block-explorers.

DoTheBestToGetTheBest avatar DoTheBestToGetTheBest commented on July 17, 2024 1

TODO

add simple client for https://sepolia.blobscan.com/

swagger:

https://api.blobscan.com/

hello, i'd be happy to take this (:

from block-explorers.

kamuik16 avatar kamuik16 commented on July 17, 2024

TODO

add simple client for https://sepolia.blobscan.com/

swagger:

https://api.blobscan.com/

Hey @mattsse! Could you give more context about the issue and point out where to add this? Thanks!

from block-explorers.

mattsse avatar mattsse commented on July 17, 2024

hey @kamuik16

so this should ideally be another client implementation.

like struct BlobClient or something then we need functions for all the endpoints defined in the swagger, similar to the existing etherscan client we have, but this should be a new client type.

there are perhaps some tools that generate rust code for swagger for example https://github.com/OpenAPITools/openapi-generator

In my experience, their usefulness is very limited though, but definitely helpful to get all the stubs and json types then do a cleanup pass.

from block-explorers.

mattsse avatar mattsse commented on July 17, 2024

I think this is the spec

'{"openapi":"3.0.3","info":{"title":"Blobscan API","description":"OpenAPI compliant REST API built using tRPC with Express","version":"1.0.0"},"servers":[{"url":"https://api.blobscan.com/api"}],"paths":{"/blocks/{number}":{"get":{"operationId":"block-getByBlockNumber","summary":"Get blocks time series stats","tags":["blocks"],"parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"blobAsCalldataGasUsed":{"type":"string"},"blobGasUsed":{"type":"string"},"excessBlobGas":{"type":"string"},"blobGasPrice":{"type":"string"},"number":{"type":"number"},"hash":{"type":"string"},"slot":{"type":"number"},"timestamp":{"type":"string","format":"date-time"},"transactions":{"type":"array","items":{"type":"object","properties":{"hash":{"type":"string"},"fromId":{"type":"string"},"toId":{"type":"string"},"blobs":{"type":"array","items":{"type":"object","properties":{"blobHash":{"type":"string"},"index":{"type":"number"},"blob":{"type":"object","properties":{"size":{"type":"number"}},"required":["size"],"additionalProperties":false}},"required":["blobHash","index","blob"],"additionalProperties":false}}},"required":["hash","fromId","toId","blobs"],"additionalProperties":false}}},"required":["blobAsCalldataGasUsed","blobGasUsed","excessBlobGas","blobGasPrice","number","hash","slot","timestamp","transactions"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/indexer/slot":{"get":{"operationId":"indexer-getSlot","summary":"Get the latest processed slot from the database","tags":["indexer"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"slot":{"type":"number"}},"required":["slot"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}},"put":{"operationId":"indexer-updateSlot","summary":"Update the latest processed slot in the database","tags":["indexer"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slot":{"type":"number"}},"required":["slot"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/indexer/block-txs-blobs":{"put":{"operationId":"indexer-indexData","summary":"Index data in the database","tags":["indexer"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"block":{"type":"object","properties":{"number":{"type":"number"},"hash":{"type":"string"},"timestamp":{"type":"number"},"slot":{"type":"number"},"blobGasUsed":{"type":"string"},"excessBlobGas":{"type":"string"}},"required":["number","hash","timestamp","slot","blobGasUsed","excessBlobGas"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"hash":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"blockNumber":{"type":"number"},"gasPrice":{"type":"string"},"maxFeePerBlobGas":{"type":"string"}},"required":["hash","from","to","blockNumber","gasPrice","maxFeePerBlobGas"],"additionalProperties":false}},"blobs":{"type":"array","items":{"type":"object","properties":{"versionedHash":{"type":"string"},"commitment":{"type":"string"},"data":{"type":"string"},"txHash":{"type":"string"},"index":{"type":"number"}},"required":["versionedHash","commitment","data","txHash","index"],"additionalProperties":false}}},"required":["block","transactions","blobs"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/stats/overall":{"get":{"operationId":"stats-getAllOverallStats","summary":"Get all overall stats","tags":["overall"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"blob":{"type":"object","properties":{"totalBlobs":{"type":"number"},"totalUniqueBlobs":{"type":"number"},"totalBlobSize":{"type":"integer","format":"int64"},"avgBlobSize":{"type":"number"},"updatedAt":{"type":"string","format":"date-time"}},"required":["totalBlobs","totalUniqueBlobs","totalBlobSize","avgBlobSize","updatedAt"],"additionalProperties":false},"block":{"type":"object","properties":{"totalBlocks":{"type":"number"},"totalBlobGasUsed":{"type":"string"},"totalBlobAsCalldataGasUsed":{"type":"string"},"totalBlobFee":{"type":"string"},"totalBlobAsCalldataFee":{"type":"string"},"avgBlobFee":{"type":"number"},"avgBlobAsCalldataFee":{"type":"number"},"avgBlobGasPrice":{"type":"number"},"updatedAt":{"type":"string","format":"date-time"}},"required":["totalBlocks","totalBlobGasUsed","totalBlobAsCalldataGasUsed","totalBlobFee","totalBlobAsCalldataFee","avgBlobFee","avgBlobAsCalldataFee","avgBlobGasPrice","updatedAt"],"additionalProperties":false},"transaction":{"type":"object","properties":{"totalTransactions":{"type":"number"},"totalUniqueReceivers":{"type":"number"},"totalUniqueSenders":{"type":"number"},"avgMaxBlobGasFee":{"type":"number"},"updatedAt":{"type":"string","format":"date-time"}},"required":["totalTransactions","totalUniqueReceivers","totalUniqueSenders","avgMaxBlobGasFee","updatedAt"],"additionalProperties":false}},"required":["blob","block","transaction"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/stats/blobs":{"get":{"operationId":"stats-getBlobDailyStats","summary":"Get blobs time series stats","tags":["blobs"],"parameters":[{"name":"timeFrame","in":"query","required":true,"schema":{"type":"string","enum":["1d","7d","15d","30d","180d","360d","All"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"array","items":{"type":"string"}},"totalBlobs":{"type":"array","items":{"type":"number"}},"totalUniqueBlobs":{"type":"array","items":{"type":"number"}},"totalBlobSizes":{"type":"array","items":{"type":"number"}},"avgBlobSizes":{"type":"array","items":{"type":"number"}}},"required":["days","totalBlobs","totalUniqueBlobs","totalBlobSizes","avgBlobSizes"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/stats/blobs/overall":{"get":{"operationId":"stats-getBlobOverallStats","summary":"Get blobs overall stats","tags":["blobs"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"totalBlobs":{"type":"number"},"totalUniqueBlobs":{"type":"number"},"totalBlobSize":{"type":"integer","format":"int64"},"avgBlobSize":{"type":"number"},"updatedAt":{"type":"string","format":"date-time"}},"required":["totalBlobs","totalUniqueBlobs","totalBlobSize","avgBlobSize","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/stats/blocks":{"get":{"operationId":"stats-getBlockDailyStats","summary":"Get blocks time series stats","tags":["blocks"],"parameters":[{"name":"timeFrame","in":"query","required":true,"schema":{"type":"string","enum":["1d","7d","15d","30d","180d","360d","All"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"array","items":{"type":"string"}},"totalBlocks":{"type":"array","items":{"type":"number"}},"totalBlobGasUsed":{"type":"array","items":{"type":"string"}},"totalBlobAsCalldataGasUsed":{"type":"array","items":{"type":"string"}},"totalBlobFees":{"type":"array","items":{"type":"string"}},"totalBlobAsCalldataFees":{"type":"array","items":{"type":"string"}},"avgBlobFees":{"type":"array","items":{"type":"number"}},"avgBlobAsCalldataFees":{"type":"array","items":{"type":"number"}},"avgBlobGasPrices":{"type":"array","items":{"type":"number"}}},"required":["days","totalBlocks","totalBlobGasUsed","totalBlobAsCalldataGasUsed","totalBlobFees","totalBlobAsCalldataFees","avgBlobFees","avgBlobAsCalldataFees","avgBlobGasPrices"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/stats/blocks/overall":{"get":{"operationId":"stats-getBlockOverallStats","summary":"Get blocks overall stats","tags":["blocks"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"totalBlocks":{"type":"number"},"totalBlobGasUsed":{"type":"string"},"totalBlobAsCalldataGasUsed":{"type":"string"},"totalBlobFee":{"type":"string"},"totalBlobAsCalldataFee":{"type":"string"},"avgBlobFee":{"type":"number"},"avgBlobAsCalldataFee":{"type":"number"},"avgBlobGasPrice":{"type":"number"},"updatedAt":{"type":"string","format":"date-time"}},"required":["totalBlocks","totalBlobGasUsed","totalBlobAsCalldataGasUsed","totalBlobFee","totalBlobAsCalldataFee","avgBlobFee","avgBlobAsCalldataFee","avgBlobGasPrice","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/stats/transactions":{"get":{"operationId":"stats-getTransactionDailyStats","summary":"Get transactions time series stats","tags":["transactions"],"parameters":[{"name":"timeFrame","in":"query","required":true,"schema":{"type":"string","enum":["1d","7d","15d","30d","180d","360d","All"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"array","items":{"type":"string"}},"totalTransactions":{"type":"array","items":{"type":"number"}},"totalUniqueSenders":{"type":"array","items":{"type":"number"}},"totalUniqueReceivers":{"type":"array","items":{"type":"number"}},"avgMaxBlobGasFees":{"type":"array","items":{"type":"number"}}},"required":["days","totalTransactions","totalUniqueSenders","totalUniqueReceivers","avgMaxBlobGasFees"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/stats/transactions/overall":{"get":{"operationId":"stats-getTransactionOverallStats","summary":"Get transactions overall stats","tags":["transactions"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"totalTransactions":{"type":"number"},"totalUniqueReceivers":{"type":"number"},"totalUniqueSenders":{"type":"number"},"avgMaxBlobGasFee":{"type":"number"},"updatedAt":{"type":"string","format":"date-time"}},"required":["totalTransactions","totalUniqueReceivers","totalUniqueSenders","avgMaxBlobGasFee","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/healthcheck":{"get":{"operationId":"healthcheck","summary":"Connection healthcheck","tags":["system"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"default":{"$ref":"#/components/responses/error"}}}}},"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}}}}},"tags":[{"name":"blobs"},{"name":"blocks"},{"name":"transactions"},{"name":"overall"},{"name":"system"}],"externalDocs":{"url":"https://docs.blobscan.com/"}}'

from block-explorers.

mattsse avatar mattsse commented on July 17, 2024

agree, we can do it either before this pr or after

before sounds easier

@kamuik16 lmk if you want to take this

from block-explorers.

kamuik16 avatar kamuik16 commented on July 17, 2024

agree, we can do it either before this pr or after

before sounds easier

@kamuik16 lmk if you want to take this

Prob not, I haven't even understood the issue.

from block-explorers.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.