Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: end2end testing on sepolia #1468

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
Loading