Skip to content

Resolve: Update state variables that could be declared immutable as immutable #605 #609

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

Merged
merged 3 commits into from
Jan 25, 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
2 changes: 1 addition & 1 deletion contracts/base/Staking1155Base.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import { CurrencyTransferLib } from "../lib/CurrencyTransferLib.sol";

contract Staking1155Base is ContractMetadata, Multicall, Ownable, Staking1155, ERC165, IERC1155Receiver {
/// @dev ERC20 Reward Token address. See {_mintRewards} below.
address public rewardToken;
address public immutable rewardToken;

/// @dev The address of the native token wrapper contract.
address internal immutable nativeTokenWrapper;
Expand Down
2 changes: 1 addition & 1 deletion contracts/base/Staking20Base.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { CurrencyTransferLib } from "../lib/CurrencyTransferLib.sol";

contract Staking20Base is ContractMetadata, Multicall, Ownable, Staking20 {
/// @dev ERC20 Reward Token address. See {_mintRewards} below.
address public rewardToken;
address public immutable rewardToken;

/// @dev Total amount of reward tokens in the contract.
uint256 private rewardTokenBalance;
Expand Down
4 changes: 2 additions & 2 deletions contracts/base/Staking721Base.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ import { CurrencyTransferLib } from "../lib/CurrencyTransferLib.sol";

contract Staking721Base is ContractMetadata, Multicall, Ownable, Staking721, ERC165, IERC721Receiver {
/// @dev ERC20 Reward Token address. See {_mintRewards} below.
address public rewardToken;
address public immutable rewardToken;

/// @dev The address of the native token wrapper contract.
address public nativeTokenWrapper;
address public immutable nativeTokenWrapper;

/// @dev Total amount of reward tokens in the contract.
uint256 private rewardTokenBalance;
Expand Down
2 changes: 1 addition & 1 deletion contracts/extension/Staking1155.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ abstract contract Staking1155 is ReentrancyGuard, IStaking1155 {
//////////////////////////////////////////////////////////////*/

///@dev Address of ERC1155 contract -- staked tokens belong to this contract.
address public stakingToken;
address public immutable stakingToken;

/// @dev Flag to check direct transfers of staking tokens.
uint8 internal isStaking = 1;
Expand Down
2 changes: 1 addition & 1 deletion contracts/extension/Staking721.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ abstract contract Staking721 is ReentrancyGuard, IStaking721 {
//////////////////////////////////////////////////////////////*/

///@dev Address of ERC721 NFT contract -- staked tokens belong to this contract.
address public stakingToken;
address public immutable stakingToken;

/// @dev Flag to check direct transfers of staking tokens.
uint8 internal isStaking = 1;
Expand Down
2 changes: 1 addition & 1 deletion contracts/infra/ContractPublisher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ contract ContractPublisher is IContractPublisher, ERC2771Context, AccessControlE

/// @notice Whether the contract publisher is paused.
bool public isPaused;
IContractPublisher public prevPublisher;
IContractPublisher public immutable prevPublisher;

/*///////////////////////////////////////////////////////////////
Mappings
Expand Down