From e257a0eaffabed9e87826bcce93da5313a1e5b4c Mon Sep 17 00:00:00 2001 From: enitrat Date: Tue, 24 Sep 2024 14:59:40 +0200 Subject: [PATCH] add coinbase to network config --- kakarot_scripts/constants.py | 3 +++ kakarot_scripts/deploy_kakarot.py | 2 ++ tests/end_to_end/bytecodes.py | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/kakarot_scripts/constants.py b/kakarot_scripts/constants.py index 79195b300..296d26df2 100644 --- a/kakarot_scripts/constants.py +++ b/kakarot_scripts/constants.py @@ -226,6 +226,9 @@ class ChainId(IntEnum): or "0x20eB005C0b9c906691F885eca5895338E15c36De", # Defaults to faucet on appchain sepolia 16, ) + +NETWORK["coinbase"] = COINBASE + CAIRO_ZERO_DIR = Path("src") CAIRO_DIR = Path("cairo1_contracts") TESTS_DIR = Path("tests") diff --git a/kakarot_scripts/deploy_kakarot.py b/kakarot_scripts/deploy_kakarot.py index e7f7f6708..3750ce633 100644 --- a/kakarot_scripts/deploy_kakarot.py +++ b/kakarot_scripts/deploy_kakarot.py @@ -147,6 +147,8 @@ async def main(): await invoke("kakarot", "set_coinbase", int(bridge.address, 16)) coinbase = (await call("kakarot", "get_coinbase")).coinbase + # Set the coinbase in the network config to be used in the tests + NETWORK["coinbase"] = coinbase if coinbase == 0: logger.error("❌ Coinbase is set to 0, all transaction fees will be lost") diff --git a/tests/end_to_end/bytecodes.py b/tests/end_to_end/bytecodes.py index 53c5144ab..d865455dd 100644 --- a/tests/end_to_end/bytecodes.py +++ b/tests/end_to_end/bytecodes.py @@ -1,6 +1,6 @@ import pytest -from kakarot_scripts.constants import BLOCK_GAS_LIMIT, COINBASE, NETWORK +from kakarot_scripts.constants import BLOCK_GAS_LIMIT, NETWORK test_cases = [ { @@ -749,7 +749,7 @@ "value": 0, "code": "4100", "calldata": "", - "stack": f"{COINBASE}", + "stack": f"{NETWORK['coinbase']}", "memory": "", "return_data": "", "success": 1,