@@ -1110,6 +1110,35 @@ describe('@api-batch-1 RPC Server Acceptance Tests', function () {
11101110 expect ( info . created_contract_ids . length ) . to . be . equal ( 1 ) ;
11111111 } ) ;
11121112
1113+ // note: according to this ticket https://github.com/hashgraph/hedera-json-rpc-relay/issues/2563,
1114+ // if calldata's size fails into the range of [2568 bytes, 5217 bytes], the request fails and throw
1115+ // `Null Entity ID` error. This unit test makes sure that with the new fix, requests should work with all case scenarios.
1116+ it ( 'should execute "eth_sendRawTransaction" and deploy a contract with any arbitrary calldata size' , async ( ) => {
1117+ const gasPrice = await relay . gasPrice ( requestId ) ;
1118+
1119+ const randomBytes = [ 2566 , 2568 , 3600 , 5217 , 7200 ] ;
1120+
1121+ for ( const bytes of randomBytes ) {
1122+ const transaction = {
1123+ type : 2 ,
1124+ chainId : Number ( CHAIN_ID ) ,
1125+ nonce : await relay . getAccountNonce ( accounts [ 0 ] . address , requestId ) ,
1126+ maxPriorityFeePerGas : gasPrice ,
1127+ maxFeePerGas : gasPrice ,
1128+ gasLimit : defaultGasLimit ,
1129+ data : '0x' + '00' . repeat ( bytes ) ,
1130+ } ;
1131+ const signedTx = await accounts [ 0 ] . wallet . signTransaction ( transaction ) ;
1132+ const transactionHash = await relay . sendRawTransaction ( signedTx , requestId ) ;
1133+ const info = await mirrorNode . get ( `/contracts/results/${ transactionHash } ` , requestId ) ;
1134+ expect ( info ) . to . have . property ( 'contract_id' ) ;
1135+ expect ( info . contract_id ) . to . not . be . null ;
1136+ expect ( info ) . to . have . property ( 'created_contract_ids' ) ;
1137+ expect ( info . created_contract_ids . length ) . to . be . equal ( 1 ) ;
1138+ await new Promise ( ( r ) => setTimeout ( r , 3000 ) ) ;
1139+ }
1140+ } ) ;
1141+
11131142 it ( 'should delete the file created while execute "eth_sendRawTransaction" to deploy a large contract' , async function ( ) {
11141143 const gasPrice = await relay . gasPrice ( requestId ) ;
11151144 const transaction = {
0 commit comments