Created
December 22, 2021 10:07
-
-
Save zac-williamson/dfbbfc9bf0013e5b7432fa5c238293a4 to your computer and use it in GitHub Desktop.
Expensive constants
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
contract Test { | |
bytes32 private constant CONST = keccak256(abi.encodePacked("Hello World")); | |
function bar() public pure returns (bytes32) { | |
return CONST; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment