feat(Gateway): Expose bulkSetApprovalForAll NFT#112
Conversation
Aderyn Analysis ReportThis report was generated by Aderyn, a static analysis tool built by Cyfrin, a blockchain security company. This report is not a substitute for manual audit or security review. It should not be relied upon for any purpose other than to assist in the identification of potential security vulnerabilities. Table of ContentsSummaryFiles Summary
Files Details
Issue Summary
High IssuesH-1: Unsafe Casting of integersDowncasting int/uints in Solidity can be unsafe due to the potential for data loss and unintended behavior.When downcasting a larger integer type to a smaller one (e.g., uint256 to uint128), the value may exceed the range of the target type,leading to truncation and loss of significant digits. Use OpenZeppelin's SafeCast library to safely downcast integers. 1 Found Instances
H-2: Yul block contains
|
a2f08d6 to
8c09cf4
Compare
Signed-off-by: tu-do.ron <tudo.dev@gmail.com>
setApprovalForAll NFT And burnAll
setApprovalForAll NFT And burnAllsetApprovalForAll NFT
feceb57 to
af8e715
Compare
setApprovalForAll NFTbulkSetApprovalForAll NFT
| if (msg.sender != _getProxyAdmin()) { | ||
| _checkRole(_MIGRATOR_ROLE); | ||
| } |
There was a problem hiding this comment.
Why does this function allow calls from the proxy admin?
There was a problem hiding this comment.
to support upgradeToAndCall in proposal
…contract on ronin
4037964 to
34a3c52
Compare
2c545ca to
82c2515
Compare
5f81a99 to
611ac45
Compare
This pull request introduces a new
bulkSetApprovalForAllfunction in two gateway contracts to streamline NFT approval management and adjusts the optimizer runs in the configuration file. Below is a breakdown of the most important changes:New functionality for NFT approval management:
src/mainchain/MainchainGatewayV3.sol: Added thebulkSetApprovalForAllfunction, allowing admins or migrators to grant or revoke NFT transfer permissions for multiple operators in a single transaction. The function includes input validation to ensure the arrays have matching lengths.src/ronin/gateway/RoninGatewayV3.sol: Added the samebulkSetApprovalForAllfunction as inMainchainGatewayV3, with identical functionality and validation.Configuration adjustment:
foundry.toml: Reduced theoptimizer_runsparameter from 200 to 10, likely to optimize for faster compilation during development or testing.