Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

thedarkjester
Copy link
Collaborator

This PR implements issue(s) #

Checklist

  • I wrote new tests for my new core changes.
  • I have successfully ran tests, style checker and build against my new changes locally.
  • I have informed the team of any breaking changes if there are any.

@thedarkjester thedarkjester deployed to docker-build-and-e2e December 17, 2024 18:20 — with GitHub Actions Active
@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.12%. Comparing base (edca267) to head (d24429c).

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     
Flag Coverage Δ
hardhat 98.70% <ø> (ø)
kotlin 65.73% <100.00%> (-0.07%) ⬇️
Files with missing lines Coverage Δ
...zkevm/ethereum/MakefileContractDeploymentHelper.kt 64.95% <100.00%> (ø)

... and 3 files with indirect coverage changes

@thedarkjester thedarkjester marked this pull request as ready for review December 17, 2024 19:17
@thedarkjester thedarkjester requested a review from a team as a code owner December 17, 2024 19:17
return contract.waitForDeployment();

const chainId = (await wallet.provider!.getNetwork()).chainId;
const txReceipt = await contract.deploymentTransaction()!.wait();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Contributor

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 ",
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants