Skip to content
Open
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
8 changes: 8 additions & 0 deletions src/demo/amm_demo/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ def deploy_contract(batch_prover: BatchProver, w3: Web3, operator: BaseAccount)
)
print("Deploying the AMM demo smart contract...")
tx_receipt = send_transaction(w3, transaction, operator)

# Check if the contract address is found in the tx_receipt
if tx_receipt.get("contractAddress"):
contract_address = tx_receipt["contractAddress"]
else:
print("Error: Contract address not found.")
exit(1)

assert (
tx_receipt["status"] == 1
), f'Failed to deploy contract. Transaction hash: {tx_receipt["transactionHash"]}.'
Expand Down