Skip to content

Commit

Permalink
Improved variable names and output messages to user
Browse files Browse the repository at this point in the history
  • Loading branch information
- committed Jul 13, 2024
1 parent d7ed314 commit f7de25d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/keyless-deploy-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,11 @@ const deployKeylessly = async (contractName, bytecodeWithArgs, gasLimit, wallet,
console.log(`Deploying ${contractName} contract by broadcasting signed raw transaction to ${network.name}...`)

// const txHash = await ethers.provider.send(`eth_sendRawTransaction`, [txSignedSerialized])
const txReceipt = await ethers.provider.broadcastTransaction(txSignedSerialized)
await txReceipt.wait()
const txResponse = await ethers.provider.broadcastTransaction(txSignedSerialized)
await txResponse.wait()

if (await ethers.provider.getCode(addressExpected) !== `0x`) console.log(`${contractName} contract was successfully deployed to ${addressExpected} in transaction ${txReceipt.hash}`)
if (await ethers.provider.getCode(addressExpected) !== `0x`) console.log(`${contractName} contract was successfully deployed to ${addressExpected} in transaction ${txResponse.hash}`)
else console.error(`${contractName} contract was not found at ${addressExpected}`)
}
return addressExpected
}
Expand Down

0 comments on commit f7de25d

Please sign in to comment.