Immutable

Variables declared immutable are like constants, except their value can be set inside the constructor.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

contract Immutable {
    // Write your code here
    address public immutable owner;
    
    constructuor(){
        owner = msg.sender
    }
}

Last updated

Was this helpful?