Skip to content

Conversation

@luziusmeisser
Copy link

Created an interface that contains all mandatory functionality according to the specifications.

  • Add functions with name "freeze" and "unfreeze" to the reference implementation (is in specification, but not in reference implementation)
  • Add function "isFrozen" to list of mandatory functions (makes sense if there is freeze)
  • Add function termsURI to the mandatory function (that's the minimum to be compliant with the law)

I did not add pause, unpause and deactivateContract to the mandatory interface as I think the standard should be open to alternative approaches.

Created an interface that contains all mandatory functionality according to the specifications.

- Add functions with name "freeze" and "unfreeze" to the reference implementation (is in specification, but not in reference implementation)
- Add function "isFrozen" to list of mandatory functions (makes sense if there is freeze)
- Add function termsURI to the mandatory function (that's the minimum to be compliant with the law)

I did not add pause, unpause and deactivateContract to the mandatory interface as I think the standard should be open to alternative approaches.
Also renamed parameter "bool freeze" to "bool frozen" in some functions to prevent shadow warnings. Also, generally, bool parameters should be named with adjectives, whereas functions should be verbs.
@rya-sge
Copy link
Collaborator

rya-sge commented Aug 15, 2025

Hello Luzius,

Thanks a lot for your PR, very cool initiative.

Just some quick comment:

  1. freeze, unfreeze were renamed in setAddressFrozen (EnforcementModule.sol#L35) to match ERC-3643 standard.

  2. Could make sense

  3. Could make sense to provide a ready-only function for termsURI similar to the read-only hash function for termsHash (ERC-7551 deployment version) like you did in your PR

Although I see a mandatory interface as useful for clarity, the CMTAT codebase is also intended to be used in an international context and for different cases (stablecoin, structured products). In this case, the legal criteria may change.
This would also add an additional interface to those dedicated to other standards (ERC-7551, ERC-3643), further complicating the architecture linked to inheritance, resulting in multiple overrides in functions implementation

@rya-sge rya-sge mentioned this pull request Aug 15, 2025
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.

2 participants