Skip to content

Conversation

@hanzel98
Copy link
Contributor

@hanzel98 hanzel98 commented Apr 21, 2025

What?

  • Refactored the NativeToken, ERC20, ERC721, ERC1155 BalanceGte enforcers to BalanceChange. This new version allows to check for a minimum increase and a maximum decrease in the balance between the before and after hooks.

Why?

  • This allows for more flexibility on the enforcers. We needed the version validating the decrease; it makes more sense to use a flag and share the logic.

How?

  • Using a boolean flag in the terms, the user can decide to validate whether the balance has increased or decreased.

@hanzel98 hanzel98 requested a review from a team as a code owner April 21, 2025 19:22
@hanzel98 hanzel98 requested a review from McOso April 21, 2025 19:24
@hanzel98 hanzel98 self-assigned this Apr 21, 2025
Copy link

@matallui matallui left a comment

Choose a reason for hiding this comment

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

Overall looks pretty good. Just had a couple of suggestions, mostly around updating the wording all around and maybe make the selection byte a isDecrease rather than a shouldIncrease.

McOso
McOso previously approved these changes Apr 22, 2025
Copy link
Member

@McOso McOso 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!

matallui
matallui previously approved these changes Apr 22, 2025
Copy link

@matallui matallui left a comment

Choose a reason for hiding this comment

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

LGTM

@hanzel98 hanzel98 merged commit 4aefa33 into main Apr 24, 2025
4 checks passed
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.

4 participants