From db87500055b9664d0d3cbcabc4b1d5e56e9e1dbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Walter?= Date: Thu, 5 Sep 2024 13:43:51 +0200 Subject: [PATCH] Fix kakarot tests --- tests/src/kakarot/test_kakarot.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/src/kakarot/test_kakarot.py b/tests/src/kakarot/test_kakarot.py index fe01e6aec..4dd504c23 100644 --- a/tests/src/kakarot/test_kakarot.py +++ b/tests/src/kakarot/test_kakarot.py @@ -8,7 +8,6 @@ from eth_utils.address import to_checksum_address from hypothesis import given from hypothesis.strategies import composite, integers -from starkware.cairo.lang.cairo_constants import DEFAULT_PRIME from starkware.starknet.public.abi import get_storage_var_address from web3._utils.abi import map_abi_data from web3._utils.normalizers import BASE_RETURN_NORMALIZERS @@ -453,7 +452,7 @@ def test_should_raise_invalid_nonce(self, cairo_run, tx): tx_data=tx_data, ) - @given(gas_limit=integers(min_value=2**64, max_value=DEFAULT_PRIME - 1)) + @given(gas_limit=integers(min_value=2**64, max_value=2**248 - 1)) def test_raise_gas_limit_too_high(self, cairo_run, gas_limit): tx = { "type": 2, @@ -479,7 +478,7 @@ def test_raise_gas_limit_too_high(self, cairo_run, gas_limit): tx_data=tx_data, ) - @given(maxFeePerGas=integers(min_value=2**128, max_value=DEFAULT_PRIME - 1)) + @given(maxFeePerGas=integers(min_value=2**128, max_value=2**248 - 1)) def test_raise_max_fee_per_gas_too_high(self, cairo_run, maxFeePerGas): tx = { "type": 2, @@ -539,7 +538,7 @@ def test_raise_max_fee_per_gas_too_low(self, cairo_run, tx): def max_priority_fee_too_high(draw): max_fee_per_gas = draw(integers(min_value=0, max_value=2**128 - 2)) max_priority_fee_per_gas = draw( - integers(min_value=max_fee_per_gas + 1, max_value=DEFAULT_PRIME - 1) + integers(min_value=max_fee_per_gas + 1, max_value=2**248 - 1) ) return (max_fee_per_gas, max_priority_fee_per_gas)