-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Chore] - standardise contract deploy logs #460
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #460 +/- ##
============================================
- Coverage 68.18% 68.12% -0.07%
Complexity 1125 1125
============================================
Files 319 319
Lines 12789 12789
Branches 1275 1275
============================================
- Hits 8720 8712 -8
- Misses 3541 3548 +7
- Partials 528 529 +1
|
return contract.waitForDeployment(); | ||
|
||
const chainId = (await wallet.provider!.getNetwork()).chainId; | ||
const txReceipt = await contract.deploymentTransaction()!.wait(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const txReceipt = await contract.deploymentTransaction()!.wait(); | |
const txReceipt = await contract.deploymentTransaction()?.wait(); |
If contract.deploymentTransaction()
= null then:
- ! => Will throw immediately with NodeJS runtime error
- ? => We will catch this in L28-30
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? syntax is used in other instances in this PR as well
@@ -23,8 +23,8 @@ class MakefileContractDeploymentHelperKtTest { | |||
assertThat( | |||
getDeployedAddress( | |||
listOf( | |||
"L2MessageServiceV1.2.3 artifact has been deployed in 1.2659626659999998s ", | |||
"L2MessageServiceV1.2.3 deployed: address=0xFE48d65B84AA0E23594Fd585c11cAD831F90AcB6 blockNumber=8", | |||
"contract=L2MessageServiceV1.2.3 artifact has been deployed in 1.2659626659999998s ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we haven't updated the TS code producing this log in contracts/scripts/hardhat/utils.ts
- I see this pattern of log in deployUpgradableFromFactory
and deployUpgradableWithAbiAndByteCode
functions
So should we also update the console.log statements produced there? And if so, should we also update the other ... artifact has been deployed in ...
statements in this file?
This PR implements issue(s) #
Checklist