Skip to content

Instantly share code, notes, and snippets.

View janoschp's full-sized avatar
🍋
sour

mokey janoschp

🍋
sour
View GitHub Profile
@janoschp
janoschp / contracts...CalculateHash.sol
Created January 26, 2022 16:48
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.11+commit.d7f03943.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;
contract CalculateHash {
function calculateHash(uint key) external pure returns (bytes32) {
return keccak256(abi.encode(key));
}
}