Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gms-1526] add ts docs to immutableerc1155 #186

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions contracts/token/erc1155/abstract/ImmutableERC1155Base.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ abstract contract ImmutableERC1155Base is OperatorAllowlistEnforced, ERC1155Perm
* Sets the default admin to `owner`
* Sets the `baseURI` and `tokenURI`
* Sets the royalty receiver and amount (this can not be changed once set)
* @param owner The address that will be granted the `DEFAULT_ADMIN_ROLE`
* @param name_ The name of the collection
* @param baseURI_ The base URI for the collection
* @param contractURI_ The contract URI for the collection
* @param _operatorAllowlist The address of the OAL
* @param _receiver The address that will receive the royalty payments
* @param _feeNumerator The percentage of the sale price that will be paid as a royalty
*/
constructor(
address owner,
Expand Down
21 changes: 21 additions & 0 deletions contracts/token/erc1155/preset/draft-ImmutableERC1155.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ contract ImmutableERC1155 is ImmutableERC1155Base {
* Sets the default admin to `owner`
* Sets the `baseURI`
* Sets the royalty receiver and amount (this can not be changed once set)
* @param owner The address that will be granted the `DEFAULT_ADMIN_ROLE`
* @param name_ The name of the collection
* @param baseURI_ The base URI for the collection
* @param contractURI_ The contract URI for the collection
* @param _operatorAllowlist The address of the OAL
* @param _receiver The address that will receive the royalty payments
* @param _feeNumerator The percentage of the sale price that will be paid as a royalty
*/
constructor(
address owner,
Expand All @@ -34,10 +41,24 @@ contract ImmutableERC1155 is ImmutableERC1155Base {

/// ===== External functions =====

/**
* @notice Mints a new token
* @param to The address that will receive the minted tokens
* @param id The id of the token to mint
* @param value The amount of tokens to mint
* @param data Additional data
*/
function safeMint(address to, uint256 id, uint256 value, bytes memory data) external onlyRole(MINTER_ROLE) {
super._mint(to, id, value, data);
}

/**
* @notice Mints a batch of new tokens with different ids to the same recipient
* @param to The address that will receive the minted tokens
* @param ids The ids of the tokens to mint
* @param values The amounts of tokens to mint
* @param data Additional data
*/
function safeMintBatch(
address to,
uint256[] calldata ids,
Expand Down
Loading