Skip to content

Commit

Permalink
Internal init function for parent contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
ScreamingHawk committed May 31, 2023
1 parent 9a9757c commit 6257a99
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ contract ERC1155MetadataUpgradeable is Initializable, IERC1155Metadata, ERC165 {
* @dev This function should be called once immediately after deployment.
*/
function initialize(string memory _name, string memory _baseURI) public virtual initializer {
_ERC1155MetadataUpgradeable_init(_name, _baseURI);
}

/**
* @notice Set the initial name and base URI.
* @dev Use this function when extending the contract.
*/
function _ERC1155MetadataUpgradeable_init(string memory _name, string memory _baseURI) internal virtual onlyInitializing {
_setContractName(_name);
_setBaseMetadataURI(_baseURI);
}
Expand Down

0 comments on commit 6257a99

Please sign in to comment.