Created
May 27, 2022 13:58
-
-
Save staccDOTsol/2ac22e33aa0a13402d7854fa2cdbcc9b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
curl https://rpc.theindex.io/mainnet-beta/kekgetyourown -X POST -H "Content-Type: application/json" -d '{ | |
"jsonrpc": "2.0", | |
"id": 1, | |
"method": "getProgramAccounts", | |
"params": [ | |
"cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ" | |
] | |
}' -o cmv1.csv |
This file contains hidden or 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
curl https://rpc.theindex.io/mainnet-beta/kekgetyourown -X POST -H "Content-Type: application/json" -d '{ | |
"jsonrpc": "2.0", | |
"id": 1, | |
"method": "getProgramAccounts", | |
"params": [ | |
"cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ" | |
] | |
}' -o cmv2.csv |
This file contains hidden or 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
import json | |
with open ('./cmv1.csv', 'r') as f: | |
blarg = json.loads(f.read()) | |
print('unrefunded cmv1 cms:') | |
print (len(blarg['result'])) | |
cmv1lamports = 0 | |
for bla in blarg['result']: | |
cmv1lamports = cmv1lamports + int(bla['account']['lamports']) / 1000000000 | |
print ('sols left unrefunded in cmv1 (still even tho shit cannot be started no longer all y\'all): ') | |
print(cmv1lamports) | |
with open ('./cmv2.csv', 'r') as f: | |
blarg2 = json.loads(f.read()) | |
print('unrefunded cmv2 cms:') | |
print (len(blarg2['result'])) | |
cmv2lamports = 0 | |
for bla in blarg2['result']: | |
cmv2lamports = cmv2lamports + int(bla['account']['lamports']) / 1000000000 | |
print ('sols left unrefunded in cmv2: ') | |
print(cmv2lamports) | |
print('sol be $41.79 (eh, snapshot, suck it)') | |
print('total sols: ') | |
sols = cmv2lamports + cmv2lamports | |
print(sols) | |
print('what be that in dollhairs tho stacc? the ppl think in fiat') | |
print(sols * 41.79) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment