Created
October 11, 2023 19:48
-
-
Save Benhawkins18/5a917c76f84fcd3b067ac2503527a137 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
## Must have solana CLI installed for this to work | |
import json | |
import subprocess | |
command_output = subprocess.check_output(["solana", "stakes", "--output", "json"]) | |
stakes = json.loads(command_output) | |
total_sfdp_stake = 0 | |
for stake in stakes: | |
if stake["withdrawer"] == "4ZJhPQAgUseCsWhKvJLTmmRRUV74fdoTpQLNfKoekbPY": | |
total_sfdp_stake += stake.get("delegatedStake",0) / 10**9 ### Lamports to SOL | |
print(total_sfdp_stake) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment