File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ const kzg = new microEthKZG(trustedSetup)
1515
1616// Use with node ./examples/blobs.ts <file path>
1717const filePath = process . argv [ 2 ]
18- let blobData : string = fs . readFileSync ( filePath , 'ascii' )
18+ const blobData : string = fs . readFileSync ( filePath , 'ascii' )
1919console . log ( blobData )
2020console . log ( blobData . length )
21- blobData = blobData . substring ( 0 , 100 )
21+ // blobData = blobData.substring(0, 100)
2222
2323const blobs = [ getBlob ( hexToBytes ( `0x${ blobData } ` ) ) ]
2424
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export function getBlob(data: Uint8Array): PrefixedHexString {
4040 const blob = new Uint8Array ( BLOB_SIZE )
4141 for ( let i = 0 ; i < FIELD_ELEMENTS_PER_BLOB ; i ++ ) {
4242 const chunk = new Uint8Array ( 32 )
43- chunk . set ( data . subarray ( i * 31 , ( i + 1 ) * 31 ) , 0 )
43+ chunk . set ( data . subarray ( i * 32 , ( i + 1 ) * 32 ) , 0 )
4444 blob . set ( chunk , i * 32 )
4545 }
4646
You can’t perform that action at this time.
0 commit comments