Skip to content

Commit

Permalink
[Q-1] FallbackFunction array of Claimable modules can be reduced
Browse files Browse the repository at this point in the history
  • Loading branch information
GWSzeto committed Sep 28, 2024
1 parent 5c9ceeb commit 1fed41d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/module/token/minting/ClaimableERC1155.sol
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ contract ClaimableERC1155 is
/// @notice Returns all implemented callback and fallback functions.
function getModuleConfig() external pure override returns (ModuleConfig memory config) {
config.callbackFunctions = new CallbackFunction[](2);
config.fallbackFunctions = new FallbackFunction[](5);
config.fallbackFunctions = new FallbackFunction[](4);

config.callbackFunctions[0] = CallbackFunction(this.beforeMintERC1155.selector);
config.callbackFunctions[1] = CallbackFunction(this.beforeMintWithSignatureERC1155.selector);
Expand Down
2 changes: 1 addition & 1 deletion src/module/token/minting/ClaimableERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ contract ClaimableERC20 is
/// @notice Returns all implemented callback and fallback functions.
function getModuleConfig() external pure override returns (ModuleConfig memory config) {
config.callbackFunctions = new CallbackFunction[](2);
config.fallbackFunctions = new FallbackFunction[](5);
config.fallbackFunctions = new FallbackFunction[](4);

config.callbackFunctions[0] = CallbackFunction(this.beforeMintERC20.selector);
config.callbackFunctions[1] = CallbackFunction(this.beforeMintWithSignatureERC20.selector);
Expand Down
2 changes: 1 addition & 1 deletion src/module/token/minting/ClaimableERC721.sol
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ contract ClaimableERC721 is
/// @notice Returns all implemented callback and fallback functions.
function getModuleConfig() external pure override returns (ModuleConfig memory config) {
config.callbackFunctions = new CallbackFunction[](2);
config.fallbackFunctions = new FallbackFunction[](5);
config.fallbackFunctions = new FallbackFunction[](4);

config.callbackFunctions[0] = CallbackFunction(this.beforeMintERC721.selector);
config.callbackFunctions[1] = CallbackFunction(this.beforeMintWithSignatureERC721.selector);
Expand Down

0 comments on commit 1fed41d

Please sign in to comment.