pragma solidity ^0.8.3;
      
      contract Constants {
        address public constant MY_ADDR = y;
      
        uint public MY_UINT = x;
      }

      Javascript language logo
      SolidityConstant

      CodingBook

      The following code is a contract that defines two variables. The contract has the pragma solidity ^0.8.3; compiler flag enabled, which allows the contract to be compiled using the latest version of the Solidity programming language. The x and y variables are declared as uint variables, which means that they can hold integers.

      Shortcut: Soliditycontract.Constant

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.