Skip to content

Commit 3f192ec

Browse files
authored
Resolve: Emit appropriate events in initialize function #604 (#610)
Emit events in initialize
1 parent 4ff7235 commit 3f192ec

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

contracts/prebuilts/token/TokenERC1155.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ contract TokenERC1155 is
173173

174174
_setupRole(METADATA_ROLE, _defaultAdmin);
175175
_setRoleAdmin(METADATA_ROLE, METADATA_ROLE);
176+
177+
emit PrimarySaleRecipientUpdated(_primarySaleRecipient);
178+
emit PlatformFeeInfoUpdated(_platformFeeRecipient, _platformFeeBps);
179+
emit DefaultRoyalty(_royaltyRecipient, _royaltyBps);
176180
}
177181

178182
/// ===== Public functions =====

contracts/prebuilts/token/TokenERC20.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ contract TokenERC20 is
112112
_setupRole(TRANSFER_ROLE, _defaultAdmin);
113113
_setupRole(MINTER_ROLE, _defaultAdmin);
114114
_setupRole(TRANSFER_ROLE, address(0));
115+
116+
emit PrimarySaleRecipientUpdated(_primarySaleRecipient);
117+
emit PlatformFeeInfoUpdated(_platformFeeRecipient, _platformFeeBps);
115118
}
116119

117120
/// @dev Returns the module type of the contract.

contracts/prebuilts/token/TokenERC721.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ contract TokenERC721 is
154154

155155
_setupRole(TRANSFER_ROLE, _defaultAdmin);
156156
_setupRole(TRANSFER_ROLE, address(0));
157+
158+
emit PrimarySaleRecipientUpdated(_saleRecipient);
159+
emit PlatformFeeInfoUpdated(_platformFeeRecipient, _platformFeeBps);
160+
emit DefaultRoyalty(_royaltyRecipient, _royaltyBps);
157161
}
158162

159163
/// ===== Public functions =====

0 commit comments

Comments
 (0)