SHARE
TWEET

Untitled

a guest Sep 16th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * SPDX-License-Identitifer:    MIT
  3.  */
  4.  
  5. pragma solidity ^0.4.24;
  6.  
  7.  
  8. contract APMNamehash {
  9.     /* Hardcoded constants to save gas
  10.     bytes32 internal constant APM_NODE = keccak256(abi.encodePacked(ETH_TLD_NODE, keccak256(abi.encodePacked("aragonpm"))));
  11.     */
  12.     bytes32 internal constant APM_NODE = 0x9065c3e7f7b7ef1ef4e53d2d0b8e0cef02874ab020c1ece79d5f0d3d0111c0ba;
  13.  
  14.     function apmNamehash(string name) public pure returns (bytes32) {
  15.         return keccak256(abi.encodePacked(APM_NODE, keccak256(bytes(name))));
  16.     }
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top