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

Improved test coverage #2

Closed
wants to merge 3 commits into from
Closed

Improved test coverage #2

wants to merge 3 commits into from

Conversation

dev1644
Copy link
Contributor

@dev1644 dev1644 commented Aug 14, 2023

  • Added constructor to avoid initializing impl contract in separate transaction.
  • Added 2 test cases to improve coverage
  • fixed linting issues (forge fmt)

Copy link
Contributor

@QEDK QEDK left a comment

Choose a reason for hiding this comment

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

LGTM except one issue.

@@ -20,6 +20,8 @@ contract DefaultInflationManager is Initializable, Ownable2StepUpgradeable, IMin
uint256 public treasuryMintPerSecond;
uint256 public lastMint;

constructor() initializer {}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it makes sense to increase deployment costs for the purposes of coverage. Also, won't this mean that we cannot call initialize() after this?

Copy link
Contributor Author

@dev1644 dev1644 Aug 14, 2023

Choose a reason for hiding this comment

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

I added constructor here so that we don't need to send another transaction to initialize the implementation contract.

won't this mean that we cannot call initialize() after this?

Aren't we using Proxy to interact with DefualtInflationManager? In that case using constructor here is better because proxy's can be initialized when we will deploy it (Proxy).

@gretzke
Copy link
Contributor

gretzke commented Sep 1, 2023

outdated

@gretzke gretzke closed this Sep 1, 2023
@gretzke gretzke deleted the dev/improved-test-coverage branch September 1, 2023 15:51
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