Skip to content

Instantly share code, notes, and snippets.

@CJ42
Created January 12, 2023 15:55
Show Gist options
  • Select an option

  • Save CJ42/dddcf0fb8cdc788fbe640f8a5f9df8a4 to your computer and use it in GitHub Desktop.

Select an option

Save CJ42/dddcf0fb8cdc788fbe640f8a5f9df8a4 to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
contract Constant {
uint48 constant private A = 25;
constructor() {
uint256 readConstantA = A + 2;
}
function getA() public pure returns (uint48) {
return A;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment