@@ -214,7 +214,7 @@ describe('fromTxData using from a json', () => {
214214} )
215215
216216describe ( 'EIP4844 constructor tests - invalid scenarios' , ( ) => {
217- const common = createCommonFromGethGenesis ( eip4844GethGenesis , {
217+ let common = createCommonFromGethGenesis ( eip4844GethGenesis , {
218218 chain : 'customChain' ,
219219 hardfork : Hardfork . Cancun ,
220220 customCrypto : { kzg } ,
@@ -232,11 +232,15 @@ describe('EIP4844 constructor tests - invalid scenarios', () => {
232232 const invalidVersionHash = {
233233 blobVersionedHashes : [ concatBytes ( new Uint8Array ( [ 3 ] ) , randomBytes ( 31 ) ) ] ,
234234 }
235- const tooManyBlobs = {
235+ const tooManyBlobs7 = {
236236 blobVersionedHashes : [
237237 concatBytes ( new Uint8Array ( [ 1 ] ) , randomBytes ( 31 ) ) ,
238238 concatBytes ( new Uint8Array ( [ 1 ] ) , randomBytes ( 31 ) ) ,
239239 concatBytes ( new Uint8Array ( [ 1 ] ) , randomBytes ( 31 ) ) ,
240+ concatBytes ( new Uint8Array ( [ 1 ] ) , randomBytes ( 31 ) ) ,
241+ concatBytes ( new Uint8Array ( [ 1 ] ) , randomBytes ( 31 ) ) ,
242+ concatBytes ( new Uint8Array ( [ 1 ] ) , randomBytes ( 31 ) ) ,
243+ concatBytes ( new Uint8Array ( [ 1 ] ) , randomBytes ( 31 ) ) ,
240244 ] ,
241245 }
242246 try {
@@ -256,10 +260,25 @@ describe('EIP4844 constructor tests - invalid scenarios', () => {
256260 )
257261 }
258262 try {
259- createBlob4844Tx ( { ...baseTxData , ...tooManyBlobs } , { common } )
263+ createBlob4844Tx ( { ...baseTxData , ...tooManyBlobs7 } , { common } )
264+ } catch ( err : any ) {
265+ assert . isTrue (
266+ err . message . includes ( 'tx can contain at most 6 blobs (maxBlobGasPerBlock/blobGasPerBlob)' ) ,
267+ 'throws on too many versioned hashes' ,
268+ )
269+ }
270+
271+ common = createCommonFromGethGenesis ( eip4844GethGenesis , {
272+ chain : 'customChain' ,
273+ hardfork : Hardfork . Cancun ,
274+ eips : [ 7594 ] ,
275+ customCrypto : { kzg } ,
276+ } )
277+ try {
278+ createBlob4844Tx ( { ...baseTxData , ...tooManyBlobs7 } , { common } )
260279 } catch ( err : any ) {
261280 assert . isTrue (
262- err . message . includes ( 'tx can contain at most' ) ,
281+ err . message . includes ( 'tx can contain at most 6 blobs (EIP-7594) ' ) ,
263282 'throws on too many versioned hashes' ,
264283 )
265284 }
0 commit comments