-
Notifications
You must be signed in to change notification settings - Fork 32
Release v3.2.0 #351
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
base: master
Are you sure you want to change the base?
Release v3.2.0 #351
Conversation
…ror when the contract is in pause
…nd update related tests
…and update documentation
Update custom error and add ERC-7943 support
…ent for batchMint and BatchBurn interface
…ison of contract addresses
Domson97
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @rya-sge
Great work on v3.2.0! I reviewed most of the changes (except automated doc) and added some comments. There could be notes not specifically addressing 3.2.0 changes, but since its my first CMTAT review here on Github I tried to dive a little deeper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific reason you are differentiating between the fungible keyword and erc20 like in these examples: IERC7943ERC20Enforcement, IERC7943FungibleTransferError. Maybe because it should be also working with erc1155?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank a lot for all the feedback!
ERC-7943 is an ERC which also works for ERC-721 and ERC-1155 and they use the terms "Fungible" for ERC-20 interface.
Good catch I should use Fungible everywhere for ERC-7943 instead of ERC-20. I will make the change
See also
ERC-7943
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Is address(0) checked anywhere (inside enforcement circuit) when adding to list? Maybe checking it could prevent gas consumption or unexpected behavior like freezing address(0) which doesn’t make sense.
_addAddressToTheListdoes not check if status actually changed. Maybe addrequire($._list[account] != status, "Status unchanged")for saving gas and only emit event if status really changes in enforcement module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback. They are indeed relevant improvement. I am just a bit concerned about the increase on the smart contract code size. We are very limited depending of the deployment version.
I don't think I will change it for this release but I have opened an issue to keep the question opened: #353
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_canTransferGenericByModuleAndRevert()will revert on failure, not return false. The if condition and return false are unreachable code- setting rule engine to address(0) disables rule checking. Is it documented somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_canTransferGenericByModuleAndRevert()
Right, thanks, I have removed the boolean return
RuleEngine => it is not really documented but for me it seems clear that if you remove the RuleEngine, all check performed through this RuleEngine will be disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a scenario where debtEngine is not set (address(0))? Functions like creditEvents()
Or debt() would return empty structs if that’s the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure to really understand but:
Debt deployment version => credit events and debt are set in the token contract
Debt Engine deployment version => credit events and debt will indeed return empty struct if the debt engine is not set
3.2.0
Added
Changed
approvefunction now reverts when the contract is paused for all deployment variants except Light (#335).Removed