Skip to content

Commit

Permalink
genesis_decode
Browse files Browse the repository at this point in the history
#13
  • Loading branch information
WizardsOrb committed Nov 12, 2019
1 parent f67d917 commit 5d09d06
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion __main__.py
Expand Up @@ -14,7 +14,7 @@
(10) Show Message Log (11) Show Node stats (12) Show Established Peers
(13) Show Blockchain Size (14) Show Leader Logs (15) Show Settings
(16) Aggregate Blocks Produced (17) Stake Distribution
(16) Aggregate Blocks Produced (17) Stake Distribution (18) Genesis Decode
(v) Show Versions (i) View User Info (f) View Config File
(e) Export All Accounts (c) Clear Screen (q) Quit
Expand Down Expand Up @@ -251,6 +251,10 @@ def run(self):
self.clear()
analyze.distribution()

if choice == '18': # Genesis Decode.
self.clear()
print(casper.cli.genesis_decode())

if choice == 'f': # Show Versions.
self.clear()
pprint.pprint(settings)
Expand Down
6 changes: 6 additions & 0 deletions casper/cli.py
Expand Up @@ -119,6 +119,12 @@ def message_logs(self, parse=False):
except:
return

def genesis_decode(self):
decoded_genesis = self._run(
f"curl -s {self.node}/api/v0/block/{self.genesis} | jcli genesis decode"
)
return decoded_genesis

def create_acct(self):
''' Create Secret Key, Public Key and Account Address '''

Expand Down

0 comments on commit 5d09d06

Please sign in to comment.