Skip to content

Instantly share code, notes, and snippets.

@emre
Created June 12, 2018 21:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emre/e46413804cb778953587cb5fe0a24db4 to your computer and use it in GitHub Desktop.
Save emre/e46413804cb778953587cb5fe0a24db4 to your computer and use it in GitHub Desktop.
approve_and_disapprove
from steem.transactionbuilder import TransactionBuilder
from steembase import operations
from steem import Steem
s = Steem(keys=["<active_wif>"])
account = "emrebeyler"
payouts = [
operations.AccountWitnessVote(**{
"account": account,
"witness": "sircork",
"approve": False,
}),
operations.AccountWitnessVote(**{
"account": account,
"witness": "noblewitness",
"approve": True,
}),]
tb = TransactionBuilder()
tb.appendOps(payouts)
tb.appendSigner(account, "active")
tb.sign()
resp = tb.broadcast()
print(resp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment