From 7d6ad699d14ab03a40babb1f348def9791abf988 Mon Sep 17 00:00:00 2001 From: Denis Date: Wed, 3 Jul 2024 16:10:59 +0100 Subject: [PATCH] Unify receipt --- src/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index 3627062..1c595bc 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -203,8 +203,8 @@ export async function saveContractWithCreate3Deployment( const receipt = await provider.getTransactionReceipt(deployTxHash) as {[key: string]: any}; if (receipt != null) { // conver ethers.TransactionReceipt object to hardhat-deploy.Receipt object - receipt.transactionHash = receipt.hash; - receipt.transactionIndex = receipt.index; + receipt.transactionHash = receipt.transactionHash || receipt.hash; + receipt.transactionIndex = receipt.transactionIndex || receipt.index; ['provider', 'blobGasPrice', 'type', 'root', 'hash', 'index'].forEach(key => delete receipt[key]); }