diff --git a/scripts/artifacts.py b/scripts/artifacts.py index 4fd9a10dd..ddf70924e 100644 --- a/scripts/artifacts.py +++ b/scripts/artifacts.py @@ -18,6 +18,7 @@ def pull_and_plot_ef_tests(name: Union[str, Path] = Path("logs")): + # Pull latest main artifacts response = requests.get( "https://api.github.com/repos/kkrt-labs/kakarot/actions/workflows/ci.yml/runs?branch=cw/run-all&per_page=100" @@ -97,35 +98,3 @@ def get_artifacts( z.extractall(Path(name) / artifact["head_branch"]) return artifacts - - -def fetch_deployments(path: str = "deployments"): - response = requests.get( - "https://api.github.com/repos/kkrt-labs/kakarot/actions/artifacts" - ) - artifacts = ( - pd.DataFrame( - [ - {**artifact["workflow_run"], **artifact} - for artifact in response.json()["artifacts"] - ] - ) - .loc[lambda df: df["head_branch"] == "main"] - .loc[lambda df: df["name"] == "deployments"] - .sort_values(["updated_at"], ascending=False) - .archive_download_url - ) - - if artifacts.empty: - raise ValueError("No deployment artifacts found for base branch main") - - github_token = os.getenv("GITHUB_TOKEN") - if not github_token: - raise ValueError("github token not found in environment variables") - - response = requests.get( - artifacts.tolist()[0], - headers={"Authorization": f"Bearer {github_token}"}, - ) - z = zipfile.ZipFile(io.BytesIO(response.content)) - z.extractall(path) diff --git a/scripts/utils/kakarot.py b/scripts/utils/kakarot.py index 48d70b16b..ffb427775 100644 --- a/scripts/utils/kakarot.py +++ b/scripts/utils/kakarot.py @@ -26,7 +26,6 @@ from web3.exceptions import LogTopicError, MismatchedABI, NoABIFunctionsFound from web3.types import LogReceipt -from scripts.artifacts import fetch_deployments from scripts.constants import EVM_ADDRESS, EVM_PRIVATE_KEY, NETWORK, RPC_CLIENT from scripts.utils.starknet import call as _call_starknet from scripts.utils.starknet import fund_address as _fund_starknet_address @@ -42,15 +41,6 @@ logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) -if not NETWORK["devnet"]: - try: - fetch_deployments() - except Exception as e: - if not get_deployments(): - logger.warn( - f"Using network {NETWORK['name']}, couldn't fetch deployment, error:\n{e}" - ) - class EvmTransactionError(Exception): pass