Skip to content

Commit

Permalink
fix end2end testing on sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
greged93 committed Oct 7, 2024
1 parent 064a996 commit 68d58e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions kakarot_scripts/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class NetworkType(Enum):
"type": NetworkType.STAGING,
"chain_id": StarknetChainId.SEPOLIA,
"check_interval": 1,
"max_wait": 10,
"max_wait": 20,
"class_hash": 0x061DAC032F228ABEF9C6626F995015233097AE253A7F72D68552DB02F2971B8F,
"voyager_api_url": "https://sepolia-api.voyager.online/beta",
},
Expand Down Expand Up @@ -202,12 +202,7 @@ class NetworkType(Enum):
f"⚠️ Could not get chain Id from {NETWORK['rpc_url']}: {e}, defaulting to KKRT"
)
starknet_chain_id = int.from_bytes(b"KKRT", "big")
chain_id = starknet_chain_id % (
# TODO: remove once Kakarot is redeployed on sepolia
2**53
if NETWORK["name"] != "starknet-sepolia"
else 2**32
)
chain_id = starknet_chain_id % 2**53


class ChainId(IntEnum):
Expand Down
2 changes: 1 addition & 1 deletion kakarot_scripts/utils/kakarot.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ async def deploy(
evm_address = int(receipt.contractAddress or receipt.to, 16)
starknet_address = (
await _call_starknet("kakarot", "get_starknet_address", evm_address)
).contract_address
).starknet_address
else:
starknet_address, evm_address = response
contract.address = Web3.to_checksum_address(f"0x{evm_address:040x}")
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def cairo_error(message=None):
yield e
if message is None:
return
if type(e.value) == ClientError:
if type(e.value) is ClientError:
error = re.search(r"Error message: (.*)", str(e.value.data["revert_error"]))
else:
error = re.search(r"Error message: (.*)", str(e.value))
Expand Down

0 comments on commit 68d58e2

Please sign in to comment.