MCPcopy Create free account
hub / github.com/ethstorage/es-node / DecodeBlob

Function DecodeBlob

cmd/es-utils/utils/utils.go:277–290  ·  view source on GitHub ↗
(blob []byte)

Source from the content-addressed store, hash-verified

275}
276
277func DecodeBlob(blob []byte) []byte {
278 if len(blob) != params.BlobTxFieldElementsPerBlob*32 {
279 panic("Invalid blob encoding")
280 }
281 var data []byte
282
283 j := 0
284 for i := 0; i < params.BlobTxFieldElementsPerBlob; i++ {
285 data = append(data, blob[j+1:j+32]...)
286 j += 32
287 }
288
289 return data
290}
291
292func DecodeUint256String(hexOrDecimal string) (*uint256.Int, error) {
293 var base = 10

Callers 2

GetBlobMethod · 0.92
TestEncodeDecodeBlobFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestEncodeDecodeBlobFunction · 0.68