Is there a way to get the transaction-receipt when deploying a contract with contract.deploy()? The method returns the Contract object but i also want the transaction receipt.

Background: i want to log the gas-costs for deployment

1 Answer 1


It's available under tx property of the Contract object.

contract = MyFancyContract.deploy(...)
receipt = contract.tx


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.