diff --git a/scripts/constants.py b/scripts/constants.py index b547468cb..94faffe6e 100644 --- a/scripts/constants.py +++ b/scripts/constants.py @@ -14,9 +14,12 @@ ETH_TOKEN_ADDRESS = 0x49D36570D4E46F48E99674BD3FCC84644DDD6B96F7C741B1562B82F9E004DC7 EVM_PRIVATE_KEY = os.getenv("EVM_PRIVATE_KEY") -EVM_ADDRESS = keys.PrivateKey( - bytes.fromhex(EVM_PRIVATE_KEY[2:]) -).public_key.to_checksum_address() +EVM_ADDRESS = ( + EVM_PRIVATE_KEY + and keys.PrivateKey( + bytes.fromhex(EVM_PRIVATE_KEY[2:]) + ).public_key.to_checksum_address() +) NETWORK = os.getenv("STARKNET_NETWORK", "starknet-devnet") NETWORK = ( "testnet" diff --git a/scripts/deploy_kakarot.py b/scripts/deploy_kakarot.py index 839d16a24..36bf4bf55 100644 --- a/scripts/deploy_kakarot.py +++ b/scripts/deploy_kakarot.py @@ -3,15 +3,15 @@ from math import ceil, log from scripts.constants import CHAIN_ID, EVM_ADDRESS, GATEWAY_CLIENT -from scripts.utils import ( +from scripts.utils.starknet import ( declare, deploy, deploy_and_fund_evm_address, dump_declarations, dump_deployments, - get_account, get_declarations, get_eth_contract, + get_starknet_account, invoke, ) @@ -25,7 +25,7 @@ async def main(): f"ℹ️ Connected to CHAIN_ID {CHAIN_ID.value.to_bytes(ceil(log(CHAIN_ID.value, 256)), 'big')} " f"with GATEWAY {GATEWAY_CLIENT.net}" ) - account = await get_account() + account = await get_starknet_account() logger.info(f"ℹ️ Using account {hex(account.address)} as deployer") class_hash = {