-
Notifications
You must be signed in to change notification settings - Fork 819
Update ERC-7943: Fix examples #1340
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?
Conversation
File
|
| /// @dev Can only be called by accounts holding the `WHITELIST_ROLE`. | ||
| /// Emits a {Whitelisted} event. | ||
| /// @param account The address whose whitelist status is to be changed. | ||
| /// @param account The address whose whitelist status is to be changed. Must not be the zero address. |
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.
Since it's not enforced, I'd remove this "Must" from here.
| /// @param account The address whose whitelist status is to be changed. Must not be the zero address. | ||
| /// @param status The new whitelist status (true = whitelisted, false = not whitelisted). | ||
| function changeWhitelist(address account, bool status) external onlyRole(WHITELIST_ROLE) { | ||
| function changeWhitelist(address account, bool status) external virtual onlyRole(WHITELIST_ROLE) { |
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.
This is not virtual in uRWA20 and uRWA721, is it needed ?
|
|
||
| /// @inheritdoc IERC7943MultiToken | ||
| function getFrozenTokens(address account, uint256 tokenId) external view returns (uint256 amount) { | ||
| function getFrozenTokens(address account, uint256 tokenId) public view virtual override returns (uint256 amount) { |
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.
Now that you made me think that this is public, instead of using _frozenTokens[account] we could be using getFrozenTokens directly, and improve readability. Wdyt ?
| function forcedTransfer(address from, address to, uint256 tokenId, uint256 amount) public onlyRole(FORCE_TRANSFER_ROLE) returns(bool result) { | ||
| function forcedTransfer(address from, address to, uint256 tokenId, uint256 amount) public virtual override onlyRole(FORCE_TRANSFER_ROLE) returns(bool result) { | ||
| require(to != address(0), ERC1155InvalidReceiver(address(0))); | ||
| require(from != address(0), ERC1155InvalidSender(address(0))); |
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.
Should we add this check also in uRWA721 to make it consistent all across the three cases ?
When opening a pull request to submit a new EIP, please use the suggested template: https://github.com/ethereum/EIPs/blob/master/eip-template.md
We have a GitHub bot that automatically merges some PRs. It will merge yours immediately if certain criteria are met: