Skip to content

Commit

Permalink
Fix kakarot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter committed Sep 5, 2024
1 parent 177f3d5 commit db87500
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/src/kakarot/test_kakarot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit db87500

Please sign in to comment.