Skip to content

Commit 6257a99

Browse files
committed
Internal init function for parent contracts
1 parent 9a9757c commit 6257a99

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/contracts/tokens/ERC1155Upgradeable/ERC1155MetadataUpgradeable.sol

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ contract ERC1155MetadataUpgradeable is Initializable, IERC1155Metadata, ERC165 {
2323
* @dev This function should be called once immediately after deployment.
2424
*/
2525
function initialize(string memory _name, string memory _baseURI) public virtual initializer {
26+
_ERC1155MetadataUpgradeable_init(_name, _baseURI);
27+
}
28+
29+
/**
30+
* @notice Set the initial name and base URI.
31+
* @dev Use this function when extending the contract.
32+
*/
33+
function _ERC1155MetadataUpgradeable_init(string memory _name, string memory _baseURI) internal virtual onlyInitializing {
2634
_setContractName(_name);
2735
_setBaseMetadataURI(_baseURI);
2836
}

0 commit comments

Comments
 (0)