Skip to content

Commit

Permalink
Removes annoying warnings about unused variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
steven2308 committed Jan 4, 2024
1 parent e249890 commit 4d6e16a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion contracts/RMRK/extension/RMRKRoyalties.sol
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ abstract contract RMRKRoyalties {
uint256 tokenId,
uint256 salePrice
) external view virtual returns (address receiver, uint256 royaltyAmount) {
// tokenId is ignored as the royalty is the same for all tokens
uint256(tokenId); // Silence the warning about unused variable, needed for docs generation
receiver = _royaltyRecipient;
royaltyAmount = (salePrice * _royaltyPercentageBps) / 10000;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ abstract contract RMRKSoulboundAfterTransactions is RMRKSoulbound {
address to,
uint256 tokenId
) internal virtual {
// to
address(to); // Silence the warning about unused variable, needed for docs generation
// We won't count minting:
if (from != address(0)) {
_transfersPerToken[tokenId]++;
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/OwnableMintableERC721Mock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ pragma solidity ^0.8.21;
/// @dev This mock smart contract is intended to be used with `@defi-wonderland/smock` and doesn't need any business
/// logic.
contract OwnableMintableERC721Mock {
function owner() public returns (address) {
function owner() public pure returns (address) {
return address(0);
}

function ownerOf(uint256 tokenId) public returns (address) {
function ownerOf(uint256) public pure returns (address) {
return address(0);
}
}
12 changes: 0 additions & 12 deletions docs/console.md

This file was deleted.

0 comments on commit 4d6e16a

Please sign in to comment.