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

feat: refactor batch to revert and return values #1126

Open
wants to merge 7 commits into
base: staging
Choose a base branch
from

Conversation

smol-ninja
Copy link
Member

Changelog

Regarding tests, because the batch function now returns values, I have taken a different approach to test it with Lockup functions. Please let me know if I have missed anything.

feat: return results in batch function
test: comprehensive testing for batch with Lockup
test: move allowToHook call to Integration
@smol-ninja

This comment was marked as resolved.

@smol-ninja
Copy link
Member Author

Pushed a new commit. Now, I think, we have the most comprehensive tests for batch function.

test: refactor BatchMock
test: refactor branches in batch tests
test: rename initialize function
Copy link
Member

@PaulRBerg PaulRBerg left a comment

Choose a reason for hiding this comment

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

great work, made some suggestions

tests/integration/Integration.t.sol Show resolved Hide resolved
tests/mocks/BatchMock.sol Outdated Show resolved Hide resolved
tests/unit/concrete/batch/batch.tree Outdated Show resolved Hide resolved
tests/integration/concrete/batch/batch.t.sol Outdated Show resolved Hide resolved
Copy link
Member

@andreivladbrg andreivladbrg left a comment

Choose a reason for hiding this comment

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

great work, left some comments below:

src/abstracts/Batch.sol Show resolved Hide resolved
src/abstracts/Batch.sol Outdated Show resolved Hide resolved
tests/unit/concrete/batch/batch.t.sol Show resolved Hide resolved
tests/integration/concrete/batch/batch.t.sol Outdated Show resolved Hide resolved
tests/unit/concrete/batch/batch.t.sol Show resolved Hide resolved
tests/unit/concrete/batch/batch.tree Outdated Show resolved Hide resolved
@PaulRBerg
Copy link
Member

I won't make any edits here, feel free to push a new commit to address the feedback above.

@smol-ninja
Copy link
Member Author

I have included all the suggestions. Let me know if it looks good now.

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