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

Move beefy initialize params to construct #893

Merged
merged 3 commits into from
Jul 21, 2023

Conversation

yrong
Copy link
Contributor

@yrong yrong commented Jul 20, 2023

@yrong yrong requested a review from vgeddes July 20, 2023 05:41
@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Patch coverage has no change and project coverage change: +1.76 🎉

Comparison is base (7b7a037) 65.50% compared to head (2d1d403) 67.27%.

❗ Current head 2d1d403 differs from pull request most recent head fe0d78b. Consider uploading reports for the commit fe0d78b to get more accurate results

Additional details and impacted files
@@                 Coverage Diff                 @@
##           proxy-contracts     #893      +/-   ##
===================================================
+ Coverage            65.50%   67.27%   +1.76%     
===================================================
  Files                   43       42       -1     
  Lines                 1754     1583     -171     
  Branches                70       70              
===================================================
- Hits                  1149     1065      -84     
+ Misses                 586      499      -87     
  Partials                19       19              
Flag Coverage Δ
solidity 72.34% <ø> (+0.86%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
core/packages/contracts/src/BeefyClient.sol 75.00% <ø> (+2.50%) ⬆️

... and 13 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@vgeddes vgeddes left a comment

Choose a reason for hiding this comment

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

I prefer for DeployScript.sol to read the beefy init parameters from a JSON file. With this approach, we know exactly what the init parameters will be before we actually deploy the contracts. This is important for production.

See docs at https://book.getfoundry.sh/cheatcodes/parse-json?highlight=parseJson#how-to-use-stdjson

There is also an example in our codebase at

fixtureData = vm.readFile(path).parseRaw("");

Copy link
Collaborator

@vgeddes vgeddes left a comment

Choose a reason for hiding this comment

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

+1

@yrong yrong merged commit 1c06d27 into proxy-contracts Jul 21, 2023
1 check passed
@yrong yrong deleted the ron/initialize-beefy branch July 21, 2023 01:07
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