Skip to content

Instantly share code, notes, and snippets.

@TheCrazyGM
Last active April 13, 2020 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheCrazyGM/211971c52f46feb7bb510fdf741675eb to your computer and use it in GitHub Desktop.
Save TheCrazyGM/211971c52f46feb7bb510fdf741675eb to your computer and use it in GitHub Desktop.
bsting - remove all delegations that carried over from Steem to Hive
#!/usr/bin/env python3
import getpass
from pprint import pprint
from beem import Steem
from beem.account import Account
from beem.wallet import Wallet
active_wif = getpass.getpass(prompt='Active key: ')
hv = Steem(node="http://anyx.io", keys=[active_wif])
w = Wallet(steem_instance=hv)
usr = w.getAccountFromPrivateKey(active_wif)
a = Account(usr, steem_instance=hv)
deleg = a.get_vesting_delegations()
for x in deleg:
delegatee = x['delegatee']
print(f'[Dropping delegation to {delegatee} to 0]')
pprint(a.delegate_vesting_shares(delegatee, 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment