-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #600 from LimeChain/593-retrieve-genesis-slot
Implement Genesis Slot Number Retrieval
- Loading branch information
Showing
7 changed files
with
166 additions
and
49 deletions.
There are no files selected for viewing
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
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
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
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
19 changes: 19 additions & 0 deletions
19
src/main/java/com/limechain/runtime/RuntimeStorageKey.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.limechain.runtime; | ||
|
||
import com.limechain.trie.structure.nibble.Nibbles; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
// All available keys can be found here: https://www.shawntabrizi.com/substrate-known-keys/ | ||
// Keys are encoded using 'xxHash' algorithm, and we use directly the encoded value | ||
@Getter | ||
@AllArgsConstructor | ||
public enum RuntimeStorageKey { | ||
GENESIS_SLOT("0x1cb6f36e027abb2091cfb5110ab5087f678711d15ebbceba5cd0cea158e6675a"); | ||
|
||
private final String encodedKey; | ||
|
||
public Nibbles getNibbles() { | ||
return Nibbles.fromHexString(this.getEncodedKey()); | ||
} | ||
} |
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
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