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

Zero distribution #878

Merged
merged 6 commits into from Aug 2, 2023
Merged

Zero distribution #878

merged 6 commits into from Aug 2, 2023

Conversation

tbrent
Copy link
Contributor

@tbrent tbrent commented Jul 31, 2023

@tbrent tbrent requested a review from julianmrodri July 31, 2023 23:52
emitted: true,
},
{
contract: token1,
Copy link
Collaborator

Choose a reason for hiding this comment

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

i dont think this should fire?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, it has emitted: false to check for that.

Copy link
Contributor

Choose a reason for hiding this comment

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

We dont need the args param if we are checking for emitted = false, maybe thats the confusion.

test/Revenues.test.ts Outdated Show resolved Hide resolved
args: [rTokenTrader.address, backingManager.address, issueAmount.add(1)],
emitted: true,
},
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

i don't think this should fire?

test/Revenues.test.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@julianmrodri julianmrodri left a comment

Choose a reason for hiding this comment

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

Looks good overall. Left some comments.

emitted: true,
},
{
contract: token1,
Copy link
Contributor

Choose a reason for hiding this comment

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

We dont need the args param if we are checking for emitted = false, maybe thats the confusion.

} else if (address(tokenToBuy) == address(main.rToken())) {
require(revTotals.rTokenTotal == 0, "rTokenTotal > 0");
} else {
revert("invalid tokenToBuy");
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not going to be covered with our default tests. So we can either deploy a standalone mock case with a RevTrader initialized to another tokenToBuy (not generally what we do in most tests as it would not be our "interface") or we add the untestable comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding the comment

@tbrent tbrent merged commit e85ed27 into 3.0.0-rc5 Aug 2, 2023
8 checks passed
@tbrent tbrent deleted the zero-distribution branch August 2, 2023 16:28
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.

None yet

3 participants