Created
November 18, 2018 18:54
-
-
Save ylv-io/a3b167b0d45f32884391aae5f80c94b0 to your computer and use it in GitHub Desktop.
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
contract Calc { | |
bytes32 public one; | |
uint public index; | |
uint public length; | |
bytes32 public lengthBytes; | |
function getIndex() { | |
one = keccak256(bytes32(1)); | |
index = 2 ** 256 - 1 - uint(one) + 1; | |
} | |
function getLength() { | |
length = 2 ** 200 + 1; | |
lengthBytes = bytes32(length); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment