diff --git a/deployments/sepolia/declarations.json b/deployments/sepolia/declarations.json index 1284d171..b4200352 100644 --- a/deployments/sepolia/declarations.json +++ b/deployments/sepolia/declarations.json @@ -1,5 +1,5 @@ { - "pragma_Oracle": "0x5e269051bec902aa2bd421d348e023c3893c4ff93de6c5f4b8964cd67cc3fc5", + "pragma_Oracle": "0x230f20832d73433a0ef69663545aabb607a3bbc0ff0a5f75e5d9716730e4141", "pragma_Ownable": "0x7b50a7a9bbb75d08248135003f1c87f0d44ba23018dc0ca480ac37a901531f3", "pragma_PublisherRegistry": "0x306288971002bd7906e3a607d504dfb28dcbdc7655a115984e567dce3b67e8f", "pragma_SummaryStats": "0x3b5bf1c2f918de14620b3c63e2c6543cf0a138df258bce3d03e3fb0b7d2183a", diff --git a/deployments/sepolia/deployments.json b/deployments/sepolia/deployments.json index fdd441ae..8df7aad3 100644 --- a/deployments/sepolia/deployments.json +++ b/deployments/sepolia/deployments.json @@ -8,8 +8,8 @@ "tx": "0x64f5b3cd696f93beb8f834b9fdc5b660fac342655708b75ae353eb7b956ca04" }, "pragma_SummaryStats": { - "address": "0x54563a0537b3ae0ba91032d674a6d468f30a59dc4deb8f0dce4e642b94be15c", - "tx": "0x1c753020f5b99852025defa05313b4b82c5cbeb989bb9f700b7a63453f21781" + "address": "0x15df5075251c103ad1e2b22328e426ad145d2003fc7f80c66c4820649fef1e7", + "tx": "0x670e04f51ebfae0f4bd342259e9181f05abed610aa361495eaefc5e3a1bcf32" }, "pragma_Randomness": { "address": "0x60c69136b39319547a4df303b6b3a26fab8b2d78de90b6bd215ce82e9cb515c", diff --git a/pragma-deployer/pragma_deployer/upgrade_pragma.py b/pragma-deployer/pragma_deployer/upgrade_pragma.py index 4391d510..3f45be71 100755 --- a/pragma-deployer/pragma_deployer/upgrade_pragma.py +++ b/pragma-deployer/pragma_deployer/upgrade_pragma.py @@ -36,10 +36,10 @@ async def main(port: Optional[int]) -> None: declarations = get_declarations() cur_class_hash = declarations["pragma_Oracle"] - logger.info(f"ℹ️ Current implementation hash: {cur_class_hash}") + logger.info(f"ℹ️ Current implementation hash: {hex(cur_class_hash)}") new_implementation_hash = await declare_v2("pragma_Oracle", port=port) - logger.info(f"ℹ️ New implementation hash: {new_implementation_hash}") + logger.info(f"ℹ️ New implementation hash: {hex(new_implementation_hash)}") tx_hash = await invoke( "pragma_Oracle", "upgrade", [new_implementation_hash], port=port diff --git a/pragma-deployer/pragma_deployer/utils/starknet.py b/pragma-deployer/pragma_deployer/utils/starknet.py index 877bb94d..02c90b0e 100644 --- a/pragma-deployer/pragma_deployer/utils/starknet.py +++ b/pragma-deployer/pragma_deployer/utils/starknet.py @@ -207,10 +207,10 @@ async def declare_v2(contract_name, port=None): max_fee=MAX_FEE, ) - # # Send Declare v2 transaction + # Send Declare v2 transaction resp = await account.client.declare(transaction=sign_declare_v2) - logger.info(f"✅ {contract_name} class hash: {hex(resp.class_hash)}") + logger.info(f"✅ {contract_name} class hash {hex(resp.class_hash)} at tx {hex(resp.transaction_hash)}") return resp.class_hash @@ -231,6 +231,8 @@ async def deploy_v2(contract_name, *args, port=None): max_fee=MAX_FEE, ) + logger.info(f"Transaction hash: {hex(deploy_result.hash)}") + await deploy_result.wait_for_acceptance() logger.info( @@ -260,11 +262,11 @@ async def invoke(contract_name, function_name, inputs, address=None, port=None): calls=call, max_fee=MAX_FEE, ) - await account.client.wait_for_tx(response.transaction_hash) logger.info( f"✅ {contract_name}.{function_name} invoked at tx: %s", hex(response.transaction_hash), ) + await account.client.wait_for_tx(response.transaction_hash) return response.transaction_hash