Skip to content

Commit

Permalink
chore: use capitalized SNAKE_CASE for total supply immutable
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ42 committed Sep 13, 2023
1 parent 40e150a commit 920bd72
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ abstract contract LSP7CappedSupply is LSP7DigitalAsset {
error LSP7CappedSupplyCannotMintOverCap();

// --- Storage
uint256 private immutable _tokenSupplyCap;
uint256 private immutable _TOKEN_SUPPLY_CAP;

/**
* @notice Deploying a `LSP7CappedSupply` token contract with max token supply cap set to `tokenSupplyCap_`.
Expand All @@ -41,21 +41,21 @@ abstract contract LSP7CappedSupply is LSP7DigitalAsset {
revert LSP7CappedSupplyRequired();
}

_tokenSupplyCap = tokenSupplyCap_;
_TOKEN_SUPPLY_CAP = tokenSupplyCap_;
}

// --- Token queries

/**
* @notice The maximum supply amount of tokens allowed to exist is `_tokenSupplyCap`.
* @notice The maximum supply amount of tokens allowed to exist is `_TOKEN_SUPPLY_CAP`.
*
* @dev Get the maximum number of tokens that can exist to circulate. Once {totalSupply} reaches
* reaches {totalSuuplyCap}, it is not possible to mint more tokens.
*
* @return The maximum number of tokens that can exist in the contract.
*/
function tokenSupplyCap() public view virtual returns (uint256) {
return _tokenSupplyCap;
return _TOKEN_SUPPLY_CAP;
}

// --- Transfer functionality
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ abstract contract LSP8CappedSupply is LSP8IdentifiableDigitalAsset {
error LSP8CappedSupplyCannotMintOverCap();

// --- Storage
uint256 private immutable _tokenSupplyCap;
uint256 private immutable _TOKEN_SUPPLY_CAP;

/**
* @notice Deploying a `LSP8CappedSupply` token contract with max token supply cap set to `tokenSupplyCap_`.
Expand All @@ -43,21 +43,21 @@ abstract contract LSP8CappedSupply is LSP8IdentifiableDigitalAsset {
revert LSP8CappedSupplyRequired();
}

_tokenSupplyCap = tokenSupplyCap_;
_TOKEN_SUPPLY_CAP = tokenSupplyCap_;
}

// --- Token queries

/**
* @notice The maximum supply amount of tokens allowed to exist is `_tokenSupplyCap`.
* @notice The maximum supply amount of tokens allowed to exist is `_TOKEN_SUPPLY_CAP`.
*
* @dev Get the maximum number of tokens that can exist to circulate. Once {totalSupply} reaches
* reaches {totalSuuplyCap}, it is not possible to mint more tokens.
*
* @return The maximum number of tokens that can exist in the contract.
*/
function tokenSupplyCap() public view virtual returns (uint256) {
return _tokenSupplyCap;
return _TOKEN_SUPPLY_CAP;
}

// --- Transfer functionality
Expand Down

0 comments on commit 920bd72

Please sign in to comment.