@@ -98,7 +98,7 @@ describe('@api-batch-1 RPC Server Acceptance Tests', function () {
98
98
expectedGasPrice = await relay . call ( RelayCalls . ETH_ENDPOINTS . ETH_GAS_PRICE , [ ] , requestIdPrefix ) ;
99
99
100
100
const initialAccount : AliasAccount = global . accounts [ 0 ] ;
101
- const neededAccounts : number = 4 ;
101
+ const neededAccounts : number = 3 ;
102
102
accounts . push (
103
103
...( await Utils . createMultipleAliasAccounts (
104
104
mirrorNode ,
@@ -1800,75 +1800,6 @@ describe('@api-batch-1 RPC Server Acceptance Tests', function () {
1800
1800
requestDetails ,
1801
1801
] ) ;
1802
1802
} ) ;
1803
-
1804
- describe ( 'contractCodeSize' , function ( ) {
1805
- it ( '@release should execute "eth_sendRawTransaction" and deploy a contract with code size within the limit' , async function ( ) {
1806
- const gasPrice = await relay . gasPrice ( requestId ) ;
1807
- const transaction = {
1808
- type : 2 ,
1809
- chainId : Number ( CHAIN_ID ) ,
1810
- nonce : await relay . getAccountNonce ( accounts [ 3 ] . address , requestId ) ,
1811
- maxPriorityFeePerGas : gasPrice ,
1812
- maxFeePerGas : gasPrice ,
1813
- gasLimit : defaultGasLimit ,
1814
- data : '0x' + '00' . repeat ( Constants . CONTRACT_CODE_SIZE_LIMIT ) , // Within the CONTRACT_CODE_SIZE_LIMIT limit
1815
- } ;
1816
-
1817
- const signedTx = await accounts [ 3 ] . wallet . signTransaction ( transaction ) ;
1818
- const transactionHash = await relay . sendRawTransaction ( signedTx , requestId ) ;
1819
- const info = await mirrorNode . get ( `/contracts/results/${ transactionHash } ` , requestId ) ;
1820
- expect ( info ) . to . have . property ( 'contract_id' ) ;
1821
- expect ( info . contract_id ) . to . not . be . null ;
1822
- expect ( info ) . to . have . property ( 'created_contract_ids' ) ;
1823
- expect ( info . created_contract_ids . length ) . to . be . equal ( 1 ) ;
1824
- } ) ;
1825
-
1826
- it ( '@release should fail "eth_sendRawTransaction" for contract with code size exceeding the limit' , async function ( ) {
1827
- const gasPrice = await relay . gasPrice ( requestId ) ;
1828
- // Create a transaction with contract code size exceeding CONTRACT_CODE_SIZE_LIMIT
1829
- const transaction = {
1830
- type : 2 ,
1831
- chainId : Number ( CHAIN_ID ) ,
1832
- nonce : await relay . getAccountNonce ( accounts [ 3 ] . address , requestId ) ,
1833
- maxPriorityFeePerGas : gasPrice ,
1834
- maxFeePerGas : gasPrice ,
1835
- gasLimit : defaultGasLimit ,
1836
- data : '0x' + '00' . repeat ( Constants . CONTRACT_CODE_SIZE_LIMIT + 1 ) ,
1837
- } ;
1838
-
1839
- const signedTx = await accounts [ 3 ] . wallet . signTransaction ( transaction ) ;
1840
- const contractCodeSize = ( transaction . data . length - 2 ) / 2 ;
1841
- const error = predefined . CONTRACT_CODE_SIZE_LIMIT_EXCEEDED (
1842
- contractCodeSize ,
1843
- Constants . CONTRACT_CODE_SIZE_LIMIT ,
1844
- ) ;
1845
-
1846
- await Assertions . assertPredefinedRpcError ( error , sendRawTransaction , false , relay , [
1847
- signedTx ,
1848
- requestDetails ,
1849
- ] ) ;
1850
- } ) ;
1851
-
1852
- it ( '@release should pass precheck and execute "eth_sendRawTransaction" for a regular transaction i.e. non contract deployment transaction with data exceeding the limit' , async function ( ) {
1853
- const gasPrice = await relay . gasPrice ( requestId ) ;
1854
- // Create a transaction with large data but sent to an existing address (not contract creation)
1855
- const transaction = {
1856
- type : 2 ,
1857
- chainId : Number ( CHAIN_ID ) ,
1858
- nonce : await relay . getAccountNonce ( accounts [ 3 ] . address , requestId ) ,
1859
- maxPriorityFeePerGas : gasPrice ,
1860
- maxFeePerGas : gasPrice ,
1861
- gasLimit : defaultGasLimit ,
1862
- to : parentContractAddress , // Sending to existing address, so code size check doesn't apply
1863
- data : '0x' + '00' . repeat ( Constants . CONTRACT_CODE_SIZE_LIMIT + 1 ) , // Size exceeds CONTRACT_CODE_SIZE_LIMIT but should work
1864
- } ;
1865
-
1866
- const signedTx = await accounts [ 3 ] . wallet . signTransaction ( transaction ) ;
1867
- const transactionHash = await relay . sendRawTransaction ( signedTx , requestId ) ;
1868
- const info = await mirrorNode . get ( `/contracts/results/${ transactionHash } ` , requestId ) ;
1869
- expect ( info ) . to . exist ;
1870
- } ) ;
1871
- } ) ;
1872
1803
} ) ;
1873
1804
1874
1805
it ( '@release should execute "eth_getTransactionByHash" for existing transaction' , async function ( ) {
0 commit comments