-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add maxSupply to ConfigurableGuildRewardNFT
- Loading branch information
Showing
11 changed files
with
205 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
interface IMaxSupply { | ||
/// @notice The maximum number of tokens that can ever be minted. | ||
/// @return count The number of tokens. | ||
function maxSupply() external view returns (uint256 count); | ||
|
||
/// @notice Sets the maximum number of tokens that can ever be minted. | ||
/// @dev Only callable by the owner. | ||
/// @param newMaxSupply The number of tokens. | ||
function setMaxSupply(uint256 newMaxSupply) external; | ||
|
||
/// @notice Event emitted when the maxSupply is changed. | ||
/// @param newMaxSupply The number of tokens. | ||
event MaxSupplyChanged(uint256 newMaxSupply); | ||
|
||
/// @notice Error thrown when the maximum supply attempted to be set is zero. | ||
error MaxSupplyZero(); | ||
|
||
/// @notice Error thrown when the tokenId is higher than the maximum supply. | ||
/// @param maxSupply The maximum supply of the token. | ||
error MaxSupplyReached(uint256 maxSupply); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# IMaxSupply | ||
|
||
## Functions | ||
|
||
### maxSupply | ||
|
||
```solidity | ||
function maxSupply() external returns (uint256 count) | ||
``` | ||
|
||
The maximum number of tokens that can ever be minted. | ||
|
||
#### Return Values | ||
|
||
| Name | Type | Description | | ||
| :--- | :--- | :---------- | | ||
| `count` | uint256 | The number of tokens. | | ||
### setMaxSupply | ||
|
||
```solidity | ||
function setMaxSupply( | ||
uint256 newMaxSupply | ||
) external | ||
``` | ||
|
||
Sets the maximum number of tokens that can ever be minted. | ||
|
||
Only callable by the owner. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| :--- | :--- | :---------- | | ||
| `newMaxSupply` | uint256 | The number of tokens. | | ||
|
||
## Events | ||
|
||
### MaxSupplyChanged | ||
|
||
```solidity | ||
event MaxSupplyChanged( | ||
uint256 newMaxSupply | ||
) | ||
``` | ||
|
||
Event emitted when the maxSupply is changed. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| :--- | :--- | :---------- | | ||
| `newMaxSupply` | uint256 | The number of tokens. | | ||
|
||
## Custom errors | ||
|
||
### MaxSupplyZero | ||
|
||
```solidity | ||
error MaxSupplyZero() | ||
``` | ||
|
||
Error thrown when the maximum supply attempted to be set is zero. | ||
|
||
### MaxSupplyReached | ||
|
||
```solidity | ||
error MaxSupplyReached(uint256 maxSupply) | ||
``` | ||
|
||
Error thrown when the tokenId is higher than the maximum supply. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| ---- | ---- | ----------- | | ||
| maxSupply | uint256 | The maximum supply of the token. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters